Skip to content

Completed System T Normalization Proof - #13

Open
JasonAlanVeenendaal wants to merge 4 commits into
amarmaduke:mainfrom
JasonAlanVeenendaal:main
Open

JasonAlanVeenendaal wants to merge 4 commits into
amarmaduke:mainfrom
JasonAlanVeenendaal:main

Conversation

@JasonAlanVeenendaal

Copy link
Copy Markdown

I finished the strong normalization proof of System T by completing some missing lemmas. Specifically, I proved the renaming lemmas for SnNor, SnNeu, and SnRed. I also needed to add an additional context renaming assumption to make it work. I changed the definition the data constructors of SnNor to have a Kripke relation.

Comment thread Examples/SystemT/Normalization.lean Resolved
Comment thread Examples/SystemT/Normalization.lean Outdated
(SnNor.rename (TypingRen.lift A m) h2)
| SnNor.unit => .unit
| SnNor.pair h1 h2 h3 =>
.pair (λ m' => h1 (TypingRen.comp m m') |> cast (by simp)) (SnNor.rename m h2) (SnNor.rename m h3)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use fully qualified names unless necessary, here we should be able to say m.comp m' and h2.rename m. There are many places where this can be fixed, go through and fix those.

Comment thread Examples/SystemT/Normalization.lean Resolved
Comment thread Examples/SystemT/Normalization.lean Outdated
| .zero h1 =>
have lem1 := TypingRen.lift T m
have lem2 := TypingRen.lift ℕ lem1
have lem3 := h1.rename lem2

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have extraneous lemmas; for example m.lift T can be inline, it's not a meaningful lemma.

Comment thread Examples/SystemT/Normalization.lean Resolved
Comment thread Examples/SystemT/Normalization.lean Resolved
Comment thread Examples/SystemT/Typing.lean Outdated
| inj2 t => inj2 (.rename m t)
| zero => zero
| succ t => succ (.rename m t)
| nrec (s := s') n z s => nrec (.rename m n) (.rename m z) (s.rename ((m.lift A).lift ℕ)) |> cast (by simp)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use %simp

Comment thread Examples/SystemT/Typing.lean Resolved
Comment thread Examples/SystemT/Normalization.lean Resolved
Comment thread Examples/SystemT/Normalization.lean Resolved
Comment thread Examples/SystemT/Normalization.lean Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants