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

Close open Rec to subst

Cslib.LambdaCalculus.LocallyNameless.Untyped.Term.close_openRec_to_subst

Plain-language statement

Closing then opening is equivalent to substitution.

Exact Lean statement

@[scoped grind =]
lemma close_openRec_to_subst (m n : Term Var) (x : Var) (k : ℕ) (m_lc : LC m) (n_lc : LC n) :
    m ⟦k ↜ x⟧⟦k ↝ n⟧ = m[x := n]

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
@[scoped grind =]lemma close_openRec_to_subst (m n : Term Var) (x : Var) (k : ) (m_lc : LC m) (n_lc : LC n) :    m ⟦k ↜ x⟧⟦k ↝ n⟧ = m[x := n] := by  induction m_lc generalizing k with  | abs xs t =>    have x', _ := fresh_exists <| free_union [fv] Var    simp only [closeRec_abs, openRec_abs, subst_abs]    rw [open_close x' (t⟦k+1 ↜ x⟧⟦k+1 ↝ n⟧) 0, open_close x' (t[x := n]) 0]    · grind [swap_open, =_ swap_open_fvar_close]    · grind [subst_preserve_not_fvar]    · grind [open_preserve_not_fvar]  | _ => grind
Project
Lean Computer Science Library
License
Apache-2.0
Commit
f36649cff2c9
Source
Cslib/Languages/LambdaCalculus/LocallyNameless/Untyped/Properties.lean:136-147

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