Skip to content

added general lemmas for strong normalization of untyped lambda terms…#327

Draft
WegmannDavid wants to merge 1 commit intoleanprover:mainfrom
WegmannDavid:main
Draft

added general lemmas for strong normalization of untyped lambda terms…#327
WegmannDavid wants to merge 1 commit intoleanprover:mainfrom
WegmannDavid:main

Conversation

@WegmannDavid
Copy link

… and a partially complete proof for strong norm of stlc

… and a partially complete proof for strong norm of stlc
@chenson2018 chenson2018 marked this pull request as draft February 8, 2026 18:34
@intgrah
Copy link

intgrah commented Feb 8, 2026

sn_app is relatively straight forward

lemma sn_app (t s : Term Var) :
  SN t →
  SN s →
  (∀ {t' s' : Term Var}, t ↠βᶠ t'.abs → s ↠βᶠ s' → SN (t' ^ s')) →
  SN (t.app s) := by
  intro h_sn_t h_sn_s hβ
  induction h_sn_t generalizing s with | sn t ht ih_t =>
  induction h_sn_s with | sn s hs ih_s =>
  constructor
  intro u hstep
  cases hstep with
  | beta _ _ => apply hβ <;> rfl
  | appL _ h_s_red =>
    apply ih_s _ h_s_red
    intro t' s'' hstep1 hstep2
    exact hβ hstep1 (Relation.ReflTransGen.head h_s_red hstep2)
  | appR _ h_t_red =>
    apply ih_t _ h_t_red _ (SN.sn s hs)
    intro t' s' hstep1 hstep2
    exact hβ (Relation.ReflTransGen.head h_t_red hstep1) hstep2
    ```

rw[ih_l H.1]
rw[ih_r H.2]

lemma swap_subst_fresh (M N P : Term Var) (x y : Var) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this meant to have some extra hypothesis? It is not true in general as is.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, this will require another hypothesis, but I was holding that off until later, I am not yet sure exactly how this hypothesis is best formulated. Maybe I should have put in some blank.

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.

3 participants