N O I L A M R Z A T I O N
I A T I O N Z A N M I I I I I I I I 2 1 4 8 1 1 1 2 - - PowerPoint PPT Presentation
I A T I O N Z A N M I I I I I I I I 2 1 4 8 1 1 1 2 - - PowerPoint PPT Presentation
O L R I A T I O N Z A N M I I I I I I I I 2 1 4 8 1 1 1 2 4 8 = 1 4 2 1 8 1 1 2 4 8 2 1 4 8 1 4 2 8 1 1 1 4 2 1 8 1 8 1 4 2 8 1 1 2 4 1 1 2 4 8 1 4 8 1 2 normalized 8 2 4 1 1 4 1 2 1
I I I I I I I I
2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1
=
2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 2 1 4 8 1 normalized
Γ ⊢ M ≡ N : A
Consistency Type-checking Unification Completeness
O
Normalization
(…many others)
⊤ ◇ ⊥ abort(M) A × B ⟨M, N⟩ fst(M) snd(M) λx.M A → B M(N) x A + B inl(M) inr(M) case(x.M; y.N; O)
(λx.M) N ≡ M[N/x] fst ⟨M, N⟩ ≡ M snd ⟨M, N⟩ ≡ N case(x.M; y.N; inl(O)) ≡ M[O/x] case(x.M; y.N; inr(O)) ≡ N[O/y]
(λx.M) N ↦ M[N/x] fst ⟨M, N⟩ ↦ M snd ⟨M, N⟩ ↦ N case(x.M; y.N; inl(O)) ↦ M[O/x] case(x.M; y.N; inr(O)) ↦ N[O/y]
M M'
β rules
λx.fst⟨x,x⟩ ≡ λx.x : A → A
◇ inl(◇) λx.x inl(λx.◇) fst(x) x(y)(z) x case(…; x)
F ≡ λx.F(x) : A → B
both sides are stuck!
P ≡ ⟨fst(P),snd(P)⟩ : A × B M ≡ ◇ : ⊤
η-expansion
all terms stuck terms
normal forms
β η
eval reify
Normalization By Evaluation
(λx.M)N (λx.M')N (λx.M')N'
steps 1 step steps
(λx.M)N {x.M}N {x.M}N'
1 step 1 step
M'[N'/x]
steps
M[N'/x]
steps … … steps
all terms
normal forms
β η
e v a l r e i f y
special domain
λx.M
{x.M}
all terms
normal forms
domain
e v a l reify
x:A, y:B, z:C ⊢ λw.w(y)
1 2 3
x:A, y:B, z:C ⊢ λw.w(y) A, B, C ⊢ λ 0(2)
2 De Bruijn indices: from the right
A, B, C ⊢ λ 3(1)
De Bruijn levels: from the le
Trick: use a different scheme in the domain
…, p:Path_.A(M;N) ⊢ p@0 ≡ M : A …, p:Path_.A(M;N) ⊢ p@1 ≡ N : A …, p:Path_.A(M;N), i=0 ⊢ p@i ≡ M : A …, p:Path_.A(M;N) ⊢ p@i : A …, p:Path_.A(M;N), i=1 ⊢ p@i ≡ N : A …, i=0 ⊢ loopi ≡ base : S1 … ⊢ loopi : S1 …, i=1 ⊢ loopi ≡ base : S1
CUBICAL
Normalization by Evaluation Hereditary Substitution
β-reduction + η-expansion
TODO: Cubical Type Theory
alternative method