Elm Exactly

TheoremisDefault_iff

StandardElmMech/Stat/Pipeline.lean:109, Copy names · tactic proof

Statement

theorem isDefault_iff (a : Assignment) : a.isDefault = true ↔ a = Assignment.default a.length

Proof

by
  simp only [Assignment.isDefault, Assignment.default, List.all_eq_true, beq_iff_eq]
  constructor
  · intro h; exact List.eq_replicate_iff.mpr ⟨rfl, h⟩
  · intro h n hn; rw [h] at hn; exact List.eq_of_mem_replicate hn

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

Used by

In StandardElmMech/Stat/Pipeline.lean: SpecOf, DynOf (in Lib.Btest for a view, Mod.Btest [] for a worker: dynBasis), ProgramSem (r:p-program), D11For; copy names, payload types and main (copyName_inj, toPTy_isSome_iff, mainKind_worker_iff, mainKind_view_iff); the pipeline theorems (specOf_of_endToEnd, programSem_of_legal).

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.