@@ -43,13 +43,10 @@ section Preorder
4343
4444/-- A preorder is a reflexive, transitive relation `≤` with `a < b` defined in the obvious way. -/
4545class Preorder (α : Type *) extends LE α, LT α where
46- le_refl : ∀ a : α, a ≤ a
47- le_trans : ∀ a b c : α, a ≤ b → b ≤ c → a ≤ c
46+ protected le_refl : ∀ a : α, a ≤ a
47+ protected le_trans : ∀ a b c : α, a ≤ b → b ≤ c → a ≤ c
4848 lt := fun a b => a ≤ b ∧ ¬b ≤ a
49- lt_iff_le_not_ge : ∀ a b : α, a < b ↔ a ≤ b ∧ ¬b ≤ a := by intros; rfl
50-
51- attribute [to_dual self (reorder := a c, 6 7 )] Preorder.le_trans
52- attribute [to_dual self] Preorder.lt_iff_le_not_ge
49+ protected lt_iff_le_not_ge : ∀ a b : α, a < b ↔ a ≤ b ∧ ¬b ≤ a := by intros; rfl
5350
5451instance [Preorder α] : Std.LawfulOrderLT α where
5552 lt_iff := Preorder.lt_iff_le_not_ge
@@ -69,7 +66,10 @@ variable [Preorder α] {a b c : α}
6966lemma le_rfl : a ≤ a := le_refl a
7067
7168/-- The relation `≤` on a preorder is transitive. -/
72- @[to_dual ge_trans] lemma le_trans : a ≤ b → b ≤ c → a ≤ c := Preorder.le_trans _ _ _
69+ lemma le_trans : a ≤ b → b ≤ c → a ≤ c := Preorder.le_trans _ _ _
70+
71+ @[to_dual existing le_trans]
72+ lemma ge_trans : b ≤ a → c ≤ b → c ≤ a := flip le_trans
7373
7474@[to_dual self]
7575lemma lt_iff_le_not_ge : a < b ↔ a ≤ b ∧ ¬b ≤ a := Preorder.lt_iff_le_not_ge _ _
@@ -176,18 +176,18 @@ section PartialOrder
176176
177177/-- A partial order is a reflexive, transitive, antisymmetric relation `≤`. -/
178178class PartialOrder (α : Type *) extends Preorder α where
179- le_antisymm : ∀ a b : α, a ≤ b → b ≤ a → a = b
180-
181- attribute [to_dual self (reorder := 5 6 )] PartialOrder.le_antisymm
179+ protected le_antisymm : ∀ a b : α, a ≤ b → b ≤ a → a = b
182180
183181instance [PartialOrder α] : Std.IsPartialOrder α where
184182 le_antisymm := PartialOrder.le_antisymm
185183
186184variable [PartialOrder α] {a b : α}
187185
188- @[to_dual ge_antisymm]
189186lemma le_antisymm : a ≤ b → b ≤ a → a = b := PartialOrder.le_antisymm _ _
190187
188+ @[to_dual existing le_antisymm]
189+ lemma ge_antisymm : b ≤ a → a ≤ b → a = b := flip le_antisymm
190+
191191@[to_dual eq_of_ge_of_le]
192192alias eq_of_le_of_ge := le_antisymm
193193
0 commit comments