@@ -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
1717This is closely related to the function `partialSups`, although these two functions have
1818slightly different typeclass assumptions and API. `partialSups_eq_accumulate` shows
@@ -26,64 +26,66 @@ variable {α β : Type*} {s : α → Set β}
2626
2727namespace 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]
4951theorem 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
7375open Function in
7476theorem 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
8183theorem 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
8486lemma 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
8991end Set
0 commit comments