Skip to content

[Merged by Bors] - feat(Sym2/Order): s.inf = t.inf ∧ s.sup = t.sup ↔ s = t #24005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Mathlib/Data/Sym/Sym2/Order.lean
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,13 @@ def sortEquiv [LinearOrder α] : Sym2 α ≃ { p : α × α // p.1 ≤ p.2 } whe
right_inv := Subtype.rec <| Prod.rec fun x y hxy =>
Subtype.ext <| Prod.ext (by simp [hxy]) (by simp [hxy])

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

end Sym2
Loading