typo
[lambda.git] / topics / _week2_lambda_calculus_fine_points.mdwn
1 Fine points concerning the lambda calculus
2 ==========================================
3
4 Hankin uses the symbol
5 <code><big><big>&rarr;</big></big></code> for one-step contraction,
6 and the symbol <code><big><big>&#8608;</big></big></code> for
7 zero-or-more step reduction. Hindley and Seldin use
8 <code><big><big><big>&#8883;</big></big></big><sub>1</sub></code> and
9 <code><big><big><big>&#8883;</big></big></big></code>.
10
11 When M and N are such that there's some P that M reduces to by zero or
12 more steps, and that N also reduces to by zero or more steps, then we
13 say that M and N are **beta-convertible**. We'll write that like this:
14
15         M <~~> N
16
17 This is what plays the role of equality in the lambda calculus. Hankin
18 uses the symbol `=` for this. So too do Hindley and
19 Seldin. Personally, I keep confusing that with the relation to be
20 described next, so let's use this notation instead. Note that `M <~~>
21 N` doesn't mean that each of `M` and `N` are reducible to each other;
22 that only holds when `M` and `N` are the same expression. (Or, with
23 our convention of only saying "reducible" for one or more reduction
24 steps, it never holds.)
25
26 In the metatheory, it's also sometimes useful to talk about formulas
27 that are syntactically equivalent *before any reductions take
28 place*. Hankin uses the symbol <code>&equiv;</code> for this. So too
29 do Hindley and Seldin. We'll use that too, and will avoid using `=`
30 when discussing the metatheory. Instead we'll use `<~~>` as we said
31 above. When we want to introduce a stipulative definition, we'll write
32 it out longhand, as in:
33
34 >       T is defined to be `(M N)`.
35
36 We'll regard the following two expressions:
37
38         (\x (x y))
39
40         (\z (z y))
41
42 as syntactically equivalent, since they only involve a typographic
43 change of a bound variable. Read Hankin section 2.3 for discussion of
44 different attitudes one can take about this.
45
46 Note that neither of those expressions are identical to:
47
48         (\x (x w))
49
50 because here it's a free variable that's been changed. Nor are they identical to:
51
52         (\y (y y))
53
54 because here the second occurrence of `y` is no longer free.
55
56 There is plenty of discussion of this, and the fine points of how
57 substitution works, in Hankin and in various of the tutorials we've
58 linked to about the lambda calculus. We expect you have a good
59 intuitive understanding of what to do already, though, even if you're
60 not able to articulate it rigorously.
61
62 *       [More discussion in week 2 notes](/week2/#index1h1)
63