Elm Exactly

Theorema38_later_import_kept

StandardElmMech/Mod/Rulings.lean:45 · term proof

A38: where two imports expose the same name, the later import's binding is kept.

Statement

theorem a38_later_import_kept :
    ∃ E, EvalImports B38 [⟨"A", "A", some (.items [.var "x"])⟩, ⟨"B", "B", some (.items [.var "x"])⟩] E ∧
         E.lookup ⟨none, "x"⟩ = some (.int 20)

Proof

⟨_, evImports_sound rfl, rfl⟩

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

Theorems it uses

About ruling A38 of the book, where the implementations disagreed or were silent and the definition decides.

In StandardElmMech/Mod/Rulings.lean: A82, A38 and A28 on programs written by hand.

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.