-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.agda
125 lines (79 loc) · 3.62 KB
/
README.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
------------------------------------------------------------------------
-- A library for working with dependently typed syntax
-- Nils Anders Danielsson
------------------------------------------------------------------------
-- This library is leaning heavily on two of Conor McBride's papers:
--
-- * Type-Preserving Renaming and Substitution.
--
-- * Outrageous but Meaningful Coincidences: Dependent type-safe
-- syntax and evaluation.
-- This module gives a brief overview of the modules in the library.
module README where
------------------------------------------------------------------------
-- The library
-- Contexts, variables, context morphisms, context extensions, etc.
import deBruijn.Context
-- Parallel substitutions (defined using an inductive family).
import deBruijn.Substitution.Data.Basics
-- A map function for the substitutions.
import deBruijn.Substitution.Data.Map
-- Some simple substitution combinators. (Given a term type which
-- supports weakening and transformation of variables to terms various
-- substitutions are defined and various lemmas proved.)
import deBruijn.Substitution.Data.Simple
-- Given an operation which applies a substitution to a term,
-- satisfying some properties, more operations and lemmas are
-- defined/proved.
--
-- (This module reexports various other modules.)
import deBruijn.Substitution.Data.Application
-- A module which repackages (and reexports) the development under
-- deBruijn.Substitution.Data.
import deBruijn.Substitution.Data
-- Some modules mirroring the development under
-- deBruijn.Substitution.Data, but using substitutions defined as
-- functions rather than data.
--
-- The functional version of substitutions is in some respects easier
-- to work with than the one based on data, but in other respects more
-- awkward. I maintain both developments so that they can be compared.
import deBruijn.Substitution.Function.Basics
import deBruijn.Substitution.Function.Map
import deBruijn.Substitution.Function.Simple
-- The two definitions of substitutions are isomorphic (assuming
-- extensionality).
import deBruijn.Substitution.Isomorphic
------------------------------------------------------------------------
-- An example showing how the library can be used
-- A well-typed representation of a dependently typed language.
import README.DependentlyTyped.Term
-- Normal and neutral terms.
import README.DependentlyTyped.NormalForm
-- Instantiation of deBruijn.Substitution.Data for terms.
import README.DependentlyTyped.Term.Substitution
-- Instantiation of deBruijn.Substitution.Data for normal and neutral
-- terms.
import README.DependentlyTyped.NormalForm.Substitution
-- Normalisation by evaluation.
import README.DependentlyTyped.NBE
-- Various equality checkers (some complete, all sound).
import README.DependentlyTyped.Equality-checker
-- Raw terms.
import README.DependentlyTyped.Raw-term
-- A type-checker (sound).
import README.DependentlyTyped.Type-checker
-- A definability result: A "closed value" is the semantics of a
-- closed term if and only if it satisfies all "Kripke predicates".
import README.DependentlyTyped.Definability
-- An observation: There is a term without a corresponding syntactic
-- type (given some assumptions).
import README.DependentlyTyped.Term-without-type
-- Another observation: If the "Outrageous but Meaningful
-- Coincidences" approach is used to formalise a language, then you
-- can end up with an extensional type theory (with equality
-- reflection).
import README.DependentlyTyped.Extensional-type-theory
-- Inductively defined beta-eta-equality.
import README.DependentlyTyped.Beta-Eta
-- TODO: Add an untyped example.