Skip to content

Commit cd5b4d3

Browse files
pfaffelhjoneugster
andcommitted
feat(Data/Set/Dissipate): Introduce dissipate s x := ⋂ y ≤ x, s y (#33975)
Introduce Dissipate s x := ⋂ y ≤ x, s y (Data/Set/Dissipate), which is parallel to Data/Set/Accumulate and provide some API for it. This will be used for compact systems in another PR. This PR continues the work from #25899. Co-authored-by: pfaffelh <p.p@stochastik.uni-freiburg.de> Co-authored-by: Jon Eugster <eugster.jon@gmail.com>
1 parent 84e8ddf commit cd5b4d3

4 files changed

Lines changed: 91 additions & 5 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4047,6 +4047,7 @@ public import Mathlib.Data.Set.Constructions
40474047
public import Mathlib.Data.Set.Countable
40484048
public import Mathlib.Data.Set.Defs
40494049
public import Mathlib.Data.Set.Disjoint
4050+
public import Mathlib.Data.Set.Dissipate
40504051
public import Mathlib.Data.Set.Enumerate
40514052
public import Mathlib.Data.Set.Equitable
40524053
public import Mathlib.Data.Set.Finite.Basic

Mathlib/Data/Set/Accumulate.lean

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ Copyright (c) 2020 Floris van Doorn. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Floris van Doorn
55
-/
6+
67
module
78

89
public import Mathlib.Data.Nat.Lattice
9-
public import Mathlib.Data.Set.Lattice
1010
public import Mathlib.Order.PartialSups
1111

1212
/-!
1313
# Accumulate
1414
15-
The function `accumulate` takes a set `s` and returns `⋃ y ≤ x, s y`.
15+
The function `accumulate` takes `s : α → Set β` with `LE α` and returns `⋃ y ≤ x, s y`.
16+
It is related to `dissipate s := ⋂ y ≤ x, s y`.
1617
17-
This is closely related to the function `partialSups`, although these two functions have
18+
`accumulate` is closely related to the function `partialSups`, although these two functions have
1819
slightly different typeclass assumptions and API. `partialSups_eq_accumulate` shows
1920
that they coincide on `ℕ`.
2021
-/
2122

2223
@[expose] public section
2324

24-
2525
variable {α β : Type*} {s : α → Set β}
2626

2727
namespace Set
@@ -52,11 +52,13 @@ theorem accumulate_subset_accumulate [Preorder α] {x y} (h : x ≤ y) :
5252
accumulate s x ⊆ accumulate s y :=
5353
monotone_accumulate h
5454

55+
@[simp]
5556
theorem biUnion_accumulate [Preorder α] (x : α) : ⋃ y ≤ x, accumulate s y = ⋃ y ≤ x, s y := by
5657
apply Subset.antisymm
5758
· exact iUnion₂_subset fun y hy => monotone_accumulate hy
5859
· exact iUnion₂_mono fun y _ => subset_accumulate
5960

61+
@[simp]
6062
theorem iUnion_accumulate [Preorder α] : ⋃ x, accumulate s x = ⋃ x, s x := by
6163
apply Subset.antisymm
6264
· simp only [subset_def, mem_iUnion, exists_imp, mem_accumulate]

Mathlib/Data/Set/Dissipate.lean

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/-
2+
Copyright (c) 2026 Peter Pfaffelhuber. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Peter Pfaffelhuber
5+
-/
6+
7+
module
8+
9+
public import Mathlib.Data.Set.Accumulate
10+
11+
/-!
12+
# Dissipate
13+
14+
The function `dissipate` takes `s : α → Set β` with `LE α` and returns `⋂ y ≤ x, s y`.
15+
It is related to `accumulate s := ⋃ y ≤ x, s y`.
16+
17+
-/
18+
19+
@[expose] public section
20+
21+
variable {α β : Type*} {s : α → Set β}
22+
23+
namespace Set
24+
25+
/-- `dissipate s` is the intersection of `s y` for `y ≤ x`. -/
26+
def dissipate [LE α] (s : α → Set β) (x : α) : Set β :=
27+
⋂ y ≤ x, s y
28+
29+
theorem dissipate_def [LE α] {x : α} : dissipate s x = ⋂ y ≤ x, s y := rfl
30+
31+
@[simp]
32+
theorem mem_dissipate [LE α] {x : α} {z : β} : z ∈ dissipate s x ↔ ∀ y ≤ x, z ∈ s y := by
33+
simp [dissipate_def]
34+
35+
theorem dissipate_subset [LE α] {x y : α} (hy : y ≤ x) : dissipate s x ⊆ s y :=
36+
biInter_subset_of_mem hy
37+
38+
theorem iInter_subset_dissipate [LE α] (x : α) : ⋂ i, s i ⊆ dissipate s x := by
39+
simp only [dissipate, subset_iInter_iff]
40+
exact fun x h ↦ iInter_subset_of_subset x fun ⦃a⦄ a ↦ a
41+
42+
theorem antitone_dissipate [Preorder α] : Antitone (dissipate s) :=
43+
fun _ _ hab ↦ biInter_subset_biInter_left fun _ hz => le_trans hz hab
44+
45+
@[gcongr]
46+
theorem dissipate_subset_dissipate [Preorder α] {x y} (h : y ≤ x) :
47+
dissipate s x ⊆ dissipate s y :=
48+
antitone_dissipate h
49+
50+
@[simp]
51+
theorem biInter_dissipate [Preorder α] {s : α → Set β} {x : α} :
52+
⋂ y, ⋂ (_ : y ≤ x), dissipate s y = dissipate s x := by
53+
apply Subset.antisymm
54+
· apply iInter_mono fun z y hy ↦ ?_
55+
simp only [mem_iInter, mem_dissipate] at *
56+
exact fun h ↦ hy h z le_rfl
57+
· simp only [subset_iInter_iff]
58+
exact fun i j ↦ dissipate_subset_dissipate j
59+
60+
@[simp]
61+
theorem iInter_dissipate [Preorder α] : ⋂ x, dissipate s x = ⋂ x, s x := by
62+
apply Subset.antisymm <;> simp_rw [subset_def, dissipate_def, mem_iInter]
63+
· exact fun z h x' ↦ h x' x' le_rfl
64+
· exact fun z h x' y hy ↦ h y
65+
66+
@[simp]
67+
lemma dissipate_bot [PartialOrder α] [OrderBot α] (s : α → Set β) : dissipate s ⊥ = s ⊥ := by
68+
simp [dissipate_def]
69+
70+
@[simp]
71+
lemma dissipate_zero_nat (s : ℕ → Set β) : dissipate s 0 = s 0 := by
72+
simp [dissipate_def]
73+
74+
open Nat
75+
76+
@[simp]
77+
theorem dissipate_succ (s : ℕ → Set α) (n : ℕ) :
78+
dissipate s (n + 1) = (dissipate s n) ∩ s (n + 1) := by
79+
ext x
80+
simp_all only [dissipate_def, mem_iInter, mem_inter_iff]
81+
grind
82+
83+
end Set

Mathlib/MeasureTheory/Measure/MeasuredSets.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ lemma exists_measure_symmDiff_lt_of_generateFrom_isSetRing [IsFiniteMeasure μ]
114114
have fC n : Set.accumulate f n ∈ C := hC.accumulate_mem (fun n ↦ DC (by simp [hf])) n
115115
have : Tendsto (fun n ↦ μ (Set.accumulate f n)ᶜ) atTop (𝓝 0) := by
116116
have : ⋃₀ D = ⋃ n, Set.accumulate f n := by simp [hf, iUnion_accumulate]
117-
rw [show (⋃₀ D)ᶜ = ⋂ n, (Set.accumulate f n)ᶜ by simp [this]] at hD
117+
rw [show (⋃₀ D)ᶜ = ⋂ n, (Set.accumulate f n)ᶜ by simp [this, accumulate]] at hD
118118
rw [← hD]
119119
apply tendsto_measure_iInter_atTop (fun i ↦ ?_)
120120
(fun i j hij ↦ by simpa using monotone_accumulate hij) ⟨0, by simp⟩

0 commit comments

Comments
 (0)