Skip to content

Commit 772dc6e

Browse files
committed
chore: lower case Accumulate (#32871)
`Accumulate` is a function constructing a `Set`. Per our naming rules, it should be lower-case. The current upper case is probably a consequence of the migration script from Lean 3 to Lean 4, which had issues with the casing of Set-valued functions. This PR changes it to lower case. Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
1 parent fcf037d commit 772dc6e

File tree

12 files changed

+34
-32
lines changed

12 files changed

+34
-32
lines changed

Mathlib/Data/Set/Accumulate.lean

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public import Mathlib.Order.PartialSups
1212
/-!
1313
# Accumulate
1414
15-
The function `Accumulate` takes a set `s` and returns `⋃ y ≤ x, s y`.
15+
The function `accumulate` takes a set `s` and returns `⋃ y ≤ x, s y`.
1616
1717
This is closely related to the function `partialSups`, although these two functions have
1818
slightly different typeclass assumptions and API. `partialSups_eq_accumulate` shows
@@ -26,64 +26,66 @@ variable {α β : Type*} {s : α → Set β}
2626

2727
namespace Set
2828

29-
/-- `Accumulate s` is the union of `s y` for `y ≤ x`. -/
30-
def Accumulate [LE α] (s : α → Set β) (x : α) : Set β :=
29+
/-- `accumulate s` is the union of `s y` for `y ≤ x`. -/
30+
def accumulate [LE α] (s : α → Set β) (x : α) : Set β :=
3131
⋃ y ≤ x, s y
3232

33-
theorem accumulate_def [LE α] {x : α} : Accumulate s x = ⋃ y ≤ x, s y :=
33+
@[deprecated (since := "2025-12-14")] alias Accumulate := accumulate
34+
35+
theorem accumulate_def [LE α] {x : α} : accumulate s x = ⋃ y ≤ x, s y :=
3436
rfl
3537

3638
@[simp]
37-
theorem mem_accumulate [LE α] {x : α} {z : β} : z ∈ Accumulate s x ↔ ∃ y ≤ x, z ∈ s y := by
39+
theorem mem_accumulate [LE α] {x : α} {z : β} : z ∈ accumulate s x ↔ ∃ y ≤ x, z ∈ s y := by
3840
simp_rw [accumulate_def, mem_iUnion₂, exists_prop]
3941

40-
theorem subset_accumulate [Preorder α] {x : α} : s x ⊆ Accumulate s x := fun _ => mem_biUnion le_rfl
42+
theorem subset_accumulate [Preorder α] {x : α} : s x ⊆ accumulate s x := fun _ => mem_biUnion le_rfl
4143

42-
theorem accumulate_subset_iUnion [LE α] (x : α) : Accumulate s x ⊆ ⋃ i, s i :=
44+
theorem accumulate_subset_iUnion [LE α] (x : α) : accumulate s x ⊆ ⋃ i, s i :=
4345
(biUnion_subset_biUnion_left (subset_univ _)).trans_eq (biUnion_univ _)
4446

45-
theorem monotone_accumulate [Preorder α] : Monotone (Accumulate s) := fun _ _ hxy =>
47+
theorem monotone_accumulate [Preorder α] : Monotone (accumulate s) := fun _ _ hxy =>
4648
biUnion_subset_biUnion_left fun _ hz => le_trans hz hxy
4749

4850
@[gcongr]
4951
theorem accumulate_subset_accumulate [Preorder α] {x y} (h : x ≤ y) :
50-
Accumulate s x ⊆ Accumulate s y :=
52+
accumulate s x ⊆ accumulate s y :=
5153
monotone_accumulate h
5254

53-
theorem biUnion_accumulate [Preorder α] (x : α) : ⋃ y ≤ x, Accumulate s y = ⋃ y ≤ x, s y := by
55+
theorem biUnion_accumulate [Preorder α] (x : α) : ⋃ y ≤ x, accumulate s y = ⋃ y ≤ x, s y := by
5456
apply Subset.antisymm
5557
· exact iUnion₂_subset fun y hy => monotone_accumulate hy
5658
· exact iUnion₂_mono fun y _ => subset_accumulate
5759

58-
theorem iUnion_accumulate [Preorder α] : ⋃ x, Accumulate s x = ⋃ x, s x := by
60+
theorem iUnion_accumulate [Preorder α] : ⋃ x, accumulate s x = ⋃ x, s x := by
5961
apply Subset.antisymm
6062
· simp only [subset_def, mem_iUnion, exists_imp, mem_accumulate]
6163
intro z x x' ⟨_, hz⟩
6264
exact ⟨x', hz⟩
6365
· exact iUnion_mono fun i => subset_accumulate
6466

6567
@[simp]
66-
lemma accumulate_bot [PartialOrder α] [OrderBot α] (s : α → Set β) : Accumulate s ⊥ = s ⊥ := by
68+
lemma accumulate_bot [PartialOrder α] [OrderBot α] (s : α → Set β) : accumulate s ⊥ = s ⊥ := by
6769
simp [Set.accumulate_def]
6870

6971
@[simp]
70-
lemma accumulate_zero_nat (s : ℕ → Set β) : Accumulate s 0 = s 0 := by
72+
lemma accumulate_zero_nat (s : ℕ → Set β) : accumulate s 0 = s 0 := by
7173
simp [accumulate_def]
7274

7375
open Function in
7476
theorem disjoint_accumulate [Preorder α] (hs : Pairwise (Disjoint on s)) {i j : α} (hij : i < j) :
75-
Disjoint (Accumulate s i) (s j) := by
77+
Disjoint (accumulate s i) (s j) := by
7678
apply disjoint_left.2 (fun x hx ↦ ?_)
77-
simp only [Accumulate, mem_iUnion, exists_prop] at hx
79+
simp only [accumulate, mem_iUnion, exists_prop] at hx
7880
rcases hx with ⟨k, hk, hx⟩
7981
exact disjoint_left.1 (hs (hk.trans_lt hij).ne) hx
8082

8183
theorem accumulate_succ (u : ℕ → Set α) (n : ℕ) :
82-
Accumulate u (n + 1) = Accumulate u n ∪ u (n + 1) := biUnion_le_succ u n
84+
accumulate u (n + 1) = accumulate u n ∪ u (n + 1) := biUnion_le_succ u n
8385

8486
lemma partialSups_eq_accumulate (f : ℕ → Set α) :
85-
partialSups f = Accumulate f := by
87+
partialSups f = accumulate f := by
8688
ext n
87-
simp [partialSups_eq_sup_range, Accumulate, Nat.lt_succ_iff]
89+
simp [partialSups_eq_sup_range, accumulate, Nat.lt_succ_iff]
8890

8991
end Set

Mathlib/MeasureTheory/Measure/AddContent.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ lemma addContent_diff_of_ne_top (m : AddContent C) (hC : IsSetRing C)
352352

353353
lemma addContent_accumulate (m : AddContent C) (hC : IsSetRing C)
354354
{s : ℕ → Set α} (hs_disj : Pairwise (Disjoint on s)) (hsC : ∀ i, s i ∈ C) (n : ℕ) :
355-
m (Set.Accumulate s n) = ∑ i ∈ Finset.range (n + 1), m (s i) := by
355+
m (Set.accumulate s n) = ∑ i ∈ Finset.range (n + 1), m (s i) := by
356356
induction n with
357357
| zero => simp
358358
| succ n hn =>
@@ -396,7 +396,7 @@ theorem addContent_iUnion_eq_sum_of_tendsto_zero (hC : IsSetRing C) (m : AddCont
396396
(h_disj : Pairwise (Disjoint on f)) :
397397
m (⋃ i, f i) = ∑' i, m (f i) := by
398398
-- We use the continuity of `m` at `∅` on the sequence `n ↦ (⋃ i, f i) \ (set.accumulate f n)`
399-
let s : ℕ → Set α := fun n ↦ (⋃ i, f i) \ Set.Accumulate f n
399+
let s : ℕ → Set α := fun n ↦ (⋃ i, f i) \ Set.accumulate f n
400400
have hCs n : s n ∈ C := hC.diff_mem hUf (hC.accumulate_mem hf n)
401401
have h_tendsto : Tendsto (fun n ↦ m (s n)) atTop (𝓝 0) := by
402402
refine hm_tendsto hCs ?_ ?_
@@ -428,7 +428,7 @@ theorem tendsto_atTop_addContent_iUnion_of_addContent_iUnion_eq_tsum (hC : IsSet
428428
(disjoint_disjointed f)]
429429
have h n : m (f n) = ∑ i ∈ range (n + 1), m (disjointed f i) := by
430430
nth_rw 1 [← addContent_accumulate _ hC (disjoint_disjointed f) (hC.disjointed_mem hf),
431-
← hf_mono.partialSups_eq, ← partialSups_disjointed, partialSups_eq_biSup, Accumulate]
431+
← hf_mono.partialSups_eq, ← partialSups_disjointed, partialSups_eq_biSup, accumulate]
432432
rfl
433433
simp_rw [h]
434434
refine (tendsto_add_atTop_iff_nat (f := (fun k ↦ ∑ i ∈ range k, m (disjointed f i))) 1).2 ?_

Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ theorem apply_union_le (μ : FiniteMeasure Ω) {s₁ s₂ : Set Ω} : μ (s₁
177177
sets is the limit of the measures of the partial unions. -/
178178
protected lemma tendsto_measure_iUnion_accumulate {ι : Type*} [Preorder ι]
179179
[IsCountablyGenerated (atTop : Filter ι)] {μ : FiniteMeasure Ω} {f : ι → Set Ω} :
180-
Tendsto (fun i ↦ μ (Accumulate f i)) atTop (𝓝 (μ (⋃ i, f i))) := by
180+
Tendsto (fun i ↦ μ (accumulate f i)) atTop (𝓝 (μ (⋃ i, f i))) := by
181181
simpa [← ennreal_coeFn_eq_coeFn_toMeasure]
182182
using tendsto_measure_iUnion_accumulate (μ := μ.toMeasure) (ι := ι)
183183

Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ theorem _root_.Antitone.measure_iUnion [Preorder ι] [IsCodirectedOrder ι]
496496
(not necessarily measurable) sets is the supremum of the measures of the partial unions. -/
497497
theorem measure_iUnion_eq_iSup_accumulate [Preorder ι] [IsDirectedOrder ι]
498498
[(atTop : Filter ι).IsCountablyGenerated] {f : ι → Set α} :
499-
μ (⋃ i, f i) = ⨆ i, μ (Accumulate f i) := by
499+
μ (⋃ i, f i) = ⨆ i, μ (accumulate f i) := by
500500
rw [← iUnion_accumulate]
501501
exact monotone_accumulate.measure_iUnion
502502

@@ -590,7 +590,7 @@ sets is the limit of the measures of the partial unions. -/
590590
theorem tendsto_measure_iUnion_accumulate {α ι : Type*}
591591
[Preorder ι] [IsCountablyGenerated (atTop : Filter ι)]
592592
{_ : MeasurableSpace α} {μ : Measure α} {f : ι → Set α} :
593-
Tendsto (fun i ↦ μ (Accumulate f i)) atTop (𝓝 (μ (⋃ i, f i))) := by
593+
Tendsto (fun i ↦ μ (accumulate f i)) atTop (𝓝 (μ (⋃ i, f i))) := by
594594
refine .of_neBot_imp fun h ↦ ?_
595595
have := (atTop_neBot_iff.1 h).2
596596
rw [measure_iUnion_eq_iSup_accumulate]

Mathlib/MeasureTheory/Measure/Portmanteau.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ lemma ProbabilityMeasure.exists_lt_measure_biUnion_of_isOpen
795795
simp [← hT, hr]
796796
rcases T_count.exists_eq_range this with ⟨f, hf⟩
797797
have G_eq : G = ⋃ n, f n := by simp [← hT, hf]
798-
have : Tendsto (fun i ↦ ν (Accumulate f i)) atTop (𝓝 (ν (⋃ i, f i))) :=
798+
have : Tendsto (fun i ↦ ν (accumulate f i)) atTop (𝓝 (ν (⋃ i, f i))) :=
799799
(ENNReal.tendsto_toNNReal_iff (by simp) (by simp)).2 tendsto_measure_iUnion_accumulate
800800
rw [← G_eq] at this
801801
rcases ((tendsto_order.1 this).1 r hr).exists with ⟨n, hn⟩

Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ theorem apply_union_le (μ : ProbabilityMeasure Ω) {s₁ s₂ : Set Ω} : μ (s
204204
sets is the limit of the measures of the partial unions. -/
205205
protected lemma tendsto_measure_iUnion_accumulate {ι : Type*} [Preorder ι]
206206
[IsCountablyGenerated (atTop : Filter ι)] {μ : ProbabilityMeasure Ω} {f : ι → Set Ω} :
207-
Tendsto (fun i ↦ μ (Accumulate f i)) atTop (𝓝 (μ (⋃ i, f i))) := by
207+
Tendsto (fun i ↦ μ (accumulate f i)) atTop (𝓝 (μ (⋃ i, f i))) := by
208208
simpa [← ennreal_coeFn_eq_coeFn_toMeasure, ENNReal.tendsto_coe]
209209
using tendsto_measure_iUnion_accumulate (μ := μ.toMeasure)
210210

Mathlib/MeasureTheory/Measure/SeparableMeasure.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ theorem Measure.MeasureDense.of_generateFrom_isSetAlgebra_sigmaFinite (h𝒜 : I
272272
measurable s hs := hgen ▸ measurableSet_generateFrom hs
273273
approx s ms hμs ε ε_pos := by
274274
-- We use partial unions of (Sₙ) to get a monotone family spanning `X`.
275-
let T := Accumulate S.set
275+
let T := accumulate S.set
276276
have T_mem (n) : T n ∈ 𝒜 := by
277277
simpa using h𝒜.biUnion_mem {k | k ≤ n}.toFinset (fun k _ ↦ S.set_mem k)
278278
have T_finite (n) : μ (T n) < ∞ := by

Mathlib/MeasureTheory/Measure/Typeclasses/SFinite.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def Measure.toFiniteSpanningSetsIn (μ : Measure α) [h : SigmaFinite μ] :
117117
measure using `Classical.choose`. This definition satisfies monotonicity in addition to all other
118118
properties in `SigmaFinite`. -/
119119
def spanningSets (μ : Measure α) [SigmaFinite μ] (i : ℕ) : Set α :=
120-
Accumulate μ.toFiniteSpanningSetsIn.set i
120+
accumulate μ.toFiniteSpanningSetsIn.set i
121121

122122
theorem monotone_spanningSets (μ : Measure α) [SigmaFinite μ] : Monotone (spanningSets μ) :=
123123
monotone_accumulate

Mathlib/MeasureTheory/SetSemiring.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ theorem iInter_le_mem (hC : IsSetRing C) {s : ℕ → Set α} (hs : ∀ n, s n
523523
| succ n hn => rw [biInter_le_succ]; exact hC.inter_mem hn (hs _)
524524

525525
theorem accumulate_mem (hC : IsSetRing C) {s : ℕ → Set α} (hs : ∀ i, s i ∈ C) (n : ℕ) :
526-
Accumulate s n ∈ C := by
526+
accumulate s n ∈ C := by
527527
induction n with
528528
| zero => simp [hs 0]
529529
| succ n hn => rw [accumulate_succ]; exact hC.union_mem hn (hs _)

Mathlib/Topology/Compactness/Compact.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ theorem Finset.isCompact_biUnion (s : Finset ι) {f : ι → Set X} (hf : ∀ i
458458
s.finite_toSet.isCompact_biUnion hf
459459

460460
theorem isCompact_accumulate {K : ℕ → Set X} (hK : ∀ n, IsCompact (K n)) (n : ℕ) :
461-
IsCompact (Accumulate K n) :=
461+
IsCompact (accumulate K n) :=
462462
(finite_le_nat n).isCompact_biUnion fun k _ => hK k
463463

464464
theorem Set.Finite.isCompact_sUnion {S : Set (Set X)} (hf : S.Finite) (hc : ∀ s ∈ S, IsCompact s) :

0 commit comments

Comments
 (0)