Elm Exactly

TheoremelabTypBinds_sound

StandardElmMech/Stat/Deterministic.lean:404, Type declarations, given the type names they generate · term proof

Statement

theorem elabTypBinds_sound (C : Ctx) : (tbs : List BTypBind) → (VEs : List ValEnv) → (TEs : List TyEnv) →
    elabTypBinds C tbs = some (VEs, TEs) → ElTypBindList C tbs VEs TEs
  | [], VEs, TEs, h => by
    simp only [elabTypBinds, Option.some.injEq, Prod.mk.injEq] at h; obtain ⟨rfl, rfl⟩

Proof

h; exact .seq_nil
  | tb :: tbs, VEs, TEs, h => by
    simp only [elabTypBinds] at h
    split at h
    · rename_i VE TE VEs' TEs' h1 h2
      simp only [Option.some.injEq, Prod.mk.injEq] at h
      obtain ⟨rfl, rfl⟩ := h
      exact .seq_cons (elabTypBind_sound C tb VE TE h1) (elabTypBinds_sound C tbs VEs' TEs' h2)
    · cases h

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

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.