Elm Exactly

Theoremnot_setFails_of

StandardElmMech/Src/SynSet.lean:89, Refusals whatever the order · tactic proof

A sequence meeting the restrictions fails none of the set conditions.

Statement

theorem not_setFails_of {q : SProgram} (hm : ∀ m ∈ q.modules, ModuleOK m) (hmp : ModulesProgram q)
    (hd : ModulesDistinct q) (hio : ImportOrder q) : ¬ SetFails q

Proof

by
  rintro (⟨m, hm', h⟩ | h | ⟨m, hm', h⟩ | ⟨m, hm', mod, hmod, h1, h2⟩)
  · exact h (hm m hm')
  · exact h hmp.1
  · exact hd.2 m hm' h
  · obtain ⟨i, hi, rfl⟩ := List.getElem_of_mem hm'
    obtain ⟨j, hj, he⟩ := import_before hio hi hmod h1
    have hjl : j < q.modules.length := by omega
    simp only [List.getElem?_eq_getElem hjl, Option.map_some, Option.some.injEq] at he
    exact h2 _ (List.getElem_mem hjl) he

Proved with tactics, which Lean expands into a proof term that its kernel checks.

Theorems it uses

Used by

In StandardElmMech/Src/SynSet.lean: The restrictions of the set of a program's modules (SynOKSet) and the refusals of every order.

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.