Elm Exactly

Theoremfoldl_btest_other

StandardElmMech/Mod/Properties.lean:115, The test basis (D2) · term proof

Statement

theorem foldl_btest_other : ∀ (lib : ModEnv) (B : Basis) (md : ModId), md ∉ fmDom lib →
    fmLookup (lib.foldl btestStep B) md = fmLookup B md
  | [], B, md, _ => rfl
  | (m, I) :: lib, B, md, h => by
    simp only [fmDom, List.map_cons, List.mem_cons, not_or] at h
    simp only [List.foldl_cons]
    rw [foldl_btest_other lib _ md (by simpa [fmDom] using h.2)]
    exact btestStep_other B m I md (fun e => h.1 e.symm)

Proof

Proved by a term, which Lean's kernel checks directly.

Used by

In StandardElmMech/Mod/Properties.lean: The frame lemmas (a module's derivation reads the basis only at the modules it imports) and Btest_agrees.

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.