Elm Exactly

TheoremlabelsMatch_perm

StandardElmMech/Eff/Properties.lean:86, A76 · tactic proof

Statement

theorem labelsMatch_perm {r r' : List (String × Val)} (hp : r.Perm r') (fs : PFields) :
    labelsMatch r fs = labelsMatch r' fs

Proof

by
  unfold labelsMatch
  have hm : ∀ l, l ∈ r.map (·.1) ↔ l ∈ r'.map (·.1) := fun l => (hp.map _).mem_iff
  congr 1
  · exact Bool.eq_iff_iff.mpr (by
      simp only [List.all_eq_true]
      exact ⟨fun h x hx => h x ((hm x).mpr hx), fun h x hx => h x ((hm x).mp hx)⟩)
  · exact Bool.eq_iff_iff.mpr (by
      simp only [List.all_eq_true, List.contains_iff_mem]
      exact ⟨fun h x hx => (hm x).mp (h x hx), fun h x hx => (hm x).mpr (h x hx)⟩)

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

Used by

In StandardElmMech/Eff/Properties.lean: APPLY of the effect values has one member; the rulings A74, A76, A88 and A92; canonical payload types, the decimality of a float's exact value, and that every value of a payload type has a canonical encoding (enc_total).

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.