TheoremtypedB_sound
Statement
theorem typedB_sound (tbl : ConTable) : ∀ (f : Nat) (τ : Ty) (p : PatN), PatN.typedB tbl f τ p = true → PTyped tbl τ p
| 0, _, _, h => by simp [PatN.typedB] at h
| _ + 1, _, .wild, _ => trivial
| _ + 1, τ, .den d, h => by
simp only [PatN.typedB, Bool.and_eq_true, beq_iff_eq] at h
exact ⟨h.1, h.2⟩
| f + 1, τ, .con k args, h => by
simp only [PatN.typedB] at h
split at h
· rename_i as has
simp only [Bool.and_eq_true, beq_iff_eq] at h
exact ⟨h.1.2, as, has, typedList_sound f as args h.2⟩
· cases hProof
Proved by a term, which Lean's kernel checks directly.
Used by
In StandardElmMech/Stat/PatternsProof.lean: The pattern decider is correct: every type is inhabited (inhabited), useful_spec, exhDec_sound, irrDec_sound.
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.