Elm Exactly

Theoremnone_of_not_bound

StandardElmMech/Mod/Good.lean:184, Top-level declarations · tactic proof

A binding of VE outside the names a derivation binds is none.

Statement

theorem none_of_not_bound {VE : ValEnv} {names : List String} {c : String}
    (hdom : ∀ c, (fmLookup VE c).isSome → c ∈ names) (h : c ∉ names) : fmLookup VE c = none

Proof

by
  cases hl : fmLookup VE c with
  | none => rfl
  | some w => exact absurd (hdom c (by simp [hl])) h

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

Used by

In StandardElmMech/Mod/Good.lean: The property of interfaces (Interface.Good): ME0 and the harness have it (ME0_good), a top-level declaration with distinct bound names infers an interface with it (EvalTopDec.good), a header's exposing list keeps it (EvalHeader.good), and so does every interface a module puts in the basis (EvalModule.good).

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.