All proofs
Project-declaredLean 4.33.0-rc1 · mathlib@169c26b52a38

Invert abs multi App st

Cslib.LambdaCalculus.LocallyNameless.Untyped.Term.invert_abs_multiApp_st

Plain-language statement

If a term (λ M) N P_1 ... P_n reduces in a single step to Q, then Q must be one of the following forms: Q = (λ M') N P₁ ... Pₙ where M ⭢βᶠ M' or Q = (λ M) N' P₁ ... Pₙ where N ⭢βᶠ N' or Q = (λ M) N P₁' ... Pₙ' where P_i ⭢βᶠ P_i' for some i or Q = (M ^ N) P₁ ... Pₙ

Exact Lean statement

lemma invert_abs_multiApp_st {Ps} {M N Q : Term Var}
  (h_red : multiApp (M.abs.app N) Ps ⭢βᶠ Q) :
    (∃ M', M.abs ⭢βᶠ Term.abs M' ∧ Q = multiApp (M'.abs.app N) Ps) ∨
    (∃ N', N ⭢βᶠ N' ∧ Q = multiApp (M.abs.app N') Ps) ∨
    (∃ Ps', Ps ⭢lβᶠ Ps' ∧ Q = multiApp (M.abs.app N) Ps') ∨
    (Q = multiApp (M ^ N) Ps)

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma invert_abs_multiApp_st {Ps} {M N Q : Term Var}  (h_red : multiApp (M.abs.app N) Ps ⭢βᶠ Q) :    ( M', M.abs ⭢βᶠ Term.abs M'  Q = multiApp (M'.abs.app N) Ps)     ( N', N ⭢βᶠ N'  Q = multiApp (M.abs.app N') Ps)     ( Ps', Ps ⭢lβᶠ Ps'  Q = multiApp (M.abs.app N) Ps')     (Q = multiApp (M ^ N) Ps) := by  induction Ps using List.reverseRecOn generalizing M N Q with  | nil => grind only [cases Xi, multiApp]  | append_singleton Ps P ih =>    rw [multiApp_tail] at h_red    cases h_red with    | @appL _ _ P' _ P_P' =>      have : (Ps ++ [P]) ⭢lβᶠ Ps ++ [P'] := by apply listFullBeta_cons_r (.step P_P' ?_) <;> grind      grind [multiApp_tail]    | appR _ h =>      have {Ps'} (h : Ps ⭢lβᶠ Ps') : (Ps ++ [P]) ⭢lβᶠ Ps' ++ [P] := listFullBeta_cons_l h (by grind)      grind [multiApp_tail]    | base => induction Ps using List.reverseRecOn with grind [multiApp_tail]
Project
Lean Computer Science Library
License
Apache-2.0
Commit
f36649cff2c9
Source
Cslib/Languages/LambdaCalculus/LocallyNameless/Untyped/MultiApp.lean:94-111

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.33.0-rc1

Unique minimal

Cslib.Automata.DA.FinAcc.unique_minimal

Plain-language statement

The minimal DFA M accepting the language l is unique up to unique isomorphism.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

Buchi Family cover

Cslib.Automata.NA.Buchi.buchiFamily_cover

Project documentation

na.buchiFamily is a cover if na has only finitely many states. This theorem uses the Ramsey theorem for infinite graphs and does not depend on any details of na.BuchiCongruence other than that it is of finite index.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record