Elm Exactly

TheoremhostAllows_other

StandardElmMech/Prog/Invariant.lean:371, Inversions · tactic proof

Other events leave the host's state.

Statement

theorem hostAllows_other {h : Host} {hs hs' : List BVal} {a : Option Event}
    (hn : ∀ p j, a ≠ some (.inn p j)) (ho : ∀ p j, a ≠ some (.out p j)) (hh : HostAllows h hs a hs') :
    hs' = hs

Proof

by
  cases hh with
  | out_echo => exact absurd rfl (ho _ _)
  | in_echo => exact absurd rfl (hn _ _)
  | out_feed => exact absurd rfl (ho _ _)
  | in_feed => exact absurd rfl (hn _ _)
  | _ => rfl

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.