TLC Flashcards

1
Q

Proof by induction for ∀n ∈ N. A

A

– When x = 0 … hence A is true of 0.
– When x = k + 1, assume A holds of k
… A is true of k + 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Proof by induction for ∀R ∈ REGEXP. A

A

– When R = ε … hence A is true of ε
– When R = φ … hence A is true of φ
– When R = a … hence A is true of a
– When R is of shape (R1 + R2), assume A holds of R1 and R2 separately … A is true of (R1 + R2)
– When R is of shape (R1· R2), assume A holds of R1 and R2 separately … A is true of (R1 + R2)
– When R is of shape R∗1, assume A holds of R1… A is true of R∗1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Subterm of term M

A

Includes M itself and is any substring that is itself a term except the variable between lambda and the . if it does not occur outside this position

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Parentheses:
MN
MNP
λx.MN
λxy.M
x y (pred y)

A

(MN)
((MN)P)
(λx.(MN))
(λx.(λy.M))
((x y) (pred y))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Free variables:
FV(x)
FV(c)
FV(PQ)
FV(λx.N)

A

{x}
φ
FV(P) U FV(Q)
FV(N) \ {x}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

a-equivalence?
λx.x and λy.y
λxy.x and λyx.y
λx.xy and λx.xz

A

Yes
Yes
No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Redex/contraction pair example

A

pred Z/Z

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Confluence

A

If M ->* P and M->* Q then there exists a term N such that P->* N and Q->* N

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Unique normal forms

A

If M->* N and M->* P with N and P normal forms, then N=P

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Fixed point and example

A

Term N is a fixed point of another term M just if MN≈N e.g. id n ≈ n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Inversion

A

Suppose Γ⊢M:A is derivable then:
* If M is a variable x, then it must be that x:A ∈ Γ
* If M is a constant c, then it must be that c:A ∈ C
* If M is an application PQ, then there is a type B such that Γ ⊢ P : B → A and Γ ⊢ Q : B
* If M is an abstraction λx. P, then there are types B and C such that A = B → C, and Γ , x : B ⊢ P : C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Proof involving AVB

A

Assume A is true for first case
Assume B is true for second case
Conclude with statement that holds in both cases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Subject reduction

A

If Γ ⊢ M:A and M ->* N then Γ ⊢N:A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Progess

A

If Γ ⊢M:A then either M is a value or there is some N such that M -> N

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Well-typed programs

A

If ⊢ M:A then M does not go wrong

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

First Recursion Theorem

A

Every term has a fixed point