Insertion sort with exposed bodies #
Mathlib does not expose the bodies of List.orderedInsert and
List.insertionSort to other modules, so the kernel cannot reduce a
computation that sorts through them, and a decide-checked equation about a
computed relation gets stuck there. The two functions below are the same
ones, written out again with their bodies exposed. The evaluators sort
through these; each comes with a simp lemma rewriting it to Mathlib's, so
that proofs reason with Mathlib's lemmas.
Dependency graph
List.insertionSort, with an exposed body.
Equations
- List.insSort r = List.foldr (List.orderedIns r) []
Instances For
Dependency graph
@[simp]
theorem
List.orderedIns_eq
{α : Type u_1}
(r : α → α → Prop)
[DecidableRel r]
(a : α)
(l : List α)
: