Skip to content

Commit b07a584

Browse files
committed
chore: rename mul_le_mul_right' to mul_le_mul_left (leanprover-community#30242)
1 parent 49c3430 commit b07a584

File tree

121 files changed

+421
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+421
-482
lines changed

Archive/Wiedijk100Theorems/CubingACube.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ theorem smallest_onBoundary {j} (bi : OnBoundary (mi_mem_bcubes : mi h v ∈ _)
349349
intro i' hi' i'_i h2i'; constructor
350350
· apply le_trans h2i'.1
351351
simp [i, hw']
352-
apply lt_of_lt_of_le (add_lt_add_left (mi_strict_minimal i'_i.symm hi') _)
352+
apply lt_of_lt_of_le (add_lt_add_right (mi_strict_minimal i'_i.symm hi') _)
353353
simp [i, bi.symm, b_le_b hi']
354354
let s := bcubes cs c \ {i}
355355
have hs : s.Nonempty := by

Counterexamples/OrderedCancelAddCommMonoidWithBounds.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ The same applies to any superclasses, e.g. combining `StrictOrderedSemiring` wit
1616

1717
example {α : Type*} [AddCommMonoid α] [PartialOrder α] [IsOrderedCancelAddMonoid α]
1818
[BoundedOrder α] [Nontrivial α] : False :=
19-
have top_pos := pos_of_lt_add_right (bot_le.trans_lt (add_lt_add_left bot_lt_top (⊥ : α)))
19+
have top_pos := pos_of_lt_add_right (bot_le.trans_lt (add_lt_add_right bot_lt_top (⊥ : α)))
2020
have top_add_top_lt_self := lt_add_of_le_of_pos (@le_top _ _ _ (⊤ + ⊤)) top_pos
2121
top_add_top_lt_self.false

Mathlib/Algebra/Algebra/Operations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ theorem one_mem_div {I J : Submodule R A} : 1 ∈ I / J ↔ J ≤ I := by
819819
rw [← one_le, le_div_iff_mul_le, one_mul]
820820

821821
theorem le_self_mul_one_div {I : Submodule R A} (hI : I ≤ 1) : I ≤ I * (1 / I) := by
822-
simpa using mul_le_mul_left' (one_le_one_div.mpr hI) _
822+
simpa using mul_le_mul_right (one_le_one_div.mpr hI) _
823823

824824
theorem mul_one_div_le_one {I : Submodule R A} : I * (1 / I) ≤ 1 := by
825825
rw [Submodule.mul_le]

Mathlib/Algebra/Group/UniqueProds/Basic.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,9 @@ instance (priority := 100) of_covariant_right [IsRightCancelMul G]
586586
have : UniqueMul A B a0 b0 := by
587587
intro a b ha hb he
588588
obtain hl | rfl | hl := lt_trichotomy b b0
589-
· exact ((he0 ▸ he ▸ mul_lt_mul_left' hl a).not_ge <| le_max' _ _ <| mul_mem_mul ha hb0).elim
589+
· exact ((he0 ▸ he ▸ mul_lt_mul_right hl a).not_ge <| le_max' _ _ <| mul_mem_mul ha hb0).elim
590590
· exact ⟨mul_right_cancel he, rfl⟩
591-
· exact ((he0 ▸ mul_lt_mul_left' hl a0).not_ge <| le_max' _ _ <| mul_mem_mul ha0 hb).elim
591+
· exact ((he0 ▸ mul_lt_mul_right hl a0).not_ge <| le_max' _ _ <| mul_mem_mul ha0 hb).elim
592592
refine ⟨_, mk_mem_product ha0 hb0, _, mk_mem_product ha1 hb1, fun he ↦ ?_, this, ?_⟩
593593
· rw [Prod.mk_inj] at he; rw [he.1, he.2, he1] at he0
594594
obtain ⟨⟨a2, b2⟩, h2, hne⟩ := exists_mem_ne hc (a0, b0)
@@ -597,9 +597,9 @@ instance (priority := 100) of_covariant_right [IsRightCancelMul G]
597597
exact Prod.ext_iff.mpr (this h2.1 h2.2 he.symm)
598598
· intro a b ha hb he
599599
obtain hl | rfl | hl := lt_trichotomy b b1
600-
· exact ((he1 ▸ mul_lt_mul_left' hl a1).not_ge <| min'_le _ _ <| mul_mem_mul ha1 hb).elim
600+
· exact ((he1 ▸ mul_lt_mul_right hl a1).not_ge <| min'_le _ _ <| mul_mem_mul ha1 hb).elim
601601
· exact ⟨mul_right_cancel he, rfl⟩
602-
· exact ((he1 ▸ he ▸ mul_lt_mul_left' hl a).not_ge <| min'_le _ _ <| mul_mem_mul ha hb1).elim
602+
· exact ((he1 ▸ he ▸ mul_lt_mul_right hl a).not_ge <| min'_le _ _ <| mul_mem_mul ha hb1).elim
603603

604604
open MulOpposite in
605605
-- see Note [lower instance priority]
@@ -613,7 +613,7 @@ instance (priority := 100) of_covariant_left [IsLeftCancelMul G]
613613
TwoUniqueProds G :=
614614
let _ := LinearOrder.lift' (unop : Gᵐᵒᵖ → G) unop_injective
615615
let _ : MulLeftStrictMono Gᵐᵒᵖ :=
616-
{ elim := fun _ _ _ bc ↦ mul_lt_mul_right' (α := G) bc (unop _) }
616+
{ elim := fun _ _ _ bc ↦ mul_lt_mul_left (α := G) bc (unop _) }
617617
of_mulOpposite of_covariant_right
618618

619619
end TwoUniqueProds

Mathlib/Algebra/Lie/Subalgebra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ instance addCommMonoid : AddCommMonoid (LieSubalgebra R L) where
494494
nsmul := nsmulRec
495495

496496
instance : IsOrderedAddMonoid (LieSubalgebra R L) where
497-
add_le_add_left _ _ := sup_le_sup_left
497+
add_le_add_left _ _ := sup_le_sup_right
498498

499499
instance : CanonicallyOrderedAdd (LieSubalgebra R L) where
500500
exists_add_of_le {_a b} h := ⟨b, (sup_eq_right.2 h).symm⟩

Mathlib/Algebra/Module/Submodule/Pointwise.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ theorem add_eq_sup (p q : Submodule R M) : p + q = p ⊔ q :=
168168
theorem zero_eq_bot : (0 : Submodule R M) = ⊥ :=
169169
rfl
170170

171-
instance : IsOrderedAddMonoid (Submodule R M) :=
172-
{ add_le_add_left := fun _a _b => sup_le_sup_left }
171+
instance : IsOrderedAddMonoid (Submodule R M) where
172+
add_le_add_left _ _ := sup_le_sup_right
173173

174174
instance : CanonicallyOrderedAdd (Submodule R M) where
175175
exists_add_of_le {_a b} h := ⟨b, (sup_eq_right.2 h).symm⟩

Mathlib/Algebra/MonoidAlgebra/Degree.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ theorem apply_add_of_supDegree_le (hadd : ∀ a1 a2, D (a1 + a2) = D a1 + D a2)
314314
rw [Finset.sum_eq_single ap, Finset.sum_eq_single aq, if_pos rfl]
315315
· refine fun a ha hne => if_neg (fun he => ?_)
316316
apply_fun D at he; simp_rw [hadd] at he
317-
exact (add_lt_add_left (((Finset.le_sup ha).trans hq).lt_of_ne <| hD.ne_iff.2 hne) _).ne he
317+
exact (add_lt_add_right (((Finset.le_sup ha).trans hq).lt_of_ne <| hD.ne_iff.2 hne) _).ne he
318318
· intro h; rw [if_pos rfl, Finsupp.notMem_support_iff.1 h, mul_zero]
319319
· refine fun a ha hne => Finset.sum_eq_zero (fun a' ha' => if_neg <| fun he => ?_)
320320
apply_fun D at he

Mathlib/Algebra/Order/AbsoluteValue/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected theorem add_le (x y : R) : abv (x + y) ≤ abv x + abv y :=
102102
lemma listSum_le [AddLeftMono S] (l : List R) : abv l.sum ≤ (l.map abv).sum := by
103103
induction l with
104104
| nil => simp
105-
| cons head tail ih => exact (abv.add_le ..).trans <| add_le_add_left ih (abv head)
105+
| cons head tail ih => exact (abv.add_le ..).trans <| add_le_add_right ih (abv head)
106106

107107
@[simp]
108108
protected theorem map_mul (x y : R) : abv (x * y) = abv x * abv y :=

Mathlib/Algebra/Order/AddTorsor.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ instance [LE G] [LE P] [SMul G P] [IsOrderedSMul G P] : CovariantClass G P (·
7474

7575
@[to_additive]
7676
instance [CommMonoid G] [PartialOrder G] [IsOrderedMonoid G] : IsOrderedSMul G G where
77-
smul_le_smul_left _ _ := mul_le_mul_left'
78-
smul_le_smul_right _ _ := mul_le_mul_right'
77+
smul_le_smul_left _ _ := mul_le_mul_right
78+
smul_le_smul_right _ _ := mul_le_mul_left
7979

8080
@[to_additive]
8181
theorem IsOrderedSMul.smul_le_smul [LE G] [Preorder P] [SMul G P] [IsOrderedSMul G P]

Mathlib/Algebra/Order/BigOperators/Group/List.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ theorem apply_prod_le_sum_map (h_one : f 1 ≤ 0) (h_mul : ∀ (a b : α), f (a
265265
f l.prod ≤ (l.map f).sum := by
266266
induction l with
267267
| nil => simp [h_one]
268-
| cons hd tl IH => simpa using (h_mul _ _).trans (add_le_add_left IH _)
268+
| cons hd tl IH => grw [prod_cons, h_mul, IH]; simp
269269

270270
theorem sum_map_le_apply_prod (h_one : 0 ≤ f 1) (h_mul : ∀ (a b : α), f a + f b ≤ f (a * b)) :
271271
(l.map f).sum ≤ f l.prod :=

0 commit comments

Comments
 (0)