TheoremlitCandidate_spec
Statement
theorem litCandidate_spec {kind i : Nat} {d : Den} (hk : kind = 0 ∨ kind = 1 ∨ kind = 2)
(h : litCandidate kind i = some d) : d.kind = kind ∧ d.inRange = trueProof
by
rcases hk with rfl | rfl | rfl
· simp only [litCandidate] at h
split at h
· rename_i hle
simp only [Option.some.injEq] at h
subst h
refine ⟨rfl, ?_⟩
simp only [Den.inRange, decide_eq_true_eq]
exact ⟨by omega, hle⟩
· cases h
· simp only [litCandidate] at h
split at h
· simp only [Option.some.injEq] at h; subst h; exact ⟨rfl, rfl⟩
· cases h
· simp only [litCandidate, Option.some.injEq] at h
subst h
exact ⟨rfl, rfl⟩Proved with tactics, which Lean expands into a proof term that its kernel checks.
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.