Subst tm
Cslib.LambdaCalculus.LocallyNameless.Fsub.Typing.subst_tm
Plain-language statement
Term substitution within a typing.
Exact Lean statement
lemma subst_tm (der : Typing (Γ ++ ⟨X, .ty σ⟩ :: Δ) t τ) (der_sub : Typing Δ s σ) :
Typing (Γ ++ Δ) (t[X := s]) τFormal artifact
Lean source
lemma subst_tm (der : Typing (Γ ++ ⟨X, .ty σ⟩ :: Δ) t τ) (der_sub : Typing Δ s σ) : Typing (Γ ++ Δ) (t[X := s]) τ := by generalize eq : Γ ++ ⟨X, .ty σ⟩ :: Δ = Θ at der induction der generalizing Γ X case var σ' _ X' _ _ => have : Γ ++ ⟨X, .ty σ⟩ :: Δ ~ ⟨X, .ty σ⟩ :: (Γ ++ Δ) := perm_middle by_cases eq : X = X' · #adaptation_note /-- Moving from `nightly-2025-09-15` to `nightly-2025-10-19`, I've had to remove the `append_assoc` lemma from grind; without this `grind` is exploding. This requires further investigation. -/ grind [→ List.mem_dlookup, weaken_head, Env.Wf.strengthen, -append_assoc] · grind [Env.Wf.strengthen, => List.perm_dlookup] case abs => grind [abs (free_union Var), openTm_substTm_var] case tabs => grind [tabs (free_union Var), openTy_substTm_var] case let' der _ => grind [let' (free_union Var) (der eq), openTm_substTm_var] case case der _ _ => apply case (free_union Var) (der eq) <;> grind [openTm_substTm_var] all_goals grind [Env.Wf.strengthen, Ty.Wf.strengthen, Sub.strengthen]- Project
- Lean Computer Science Library
- License
- Apache-2.0
- Commit
- f36649cff2c9
- Source
- Cslib/Languages/LambdaCalculus/LocallyNameless/Fsub/Typing.lean:118-138
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
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.
Source project: Lean Computer Science Library
Person-level attribution pending.
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.
Source project: Lean Computer Science Library
Person-level attribution pending.
Buchi Family saturation
Cslib.Automata.NA.Buchi.buchiFamily_saturation
Plain-language statement
na.buchiFamily saturates the ω-language accepted by na.
Source project: Lean Computer Science Library
Person-level attribution pending.