Elm Exactly

TheoremdecFields_congr

StandardElmMech/Eff/MkObj.lean:259, Lookups through `mkObj` · term proof

Statement

theorem decFields_congr : ∀ (fs : PFields) (o o' : BObj), (∀ l ∈ fs.labels, o.lookup l = o'.lookup l) →
    decFields fs o = decFields fs o'
  | .nil, _, _, _ => by simp [decFields]
  | .cons l τ rest, o, o', h => by
    simp only [decFields]
    rw [h l (by simp [PFields.labels]),
      decFields_congr rest o o' (fun l' hl' => h l' (by simp [PFields.labels, hl']))]

Proof

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

Used by

In StandardElmMech/Eff/MkObj.lean: A76: mkObj ignores the order of distinct keys (a76_mkObj_perm), a lookup finds the last binding (lookup_mkObj), and decoding ignores keys outside the record type (a76_dec_extra_key).

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.