Elm Exactly

Theoremuseful_default_fwd

StandardElmMech/Stat/PatternsProof.lean:697, The three cases of a wildcard · tactic proof

Statement

theorem useful_default_fwd {tbl : ConTable} {mode : Mode} {τ : Ty} {τr : List Ty} {P : List (List PatN)}
    {qs : List PatN} : Useful tbl mode (τ :: τr) P (.wild :: qs) → Useful tbl mode τr (defaultM P) qs

Proof

by
  rintro ⟨hs, hw, hc, hn⟩
  match hs, hw, hc with
  | h :: hr, ⟨_, hwr⟩, ⟨_, hcr⟩ =>
    refine ⟨hr, hwr, hcr, fun r' hr' hc' => ?_⟩
    obtain ⟨r, hr0, hc0⟩ := defaultM_bwd h hr P ⟨r', hr', hc'⟩
    exact hn r hr0 hc0

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.