Elm Exactly

Theorema28_written_import_replaces_default

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

A28: a written import replaces what a default import exposes: after import A exposing (Maybe(..)), Just is A's constructor, of arity 2.

Statement

theorem a28_written_import_replaces_default :
    ∃ E, EvalImports (fmPlus (Btest []) [("A", I_A28)])
           (defaultImports ++ [⟨"A", "A", some (.items [.opened "Maybe"])⟩]) E ∧
         E.lookup ⟨none, "Just"⟩ = some (.con ⟨"Just", 2⟩ [])

Proof

⟨_, evImports_sound rfl, rfl⟩

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

Theorems it uses

About ruling A28 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.