Elm Exactly

Theoremgood_of_entries

StandardElmMech/Mod/Good.lean:368, ME0 and the harness · term proof

An interface without record aliases has the property when every constructor its CE entries bind is bound in its VE to the same value.

Statement

theorem good_of_entries {CE : ConEnv} {VE : ValEnv}
    (h : ∀ p ∈ CE, ∀ q ∈ p.2, fmLookup VE q.1 = some q.2) : (⟨[], CE, VE⟩ : Interface).Good

Proof

⟨fun t ht => by simp at ht, fun t VEt c v h1 h2 =>
  h (t, VEt) (fmLookup_some_mem CE t VEt h1) (c, v) (fmLookup_some_mem VEt c v h2)⟩

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

Theorems it uses

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.