File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -428,6 +428,23 @@ theorem le_implies_le_of_le_of_le {a b c d : α} [Preorder α] (hca : c ≤ a) (
428
428
a ≤ b → c ≤ d :=
429
429
fun hab ↦ (hca.trans hab).trans hbd
430
430
431
+ section PartialOrder
432
+ variable [PartialOrder α]
433
+
434
+ /-- To prove commutativity of a binary operation `○`, we only to check `a ○ b ≤ b ○ a` for all `a`,
435
+ `b`. -/
436
+ lemma commutative_of_le {f : β → β → α} (comm : ∀ a b, f a b ≤ f b a) : ∀ a b, f a b = f b a :=
437
+ fun _ _ ↦ (comm _ _).antisymm $ comm _ _
438
+
439
+ /-- To prove associativity of a commutative binary operation `○`, we only to check
440
+ `(a ○ b) ○ c ≤ a ○ (b ○ c)` for all `a`, `b`, `c`. -/
441
+ lemma associative_of_commutative_of_le {f : α → α → α} (comm : Commutative f)
442
+ (assoc : ∀ a b c, f (f a b) c ≤ f a (f b c)) :
443
+ Associative f :=
444
+ fun a b c ↦ le_antisymm (assoc _ _ _) $ by rw [comm, comm b, comm _ c, comm a]; exact assoc _ _ _
445
+
446
+ end PartialOrder
447
+
431
448
@[ext]
432
449
theorem Preorder.toLE_injective {α : Type _} : Function.Injective (@Preorder.toLE α) :=
433
450
fun A B h ↦ match A, B with
You can’t perform that action at this time.
0 commit comments