Documentation

Mathlib.Data.Set.Accumulate

Accumulate #

The function accumulate takes a set s and returns ⋃ y ≤ x, s y.

This is closely related to the function partialSups, although these two functions have slightly different typeclass assumptions and API. partialSups_eq_accumulate shows that they coincide on ℕ.

def Set.accumulate {α : Type u_1} {β : Type u_2} [LE α] (s : α → Set β) (x : α) :
Set β

accumulate s is the union of s y for y ≤ x.

Equations
Instances For
    @[deprecated Set.accumulate (since := "2025-12-14")]
    def Set.Accumulate {α : Type u_1} {β : Type u_2} [LE α] (s : α → Set β) (x : α) :
    Set β

    Alias of Set.accumulate.


    accumulate s is the union of s y for y ≤ x.

    Equations
    Instances For
      theorem Set.accumulate_def {α : Type u_1} {β : Type u_2} {s : α → Set β} [LE α] {x : α} :
      accumulate s x = ⋃ (y : α), ⋃ (_ : y ≤ x), s y
      @[simp]
      theorem Set.mem_accumulate {α : Type u_1} {β : Type u_2} {s : α → Set β} [LE α] {x : α} {z : β} :
      z ∈ accumulate s x ↔ ∃ y ≤ x, z ∈ s y
      theorem Set.subset_accumulate {α : Type u_1} {β : Type u_2} {s : α → Set β} [Preorder α] {x : α} :
      s x ⊆ accumulate s x
      theorem Set.accumulate_subset_iUnion {α : Type u_1} {β : Type u_2} {s : α → Set β} [LE α] (x : α) :
      accumulate s x ⊆ ⋃ (i : α), s i
      theorem Set.monotone_accumulate {α : Type u_1} {β : Type u_2} {s : α → Set β} [Preorder α] :
      theorem Set.accumulate_subset_accumulate {α : Type u_1} {β : Type u_2} {s : α → Set β} [Preorder α] {x y : α} (h : x ≤ y) :
      theorem Set.biUnion_accumulate {α : Type u_1} {β : Type u_2} {s : α → Set β} [Preorder α] (x : α) :
      ⋃ (y : α), ⋃ (_ : y ≤ x), accumulate s y = ⋃ (y : α), ⋃ (_ : y ≤ x), s y
      theorem Set.iUnion_accumulate {α : Type u_1} {β : Type u_2} {s : α → Set β} [Preorder α] :
      ⋃ (x : α), accumulate s x = ⋃ (x : α), s x
      @[simp]
      theorem Set.accumulate_bot {α : Type u_1} {β : Type u_2} [PartialOrder α] [OrderBot α] (s : α → Set β) :
      @[simp]
      theorem Set.accumulate_zero_nat {β : Type u_2} (s : ℕ → Set β) :
      accumulate s 0 = s 0
      theorem Set.disjoint_accumulate {α : Type u_1} {β : Type u_2} {s : α → Set β} [Preorder α] (hs : Pairwise (Function.onFun Disjoint s)) {i j : α} (hij : i < j) :
      Disjoint (accumulate s i) (s j)
      theorem Set.accumulate_succ {α : Type u_1} (u : ℕ → Set α) (n : ℕ) :
      accumulate u (n + 1) = accumulate u n ∪ u (n + 1)
      theorem Set.partialSups_eq_accumulate {α : Type u_1} (f : ℕ → Set α) :