Elm Exactly

TheoremrunAt_sound

StandardElmMech/Checks.lean:389, The log statements · term proof

Statement

theorem runAt_sound : ∀ {ps : List EntryPat} {l : Log}, runAt ps l = true →
    ∃ mid post, l = mid ++ post ∧ EntryPat.HoldsAll ps mid
  | [], l, _ => ⟨[], l, rfl, trivial⟩
  | p :: ps, e :: l, h => by
    simp only [runAt, Bool.and_eq_true] at h
    obtain ⟨mid, post, h1, h2⟩

Proof

runAt_sound h.2
    exact ⟨e :: mid, post, by simp [h1], EntryPat.check_sound h.1, h2⟩
  | _ :: _, [], h => by simp [runAt] at h

Proved by a term, which Lean's kernel checks directly.

Theorems it uses

Used by

In StandardElmMech/Checks.lean: What a check states (plan decision D9): Expect (structural values) with its decider, the parser of CHECK values, CheckStmt, the log statements EntryPat, LogCheck, ExpChecks with their deciders, regular expressions Rx.

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.