Elm Exactly

TheoremsetFails_perm

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

Statement

theorem setFails_perm {p q : SProgram} (hp : q.modules.Perm p.modules) (h : SetFails p) : SetFails q

Proof

by
  rcases h with ⟨m, hm, h⟩ | h | ⟨m, hm, h⟩ | ⟨m, hm, mod, hmod, h1, h2⟩
  · exact .inl ⟨m, hp.mem_iff.mpr hm, h⟩
  · have hpf : (q.modules.flatMap SModule.ports).Perm (p.modules.flatMap SModule.ports) := by
      have := (hp.map SModule.ports).flatten
      rw [List.flatMap_def, List.flatMap_def]; exact this
    exact .inr (.inl fun h' => h (hpf.nodup_iff.mp h'))
  · exact .inr (.inr (.inl ⟨m, hp.mem_iff.mpr hm, h⟩))
  · exact .inr (.inr (.inr ⟨m, hp.mem_iff.mpr hm, mod, hmod, h1, fun m' hm' => h2 m' (hp.mem_iff.mp hm')⟩))

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

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.