Theoremvesound_datBind
Statement
theorem vesound_datBind (C : Ctx) (names : String → Option TyName) : (d : BDatBind) → (VE : ValEnv) →
(TE : TyEnv) → elabDatBind C names d = some (VE, TE) → VESound VE (datBsL d)
| [], VE, TE, h => by
simp only [elabDatBind, Option.some.injEq, Prod.mk.injEq] at h
obtain ⟨rfl, rfl⟩Proof
h
exact vesound_nil
| (c, ps, cb) :: rest, VE, TE, h => by
simp only [elabDatBind] at h
split at h
· cases h
· rename_i t _
split at h
· rename_i τs VE' TE' _ h2
split at h
· rename_i VEc h3
split at h
· simp only [Option.some.injEq, Prod.mk.injEq] at h
obtain ⟨rfl, rfl⟩ := h
simp only [datBsL]
exact vesound_modify (vesound_clos _ (vesound_conBind _ _ _ cb VEc h3))
(vesound_datBind C names rest VE' TE' h2)
· cases h
· cases h
· cases hProved 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.