Skip to content

Commit 22da988

Browse files
feat(Sym2/Order): s.inf = t.inf ∧ s.sup = t.sup ↔ s = t (#24005)
Characterize equality of two symmetric squares. In a linear order, two symmetric squares are equal if and only if they have the same infimum and supremum. Co-authored-by: Yaël Dillies <[email protected]>
1 parent c9486a6 commit 22da988

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Mathlib/Data/Sym/Sym2/Order.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,13 @@ def sortEquiv [LinearOrder α] : Sym2 α ≃ { p : α × α // p.1 ≤ p.2 } whe
4242
right_inv := Subtype.rec <| Prod.rec fun x y hxy =>
4343
Subtype.ext <| Prod.ext (by simp [hxy]) (by simp [hxy])
4444

45+
/-- In a linear order, two symmetric squares are equal if and only if
46+
they have the same infimum and supremum. -/
47+
theorem inf_eq_inf_and_sup_eq_sup [LinearOrder α] {s t : Sym2 α} :
48+
s.inf = t.inf ∧ s.sup = t.sup ↔ s = t := by
49+
induction' s with a b
50+
induction' t with c d
51+
obtain hab | hba := le_total a b <;> obtain hcd | hdc := le_total c d <;>
52+
aesop (add unsafe le_antisymm)
53+
4554
end Sym2

0 commit comments

Comments
 (0)