TheoremelabDatBind_sound
Statement
theorem elabDatBind_sound (C : Ctx) (names : String → Option TyName) : (d : BDatBind) → (VE : ValEnv) →
(TE : TyEnv) → elabDatBind C names d = some (VE, TE) → ElDatBindOpt C d VE TE
| [], VE, TE, h => by simp only [elabDatBind, Option.some.injEq, Prod.mk.injEq] at h; obtain ⟨rfl, rfl⟩Proof
h; exact .opt_none
| (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' h1 h2
split at h
· rename_i VEc h3
split at h
· rename_i hc
simp only [Option.some.injEq, Prod.mk.injEq] at h
obtain ⟨rfl, rfl⟩ := h
have hr := elabDatBind_sound C names rest VE' TE' h2
obtain ⟨hne, har, hdist⟩ := hc
have hcb := elabConBind_sound _ _ cb VEc h3
cases cb with
| nil => exact absurd rfl hne
| cons kt cbr =>
cases hcb with
| opt_some hcb =>
exact .opt_some (.r_sm_datbind rfl (elabTyList_sound _ _ _ h1) hcb har hr hdist)
· cases h
· cases h
· cases hProved 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.