1
+ [file]
2
+ slides.pdf
3
+ [duration]
4
+ 35
5
+ [end_user_slide]
6
+ 1
7
+ [notes]
8
+ ### 1
9
+
10
+
11
+ I'm a software developer
12
+ a number of years working on banking systems, mostly in Java, recently Scala
13
+ curious about ways of making correct and maintainable software
14
+ keep hearing about various tools that are supposed to make it easier: purity, category theory, dependent types
15
+ some of the terminology and concepts might be intimidating
16
+ fortunately, underpinning most of this is a simple formalism: lambda calculus
17
+ ### 2
18
+ This is going to be a basic introduction
19
+
20
+ I do not assume any prior computer science knowledge
21
+
22
+ If anything is not clear please ask -- it is my fault, not yours
23
+
24
+ Core topics
25
+ basics of untyped lambda calculus
26
+ programming in lambda calculus
27
+
28
+ If we have time we can do
29
+ combinatory logic
30
+ simple types; from there we can branch to:
31
+ more advanced types
32
+ Curry-Howard correspondence
33
+ ### 3
34
+ Let's start with what lambda calculus is.
35
+
36
+ >> Who knows what an AST is? Context-free grammar?
37
+
38
+ Explain:
39
+ expr ::= n | (<expr> + <expr>) | (<expr> * <expr>)
40
+
41
+ (2+(3*4))
42
+
43
+ draw AST
44
+ ### 4
45
+
46
+ Lambda terms consist of three things: variables/abstractions/applications
47
+
48
+ ### 5
49
+ This is a term that consists of a single variable, v1
50
+
51
+ >> What does its AST look like?
52
+ ### 6
53
+ A single variable node
54
+ ### 7
55
+ application of x to y
56
+
57
+ not a valid term, missing parentheses
58
+
59
+ convention: application binds to the left
60
+
61
+ >> How many nodes is AST going to have?
62
+ ### 8
63
+ The root is an application; its children are two variables, x and y
64
+ ### 9
65
+ abstraction
66
+
67
+ again, we omit redundant parentheses
68
+
69
+ full-stop is opening parenthesis that extends until the end of subterm
70
+ ### 10
71
+ abstraction has just one subterm, so the tree has two nodes
72
+ ### 11
73
+ >> What type of node is in the root of this tree?
74
+ ### 13
75
+ Take-away: lambda terms are trees with three types of nodes in them
76
+
77
+ For convenience we write them as linear expressions (as we do with arithmetics)
78
+
79
+ What operations can we perform on those trees?
80
+ ### 14
81
+ Rename variables.
82
+
83
+ Alpha-conversion.
84
+ ### 15
85
+ remove abstraction under application
86
+
87
+ beta-reduction
0 commit comments