Skip to content

Commit 01ce6da

Browse files
committed
chore: Rename a few lemmas about Pi.mulSingle (#12317)
Before this PR, the `MonoidHom` version of `Pi.mulSingle` was called `MonoidHom.single` for brevity; but this is confusing when contrasted with `MulHom.single` which is about `Pi.single`. After this PR, the name is `MonoidHom.mulSingle`. Also fix the name of `Pi.single_div` since it is about `Pi.mulSingle` (and we don't have the lemma that would be called `Pi.single_div`).
1 parent cf7f235 commit 01ce6da

File tree

8 files changed

+29
-29
lines changed

8 files changed

+29
-29
lines changed

Mathlib/Algebra/BigOperators/Pi.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ note [partially-applied ext lemmas]. -/
104104
"\nThis is used as the ext lemma instead of `AddMonoidHom.functions_ext` for reasons
105105
explained in note [partially-applied ext lemmas]."]
106106
theorem MonoidHom.functions_ext' [Finite I] (M : Type*) [CommMonoid M] (g h : (∀ i, Z i) →* M)
107-
(H : ∀ i, g.comp (MonoidHom.single Z i) = h.comp (MonoidHom.single Z i)) : g = h :=
107+
(H : ∀ i, g.comp (MonoidHom.mulSingle Z i) = h.comp (MonoidHom.mulSingle Z i)) : g = h :=
108108
g.functions_ext M h fun i => DFunLike.congr_fun (H i)
109109
#align monoid_hom.functions_ext' MonoidHom.functions_ext'
110110
#align add_monoid_hom.functions_ext' AddMonoidHom.functions_ext'

Mathlib/Algebra/Group/Pi/Lemmas.lean

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -271,17 +271,16 @@ This is the `OneHom` version of `Pi.mulSingle`. -/
271271
as functions supported at a point.
272272
273273
This is the `ZeroHom` version of `Pi.single`."]
274-
def OneHom.single [∀ i, One <| f i] (i : I) : OneHom (f i) (∀ i, f i) where
274+
nonrec def OneHom.mulSingle [∀ i, One <| f i] (i : I) : OneHom (f i) (∀ i, f i) where
275275
toFun := mulSingle i
276276
map_one' := mulSingle_one i
277-
#align one_hom.single OneHom.single
277+
#align one_hom.single OneHom.mulSingle
278278
#align zero_hom.single ZeroHom.single
279279

280280
@[to_additive (attr := simp)]
281-
theorem OneHom.single_apply [∀ i, One <| f i] (i : I) (x : f i) :
282-
OneHom.single f i x = mulSingle i x :=
283-
rfl
284-
#align one_hom.single_apply OneHom.single_apply
281+
theorem OneHom.mulSingle_apply [∀ i, One <| f i] (i : I) (x : f i) :
282+
mulSingle f i x = Pi.mulSingle i x := rfl
283+
#align one_hom.single_apply OneHom.mulSingle_apply
285284
#align zero_hom.single_apply ZeroHom.single_apply
286285

287286
/-- The monoid homomorphism including a single monoid into a dependent family of additive monoids,
@@ -293,16 +292,16 @@ This is the `MonoidHom` version of `Pi.mulSingle`. -/
293292
of additive monoids, as functions supported at a point.
294293
295294
This is the `AddMonoidHom` version of `Pi.single`."]
296-
def MonoidHom.single [∀ i, MulOneClass <| f i] (i : I) : f i →* ∀ i, f i :=
297-
{ OneHom.single f i with map_mul' := mulSingle_op₂ (fun _ => (· * ·)) (fun _ => one_mul _) _ }
298-
#align monoid_hom.single MonoidHom.single
295+
def MonoidHom.mulSingle [∀ i, MulOneClass <| f i] (i : I) : f i →* ∀ i, f i :=
296+
{ OneHom.mulSingle f i with map_mul' := mulSingle_op₂ (fun _ => (· * ·)) (fun _ => one_mul _) _ }
297+
#align monoid_hom.single MonoidHom.mulSingle
299298
#align add_monoid_hom.single AddMonoidHom.single
300299

301300
@[to_additive (attr := simp)]
302-
theorem MonoidHom.single_apply [∀ i, MulOneClass <| f i] (i : I) (x : f i) :
303-
MonoidHom.single f i x = mulSingle i x :=
301+
theorem MonoidHom.mulSingle_apply [∀ i, MulOneClass <| f i] (i : I) (x : f i) :
302+
mulSingle f i x = Pi.mulSingle i x :=
304303
rfl
305-
#align monoid_hom.single_apply MonoidHom.single_apply
304+
#align monoid_hom.single_apply MonoidHom.mulSingle_apply
306305
#align add_monoid_hom.single_apply AddMonoidHom.single_apply
307306

308307
/-- The multiplicative homomorphism including a single `MulZeroClass`
@@ -335,22 +334,22 @@ theorem Pi.mulSingle_inf [∀ i, SemilatticeInf (f i)] [∀ i, One (f i)] (i : I
335334
@[to_additive]
336335
theorem Pi.mulSingle_mul [∀ i, MulOneClass <| f i] (i : I) (x y : f i) :
337336
mulSingle i (x * y) = mulSingle i x * mulSingle i y :=
338-
(MonoidHom.single f i).map_mul x y
337+
(MonoidHom.mulSingle f i).map_mul x y
339338
#align pi.mul_single_mul Pi.mulSingle_mul
340339
#align pi.single_add Pi.single_add
341340

342341
@[to_additive]
343342
theorem Pi.mulSingle_inv [∀ i, Group <| f i] (i : I) (x : f i) :
344343
mulSingle i x⁻¹ = (mulSingle i x)⁻¹ :=
345-
(MonoidHom.single f i).map_inv x
344+
(MonoidHom.mulSingle f i).map_inv x
346345
#align pi.mul_single_inv Pi.mulSingle_inv
347346
#align pi.single_neg Pi.single_neg
348347

349348
@[to_additive]
350-
theorem Pi.single_div [∀ i, Group <| f i] (i : I) (x y : f i) :
349+
theorem Pi.mulSingle_div [∀ i, Group <| f i] (i : I) (x y : f i) :
351350
mulSingle i (x / y) = mulSingle i x / mulSingle i y :=
352-
(MonoidHom.single f i).map_div x y
353-
#align pi.single_div Pi.single_div
351+
(MonoidHom.mulSingle f i).map_div x y
352+
#align pi.single_div Pi.mulSingle_div
354353
#align pi.single_sub Pi.single_sub
355354

356355
theorem Pi.single_mul [∀ i, MulZeroClass <| f i] (i : I) (x y : f i) :

Mathlib/Data/Finset/NoncommProd.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ theorem noncommProd_mul_single [Fintype ι] [DecidableEq ι] (x : ∀ i, M i) :
462462
(univ.noncommProd (fun i => Pi.mulSingle i (x i)) fun i _ j _ _ =>
463463
Pi.mulSingle_apply_commute x i j) = x := by
464464
ext i
465-
apply (univ.noncommProd_map (fun i => MonoidHom.single M i (x i)) ?a (Pi.evalMonoidHom M i)).trans
465+
apply (univ.noncommProd_map (fun i ↦ MonoidHom.mulSingle M i (x i)) ?a
466+
(Pi.evalMonoidHom M i)).trans
466467
case a =>
467468
intro i _ j _ _
468469
exact Pi.mulSingle_apply_commute x i j
@@ -472,10 +473,10 @@ theorem noncommProd_mul_single [Fintype ι] [DecidableEq ι] (x : ∀ i, M i) :
472473
· intro j _; dsimp
473474
· rw [noncommProd_insert_of_not_mem _ _ _ _ (not_mem_erase _ _),
474475
noncommProd_eq_pow_card (univ.erase i), one_pow, mul_one]
475-
simp only [MonoidHom.single_apply, ne_eq, Pi.mulSingle_eq_same]
476+
simp only [MonoidHom.mulSingle_apply, ne_eq, Pi.mulSingle_eq_same]
476477
· intro j hj
477478
simp? at hj says simp only [mem_erase, ne_eq, mem_univ, and_true] at hj
478-
simp only [MonoidHom.single_apply, Pi.mulSingle, Function.update, Eq.ndrec, Pi.one_apply,
479+
simp only [MonoidHom.mulSingle_apply, Pi.mulSingle, Function.update, Eq.ndrec, Pi.one_apply,
479480
ne_eq, dite_eq_right_iff]
480481
intro h
481482
simp [*] at *

Mathlib/GroupTheory/NoncommPiCoprod.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ def noncommPiCoprodEquiv :
148148
where
149149
toFun ϕ := noncommPiCoprod ϕ.1 ϕ.2
150150
invFun f :=
151-
fun i => f.comp (MonoidHom.single N i), fun i j hij x y =>
151+
fun i => f.comp (MonoidHom.mulSingle N i), fun i j hij x y =>
152152
Commute.map (Pi.mulSingle_commute hij x y) f⟩
153153
left_inv ϕ := by
154154
ext
155-
simp only [coe_comp, Function.comp_apply, single_apply, noncommPiCoprod_mulSingle]
155+
simp only [coe_comp, Function.comp_apply, mulSingle_apply, noncommPiCoprod_mulSingle]
156156
right_inv f := pi_ext fun i x => by
157-
simp only [noncommPiCoprod_mulSingle, coe_comp, Function.comp_apply, single_apply]
157+
simp only [noncommPiCoprod_mulSingle, coe_comp, Function.comp_apply, mulSingle_apply]
158158
#align monoid_hom.noncomm_pi_coprod_equiv MonoidHom.noncommPiCoprodEquiv
159159
#align add_monoid_hom.noncomm_pi_coprod_equiv AddMonoidHom.noncommPiCoprodEquiv
160160

Mathlib/GroupTheory/Subgroup/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,8 +1897,8 @@ theorem pi_eq_bot_iff (H : ∀ i, Subgroup (f i)) : pi Set.univ H = ⊥ ↔ ∀
18971897
simp only [eq_bot_iff_forall]
18981898
constructor
18991899
· intro h i x hx
1900-
have : MonoidHom.single f i x = 1 :=
1901-
h (MonoidHom.single f i x) ((mulSingle_mem_pi i x).mpr fun _ => hx)
1900+
have : MonoidHom.mulSingle f i x = 1 :=
1901+
h (MonoidHom.mulSingle f i x) ((mulSingle_mem_pi i x).mpr fun _ => hx)
19021902
simpa using congr_fun this i
19031903
· exact fun h x hx => funext fun i => h _ _ (hx i trivial)
19041904
#align subgroup.pi_eq_bot_iff Subgroup.pi_eq_bot_iff

Mathlib/GroupTheory/Subgroup/Finite.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ theorem pi_mem_of_mulSingle_mem [Finite η] [DecidableEq η] {H : Subgroup (∀
243243
@[to_additive "For finite index types, the `Subgroup.pi` is generated by the embeddings of the
244244
additive groups."]
245245
theorem pi_le_iff [DecidableEq η] [Finite η] {H : ∀ i, Subgroup (f i)} {J : Subgroup (∀ i, f i)} :
246-
pi univ H ≤ J ↔ ∀ i : η, map (MonoidHom.single f i) (H i) ≤ J := by
246+
pi univ H ≤ J ↔ ∀ i : η, map (MonoidHom.mulSingle f i) (H i) ≤ J := by
247247
constructor
248248
· rintro h i _ ⟨x, hx, rfl⟩
249249
apply h

Mathlib/Probability/Moments.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def centralMoment (X : Ω → ℝ) (p : ℕ) (μ : Measure Ω) : ℝ := by
6161
@[simp]
6262
theorem moment_zero (hp : p ≠ 0) : moment 0 p μ = 0 := by
6363
simp only [moment, hp, zero_pow, Ne, not_false_iff, Pi.zero_apply, integral_const,
64-
smul_eq_mul, mul_zero]
64+
smul_eq_mul, mul_zero, integral_zero]
6565
#align probability_theory.moment_zero ProbabilityTheory.moment_zero
6666

6767
@[simp]

Mathlib/RingTheory/PiTensorProduct.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ The map `Aᵢ ⟶ ⨂ᵢ Aᵢ` given by `a ↦ 1 ⊗ ... ⊗ a ⊗ 1 ⊗ ...`
188188
-/
189189
@[simps]
190190
def singleAlgHom [DecidableEq ι] (i : ι) : A i →ₐ[R] ⨂[R] i, A i where
191-
toFun a := tprod R (MonoidHom.single _ i a)
191+
toFun a := tprod R (MonoidHom.mulSingle _ i a)
192192
map_one' := by simp only [_root_.map_one]; rfl
193193
map_mul' a a' := by simp
194194
map_zero' := MultilinearMap.map_update_zero _ _ _

0 commit comments

Comments
 (0)