TheoremcheckTypesFix_sound
Statement
theorem checkTypesFix_sound (C : Ctx) (TE : TyEnv) (VE : ValEnv) (db : Option BDatBind) (tbs : List BTypBind)
(h : checkTypesFix C TE VE db tbs = true) : TypesOK (C.oplusTE TE) C db tbs TE VEProof
by
unfold checkTypesFix at h
cases db with
| none =>
simp only at h
split at h
· rename_i VEs TEs h1
simp only [decide_eq_true_eq] at h
obtain ⟨hne, rfl, rfl⟩ := h
exact .opt_none hne (elabTypBinds_sound _ _ _ _ h1)
· cases h
| some d =>
simp only at h
split at h
· rename_i VE' TE' VEs TEs h1 h2
simp only [Bool.and_eq_true, decide_eq_true_eq] at h
obtain ⟨hn, hne, rfl, rfl⟩ := h
have hd := elabDatBind_sound _ _ d VE' TE' h1
obtain _ | ⟨d1, ds⟩ := d
· exact absurd rfl hne
· cases hd with
| opt_some hd =>
exact .opt_some hd (namesNewB_spec _ _ hn) hne (elabTypBinds_sound _ _ _ _ h2)
· cases hProved with tactics, which Lean expands into a proof term that its kernel checks.
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.