Elm Exactly

Theoremlabels_sort_perm

StandardElmMech/Eff/Normalise.lean:82, Labels increasing as a pairwise property · term proof

Statement

theorem labels_sort_perm : ∀ fs : PFields, fs.sort.labels.Perm fs.labels
  | .nil => List.Perm.refl _
  | .cons l τ rest => (labels_insert_perm l τ _).trans ((labels_sort_perm rest).cons l)

Proof

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

In StandardElmMech/Eff/Normalise.lean: PTy.normalise (record fields sorted by label) and normalise_canon: canonical when each record's labels are distinct.

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.