Sorting the elements of Sym2
#
This files provides Sym2.sortEquiv
, the forward direction of which is somewhat analogous to
Multiset.sort
.
In a linear order, symmetric squares are canonically identified with ordered pairs.
Equations
Instances For
@[simp]
theorem
Sym2.sortEquiv_apply_coe
{α : Type u_1}
[LinearOrder α]
(s : Sym2 α)
:
↑(Sym2.sortEquiv s) = (s.inf, s.sup)
@[simp]
theorem
Sym2.sortEquiv_symm_apply
{α : Type u_1}
[LinearOrder α]
(p : { p : α × α // p.1 ≤ p.2 })
:
Sym2.sortEquiv.symm p = Sym2.mk ↑p