TheoremceSwap_inj
Statement
theorem ceSwap_inj : ∀ a b, ceSwap.tvApply a = ceSwap.tvApply b → a = bProof
by
intro a b h
rw [ceSwap_apply, ceSwap_apply] at h
by_cases ha1 : a = .fresh 5 .num <;> by_cases ha2 : a = .named "number" <;>
by_cases hb1 : b = .fresh 5 .num <;> by_cases hb2 : b = .named "number" <;>
simp only [ha1, ha2, hb1, hb2, ↓reduceIte] at h <;> first | exact h | (subst_vars; rfl) | cases h | skip
all_goals simp_allProved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
In StandardElmMech/Stat/RenameCounterexample.lean: Two principal derivations of one program that specialisation once told apart (finding of 2026-11-12), kept as a regression theorem (ce_equal).
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.