Parallel Reduction diamond
Cslib.SKI.parallelReduction_diamond
Plain-language statement
The key result: the Church-Rosser property holds for ⭢ₚ. The proof is a lengthy case analysis on the reductions a ⭢ₚ a₁ and a ⭢ₚ a₂, but is entirely mechanical.
Exact Lean statement
theorem parallelReduction_diamond : Diamond ParallelReduction
Formal artifact
Lean source
theorem parallelReduction_diamond : Diamond ParallelReduction := by intro a a₁ a₂ h₁ h₂ cases h₁ case refl => exact ⟨a₂, h₂, .refl a₂⟩ case par a a' b b' ha' hb' => cases h₂ case refl => use a' ⬝ b' exact ⟨.refl (a' ⬝ b'), .par ha' hb'⟩ case par a'' b'' ha'' hb'' => let ⟨a₃, ha⟩ := parallelReduction_diamond ha' ha'' let ⟨b₃, hb⟩ := parallelReduction_diamond hb' hb'' use a₃ ⬝ b₃ constructor · exact .par ha.1 hb.1 · exact .par ha.2 hb.2 case red_I => rw [I_irreducible a' ha'] use b', .red_I b' case red_K => let ⟨a₂', ha₂'⟩ := Ka_irreducible a₂ a' ha' rw [ha₂'.2] use a₂' exact ⟨.red_K a₂' b', ha₂'.1⟩ case red_S a c => let ⟨a'', c', h⟩ := Sab_irreducible a c a' ha' rw [h.2.2] use a'' ⬝ b' ⬝ (c' ⬝ b'), .red_S a'' c' b' apply ParallelReduction.par <;> apply ParallelReduction.par <;> grind case red_I => cases h₂ case refl => use a₁; exact ⟨.refl a₁, .red_I a₁⟩ case par c a₁' hc ha => rw [I_irreducible c hc] use a₁' exact ⟨ha, .red_I a₁'⟩ case red_I => use a₁; exact ⟨.refl a₁, .refl a₁⟩ case red_K c => cases h₂ case refl => use a₁; exact ⟨.refl a₁, .red_K a₁ c⟩ case par a' c' ha hc => let ⟨a₁', h'⟩ := Ka_irreducible a₁ a' ha rw [h'.2] use a₁' exact ⟨h'.1, .red_K a₁' c'⟩ case red_K => use a₁; exact ⟨.refl a₁, .refl a₁⟩ case red_S a b c => cases h₂ case refl => use a ⬝ c ⬝ (b ⬝ c) exact ⟨.refl _, .red_S ..⟩ case par d c' hd hc => let ⟨a', b', h⟩ := Sab_irreducible a b d hd rw [h.2.2] use a' ⬝ c' ⬝ (b' ⬝ c') constructor · apply ParallelReduction.par · exact .par h.left hc · exact .par h.2.1 hc · exact .red_S .. case red_S => exact ⟨a ⬝ c ⬝ (b ⬝ c), .refl _, .refl _,⟩- Project
- Lean Computer Science Library
- License
- Apache-2.0
- Commit
- f36649cff2c9
- Source
- Cslib/Languages/CombinatoryLogic/Confluence.lean:142-205
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.