Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit e823109

Browse files
committed
chore(algebra/{group,group_with_zero}/basic): rename div_mul_div and div_mul_comm (#12365)
The new name, `div_mul_div_comm` is consistent with `mul_mul_mul_comm`. Obviously this renames the additive versions too.
1 parent ca7346d commit e823109

File tree

19 files changed

+29
-29
lines changed

19 files changed

+29
-29
lines changed

src/algebra/big_operators/multiset.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ by { convert (m.map f).prod_hom (inv_monoid_with_zero_hom : α →*₀ α), rw m
226226

227227
@[simp]
228228
lemma prod_map_div₀ : (m.map $ λ i, f i / g i).prod = (m.map f).prod / (m.map g).prod :=
229-
m.prod_hom₂ (/) (λ _ _ _ _, (div_mul_div _ _ _ _).symm) (div_one _) _ _
229+
m.prod_hom₂ (/) (λ _ _ _ _, (div_mul_div_comm₀ _ _ _ _).symm) (div_one _) _ _
230230

231231
lemma prod_map_zpow₀ {n : ℤ} : prod (m.map $ λ i, f i ^ n) = (m.map f).prod ^ n :=
232232
by { convert (m.map f).prod_hom (zpow_group_hom₀ _ : α →* α), rw map_map, refl }

src/algebra/group/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ lemma div_eq_of_eq_mul' {a b c : G} (h : a = b * c) : a / b = c :=
480480
by rw [h, div_eq_mul_inv, mul_comm, inv_mul_cancel_left]
481481

482482
@[to_additive]
483-
lemma div_mul_comm (a b c d : G) : a / b * (c / d) = a * c / (b * d) :=
483+
lemma div_mul_div_comm (a b c d : G) : a / b * (c / d) = a * c / (b * d) :=
484484
by rw [div_eq_mul_inv, div_eq_mul_inv, div_eq_mul_inv, mul_inv_rev, mul_assoc, mul_assoc,
485485
mul_left_cancel_iff, mul_comm, mul_assoc]
486486

src/algebra/group/prod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,6 @@ def div_monoid_with_zero_hom [comm_group_with_zero α] : α × α →*₀ α :=
502502
{ to_fun := λ a, a.1 / a.2,
503503
map_zero' := zero_div _,
504504
map_one' := div_one _,
505-
map_mul' := λ a b, (div_mul_div _ _ _ _).symm }
505+
map_mul' := λ a b, (div_mul_div_comm₀ _ _ _ _).symm }
506506

507507
end bundled_mul_div

src/algebra/group_with_zero/basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ by rw [mul_comm, (div_mul_cancel _ hb)]
968968

969969
local attribute [simp] mul_assoc mul_comm mul_left_comm
970970

971-
lemma div_mul_div (a b c d : G₀) :
971+
lemma div_mul_div_comm₀ (a b c d : G₀) :
972972
(a / b) * (c / d) = (a * c) / (b * d) :=
973973
by simp [div_eq_mul_inv, mul_inv₀]
974974

@@ -981,7 +981,7 @@ by simp [div_eq_mul_inv]
981981

982982
lemma div_mul_eq_mul_div_comm (a b c : G₀) :
983983
(b / c) * a = b * (a / c) :=
984-
by rw [div_mul_eq_mul_div, ← one_mul c, ← div_mul_div, div_one, one_mul]
984+
by rw [div_mul_eq_mul_div, ← one_mul c, ← div_mul_div_comm₀, div_one, one_mul]
985985

986986
lemma mul_eq_mul_of_div_eq_div (a : G₀) {b : G₀} (c : G₀) {d : G₀} (hb : b ≠ 0)
987987
(hd : d ≠ 0) (h : a / b = c / d) : a * d = c * b :=
@@ -990,7 +990,7 @@ by rw [← mul_one (a*d), mul_assoc, mul_comm d, ← mul_assoc, ← div_self hb,
990990

991991
@[field_simps] lemma div_div_eq_div_mul (a b c : G₀) :
992992
(a / b) / c = a / (b * c) :=
993-
by rw [div_eq_mul_one_div, div_mul_div, mul_one]
993+
by rw [div_eq_mul_one_div, div_mul_div_comm₀, mul_one]
994994

995995
lemma div_div_div_div_eq (a : G₀) {b c d : G₀} :
996996
(a / b) / (c / d) = (a * d) / (b * c) :=

src/algebra/order/lattice_group.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ begin
382382
rw [sup_right_idem, sup_assoc, inf_assoc],
383383
nth_rewrite 3 inf_comm,
384384
rw [inf_right_idem, inf_assoc], }
385-
... = (b ⊔ a ⊔ c) * ((b ⊔ a) ⊓ c) /(((b ⊓ a) ⊔ c) * (b ⊓ a ⊓ c)) : by rw div_mul_comm
385+
... = (b ⊔ a ⊔ c) * ((b ⊔ a) ⊓ c) /(((b ⊓ a) ⊔ c) * (b ⊓ a ⊓ c)) : by rw div_mul_div_comm
386386
... = (b ⊔ a) * c / ((b ⊓ a) * c) :
387387
by rw [mul_comm, inf_mul_sup, mul_comm (b ⊓ a ⊔ c), inf_mul_sup]
388388
... = (b ⊔ a) / (b ⊓ a) : by rw [div_eq_mul_inv, mul_inv_rev, mul_assoc, mul_inv_cancel_left,

src/analysis/box_integral/partition/additive.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ of_map_split_add
176176
rw with_top.coe_le_coe at hJ,
177177
refine i.succ_above_cases _ _ j,
178178
{ intros x hx,
179-
simp only [box.split_lower_def hx, box.split_upper_def hx, update_same,
179+
simp only [box.split_lower_def hx, box.split_upper_def hx, update_same,
180180
← with_bot.some_eq_coe, option.elim, box.face, (∘), update_noteq (fin.succ_above_ne _ _)],
181181
abel },
182182
{ clear j, intros j x hx,
@@ -189,7 +189,7 @@ of_map_split_add
189189
simp only [box.split_lower_def hx, box.split_upper_def hx,
190190
box.split_lower_def hx', box.split_upper_def hx',
191191
← with_bot.some_eq_coe, option.elim, box.face_mk,
192-
update_noteq (fin.succ_above_ne _ _).symm, sub_add_comm,
192+
update_noteq (fin.succ_above_ne _ _).symm, sub_add_sub_comm,
193193
update_comp_eq_of_injective _ i.succ_above.injective j x, ← hf],
194194
simp only [box.face] }
195195
end

src/analysis/mean_inequalities.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ begin
340340
let f' := λ i, (f i) / (∑ i in s, (f i) ^ p) ^ (1 / p),
341341
let g' := λ i, (g i) / (∑ i in s, (g i) ^ q) ^ (1 / q),
342342
suffices : ∑ i in s, f' i * g' i ≤ 1,
343-
{ simp_rw [f', g', div_mul_div, ← sum_div] at this,
343+
{ simp_rw [f', g', div_mul_div_comm₀, ← sum_div] at this,
344344
rwa [div_le_iff, one_mul] at this,
345345
refine mul_ne_zero _ _,
346346
{ rw [ne.def, rpow_eq_zero_iff, not_and_distrib], exact or.inl hF_zero, },

src/analysis/special_functions/polynomials.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ begin
141141
refine (P.is_equivalent_at_top_lead.symm.div
142142
Q.is_equivalent_at_top_lead.symm).symm.trans
143143
(eventually_eq.is_equivalent ((eventually_gt_at_top 0).mono $ λ x hx, _)),
144-
simp [← div_mul_div, hP, hQ, zpow_sub₀ hx.ne.symm]
144+
simp [← div_mul_div_comm₀, hP, hQ, zpow_sub₀ hx.ne.symm]
145145
end
146146

147147
lemma div_tendsto_zero_of_degree_lt (hdeg : P.degree < Q.degree) :

src/analysis/special_functions/trigonometric/complex.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ begin
107107
← div_div_div_cancel_right (sin x * cos y + cos x * sin y)
108108
(mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)),
109109
add_div, sub_div],
110-
simp only [←div_mul_div, ←tan, mul_one, one_mul,
110+
simp only [←div_mul_div_comm₀, ←tan, mul_one, one_mul,
111111
div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] },
112112
{ obtain ⟨t, hx, hy, hxy⟩ := ⟨tan_int_mul_pi_div_two, t (2*k+1), t (2*l+1), t (2*k+1+(2*l+1))⟩,
113113
simp only [int.cast_add, int.cast_bit0, int.cast_mul, int.cast_one, hx, hy] at hx hy hxy,

src/analysis/specific_limits.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,7 @@ begin
11081108
-- Finally, we prove the upper estimate
11091109
intros n hn,
11101110
calc ∥x ^ (n + 1) / (n + 1)!∥ = (∥x∥ / (n + 1)) * ∥x ^ n / n!∥ :
1111-
by rw [pow_succ, nat.factorial_succ, nat.cast_mul, ← div_mul_div,
1111+
by rw [pow_succ, nat.factorial_succ, nat.cast_mul, ← div_mul_div_comm₀,
11121112
norm_mul, norm_div, real.norm_coe_nat, nat.cast_succ]
11131113
... ≤ (∥x∥ / (⌊∥x∥⌋₊ + 1)) * ∥x ^ n / n!∥ :
11141114
by mono* with [0 ≤ ∥x ^ n / n!∥, 0 ≤ ∥x∥]; apply norm_nonneg

0 commit comments

Comments
 (0)