Contents
Contents
Idea
This is the definition of the formal system CompLF, version 1. Actually, there were several versions between zero and one, but you’re not missing anything interesting.
Syntax
Term grammar
The main syntactic class is terms. Type expressions are terms. There are also variables and contexts.
variables (, , …) ::=
(Written as usual. Complain if you can’t tell them apart from metavariables.)
terms (, , , , , , , , …) ::=
-
(variable reference)
-
(lambda abstraction)
-
(application)
-
(identity type) (computational equivalence)
-
(equality type)
-
(“relax” type)
-
(dependent function type)
-
(family intersection type)
-
(subset/separation type)
-
(type of computations (realizers))
-
(type of “booleans”) (two-element type)
-
(PER comprehension type)
-
(type of natural numbers)
contexts (, …) ::=
|
As usual, the rules may make liberal use of informal list operations to work with contexts.
Abbreviations
Semantic Judgment Forms
Computations
The Church booleans:
Scott nats:
Type Constructors
The type constructors given in the grammar above that have subexpressions are actually abbreviations for applied constants. For example:
In particular, is the only real binding form of the language.
(beta “reduction”)
(type validity)
(element in a type) (realizer of a type)
Rules
Partially-Compatible Reduction
Miscellaneous
Relax
Equality
Identity
Functions
Intersection
Subset
Computations
Booleans
PER
Natural Numbers