Elm Exactly

Theoremsingle_get

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

Statement

theorem single_get {P : Procs} {n q : Nat} {e : PEntry} (hs : Single P n) (h : P.get q = some e) : q = n

Proof

Classical.byContradiction fun hq => by rw [hs q hq] at h; cases h

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

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.