Elm Exactly

Theoremflat_two

StandardElmMech/Prog/Invariant.lean:262, Shapes of values, checked by the kernel · tactic proof

Statement

theorem flat_two {v : Val} (h : (flat2 v).isSome = true) :
    flat v = some [((flat2 v).getD (.unit, .unit)).1, ((flat2 v).getD (.unit, .unit)).2]

Proof

by
  unfold flat2 at h ⊢
  split at h <;> simp_all

Proved with tactics, which Lean expands into a proof term that its kernel checks.

In StandardElmMech/Prog/Invariant.lean: CHECK-NOT as a statement about every execution (WorkerTest.HoldsNot), per-test invariants (TestInv, TestInv.sound, holdsNot_any), and the determinism and inversion lemmas they use.

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.