Elm Exactly

TheoremtypBinds_sk

StandardElmMech/Stat/RefuseScope.lean:1433, The skeleton of a module's interface is the same in every derivation · term proof

Statement

theorem typBinds_sk (C : Ctx) : (tbs : List BTypBind) → (VEs : List ValEnv) → (TEs : List TyEnv) →
    elabTypBinds C tbs = some (VEs, TEs) → TEs.map (FMap.mapV · skS) = tbs.map tbTeSk
  | [], VEs, TEs, h => by
    simp only [elabTypBinds, Option.some.injEq, Prod.mk.injEq] at h
    obtain ⟨rfl, rfl⟩

Proof

h
    rfl
  | 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
      simp only [List.map_cons, typBind_sk C tb VE TE h1, typBinds_sk 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/RefuseScope.lean: Refusals by scope, constructor arity and imports, for one module and for a module after a helper (scopeFailB).

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.