1
- ## Lambda Calculus
1
+ <link rel =" stylesheet " type =" text/css " href =" styles.css " >
2
+
3
+ ### Lambda Calculus
2
4
3
5
Lambda Calculus just has variables, functions, and function applications.
4
6
It is a "dynamic" language without static types.
@@ -7,7 +9,7 @@ It is a "dynamic" language without static types.
7
9
λx. x y z
8
10
```
9
11
10
- ## Simply Typed Lambda Calculus
12
+ ### Simply Typed Lambda Calculus
11
13
12
14
Types can help distinguish terms and their intended purpose.
13
15
Each type is a simple name or an arrow.
@@ -17,7 +19,7 @@ Each type is a simple name or an arrow.
17
19
f : Integer -> Integer
18
20
```
19
21
20
- ## System F
22
+ ### System F
21
23
22
24
System F adds the ability for objects to be parameterized with quantified type variables.
23
25
In LM type variables are represented with lowercase identifiers.
@@ -26,7 +28,7 @@ In LM type variables are represented with lowercase identifiers.
26
28
some : a -> Option<a>
27
29
```
28
30
29
- ## System F<:
31
+ ### System F<:
30
32
31
33
System F<: adds the ability for objects to become subtypes (<:) of a hierarchical type system.
32
34
@@ -44,7 +46,7 @@ In plural notation the subtyping relations can often be expanded to clarify a bi
44
46
(x : X+Y) <: Y # yes
45
47
```
46
48
47
- ## System F<: with Specialization
49
+ ### System F<: with Specialization
48
50
49
51
Specialization adds the ability to pun (overload) functions onto the same identifier.
50
52
Then, when applied, punned functions are "narrowed as necessary" to decide which function to apply.
@@ -53,7 +55,7 @@ $$abstraction \quad \frac{\Gamma \vdash a:A \quad \Gamma \vdash b:B \quad \Gamma
53
55
54
56
$$ application \quad \frac{\Gamma \vdash f:(A \to B) + (C \to D) + (X \to Y) \quad \Gamma \vdash x:A + X \quad f(x)}{\Gamma \vdash f(x):B + Y} $$
55
57
56
- ## Logical Propositions
58
+ ### Logical Propositions
57
59
58
60
Nominal Types can be associated with logical properties.
59
61
When a Type carries a proposition, in order to soundly fulfill that proposition two things need to be independently proven:
@@ -63,7 +65,7 @@ When a Type carries a proposition, in order to soundly fulfill that proposition
63
65
Condition 1 is already working in the type system, however condition 2 will require some significant work.
64
66
This feature is a prerequisite for fully certified builds.
65
67
66
- ## Phi Types
68
+ ### Phi Types
67
69
68
70
Many novel type systems can be expressed as Phi Types.
69
71
The term "Phi Type" comes from the more widely recognized Phi Functions in Single Static Assignment form.
0 commit comments