Skip to content

feat(locallynameless): eta-postpone - #965

Open
lengyijun wants to merge 2 commits into
leanprover:mainfrom
awesome-lambda-calculus:eta-postpone
Open

lengyijun wants to merge 2 commits into
leanprover:mainfrom
awesome-lambda-calculus:eta-postpone

Conversation

@lengyijun

Copy link
Copy Markdown
Contributor

5 version of eta-postpone theorems:

  • transgen_postpone_eta_beta: if P →ηᶠ Q and Q →βᶠ R, then there is a term
    S with P ↠β+ S and S ↠ηᶠ R.
  • commute_etastar_beta: if P ↠ηᶠ Q and Q ↠βᶠ R, then there is a term
    S with P ↠βᶠ S and S ↠ηᶠ R.
  • semiDiamondCommute_eta_beta: if P →ηᶠ Q and Q ↠β+ R, then there is a term
    S with P ↠β+ S and S ↠ηᶠ R.
  • diamondcommute_etaplus_betastar: if P ↠ηᶠ Q and Q ↠β+ R, then there is
    a term S with P ↠β+ S and S ↠ηᶠ R.
  • eta_postpone: if P ↠βηᶠ Q, then there is a term S such that
    P ↠βᶠ S and S ↠ηᶠ Q.

Ai usage:
ParEta.lean and BetaNfLc.lean are generated by @Aristotle-Harmonic

@lengyijun

lengyijun commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

@thomaskwaring Sorry for the wait. Could you please take a look at this PR?

@lengyijun
lengyijun force-pushed the eta-postpone branch 2 times, most recently from 3f7bb32 to 1de5c69 Compare September 28, 2026 04:26
@lengyijun

lengyijun commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor Author

This PR is independent of #860. However, when combined with #860, we can derive the following theorem:

theorem sn_eta_steps_iff [DecidableEq Var] [HasFresh Var]   
(steps : t ↠ηᶠ t') : SN FullBeta t <-> SN FullBeta t'

…quivalences

Introduce intermediate commutation notions between single-step and multi-step
properties:

- TransGenCommute: single r₁ + single r₂ join via TransGen r₂ and ReflTransGen r₁
- SemiDiamondCommute: single r₁ + TransGen r₂ join via TransGen r₂ and ReflTransGen r₁

Prove the corresponding implications and equivalences mirroring the existing
SemiCommute ↔ Commute development, including:
- SemiDiamondCommute ↔ DiamondCommute (ReflTransGen r₁) (TransGen r₂)
- Commute ∧ TransGenCommute ↔ SemiDiamondCommute
    5 version of eta-postpone theorems:
    * `transgen_postpone_eta_beta`: if `P →ηᶠ Q` and `Q →βᶠ R`, then there is a term
      `S` with `P ↠β+ S` and `S ↠ηᶠ R`.
    * `commute_etastar_beta`: if `P ↠ηᶠ Q` and `Q ↠βᶠ R`, then there is a term
      `S` with `P ↠βᶠ S` and `S ↠ηᶠ R`.
    * `semiDiamondCommute_eta_beta`: if `P →ηᶠ Q` and `Q ↠β+ R`, then there is a term
      `S` with `P ↠β+ S` and `S ↠ηᶠ R`.
    * `diamondcommute_etaplus_betastar`: if `P ↠ηᶠ Q` and `Q ↠β+ R`, then there is
      a term `S` with `P ↠β+ S` and `S ↠ηᶠ R`.
    * `eta_postpone`: if `P ↠βηᶠ Q`, then there is a term `S` such that
      `P ↠βᶠ S` and `S ↠ηᶠ Q`.

    Ai usage:
    `ParEta.lean` and `BetaNfLc.lean` are generated by  @Aristotle-Harmonic
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.

1 participant