Theoremuseful_default_bwd
Statement
theorem useful_default_bwd {tbl : ConTable} {mode : Mode} {τ : Ty} {τr : List Ty} {P : List (List PatN)}
{qs : List PatN} (h0 : Inh) (hh0 : IsInh tbl mode τ h0)
(hnot : ∀ r ∈ P, ∀ p rest, r = p :: rest → p.isWild = false → ¬ p.covers h0) :
Useful tbl mode τr (defaultM P) qs → Useful tbl mode (τ :: τr) P (.wild :: qs)Proof
by
rintro ⟨hr, hwr, hcr, hn⟩
refine ⟨h0 :: hr, ⟨hh0, hwr⟩, ⟨trivial, hcr⟩, fun r hr0 hc0 => ?_⟩
obtain ⟨r', hr', hc'⟩ := defaultM_fwd h0 hr P hnot ⟨r, hr0, hc0⟩
exact hn r' hr' hc'Proved with tactics, which Lean expands into a proof term that its kernel checks.
Theorems it uses
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.