Elm Exactly

TheoremelabImports_sound

StandardElmMech/Stat/Deterministic.lean:243, Exposing lists and imports · term proof

Statement

theorem elabImports_sound (B : SBasis) : (is : List BImport) → (π π' : ProvMap) →
    elabImports B π is = some π' → ElImports B π is π'
  | [], π, π', h => by simp only [elabImports, Option.some.injEq] at h; subst h; exact .r_sm_imports_empty
  | i :: is, π, π', h => by
    simp only [elabImports] at h
    split at h
    · cases h
    · rename_i I hI
      split at h
      · rename_i hex
        have

Proof

elabImports_sound B is _ π' h
        refine .r_sm_imports_import (NN := none) hI ?_ ?_
        · rw [hex]; exact .opt_none
        · exact this
      · rename_i el hex
        split at h
        · rename_i N N' hel
          refine .r_sm_imports_import (NN := some (N, N')) hI ?_ (elabImports_sound B is _ π' h)
          rw [hex]; exact .opt_some (elabExpList_sound _ el _ hel)
        · cases h

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

Rules of the book it uses

Theorems it uses

Used by

In StandardElmMech/Stat/Deterministic.lean: The deterministic parts as functions, each sound for its relation: type expressions, imports and exposing, type declarations given their names (checkTypes), ports.

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.