TheoremlibCheck_sound
Statement
theorem libCheck_sound : ∀ (B : Basis) (ss : List ModSrc), libCheckB B ss = true →
EvalLib B (ss.map ModSrc.toModule) (libFrom B ss)
| B, [], _ => .nil B
| B, s :: ss, h => by
simp only [libCheckB, Bool.and_eq_true] at h
obtain ⟨h1, h2⟩Proof
h
have ih := libCheck_sound _ ss h2
simp only [List.map_cons, libFrom]
rcases hr : evLibModule B s.toModule with _ | ⟨mid, I, VE⟩
· rw [hr] at h1; cases h1
· rw [hr] at h1
simp only [Bool.and_eq_true, beq_iff_eq, List.isEmpty_iff] at h1
obtain ⟨⟨rfl, hRA⟩, hCE⟩ := h1
have hI : Interface.ofVE (modVE B s.toModule) = I := by
obtain ⟨RA, CE, VE'⟩ := I
simp only at hRA hCE
subst hRA; subst hCE
simp [modVE, hr, Interface.ofVE]
rw [hI] at ih ⊢
exact .cons B _ _ _ I VE _ (evLibModule_sound hr) ihProved by a term, which Lean's kernel checks directly.
Theorems it uses
Used by
In StandardElmMech/Lib/Library.lean: The core library values written in Elm (plans/library-elm-texts.md): libME, the interfaces Chapter 7's rules give the library modules of Generated/Library.lean, evaluated in order in ME0 (libME_eval: each module's derivation by r:dm-module, from the evaluator's soundness); Lib.Btest, the dynamic test basis with the library (Mod.Btest libME), in which the view programs' theorems are stated. Only a value a program looks up is evaluated.
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.