Skip to content

Commit 1e4b2ad

Browse files
committed
chore(Algebra/Group/Support): rename primed lemmas to match naming convention (#27777)
`mulSupport_inv` should be called `mulSupport_fun_inv`, according to the [naming convention](https://leanprover-community.github.io/contribute/naming.html#unexpanded-and-expanded-forms-of-functions), similarly for the other lemmas. Unfortunately, there is no good tooling yet for renames `A -> B` and `B -> C`.
1 parent e20d25f commit 1e4b2ad

File tree

11 files changed

+42
-28
lines changed

11 files changed

+42
-28
lines changed

Mathlib/Algebra/BigOperators/Finprod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ equals the product of `f i` divided by the product of `g i`. -/
545545
equals the sum of `f i` minus the sum of `g i`."]
546546
theorem finprod_div_distrib [DivisionCommMonoid G] {f g : α → G} (hf : (mulSupport f).Finite)
547547
(hg : (mulSupport g).Finite) : ∏ᶠ i, f i / g i = (∏ᶠ i, f i) / ∏ᶠ i, g i := by
548-
simp only [div_eq_mul_inv, finprod_mul_distrib hf ((mulSupport_inv g).symm.rec hg),
548+
simp only [div_eq_mul_inv, finprod_mul_distrib hf ((mulSupport_fun_inv g).symm.rec hg),
549549
finprod_inv_distrib]
550550

551551
/-- A more general version of `finprod_mem_mul_distrib` that only requires `s ∩ mulSupport f` and

Mathlib/Algebra/Group/Indicator.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ variable (M)
180180

181181
@[to_additive (attr := simp)]
182182
theorem mulIndicator_one (s : Set α) : (mulIndicator s fun _ => (1 : M)) = fun _ => (1 : M) :=
183-
mulIndicator_eq_one.2 <| by simp only [mulSupport_one, empty_disjoint]
183+
mulIndicator_eq_one.2 <| by simp only [mulSupport_fun_one, empty_disjoint]
184184

185185
@[to_additive (attr := simp)]
186186
theorem mulIndicator_one' {s : Set α} : s.mulIndicator (1 : α → M) = 1 :=

Mathlib/Algebra/Group/Support.lean

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,15 @@ lemma range_eq_image_or_of_mulSupport_subset {f : α → M} {k : Set α} (h : mu
138138
grind
139139

140140
@[to_additive (attr := simp)]
141-
theorem mulSupport_one' : mulSupport (1 : α → M) = ∅ :=
141+
theorem mulSupport_one : mulSupport (1 : α → M) = ∅ :=
142142
mulSupport_eq_empty_iff.2 rfl
143143

144144
@[to_additive (attr := simp)]
145-
theorem mulSupport_one : (mulSupport fun _ : α => (1 : M)) = ∅ :=
146-
mulSupport_one'
145+
theorem mulSupport_fun_one : (mulSupport fun _ : α => (1 : M)) = ∅ :=
146+
mulSupport_one
147+
148+
@[deprecated (since := "2025-07-31")] alias support_zero' := support_zero
149+
@[deprecated (since := "2025-07-31")] alias mulSupport_one' := mulSupport_one
147150

148151
@[to_additive]
149152
theorem mulSupport_const {c : M} (hc : c ≠ 1) : (mulSupport fun _ : α => c) = Set.univ := by
@@ -179,16 +182,21 @@ theorem mulSupport_comp_eq_preimage (g : β → M) (f : α → β) :
179182
mulSupport (g ∘ f) = f ⁻¹' mulSupport g :=
180183
rfl
181184

182-
@[to_additive support_prod_mk]
183-
theorem mulSupport_prod_mk (f : α → M) (g : α → N) :
185+
@[to_additive support_prodMk]
186+
theorem mulSupport_prodMk (f : α → M) (g : α → N) :
184187
(mulSupport fun x => (f x, g x)) = mulSupport f ∪ mulSupport g :=
185188
Set.ext fun x => by
186189
simp only [mulSupport, not_and_or, mem_union, mem_setOf_eq, Prod.mk_eq_one, Ne]
187190

188-
@[to_additive support_prod_mk']
189-
theorem mulSupport_prod_mk' (f : α → M × N) :
191+
@[to_additive support_prodMk']
192+
theorem mulSupport_prodMk' (f : α → M × N) :
190193
mulSupport f = (mulSupport fun x => (f x).1) ∪ mulSupport fun x => (f x).2 := by
191-
simp only [← mulSupport_prod_mk]
194+
simp only [← mulSupport_prodMk]
195+
196+
@[deprecated (since := "2025-07-31")] alias support_prod_mk := support_prodMk
197+
@[deprecated (since := "2025-07-31")] alias mulSupport_prod_mk := mulSupport_prodMk
198+
@[deprecated (since := "2025-07-31")] alias support_prod_mk' := support_prodMk'
199+
@[deprecated (since := "2025-07-31")] alias mulSupport_prod_mk' := mulSupport_prodMk'
192200

193201
@[to_additive]
194202
theorem mulSupport_along_fiber_subset (f : α × β → M) (a : α) :
@@ -201,22 +209,25 @@ theorem mulSupport_curry (f : α × β → M) :
201209
simp [mulSupport, funext_iff, image]
202210

203211
@[to_additive]
204-
theorem mulSupport_curry' (f : α × β → M) :
212+
theorem mulSupport_fun_curry (f : α × β → M) :
205213
(mulSupport fun a b ↦ f (a, b)) = (mulSupport f).image Prod.fst :=
206214
mulSupport_curry f
207215

216+
@[deprecated (since := "2025-07-31")] alias support_curry' := support_fun_curry
217+
@[deprecated (since := "2025-07-31")] alias mulSupport_curry' := mulSupport_fun_curry
218+
208219
end One
209220

210221
@[to_additive]
211222
theorem mulSupport_mul [MulOneClass M] (f g : α → M) :
212-
(mulSupport fun x => f x * g x) ⊆ mulSupport f ∪ mulSupport g :=
223+
(mulSupport fun x f x * g x) ⊆ mulSupport f ∪ mulSupport g :=
213224
mulSupport_binop_subset (· * ·) (one_mul _) f g
214225

215226
@[to_additive]
216227
theorem mulSupport_pow [Monoid M] (f : α → M) (n : ℕ) :
217228
(mulSupport fun x => f x ^ n) ⊆ mulSupport f := by
218229
induction n with
219-
| zero => simp [pow_zero, mulSupport_one]
230+
| zero => simp [pow_zero]
220231
| succ n hfn =>
221232
simpa only [pow_succ'] using (mulSupport_mul f _).trans (union_subset Subset.rfl hfn)
222233

@@ -225,12 +236,15 @@ section DivisionMonoid
225236
variable [DivisionMonoid G] (f g : α → G)
226237

227238
@[to_additive (attr := simp)]
228-
theorem mulSupport_inv : (mulSupport fun x => (f x)⁻¹) = mulSupport f :=
239+
theorem mulSupport_fun_inv : (mulSupport fun x => (f x)⁻¹) = mulSupport f :=
229240
ext fun _ => inv_ne_one
230241

231242
@[to_additive (attr := simp)]
232-
theorem mulSupport_inv' : mulSupport f⁻¹ = mulSupport f :=
233-
mulSupport_inv f
243+
theorem mulSupport_inv : mulSupport f⁻¹ = mulSupport f :=
244+
mulSupport_fun_inv f
245+
246+
@[deprecated (since := "2025-07-31")] alias support_neg' := support_neg
247+
@[deprecated (since := "2025-07-31")] alias mulSupport_inv' := mulSupport_inv
234248

235249
@[to_additive]
236250
theorem mulSupport_mul_inv : (mulSupport fun x => f x * (g x)⁻¹) ⊆ mulSupport f ∪ mulSupport g :=

Mathlib/Algebra/GroupWithZero/Indicator.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ lemma mulSupport_add_one' [AddRightCancelMonoid R] (f : ι → R) : mulSupport (
158158
mulSupport_add_one f
159159

160160
lemma mulSupport_one_sub' [AddGroup R] (f : ι → R) : mulSupport (1 - f) = support f := by
161-
rw [sub_eq_add_neg, mulSupport_one_add', support_neg']
161+
rw [sub_eq_add_neg, mulSupport_one_add', support_neg]
162162

163163
lemma mulSupport_one_sub [AddGroup R] (f : ι → R) :
164164
mulSupport (fun x ↦ 1 - f x) = support f := mulSupport_one_sub' f

Mathlib/LinearAlgebra/RootSystem/Base.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ lemma pos_or_neg_of_sum_smul_root_mem (f : ι → ℤ)
196196
have hf' : f ≠ 0 := by rintro rfl; exact P.ne_zero k <| by simp [hk]
197197
rcases b.root_mem_or_neg_mem k with hk' | hk' <;> rw [hk] at hk'
198198
· left; exact this f hk' hf₀ hf'
199-
· right; simpa using this (-f) (by convert hk'; simp) (by simpa only [support_neg']) (by simpa)
199+
· right; simpa using this (-f) (by convert hk'; simp) (by simpa only [support_neg]) (by simpa)
200200
intro f hf hf₀ hf'
201201
let f' : b.support → ℤ := fun i ↦ f i
202202
replace hf : ∑ j, f' j • P.root j ∈ AddSubmonoid.closure (P.root '' b.support) := by

Mathlib/MeasureTheory/Function/SimpleFunc.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ theorem map_iff {g : β → γ} (hg : ∀ {b}, g b = 0 ↔ b = 0) :
11971197
protected theorem pair {g : α →ₛ γ} (hf : f.FinMeasSupp μ) (hg : g.FinMeasSupp μ) :
11981198
(pair f g).FinMeasSupp μ :=
11991199
calc
1200-
μ (support <| pair f g) = μ (support f ∪ support g) := congr_arg μ <| support_prod_mk f g
1200+
μ (support <| pair f g) = μ (support f ∪ support g) := congr_arg μ <| support_prodMk f g
12011201
_ ≤ μ (support f) + μ (support g) := measure_union_le _ _
12021202
_ < _ := add_lt_top.2 ⟨hf, hg⟩
12031203

Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ end StronglyMeasurable
10481048
theorem finStronglyMeasurable_zero {α β} {m : MeasurableSpace α} {μ : Measure α} [Zero β]
10491049
[TopologicalSpace β] : FinStronglyMeasurable (0 : α → β) μ :=
10501050
0, by
1051-
simp only [Pi.zero_apply, SimpleFunc.coe_zero, support_zero', measure_empty,
1051+
simp only [Pi.zero_apply, SimpleFunc.coe_zero, support_zero, measure_empty,
10521052
zero_lt_top, forall_const],
10531053
fun _ => tendsto_const_nhds⟩
10541054

@@ -1132,9 +1132,9 @@ protected theorem add [AddZeroClass β] [ContinuousAdd β] (hf : FinStronglyMeas
11321132
@[measurability]
11331133
protected theorem neg [SubtractionMonoid β] [ContinuousNeg β] (hf : FinStronglyMeasurable f μ) :
11341134
FinStronglyMeasurable (-f) μ := by
1135-
refine ⟨fun n => -hf.approx n, fun n => ?_, fun x => (hf.tendsto_approx x).neg⟩
1136-
suffices μ (Function.support fun x => -(hf.approx n) x) < ∞ by convert this
1137-
rw [Function.support_neg (hf.approx n)]
1135+
refine ⟨fun n -hf.approx n, fun n ?_, fun x (hf.tendsto_approx x).neg⟩
1136+
suffices μ (Function.support fun x -(hf.approx n) x) < ∞ by convert this
1137+
rw [Function.support_fun_neg (hf.approx n)]
11381138
exact hf.fin_support_approx n
11391139

11401140
@[measurability]

Mathlib/RingTheory/HahnSeries/Addition.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ instance : Neg (HahnSeries Γ R) where
343343
neg x :=
344344
{ coeff := fun a => -x.coeff a
345345
isPWO_support' := by
346-
rw [Function.support_neg]
346+
rw [Function.support_fun_neg]
347347
exact x.isPWO_support }
348348

349349
@[simp]

Mathlib/RingTheory/HahnSeries/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def toIterate [PartialOrder Γ'] (x : HahnSeries (Γ ×ₗ Γ') R) :
155155
(Set.PartiallyWellOrderedOn.fiberProdLex x.isPWO_support' g)) = Function.support
156156
fun g => fun g' => x.coeff (g, g') := by
157157
simp only [Function.support, ne_eq, mk_eq_zero]
158-
rw [h₁, Function.support_curry' x.coeff]
158+
rw [h₁, Function.support_fun_curry x.coeff]
159159
exact Set.PartiallyWellOrderedOn.imageProdLex x.isPWO_support'
160160

161161
/-- The equivalence between iterated Hahn series and Hahn series on the lex product. -/
@@ -491,7 +491,7 @@ theorem forallLTEqZero_supp_BddBelow (f : Γ → R) (n : Γ) (hn : ∀ (m : Γ),
491491
exact not_lt.mp (mt (hn m) hm)
492492

493493
theorem BddBelow_zero [Nonempty Γ] : BddBelow (Function.support (0 : Γ → R)) := by
494-
simp only [support_zero', bddBelow_empty]
494+
simp only [Function.support_zero, bddBelow_empty]
495495

496496
variable [LocallyFiniteOrder Γ]
497497

Mathlib/Topology/Algebra/Support.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ section DivisionMonoid
333333
protected lemma HasCompactMulSupport.inv {α β : Type*} [TopologicalSpace α] [DivisionMonoid β]
334334
{f : α → β} (hf : HasCompactMulSupport f) :
335335
HasCompactMulSupport (f⁻¹) := by
336-
simpa only [HasCompactMulSupport, mulTSupport, mulSupport_inv'] using hf
336+
simpa only [HasCompactMulSupport, mulTSupport, mulSupport_inv] using hf
337337

338338
@[deprecated (since := "2025-07-31")] alias HasCompactSupport.neg' := HasCompactSupport.neg
339339
@[deprecated (since := "2025-07-31")] alias HasCompactMulSupport.inv' := HasCompactMulSupport.inv

0 commit comments

Comments
 (0)