Elm Exactly

TheoremsortByKey_sorted

StandardElmMech/Eff/MkObj.lean:65, Sorting by insertion · term proof

Statement

theorem sortByKey_sorted : ∀ l : List Bind, (sortByKey l).Pairwise KeyLe
  | [] => List.Pairwise.nil
  | b :: l => insertByKey_sorted b _ (sortByKey_sorted l)

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.