Typing progress
Cslib.LambdaCalculus.LocallyNameless.Fsub.Typing.progress
Plain-language statement
Any typable term either has a reduction step or is a value.
Exact Lean statement
lemma Typing.progress (der : Typing [] t τ) : t.Value ∨ ∃ t', t ⭢βᵛ t'
Formal artifact
Lean source
lemma Typing.progress (der : Typing [] t τ) : t.Value ∨ ∃ t', t ⭢βᵛ t' := by generalize eq : [] = Γ at der have der' : Typing Γ t τ := der induction der <;> subst eq case var mem => grind case app t₁ _ _ t₂ l r ih_l ih_r => right cases ih_l rfl l with | inl val_l => cases ih_r rfl r with | inl val_r => have ⟨σ, t₁, eq⟩ := l.canonical_form_abs val_l exists t₁ ^ᵗᵗ t₂ grind | inr red_r => obtain ⟨t₂', _⟩ := red_r exists t₁.app t₂' grind | inr red_l => obtain ⟨t₁', _⟩ := red_l exists t₁'.app t₂ grind case tapp σ' der _ ih => right specialize ih rfl der cases ih with | inl val => obtain ⟨_, t, _⟩ := der.canonical_form_tabs val exists t ^ᵗᵞ σ' grind | inr red => obtain ⟨t', _⟩ := red exists .tapp t' σ' grind case let' t₁ σ t₂ τ L der _ ih _ => right cases ih rfl der with | inl _ => exists t₂ ^ᵗᵗ t₁ grind | inr red => obtain ⟨t₁', _⟩ := red exists t₁'.let' t₂ grind case inl der _ ih => cases (ih rfl der) with | inl val => grind | inr red => right obtain ⟨t', _⟩ := red exists .inl t' grind case inr der _ ih => cases (ih rfl der) with | inl val => grind | inr red => right obtain ⟨t', _⟩ := red exists .inr t' grind case case t₁ _ _ t₂ _ t₃ _ der _ _ ih _ _ => right cases ih rfl der with | inl val => have ⟨t₁, lr⟩ := der.canonical_form_sum val cases lr <;> [exists t₂ ^ᵗᵗ t₁; exists t₃ ^ᵗᵗ t₁] <;> grind | inr red => obtain ⟨t₁', _⟩ := red exists t₁'.case t₂ t₃ grind case sub => grind case abs σ _ τ L _ _=> left constructor apply LC.abs L · grind only [→ wf, cases Term.LC] · grind only [→ wf] case tabs L _ _=> left constructor apply LC.tabs L · grind only [→ wf, cases Term.LC] · grind only [→ wf]- Project
- Lean Computer Science Library
- License
- Apache-2.0
- Commit
- f36649cff2c9
- Source
- Cslib/Languages/LambdaCalculus/LocallyNameless/Fsub/Safety.lean:76-158
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.