Context
stringlengths
57
6.04k
file_name
stringlengths
21
79
start
int64
14
1.49k
end
int64
18
1.5k
theorem
stringlengths
25
1.55k
proof
stringlengths
5
7.36k
rank
int64
0
2.4k
import Mathlib.Topology.Algebra.GroupCompletion import Mathlib.Topology.Algebra.InfiniteSum.Group open UniformSpace.Completion variable {Ξ± Ξ² : Type*} [AddCommGroup Ξ±] [UniformSpace Ξ±] [UniformAddGroup Ξ±] theorem hasSum_iff_hasSum_compl (f : Ξ² β†’ Ξ±) (a : Ξ±): HasSum (toCompl ∘ f) a ↔ HasSum f a := (denseInducing_toCompl Ξ±).hasSum_iff f a theorem summable_iff_summable_compl_and_tsum_mem (f : Ξ² β†’ Ξ±) : Summable f ↔ Summable (toCompl ∘ f) ∧ βˆ‘' i, toCompl (f i) ∈ Set.range toCompl := (denseInducing_toCompl Ξ±).summable_iff_tsum_comp_mem_range f
Mathlib/Topology/Algebra/InfiniteSum/GroupCompletion.lean
32
45
theorem summable_iff_cauchySeq_finset_and_tsum_mem (f : Ξ² β†’ Ξ±) : Summable f ↔ CauchySeq (fun s : Finset Ξ² ↦ βˆ‘ b in s, f b) ∧ βˆ‘' i, toCompl (f i) ∈ Set.range toCompl := by
classical constructor Β· rintro ⟨a, ha⟩ exact ⟨ha.cauchySeq, ((summable_iff_summable_compl_and_tsum_mem f).mp ⟨a, ha⟩).2⟩ Β· rintro ⟨h_cauchy, h_tsum⟩ apply (summable_iff_summable_compl_and_tsum_mem f).mpr constructor Β· apply summable_iff_cauchySeq_finset.mpr simp_rw [Function.comp_apply, ← map_sum] exact h_cauchy.map (uniformContinuous_coe Ξ±) Β· exact h_tsum
1,375
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Topology.Algebra.Star noncomputable section open Filter Finset Function open scoped Topology variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} section ProdDomain variable [CommMonoid Ξ±] [TopologicalSpace Ξ±] @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
33
35
theorem hasProd_pi_single [DecidableEq Ξ²] (b : Ξ²) (a : Ξ±) : HasProd (Pi.mulSingle b a) a := by
convert hasProd_ite_eq b a simp [Pi.mulSingle_apply]
1,376
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Topology.Algebra.Star noncomputable section open Filter Finset Function open scoped Topology variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} section ProdDomain variable [CommMonoid Ξ±] [TopologicalSpace Ξ±] @[to_additive] theorem hasProd_pi_single [DecidableEq Ξ²] (b : Ξ²) (a : Ξ±) : HasProd (Pi.mulSingle b a) a := by convert hasProd_ite_eq b a simp [Pi.mulSingle_apply] #align has_sum_pi_single hasSum_pi_single @[to_additive (attr := simp)]
Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
39
42
theorem tprod_pi_single [DecidableEq β] (b : β) (a : α) : ∏' b', Pi.mulSingle b a b' = a := by
rw [tprod_eq_mulSingle b] Β· simp Β· intro b' hb'; simp [hb']
1,376
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Topology.Algebra.Star noncomputable section open Filter Finset Function open scoped Topology variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} section ProdCodomain variable [CommMonoid Ξ±] [TopologicalSpace Ξ±] [CommMonoid Ξ³] [TopologicalSpace Ξ³] @[to_additive HasSum.prod_mk]
Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
68
70
theorem HasProd.prod_mk {f : Ξ² β†’ Ξ±} {g : Ξ² β†’ Ξ³} {a : Ξ±} {b : Ξ³} (hf : HasProd f a) (hg : HasProd g b) : HasProd (fun x ↦ (⟨f x, g x⟩ : Ξ± Γ— Ξ³)) ⟨a, b⟩ := by
simp [HasProd, ← prod_mk_prod, Filter.Tendsto.prod_mk_nhds hf hg]
1,376
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Topology.Algebra.Star noncomputable section open Filter Finset Function open scoped Topology variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} section ContinuousMul variable [CommMonoid Ξ±] [TopologicalSpace Ξ±] [ContinuousMul Ξ±] section RegularSpace variable [RegularSpace Ξ±] @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
84
101
theorem HasProd.sigma {Ξ³ : Ξ² β†’ Type*} {f : (Ξ£ b : Ξ², Ξ³ b) β†’ Ξ±} {g : Ξ² β†’ Ξ±} {a : Ξ±} (ha : HasProd f a) (hf : βˆ€ b, HasProd (fun c ↦ f ⟨b, c⟩) (g b)) : HasProd g a := by
classical refine (atTop_basis.tendsto_iff (closed_nhds_basis a)).mpr ?_ rintro s ⟨hs, hsc⟩ rcases mem_atTop_sets.mp (ha hs) with ⟨u, hu⟩ use u.image Sigma.fst, trivial intro bs hbs simp only [Set.mem_preimage, ge_iff_le, Finset.le_iff_subset] at hu have : Tendsto (fun t : Finset (Ξ£b, Ξ³ b) ↦ ∏ p ∈ t.filter fun p ↦ p.1 ∈ bs, f p) atTop (𝓝 <| ∏ b ∈ bs, g b) := by simp only [← sigma_preimage_mk, prod_sigma] refine tendsto_finset_prod _ fun b _ ↦ ?_ change Tendsto (fun t ↦ (fun t ↦ ∏ s ∈ t, f ⟨b, s⟩) (preimage t (Sigma.mk b) _)) atTop (𝓝 (g b)) exact (hf b).comp (tendsto_finset_preimage_atTop_atTop (sigma_mk_injective)) refine hsc.mem_of_tendsto this (eventually_atTop.2 ⟨u, fun t ht ↦ hu _ fun x hx ↦ ?_⟩) exact mem_filter.2 ⟨ht hx, hbs <| mem_image_of_mem _ hx⟩
1,376
import Mathlib.Topology.Algebra.InfiniteSum.Constructions import Mathlib.Topology.Algebra.Module.Basic #align_import topology.algebra.infinite_sum.module from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514" variable {Ξ± Ξ² Ξ³ Ξ΄ : Type*} open Filter Finset Function variable {ΞΉ ΞΊ R Rβ‚‚ M Mβ‚‚ : Type*} section HasSum -- Results in this section hold for continuous additive monoid homomorphisms or equivalences but we -- don't have bundled continuous additive homomorphisms. variable [Semiring R] [Semiring Rβ‚‚] [AddCommMonoid M] [Module R M] [AddCommMonoid Mβ‚‚] [Module Rβ‚‚ Mβ‚‚] [TopologicalSpace M] [TopologicalSpace Mβ‚‚] {Οƒ : R β†’+* Rβ‚‚} {Οƒ' : Rβ‚‚ β†’+* R} [RingHomInvPair Οƒ Οƒ'] [RingHomInvPair Οƒ' Οƒ] protected theorem ContinuousLinearMap.hasSum {f : ΞΉ β†’ M} (Ο† : M β†’SL[Οƒ] Mβ‚‚) {x : M} (hf : HasSum f x) : HasSum (fun b : ΞΉ ↦ Ο† (f b)) (Ο† x) := by simpa only using hf.map Ο†.toLinearMap.toAddMonoidHom Ο†.continuous #align continuous_linear_map.has_sum ContinuousLinearMap.hasSum alias HasSum.mapL := ContinuousLinearMap.hasSum set_option linter.uppercaseLean3 false in #align has_sum.mapL HasSum.mapL protected theorem ContinuousLinearMap.summable {f : ΞΉ β†’ M} (Ο† : M β†’SL[Οƒ] Mβ‚‚) (hf : Summable f) : Summable fun b : ΞΉ ↦ Ο† (f b) := (hf.hasSum.mapL Ο†).summable #align continuous_linear_map.summable ContinuousLinearMap.summable alias Summable.mapL := ContinuousLinearMap.summable set_option linter.uppercaseLean3 false in #align summable.mapL Summable.mapL protected theorem ContinuousLinearMap.map_tsum [T2Space Mβ‚‚] {f : ΞΉ β†’ M} (Ο† : M β†’SL[Οƒ] Mβ‚‚) (hf : Summable f) : Ο† (βˆ‘' z, f z) = βˆ‘' z, Ο† (f z) := (hf.hasSum.mapL Ο†).tsum_eq.symm #align continuous_linear_map.map_tsum ContinuousLinearMap.map_tsum protected theorem ContinuousLinearEquiv.hasSum {f : ΞΉ β†’ M} (e : M ≃SL[Οƒ] Mβ‚‚) {y : Mβ‚‚} : HasSum (fun b : ΞΉ ↦ e (f b)) y ↔ HasSum f (e.symm y) := ⟨fun h ↦ by simpa only [e.symm.coe_coe, e.symm_apply_apply] using h.mapL (e.symm : Mβ‚‚ β†’SL[Οƒ'] M), fun h ↦ by simpa only [e.coe_coe, e.apply_symm_apply] using (e : M β†’SL[Οƒ] Mβ‚‚).hasSum h⟩ #align continuous_linear_equiv.has_sum ContinuousLinearEquiv.hasSum protected theorem ContinuousLinearEquiv.hasSum' {f : ΞΉ β†’ M} (e : M ≃SL[Οƒ] Mβ‚‚) {x : M} : HasSum (fun b : ΞΉ ↦ e (f b)) (e x) ↔ HasSum f x := by rw [e.hasSum, ContinuousLinearEquiv.symm_apply_apply] #align continuous_linear_equiv.has_sum' ContinuousLinearEquiv.hasSum' protected theorem ContinuousLinearEquiv.summable {f : ΞΉ β†’ M} (e : M ≃SL[Οƒ] Mβ‚‚) : (Summable fun b : ΞΉ ↦ e (f b)) ↔ Summable f := ⟨fun hf ↦ (e.hasSum.1 hf.hasSum).summable, (e : M β†’SL[Οƒ] Mβ‚‚).summable⟩ #align continuous_linear_equiv.summable ContinuousLinearEquiv.summable
Mathlib/Topology/Algebra/InfiniteSum/Module.lean
167
178
theorem ContinuousLinearEquiv.tsum_eq_iff [T2Space M] [T2Space Mβ‚‚] {f : ΞΉ β†’ M} (e : M ≃SL[Οƒ] Mβ‚‚) {y : Mβ‚‚} : (βˆ‘' z, e (f z)) = y ↔ βˆ‘' z, f z = e.symm y := by
by_cases hf : Summable f Β· exact ⟨fun h ↦ (e.hasSum.mp ((e.summable.mpr hf).hasSum_iff.mpr h)).tsum_eq, fun h ↦ (e.hasSum.mpr (hf.hasSum_iff.mpr h)).tsum_eq⟩ Β· have hf' : Β¬Summable fun z ↦ e (f z) := fun h ↦ hf (e.summable.mp h) rw [tsum_eq_zero_of_not_summable hf, tsum_eq_zero_of_not_summable hf'] refine ⟨?_, fun H ↦ ?_⟩ Β· rintro rfl simp Β· simpa using congr_arg (fun z ↦ e z) H
1,377
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Topology.Algebra.InfiniteSum.Constructions import Mathlib.Topology.Algebra.Ring.Basic #align_import topology.algebra.infinite_sum.ring from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Filter Finset Function open scoped Classical variable {ΞΉ ΞΊ R Ξ± : Type*} section NonUnitalNonAssocSemiring variable [NonUnitalNonAssocSemiring Ξ±] [TopologicalSpace Ξ±] [TopologicalSemiring Ξ±] {f g : ΞΉ β†’ Ξ±} {a a₁ aβ‚‚ : Ξ±}
Mathlib/Topology/Algebra/InfiniteSum/Ring.lean
34
35
theorem HasSum.mul_left (aβ‚‚) (h : HasSum f a₁) : HasSum (fun i ↦ aβ‚‚ * f i) (aβ‚‚ * a₁) := by
simpa only using h.map (AddMonoidHom.mulLeft aβ‚‚) (continuous_const.mul continuous_id)
1,378
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Topology.Algebra.InfiniteSum.Constructions import Mathlib.Topology.Algebra.Ring.Basic #align_import topology.algebra.infinite_sum.ring from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Filter Finset Function open scoped Classical variable {ΞΉ ΞΊ R Ξ± : Type*} section NonUnitalNonAssocSemiring variable [NonUnitalNonAssocSemiring Ξ±] [TopologicalSpace Ξ±] [TopologicalSemiring Ξ±] {f g : ΞΉ β†’ Ξ±} {a a₁ aβ‚‚ : Ξ±} theorem HasSum.mul_left (aβ‚‚) (h : HasSum f a₁) : HasSum (fun i ↦ aβ‚‚ * f i) (aβ‚‚ * a₁) := by simpa only using h.map (AddMonoidHom.mulLeft aβ‚‚) (continuous_const.mul continuous_id) #align has_sum.mul_left HasSum.mul_left
Mathlib/Topology/Algebra/InfiniteSum/Ring.lean
38
39
theorem HasSum.mul_right (aβ‚‚) (hf : HasSum f a₁) : HasSum (fun i ↦ f i * aβ‚‚) (a₁ * aβ‚‚) := by
simpa only using hf.map (AddMonoidHom.mulRight aβ‚‚) (continuous_id.mul continuous_const)
1,378
import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.Topology.Algebra.InfiniteSum.Constructions import Mathlib.Topology.Algebra.Ring.Basic #align_import topology.algebra.infinite_sum.ring from "leanprover-community/mathlib"@"9a59dcb7a2d06bf55da57b9030169219980660cd" open Filter Finset Function open scoped Classical variable {ΞΉ ΞΊ R Ξ± : Type*} section NonUnitalNonAssocSemiring variable [NonUnitalNonAssocSemiring Ξ±] [TopologicalSpace Ξ±] [TopologicalSemiring Ξ±] {f g : ΞΉ β†’ Ξ±} {a a₁ aβ‚‚ : Ξ±} theorem HasSum.mul_left (aβ‚‚) (h : HasSum f a₁) : HasSum (fun i ↦ aβ‚‚ * f i) (aβ‚‚ * a₁) := by simpa only using h.map (AddMonoidHom.mulLeft aβ‚‚) (continuous_const.mul continuous_id) #align has_sum.mul_left HasSum.mul_left theorem HasSum.mul_right (aβ‚‚) (hf : HasSum f a₁) : HasSum (fun i ↦ f i * aβ‚‚) (a₁ * aβ‚‚) := by simpa only using hf.map (AddMonoidHom.mulRight aβ‚‚) (continuous_id.mul continuous_const) #align has_sum.mul_right HasSum.mul_right theorem Summable.mul_left (a) (hf : Summable f) : Summable fun i ↦ a * f i := (hf.hasSum.mul_left _).summable #align summable.mul_left Summable.mul_left theorem Summable.mul_right (a) (hf : Summable f) : Summable fun i ↦ f i * a := (hf.hasSum.mul_right _).summable #align summable.mul_right Summable.mul_right section CauchyProduct section HasAntidiagonal variable {A : Type*} [AddCommMonoid A] [HasAntidiagonal A] variable [TopologicalSpace Ξ±] [NonUnitalNonAssocSemiring Ξ±] {f g : A β†’ Ξ±} theorem summable_mul_prod_iff_summable_mul_sigma_antidiagonal : (Summable fun x : A Γ— A ↦ f x.1 * g x.2) ↔ Summable fun x : Ξ£n : A, antidiagonal n ↦ f (x.2 : A Γ— A).1 * g (x.2 : A Γ— A).2 := Finset.sigmaAntidiagonalEquivProd.summable_iff.symm #align summable_mul_prod_iff_summable_mul_sigma_antidiagonal summable_mul_prod_iff_summable_mul_sigma_antidiagonal variable [T3Space Ξ±] [TopologicalSemiring Ξ±]
Mathlib/Topology/Algebra/InfiniteSum/Ring.lean
208
213
theorem summable_sum_mul_antidiagonal_of_summable_mul (h : Summable fun x : A Γ— A ↦ f x.1 * g x.2) : Summable fun n ↦ βˆ‘ kl ∈ antidiagonal n, f kl.1 * g kl.2 := by
rw [summable_mul_prod_iff_summable_mul_sigma_antidiagonal] at h conv => congr; ext; rw [← Finset.sum_finset_coe, ← tsum_fintype] exact h.sigma' fun n ↦ (hasSum_fintype _).summable
1,378
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [TopologicalAddGroup G] here as some results require [UniformAddGroup G] instead section Nat section Monoid namespace HasProd @[to_additive "If `f : β„• β†’ M` has sum `m`, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `m`."] theorem tendsto_prod_nat {f : β„• β†’ M} (h : HasProd f m) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := h.comp tendsto_finset_range #align has_sum.tendsto_sum_nat HasSum.tendsto_sum_nat @[to_additive "If `f : β„• β†’ M` is summable, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `βˆ‘' i, f i`."] theorem Multipliable.tendsto_prod_tprod_nat {f : β„• β†’ M} (h : Multipliable f) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 (∏' i, f i)) := tendsto_prod_nat h.hasProd section ContinuousMul variable [ContinuousMul M] @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
62
65
theorem prod_range_mul {f : β„• β†’ M} {k : β„•} (h : HasProd (fun n ↦ f (n + k)) m) : HasProd f ((∏ i ∈ range k, f i) * m) := by
refine ((range k).hasProd f).mul_compl ?_ rwa [← (notMemRangeEquiv k).symm.hasProd_iff]
1,379
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [TopologicalAddGroup G] here as some results require [UniformAddGroup G] instead section Nat section Monoid namespace HasProd @[to_additive "If `f : β„• β†’ M` has sum `m`, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `m`."] theorem tendsto_prod_nat {f : β„• β†’ M} (h : HasProd f m) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := h.comp tendsto_finset_range #align has_sum.tendsto_sum_nat HasSum.tendsto_sum_nat @[to_additive "If `f : β„• β†’ M` is summable, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `βˆ‘' i, f i`."] theorem Multipliable.tendsto_prod_tprod_nat {f : β„• β†’ M} (h : Multipliable f) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 (∏' i, f i)) := tendsto_prod_nat h.hasProd section ContinuousMul variable [ContinuousMul M] @[to_additive] theorem prod_range_mul {f : β„• β†’ M} {k : β„•} (h : HasProd (fun n ↦ f (n + k)) m) : HasProd f ((∏ i ∈ range k, f i) * m) := by refine ((range k).hasProd f).mul_compl ?_ rwa [← (notMemRangeEquiv k).symm.hasProd_iff] @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
68
70
theorem zero_mul {f : β„• β†’ M} (h : HasProd (fun n ↦ f (n + 1)) m) : HasProd f (f 0 * m) := by
simpa only [prod_range_one] using h.prod_range_mul
1,379
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [TopologicalAddGroup G] here as some results require [UniformAddGroup G] instead section Nat section Monoid namespace HasProd @[to_additive "If `f : β„• β†’ M` has sum `m`, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `m`."] theorem tendsto_prod_nat {f : β„• β†’ M} (h : HasProd f m) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := h.comp tendsto_finset_range #align has_sum.tendsto_sum_nat HasSum.tendsto_sum_nat @[to_additive "If `f : β„• β†’ M` is summable, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `βˆ‘' i, f i`."] theorem Multipliable.tendsto_prod_tprod_nat {f : β„• β†’ M} (h : Multipliable f) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 (∏' i, f i)) := tendsto_prod_nat h.hasProd section ContinuousMul variable [ContinuousMul M] @[to_additive] theorem prod_range_mul {f : β„• β†’ M} {k : β„•} (h : HasProd (fun n ↦ f (n + k)) m) : HasProd f ((∏ i ∈ range k, f i) * m) := by refine ((range k).hasProd f).mul_compl ?_ rwa [← (notMemRangeEquiv k).symm.hasProd_iff] @[to_additive] theorem zero_mul {f : β„• β†’ M} (h : HasProd (fun n ↦ f (n + 1)) m) : HasProd f (f 0 * m) := by simpa only [prod_range_one] using h.prod_range_mul @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
73
78
theorem even_mul_odd {f : β„• β†’ M} (he : HasProd (fun k ↦ f (2 * k)) m) (ho : HasProd (fun k ↦ f (2 * k + 1)) m') : HasProd f (m * m') := by
have := mul_right_injectiveβ‚€ (two_ne_zero' β„•) replace ho := ((add_left_injective 1).comp this).hasProd_range_iff.2 ho refine (this.hasProd_range_iff.2 he).mul_isCompl ?_ ho simpa [(Β· ∘ Β·)] using Nat.isCompl_even_odd
1,379
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [TopologicalAddGroup G] here as some results require [UniformAddGroup G] instead section Nat section Monoid namespace HasProd @[to_additive "If `f : β„• β†’ M` has sum `m`, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `m`."] theorem tendsto_prod_nat {f : β„• β†’ M} (h : HasProd f m) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := h.comp tendsto_finset_range #align has_sum.tendsto_sum_nat HasSum.tendsto_sum_nat @[to_additive "If `f : β„• β†’ M` is summable, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `βˆ‘' i, f i`."] theorem Multipliable.tendsto_prod_tprod_nat {f : β„• β†’ M} (h : Multipliable f) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 (∏' i, f i)) := tendsto_prod_nat h.hasProd namespace Multipliable @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
88
92
theorem hasProd_iff_tendsto_nat [T2Space M] {f : β„• β†’ M} (hf : Multipliable f) : HasProd f m ↔ Tendsto (fun n : β„• ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := by
refine ⟨fun h ↦ h.tendsto_prod_nat, fun h ↦ ?_⟩ rw [tendsto_nhds_unique h hf.hasProd.tendsto_prod_nat] exact hf.hasProd
1,379
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [TopologicalAddGroup G] here as some results require [UniformAddGroup G] instead section Nat section Monoid namespace HasProd @[to_additive "If `f : β„• β†’ M` has sum `m`, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `m`."] theorem tendsto_prod_nat {f : β„• β†’ M} (h : HasProd f m) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := h.comp tendsto_finset_range #align has_sum.tendsto_sum_nat HasSum.tendsto_sum_nat @[to_additive "If `f : β„• β†’ M` is summable, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `βˆ‘' i, f i`."] theorem Multipliable.tendsto_prod_tprod_nat {f : β„• β†’ M} (h : Multipliable f) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 (∏' i, f i)) := tendsto_prod_nat h.hasProd section tprod variable [T2Space M] {Ξ± Ξ² Ξ³ : Type*} section Encodable variable [Encodable Ξ²] @[to_additive "You can compute a sum over an encodable type by summing over the natural numbers and taking a supremum. This is useful for outer measures."]
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
124
132
theorem tprod_iSup_decodeβ‚‚ [CompleteLattice Ξ±] (m : Ξ± β†’ M) (m0 : m βŠ₯ = 1) (s : Ξ² β†’ Ξ±) : ∏' i : β„•, m (⨆ b ∈ decodeβ‚‚ Ξ² i, s b) = ∏' b : Ξ², m (s b) := by
rw [← tprod_extend_one (@encode_injective Ξ² _)] refine tprod_congr fun n ↦ ?_ rcases em (n ∈ Set.range (encode : Ξ² β†’ β„•)) with ⟨a, rfl⟩ | hn Β· simp [encode_injective.extend_apply] Β· rw [extend_apply' _ _ _ hn] rw [← decodeβ‚‚_ne_none_iff, ne_eq, not_not] at hn simp [hn, m0]
1,379
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [TopologicalAddGroup G] here as some results require [UniformAddGroup G] instead section Nat section Monoid namespace HasProd @[to_additive "If `f : β„• β†’ M` has sum `m`, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `m`."] theorem tendsto_prod_nat {f : β„• β†’ M} (h : HasProd f m) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := h.comp tendsto_finset_range #align has_sum.tendsto_sum_nat HasSum.tendsto_sum_nat @[to_additive "If `f : β„• β†’ M` is summable, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `βˆ‘' i, f i`."] theorem Multipliable.tendsto_prod_tprod_nat {f : β„• β†’ M} (h : Multipliable f) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 (∏' i, f i)) := tendsto_prod_nat h.hasProd section tprod variable [T2Space M] {Ξ± Ξ² Ξ³ : Type*} section TopologicalGroup variable [TopologicalSpace G] [TopologicalGroup G] @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
218
221
theorem hasProd_nat_add_iff {f : β„• β†’ G} (k : β„•) : HasProd (fun n ↦ f (n + k)) g ↔ HasProd f (g * ∏ i ∈ range k, f i) := by
refine Iff.trans ?_ (range k).hasProd_compl_iff rw [← (notMemRangeEquiv k).symm.hasProd_iff, Function.comp_def, coe_notMemRangeEquiv_symm]
1,379
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [TopologicalAddGroup G] here as some results require [UniformAddGroup G] instead section Nat section Monoid namespace HasProd @[to_additive "If `f : β„• β†’ M` has sum `m`, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `m`."] theorem tendsto_prod_nat {f : β„• β†’ M} (h : HasProd f m) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := h.comp tendsto_finset_range #align has_sum.tendsto_sum_nat HasSum.tendsto_sum_nat @[to_additive "If `f : β„• β†’ M` is summable, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `βˆ‘' i, f i`."] theorem Multipliable.tendsto_prod_tprod_nat {f : β„• β†’ M} (h : Multipliable f) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 (∏' i, f i)) := tendsto_prod_nat h.hasProd section tprod variable [T2Space M] {Ξ± Ξ² Ξ³ : Type*} section UniformGroup variable [UniformSpace G] [UniformGroup G] @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
273
285
theorem cauchySeq_finset_iff_nat_tprod_vanishing {f : β„• β†’ G} : (CauchySeq fun s : Finset β„• ↦ ∏ n ∈ s, f n) ↔ βˆ€ e ∈ 𝓝 (1 : G), βˆƒ N : β„•, βˆ€ t βŠ† {n | N ≀ n}, (∏' n : t, f n) ∈ e := by
refine cauchySeq_finset_iff_tprod_vanishing.trans ⟨fun vanish e he ↦ ?_, fun vanish e he ↦ ?_⟩ Β· obtain ⟨s, hs⟩ := vanish e he refine ⟨if h : s.Nonempty then s.max' h + 1 else 0, fun t ht ↦ hs _ <| Set.disjoint_left.mpr ?_⟩ split_ifs at ht with h Β· exact fun m hmt hms ↦ (s.le_max' _ hms).not_lt (Nat.succ_le_iff.mp <| ht hmt) Β· exact fun _ _ hs ↦ h ⟨_, hs⟩ Β· obtain ⟨N, hN⟩ := vanish e he exact ⟨range N, fun t ht ↦ hN _ fun n hnt ↦ le_of_not_lt fun h ↦ Set.disjoint_left.mp ht hnt (mem_range.mpr h)⟩
1,379
import Mathlib.Topology.Algebra.InfiniteSum.Group import Mathlib.Logic.Encodable.Lattice noncomputable section open Filter Finset Function Encodable open scoped Topology variable {M : Type*} [CommMonoid M] [TopologicalSpace M] {m m' : M} variable {G : Type*} [CommGroup G] {g g' : G} -- don't declare [TopologicalAddGroup G] here as some results require [UniformAddGroup G] instead section Nat section Monoid namespace HasProd @[to_additive "If `f : β„• β†’ M` has sum `m`, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `m`."] theorem tendsto_prod_nat {f : β„• β†’ M} (h : HasProd f m) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 m) := h.comp tendsto_finset_range #align has_sum.tendsto_sum_nat HasSum.tendsto_sum_nat @[to_additive "If `f : β„• β†’ M` is summable, then the partial sums `βˆ‘ i ∈ range n, f i` converge to `βˆ‘' i, f i`."] theorem Multipliable.tendsto_prod_tprod_nat {f : β„• β†’ M} (h : Multipliable f) : Tendsto (fun n ↦ ∏ i ∈ range n, f i) atTop (𝓝 (∏' i, f i)) := tendsto_prod_nat h.hasProd section tprod variable [T2Space M] {Ξ± Ξ² Ξ³ : Type*} section UniformGroup variable [UniformSpace G] [UniformGroup G] @[to_additive] theorem cauchySeq_finset_iff_nat_tprod_vanishing {f : β„• β†’ G} : (CauchySeq fun s : Finset β„• ↦ ∏ n ∈ s, f n) ↔ βˆ€ e ∈ 𝓝 (1 : G), βˆƒ N : β„•, βˆ€ t βŠ† {n | N ≀ n}, (∏' n : t, f n) ∈ e := by refine cauchySeq_finset_iff_tprod_vanishing.trans ⟨fun vanish e he ↦ ?_, fun vanish e he ↦ ?_⟩ Β· obtain ⟨s, hs⟩ := vanish e he refine ⟨if h : s.Nonempty then s.max' h + 1 else 0, fun t ht ↦ hs _ <| Set.disjoint_left.mpr ?_⟩ split_ifs at ht with h Β· exact fun m hmt hms ↦ (s.le_max' _ hms).not_lt (Nat.succ_le_iff.mp <| ht hmt) Β· exact fun _ _ hs ↦ h ⟨_, hs⟩ Β· obtain ⟨N, hN⟩ := vanish e he exact ⟨range N, fun t ht ↦ hN _ fun n hnt ↦ le_of_not_lt fun h ↦ Set.disjoint_left.mp ht hnt (mem_range.mpr h)⟩ variable [CompleteSpace G] @[to_additive]
Mathlib/Topology/Algebra/InfiniteSum/NatInt.lean
290
292
theorem multipliable_iff_nat_tprod_vanishing {f : β„• β†’ G} : Multipliable f ↔ βˆ€ e ∈ 𝓝 1, βˆƒ N : β„•, βˆ€ t βŠ† {n | N ≀ n}, (∏' n : t, f n) ∈ e := by
rw [multipliable_iff_cauchySeq_finset, cauchySeq_finset_iff_nat_tprod_vanishing]
1,379
import Mathlib.Analysis.Convex.Basic import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Topology.Order.Basic #align_import analysis.convex.strict from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219" open Set open Convex Pointwise variable {π•œ 𝕝 E F Ξ² : Type*} open Function Set open Convex section OrderedSemiring variable [OrderedSemiring π•œ] [TopologicalSpace E] [TopologicalSpace F] section AddCommMonoid variable [AddCommMonoid E] [AddCommMonoid F] section SMul variable (π•œ) variable [SMul π•œ E] [SMul π•œ F] (s : Set E) def StrictConvex : Prop := s.Pairwise fun x y => βˆ€ ⦃a b : π•œβ¦„, 0 < a β†’ 0 < b β†’ a + b = 1 β†’ a β€’ x + b β€’ y ∈ interior s #align strict_convex StrictConvex variable {π•œ s} variable {x y : E} {a b : π•œ} theorem strictConvex_iff_openSegment_subset : StrictConvex π•œ s ↔ s.Pairwise fun x y => openSegment π•œ x y βŠ† interior s := forallβ‚…_congr fun _ _ _ _ _ => (openSegment_subset_iff π•œ).symm #align strict_convex_iff_open_segment_subset strictConvex_iff_openSegment_subset theorem StrictConvex.openSegment_subset (hs : StrictConvex π•œ s) (hx : x ∈ s) (hy : y ∈ s) (h : x β‰  y) : openSegment π•œ x y βŠ† interior s := strictConvex_iff_openSegment_subset.1 hs hx hy h #align strict_convex.open_segment_subset StrictConvex.openSegment_subset theorem strictConvex_empty : StrictConvex π•œ (βˆ… : Set E) := pairwise_empty _ #align strict_convex_empty strictConvex_empty
Mathlib/Analysis/Convex/Strict.lean
67
70
theorem strictConvex_univ : StrictConvex π•œ (univ : Set E) := by
intro x _ y _ _ a b _ _ _ rw [interior_univ] exact mem_univ _
1,380
import Mathlib.Analysis.Convex.Basic import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Topology.Order.Basic #align_import analysis.convex.strict from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219" open Set open Convex Pointwise variable {π•œ 𝕝 E F Ξ² : Type*} open Function Set open Convex section OrderedSemiring variable [OrderedSemiring π•œ] [TopologicalSpace E] [TopologicalSpace F] section AddCommMonoid variable [AddCommMonoid E] [AddCommMonoid F] section SMul variable (π•œ) variable [SMul π•œ E] [SMul π•œ F] (s : Set E) def StrictConvex : Prop := s.Pairwise fun x y => βˆ€ ⦃a b : π•œβ¦„, 0 < a β†’ 0 < b β†’ a + b = 1 β†’ a β€’ x + b β€’ y ∈ interior s #align strict_convex StrictConvex variable {π•œ s} variable {x y : E} {a b : π•œ} theorem strictConvex_iff_openSegment_subset : StrictConvex π•œ s ↔ s.Pairwise fun x y => openSegment π•œ x y βŠ† interior s := forallβ‚…_congr fun _ _ _ _ _ => (openSegment_subset_iff π•œ).symm #align strict_convex_iff_open_segment_subset strictConvex_iff_openSegment_subset theorem StrictConvex.openSegment_subset (hs : StrictConvex π•œ s) (hx : x ∈ s) (hy : y ∈ s) (h : x β‰  y) : openSegment π•œ x y βŠ† interior s := strictConvex_iff_openSegment_subset.1 hs hx hy h #align strict_convex.open_segment_subset StrictConvex.openSegment_subset theorem strictConvex_empty : StrictConvex π•œ (βˆ… : Set E) := pairwise_empty _ #align strict_convex_empty strictConvex_empty theorem strictConvex_univ : StrictConvex π•œ (univ : Set E) := by intro x _ y _ _ a b _ _ _ rw [interior_univ] exact mem_univ _ #align strict_convex_univ strictConvex_univ protected nonrec theorem StrictConvex.eq (hs : StrictConvex π•œ s) (hx : x ∈ s) (hy : y ∈ s) (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (h : a β€’ x + b β€’ y βˆ‰ interior s) : x = y := hs.eq hx hy fun H => h <| H ha hb hab #align strict_convex.eq StrictConvex.eq protected theorem StrictConvex.inter {t : Set E} (hs : StrictConvex π•œ s) (ht : StrictConvex π•œ t) : StrictConvex π•œ (s ∩ t) := by intro x hx y hy hxy a b ha hb hab rw [interior_inter] exact ⟨hs hx.1 hy.1 hxy ha hb hab, ht hx.2 hy.2 hxy ha hb hab⟩ #align strict_convex.inter StrictConvex.inter
Mathlib/Analysis/Convex/Strict.lean
85
92
theorem Directed.strictConvex_iUnion {ΞΉ : Sort*} {s : ΞΉ β†’ Set E} (hdir : Directed (Β· βŠ† Β·) s) (hs : βˆ€ ⦃i : ι⦄, StrictConvex π•œ (s i)) : StrictConvex π•œ (⋃ i, s i) := by
rintro x hx y hy hxy a b ha hb hab rw [mem_iUnion] at hx hy obtain ⟨i, hx⟩ := hx obtain ⟨j, hy⟩ := hy obtain ⟨k, hik, hjk⟩ := hdir i j exact interior_mono (subset_iUnion s k) (hs (hik hx) (hjk hy) hxy ha hb hab)
1,380
import Mathlib.Analysis.Convex.Basic import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Topology.Order.Basic #align_import analysis.convex.strict from "leanprover-community/mathlib"@"84dc0bd6619acaea625086d6f53cb35cdd554219" open Set open Convex Pointwise variable {π•œ 𝕝 E F Ξ² : Type*} open Function Set open Convex section OrderedSemiring variable [OrderedSemiring π•œ] [TopologicalSpace E] [TopologicalSpace F] section AddCommMonoid variable [AddCommMonoid E] [AddCommMonoid F] section SMul variable (π•œ) variable [SMul π•œ E] [SMul π•œ F] (s : Set E) def StrictConvex : Prop := s.Pairwise fun x y => βˆ€ ⦃a b : π•œβ¦„, 0 < a β†’ 0 < b β†’ a + b = 1 β†’ a β€’ x + b β€’ y ∈ interior s #align strict_convex StrictConvex variable {π•œ s} variable {x y : E} {a b : π•œ} theorem strictConvex_iff_openSegment_subset : StrictConvex π•œ s ↔ s.Pairwise fun x y => openSegment π•œ x y βŠ† interior s := forallβ‚…_congr fun _ _ _ _ _ => (openSegment_subset_iff π•œ).symm #align strict_convex_iff_open_segment_subset strictConvex_iff_openSegment_subset theorem StrictConvex.openSegment_subset (hs : StrictConvex π•œ s) (hx : x ∈ s) (hy : y ∈ s) (h : x β‰  y) : openSegment π•œ x y βŠ† interior s := strictConvex_iff_openSegment_subset.1 hs hx hy h #align strict_convex.open_segment_subset StrictConvex.openSegment_subset theorem strictConvex_empty : StrictConvex π•œ (βˆ… : Set E) := pairwise_empty _ #align strict_convex_empty strictConvex_empty theorem strictConvex_univ : StrictConvex π•œ (univ : Set E) := by intro x _ y _ _ a b _ _ _ rw [interior_univ] exact mem_univ _ #align strict_convex_univ strictConvex_univ protected nonrec theorem StrictConvex.eq (hs : StrictConvex π•œ s) (hx : x ∈ s) (hy : y ∈ s) (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (h : a β€’ x + b β€’ y βˆ‰ interior s) : x = y := hs.eq hx hy fun H => h <| H ha hb hab #align strict_convex.eq StrictConvex.eq protected theorem StrictConvex.inter {t : Set E} (hs : StrictConvex π•œ s) (ht : StrictConvex π•œ t) : StrictConvex π•œ (s ∩ t) := by intro x hx y hy hxy a b ha hb hab rw [interior_inter] exact ⟨hs hx.1 hy.1 hxy ha hb hab, ht hx.2 hy.2 hxy ha hb hab⟩ #align strict_convex.inter StrictConvex.inter theorem Directed.strictConvex_iUnion {ΞΉ : Sort*} {s : ΞΉ β†’ Set E} (hdir : Directed (Β· βŠ† Β·) s) (hs : βˆ€ ⦃i : ι⦄, StrictConvex π•œ (s i)) : StrictConvex π•œ (⋃ i, s i) := by rintro x hx y hy hxy a b ha hb hab rw [mem_iUnion] at hx hy obtain ⟨i, hx⟩ := hx obtain ⟨j, hy⟩ := hy obtain ⟨k, hik, hjk⟩ := hdir i j exact interior_mono (subset_iUnion s k) (hs (hik hx) (hjk hy) hxy ha hb hab) #align directed.strict_convex_Union Directed.strictConvex_iUnion
Mathlib/Analysis/Convex/Strict.lean
95
98
theorem DirectedOn.strictConvex_sUnion {S : Set (Set E)} (hdir : DirectedOn (Β· βŠ† Β·) S) (hS : βˆ€ s ∈ S, StrictConvex π•œ s) : StrictConvex π•œ (⋃₀ S) := by
rw [sUnion_eq_iUnion] exact (directedOn_iff_directed.1 hdir).strictConvex_iUnion fun s => hS _ s.2
1,380
import Mathlib.Topology.Baire.Lemmas import Mathlib.Topology.Algebra.Group.Basic open scoped Topology Pointwise open MulAction Set Function variable {G X : Type*} [TopologicalSpace G] [TopologicalSpace X] [Group G] [TopologicalGroup G] [MulAction G X] [SigmaCompactSpace G] [BaireSpace X] [T2Space X] [ContinuousSMul G X] [IsPretransitive G X] @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open around zero. It follows in `isOpenMap_vadd_of_sigmaCompact` that it is open around any point."]
Mathlib/Topology/Algebra/Group/OpenMapping.lean
37
88
theorem smul_singleton_mem_nhds_of_sigmaCompact {U : Set G} (hU : U ∈ 𝓝 1) (x : X) : U β€’ {x} ∈ 𝓝 x := by
/- Consider a small closed neighborhood `V` of the identity. Then the group is covered by countably many translates of `V`, say `gα΅’ V`. Let also `Kβ‚™` be a sequence of compact sets covering the space. Then the image of `Kβ‚™ ∩ gα΅’ V` in the orbit is compact, and their unions covers the space. By Baire, one of them has nonempty interior. Then `gα΅’ V β€’ x` has nonempty interior, and so does `V β€’ x`. Its interior contains a point `g' x` with `g' ∈ V`. Then `g'⁻¹ β€’ V β€’ x` contains a neighborhood of `x`, and it is included in `V⁻¹ β€’ V β€’ x`, which is itself contained in `U β€’ x` if `V` is small enough. -/ obtain ⟨V, V_mem, V_closed, V_symm, VU⟩ : βˆƒ V ∈ 𝓝 (1 : G), IsClosed V ∧ V⁻¹ = V ∧ V * V βŠ† U := exists_closed_nhds_one_inv_eq_mul_subset hU obtain ⟨s, s_count, hs⟩ : βˆƒ (s : Set G), s.Countable ∧ ⋃ g ∈ s, g β€’ V = univ := by apply countable_cover_nhds_of_sigma_compact (fun g ↦ ?_) convert smul_mem_nhds g V_mem simp only [smul_eq_mul, mul_one] let K : β„• β†’ Set G := compactCovering G let F : β„• Γ— s β†’ Set X := fun p ↦ (K p.1 ∩ (p.2 : G) β€’ V) β€’ ({x} : Set X) obtain ⟨⟨n, ⟨g, hg⟩⟩, hi⟩ : βˆƒ i, (interior (F i)).Nonempty := by have : Nonempty X := ⟨x⟩ have : Encodable s := Countable.toEncodable s_count apply nonempty_interior_of_iUnion_of_closed Β· rintro ⟨n, ⟨g, hg⟩⟩ apply IsCompact.isClosed suffices H : IsCompact ((fun (g : G) ↦ g β€’ x) '' (K n ∩ g β€’ V)) by simpa only [F, smul_singleton] using H apply IsCompact.image Β· exact (isCompact_compactCovering G n).inter_right (V_closed.smul g) Β· exact continuous_id.smul continuous_const Β· apply eq_univ_iff_forall.2 (fun y ↦ ?_) obtain ⟨h, rfl⟩ : βˆƒ h, h β€’ x = y := exists_smul_eq G x y obtain ⟨n, hn⟩ : βˆƒ n, h ∈ K n := exists_mem_compactCovering h obtain ⟨g, gs, hg⟩ : βˆƒ g ∈ s, h ∈ g β€’ V := exists_set_mem_of_union_eq_top s _ hs _ simp only [F, smul_singleton, mem_iUnion, mem_image, mem_inter_iff, Prod.exists, Subtype.exists, exists_prop] exact ⟨n, g, gs, h, ⟨hn, hg⟩, rfl⟩ have I : (interior ((g β€’ V) β€’ {x})).Nonempty := by apply hi.mono apply interior_mono exact smul_subset_smul_right inter_subset_right obtain ⟨y, hy⟩ : (interior (V β€’ ({x} : Set X))).Nonempty := by rw [smul_assoc, interior_smul] at I exact smul_set_nonempty.1 I obtain ⟨g', hg', rfl⟩ : βˆƒ g' ∈ V, g' β€’ x = y := by simpa using interior_subset hy have J : (g' ⁻¹ β€’ V) β€’ {x} ∈ 𝓝 x := by apply mem_interior_iff_mem_nhds.1 rwa [smul_assoc, interior_smul, mem_inv_smul_set_iff] have : (g'⁻¹ β€’ V) β€’ {x} βŠ† U β€’ ({x} : Set X) := by apply smul_subset_smul_right apply Subset.trans (smul_set_subset_smul (inv_mem_inv.2 hg')) ?_ rw [V_symm] exact VU exact Filter.mem_of_superset J this
1,381
import Mathlib.Topology.Baire.Lemmas import Mathlib.Topology.Algebra.Group.Basic open scoped Topology Pointwise open MulAction Set Function variable {G X : Type*} [TopologicalSpace G] [TopologicalSpace X] [Group G] [TopologicalGroup G] [MulAction G X] [SigmaCompactSpace G] [BaireSpace X] [T2Space X] [ContinuousSMul G X] [IsPretransitive G X] @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open around zero. It follows in `isOpenMap_vadd_of_sigmaCompact` that it is open around any point."] theorem smul_singleton_mem_nhds_of_sigmaCompact {U : Set G} (hU : U ∈ 𝓝 1) (x : X) : U β€’ {x} ∈ 𝓝 x := by obtain ⟨V, V_mem, V_closed, V_symm, VU⟩ : βˆƒ V ∈ 𝓝 (1 : G), IsClosed V ∧ V⁻¹ = V ∧ V * V βŠ† U := exists_closed_nhds_one_inv_eq_mul_subset hU obtain ⟨s, s_count, hs⟩ : βˆƒ (s : Set G), s.Countable ∧ ⋃ g ∈ s, g β€’ V = univ := by apply countable_cover_nhds_of_sigma_compact (fun g ↦ ?_) convert smul_mem_nhds g V_mem simp only [smul_eq_mul, mul_one] let K : β„• β†’ Set G := compactCovering G let F : β„• Γ— s β†’ Set X := fun p ↦ (K p.1 ∩ (p.2 : G) β€’ V) β€’ ({x} : Set X) obtain ⟨⟨n, ⟨g, hg⟩⟩, hi⟩ : βˆƒ i, (interior (F i)).Nonempty := by have : Nonempty X := ⟨x⟩ have : Encodable s := Countable.toEncodable s_count apply nonempty_interior_of_iUnion_of_closed Β· rintro ⟨n, ⟨g, hg⟩⟩ apply IsCompact.isClosed suffices H : IsCompact ((fun (g : G) ↦ g β€’ x) '' (K n ∩ g β€’ V)) by simpa only [F, smul_singleton] using H apply IsCompact.image Β· exact (isCompact_compactCovering G n).inter_right (V_closed.smul g) Β· exact continuous_id.smul continuous_const Β· apply eq_univ_iff_forall.2 (fun y ↦ ?_) obtain ⟨h, rfl⟩ : βˆƒ h, h β€’ x = y := exists_smul_eq G x y obtain ⟨n, hn⟩ : βˆƒ n, h ∈ K n := exists_mem_compactCovering h obtain ⟨g, gs, hg⟩ : βˆƒ g ∈ s, h ∈ g β€’ V := exists_set_mem_of_union_eq_top s _ hs _ simp only [F, smul_singleton, mem_iUnion, mem_image, mem_inter_iff, Prod.exists, Subtype.exists, exists_prop] exact ⟨n, g, gs, h, ⟨hn, hg⟩, rfl⟩ have I : (interior ((g β€’ V) β€’ {x})).Nonempty := by apply hi.mono apply interior_mono exact smul_subset_smul_right inter_subset_right obtain ⟨y, hy⟩ : (interior (V β€’ ({x} : Set X))).Nonempty := by rw [smul_assoc, interior_smul] at I exact smul_set_nonempty.1 I obtain ⟨g', hg', rfl⟩ : βˆƒ g' ∈ V, g' β€’ x = y := by simpa using interior_subset hy have J : (g' ⁻¹ β€’ V) β€’ {x} ∈ 𝓝 x := by apply mem_interior_iff_mem_nhds.1 rwa [smul_assoc, interior_smul, mem_inv_smul_set_iff] have : (g'⁻¹ β€’ V) β€’ {x} βŠ† U β€’ ({x} : Set X) := by apply smul_subset_smul_right apply Subset.trans (smul_set_subset_smul (inv_mem_inv.2 hg')) ?_ rw [V_symm] exact VU exact Filter.mem_of_superset J this @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open. This is a version of the open mapping theorem, valid notably for the action of a sigma-compact locally compact group on a locally compact space."]
Mathlib/Topology/Algebra/Group/OpenMapping.lean
96
107
theorem isOpenMap_smul_of_sigmaCompact (x : X) : IsOpenMap (fun (g : G) ↦ g β€’ x) := by
/- We have already proved the theorem around the basepoint of the orbit, in `smul_singleton_mem_nhds_of_sigmaCompact`. The general statement follows around an arbitrary point by changing basepoints. -/ simp_rw [isOpenMap_iff_nhds_le, Filter.le_map_iff] intro g U hU have : (Β· β€’ x) = (Β· β€’ (g β€’ x)) ∘ (Β· * g⁻¹) := by ext g simp [smul_smul] rw [this, image_comp, ← smul_singleton] apply smul_singleton_mem_nhds_of_sigmaCompact simpa using isOpenMap_mul_right g⁻¹ |>.image_mem_nhds hU
1,381
import Mathlib.Topology.Baire.Lemmas import Mathlib.Topology.Algebra.Group.Basic open scoped Topology Pointwise open MulAction Set Function variable {G X : Type*} [TopologicalSpace G] [TopologicalSpace X] [Group G] [TopologicalGroup G] [MulAction G X] [SigmaCompactSpace G] [BaireSpace X] [T2Space X] [ContinuousSMul G X] [IsPretransitive G X] @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open around zero. It follows in `isOpenMap_vadd_of_sigmaCompact` that it is open around any point."] theorem smul_singleton_mem_nhds_of_sigmaCompact {U : Set G} (hU : U ∈ 𝓝 1) (x : X) : U β€’ {x} ∈ 𝓝 x := by obtain ⟨V, V_mem, V_closed, V_symm, VU⟩ : βˆƒ V ∈ 𝓝 (1 : G), IsClosed V ∧ V⁻¹ = V ∧ V * V βŠ† U := exists_closed_nhds_one_inv_eq_mul_subset hU obtain ⟨s, s_count, hs⟩ : βˆƒ (s : Set G), s.Countable ∧ ⋃ g ∈ s, g β€’ V = univ := by apply countable_cover_nhds_of_sigma_compact (fun g ↦ ?_) convert smul_mem_nhds g V_mem simp only [smul_eq_mul, mul_one] let K : β„• β†’ Set G := compactCovering G let F : β„• Γ— s β†’ Set X := fun p ↦ (K p.1 ∩ (p.2 : G) β€’ V) β€’ ({x} : Set X) obtain ⟨⟨n, ⟨g, hg⟩⟩, hi⟩ : βˆƒ i, (interior (F i)).Nonempty := by have : Nonempty X := ⟨x⟩ have : Encodable s := Countable.toEncodable s_count apply nonempty_interior_of_iUnion_of_closed Β· rintro ⟨n, ⟨g, hg⟩⟩ apply IsCompact.isClosed suffices H : IsCompact ((fun (g : G) ↦ g β€’ x) '' (K n ∩ g β€’ V)) by simpa only [F, smul_singleton] using H apply IsCompact.image Β· exact (isCompact_compactCovering G n).inter_right (V_closed.smul g) Β· exact continuous_id.smul continuous_const Β· apply eq_univ_iff_forall.2 (fun y ↦ ?_) obtain ⟨h, rfl⟩ : βˆƒ h, h β€’ x = y := exists_smul_eq G x y obtain ⟨n, hn⟩ : βˆƒ n, h ∈ K n := exists_mem_compactCovering h obtain ⟨g, gs, hg⟩ : βˆƒ g ∈ s, h ∈ g β€’ V := exists_set_mem_of_union_eq_top s _ hs _ simp only [F, smul_singleton, mem_iUnion, mem_image, mem_inter_iff, Prod.exists, Subtype.exists, exists_prop] exact ⟨n, g, gs, h, ⟨hn, hg⟩, rfl⟩ have I : (interior ((g β€’ V) β€’ {x})).Nonempty := by apply hi.mono apply interior_mono exact smul_subset_smul_right inter_subset_right obtain ⟨y, hy⟩ : (interior (V β€’ ({x} : Set X))).Nonempty := by rw [smul_assoc, interior_smul] at I exact smul_set_nonempty.1 I obtain ⟨g', hg', rfl⟩ : βˆƒ g' ∈ V, g' β€’ x = y := by simpa using interior_subset hy have J : (g' ⁻¹ β€’ V) β€’ {x} ∈ 𝓝 x := by apply mem_interior_iff_mem_nhds.1 rwa [smul_assoc, interior_smul, mem_inv_smul_set_iff] have : (g'⁻¹ β€’ V) β€’ {x} βŠ† U β€’ ({x} : Set X) := by apply smul_subset_smul_right apply Subset.trans (smul_set_subset_smul (inv_mem_inv.2 hg')) ?_ rw [V_symm] exact VU exact Filter.mem_of_superset J this @[to_additive "Consider a sigma-compact additive group acting continuously and transitively on a Baire space. Then the orbit map is open. This is a version of the open mapping theorem, valid notably for the action of a sigma-compact locally compact group on a locally compact space."] theorem isOpenMap_smul_of_sigmaCompact (x : X) : IsOpenMap (fun (g : G) ↦ g β€’ x) := by simp_rw [isOpenMap_iff_nhds_le, Filter.le_map_iff] intro g U hU have : (Β· β€’ x) = (Β· β€’ (g β€’ x)) ∘ (Β· * g⁻¹) := by ext g simp [smul_smul] rw [this, image_comp, ← smul_singleton] apply smul_singleton_mem_nhds_of_sigmaCompact simpa using isOpenMap_mul_right g⁻¹ |>.image_mem_nhds hU @[to_additive]
Mathlib/Topology/Algebra/Group/OpenMapping.lean
112
121
theorem MonoidHom.isOpenMap_of_sigmaCompact {H : Type*} [Group H] [TopologicalSpace H] [BaireSpace H] [T2Space H] [ContinuousMul H] (f : G β†’* H) (hf : Function.Surjective f) (h'f : Continuous f) : IsOpenMap f := by
let A : MulAction G H := MulAction.compHom _ f have : ContinuousSMul G H := continuousSMul_compHom h'f have : IsPretransitive G H := isPretransitive_compHom hf have : f = (fun (g : G) ↦ g β€’ (1 : H)) := by simp [MulAction.compHom_smul_def] rw [this] exact isOpenMap_smul_of_sigmaCompact _
1,381
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.Group.Indicator import Mathlib.Order.LiminfLimsup import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Filter.CountableInter import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Data.Set.Lattice import Mathlib.Topology.Order.Monotone #align_import topology.algebra.order.liminf_limsup from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451" open Filter TopologicalSpace open scoped Topology Classical universe u v variable {ΞΉ Ξ± Ξ² R S : Type*} {Ο€ : ΞΉ β†’ Type*} class BoundedLENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_le_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· ≀ Β·) #align bounded_le_nhds_class BoundedLENhdsClass class BoundedGENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_ge_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· β‰₯ Β·) #align bounded_ge_nhds_class BoundedGENhdsClass section Preorder variable [Preorder Ξ±] [Preorder Ξ²] [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] section LiminfLimsup section Monotone variable {F : Filter ΞΉ} [NeBot F] [ConditionallyCompleteLinearOrder R] [TopologicalSpace R] [OrderTopology R] [ConditionallyCompleteLinearOrder S] [TopologicalSpace S] [OrderTopology S]
Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
339
385
theorem Antitone.map_limsSup_of_continuousAt {F : Filter R} [NeBot F] {f : R β†’ S} (f_decr : Antitone f) (f_cont : ContinuousAt f F.limsSup) (bdd_above : F.IsBounded (Β· ≀ Β·) := by
isBoundedDefault) (bdd_below : F.IsBounded (Β· β‰₯ Β·) := by isBoundedDefault) : f F.limsSup = F.liminf f := by have cobdd : F.IsCobounded (Β· ≀ Β·) := bdd_below.isCobounded_flip apply le_antisymm Β· rw [limsSup, f_decr.map_sInf_of_continuousAt' f_cont bdd_above cobdd] apply le_of_forall_lt intro c hc simp only [liminf, limsInf, eventually_map] at hc ⊒ obtain ⟨d, hd, h'd⟩ := exists_lt_of_lt_csSup (bdd_above.recOn fun x hx ↦ ⟨f x, Set.mem_image_of_mem f hx⟩) hc apply lt_csSup_of_lt ?_ ?_ h'd Β· exact (Antitone.isBoundedUnder_le_comp f_decr bdd_below).isCoboundedUnder_flip Β· rcases hd with ⟨e, ⟨he, fe_eq_d⟩⟩ filter_upwards [he] with x hx using (fe_eq_d.symm β–Έ f_decr hx) Β· by_cases h' : βˆƒ c, c < F.limsSup ∧ Set.Ioo c F.limsSup = βˆ… Β· rcases h' with ⟨c, c_lt, hc⟩ have B : βˆƒαΆ  n in F, F.limsSup ≀ n := by apply (frequently_lt_of_lt_limsSup cobdd c_lt).mono intro x hx by_contra! have : (Set.Ioo c F.limsSup).Nonempty := ⟨x, ⟨hx, this⟩⟩ simp only [hc, Set.not_nonempty_empty] at this apply liminf_le_of_frequently_le _ (bdd_above.isBoundedUnder f_decr) exact B.mono fun x hx ↦ f_decr hx push_neg at h' by_contra! H have not_bot : Β¬ IsBot F.limsSup := fun maybe_bot ↦ lt_irrefl (F.liminf f) <| lt_of_le_of_lt (liminf_le_of_frequently_le (frequently_of_forall (fun r ↦ f_decr (maybe_bot r))) (bdd_above.isBoundedUnder f_decr)) H obtain ⟨l, l_lt, h'l⟩ : βˆƒ l < F.limsSup, Set.Ioc l F.limsSup βŠ† { x : R | f x < F.liminf f } := by apply exists_Ioc_subset_of_mem_nhds ((tendsto_order.1 f_cont.tendsto).2 _ H) simpa [IsBot] using not_bot obtain ⟨m, l_m, m_lt⟩ : (Set.Ioo l F.limsSup).Nonempty := by contrapose! h' exact ⟨l, l_lt, h'⟩ have B : F.liminf f ≀ f m := by apply liminf_le_of_frequently_le _ _ Β· apply (frequently_lt_of_lt_limsSup cobdd m_lt).mono exact fun x hx ↦ f_decr hx.le Β· exact IsBounded.isBoundedUnder f_decr bdd_above have I : f m < F.liminf f := h'l ⟨l_m, m_lt.le⟩ exact lt_irrefl _ (B.trans_lt I)
1,382
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.Group.Indicator import Mathlib.Order.LiminfLimsup import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Filter.CountableInter import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Data.Set.Lattice import Mathlib.Topology.Order.Monotone #align_import topology.algebra.order.liminf_limsup from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451" open Filter TopologicalSpace open scoped Topology Classical universe u v variable {ΞΉ Ξ± Ξ² R S : Type*} {Ο€ : ΞΉ β†’ Type*} class BoundedLENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_le_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· ≀ Β·) #align bounded_le_nhds_class BoundedLENhdsClass class BoundedGENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_ge_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· β‰₯ Β·) #align bounded_ge_nhds_class BoundedGENhdsClass section Preorder variable [Preorder Ξ±] [Preorder Ξ²] [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] section LiminfLimsup section InfiAndSupr open Topology open Filter Set variable [CompleteLinearOrder R] [TopologicalSpace R] [OrderTopology R]
Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
476
479
theorem iInf_eq_of_forall_le_of_tendsto {x : R} {as : ΞΉ β†’ R} (x_le : βˆ€ i, x ≀ as i) {F : Filter ΞΉ} [Filter.NeBot F] (as_lim : Filter.Tendsto as F (𝓝 x)) : β¨… i, as i = x := by
refine iInf_eq_of_forall_ge_of_forall_gt_exists_lt (fun i ↦ x_le i) ?_ apply fun w x_lt_w ↦ β€ΉFilter.NeBot Fβ€Ί.nonempty_of_mem (eventually_lt_of_tendsto_lt x_lt_w as_lim)
1,382
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.Group.Indicator import Mathlib.Order.LiminfLimsup import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Filter.CountableInter import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Data.Set.Lattice import Mathlib.Topology.Order.Monotone #align_import topology.algebra.order.liminf_limsup from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451" open Filter TopologicalSpace open scoped Topology Classical universe u v variable {ΞΉ Ξ± Ξ² R S : Type*} {Ο€ : ΞΉ β†’ Type*} class BoundedLENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_le_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· ≀ Β·) #align bounded_le_nhds_class BoundedLENhdsClass class BoundedGENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_ge_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· β‰₯ Β·) #align bounded_ge_nhds_class BoundedGENhdsClass section Preorder variable [Preorder Ξ±] [Preorder Ξ²] [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] section LiminfLimsup section InfiAndSupr open Topology open Filter Set variable [CompleteLinearOrder R] [TopologicalSpace R] [OrderTopology R] theorem iInf_eq_of_forall_le_of_tendsto {x : R} {as : ΞΉ β†’ R} (x_le : βˆ€ i, x ≀ as i) {F : Filter ΞΉ} [Filter.NeBot F] (as_lim : Filter.Tendsto as F (𝓝 x)) : β¨… i, as i = x := by refine iInf_eq_of_forall_ge_of_forall_gt_exists_lt (fun i ↦ x_le i) ?_ apply fun w x_lt_w ↦ β€ΉFilter.NeBot Fβ€Ί.nonempty_of_mem (eventually_lt_of_tendsto_lt x_lt_w as_lim) #align infi_eq_of_forall_le_of_tendsto iInf_eq_of_forall_le_of_tendsto theorem iSup_eq_of_forall_le_of_tendsto {x : R} {as : ΞΉ β†’ R} (le_x : βˆ€ i, as i ≀ x) {F : Filter ΞΉ} [Filter.NeBot F] (as_lim : Filter.Tendsto as F (𝓝 x)) : ⨆ i, as i = x := iInf_eq_of_forall_le_of_tendsto (R := Rα΅’α΅ˆ) le_x as_lim #align supr_eq_of_forall_le_of_tendsto iSup_eq_of_forall_le_of_tendsto
Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
487
498
theorem iUnion_Ici_eq_Ioi_of_lt_of_tendsto (x : R) {as : ΞΉ β†’ R} (x_lt : βˆ€ i, x < as i) {F : Filter ΞΉ} [Filter.NeBot F] (as_lim : Filter.Tendsto as F (𝓝 x)) : ⋃ i : ΞΉ, Ici (as i) = Ioi x := by
have obs : x βˆ‰ range as := by intro maybe_x_is rcases mem_range.mp maybe_x_is with ⟨i, hi⟩ simpa only [hi, lt_self_iff_false] using x_lt i -- Porting note: `rw at *` was too destructive. Let's only rewrite `obs` and the goal. have := iInf_eq_of_forall_le_of_tendsto (fun i ↦ (x_lt i).le) as_lim rw [← this] at obs rw [← this] exact iUnion_Ici_eq_Ioi_iInf obs
1,382
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.Group.Indicator import Mathlib.Order.LiminfLimsup import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Filter.CountableInter import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Data.Set.Lattice import Mathlib.Topology.Order.Monotone #align_import topology.algebra.order.liminf_limsup from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451" open Filter TopologicalSpace open scoped Topology Classical universe u v variable {ΞΉ Ξ± Ξ² R S : Type*} {Ο€ : ΞΉ β†’ Type*} class BoundedLENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_le_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· ≀ Β·) #align bounded_le_nhds_class BoundedLENhdsClass class BoundedGENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_ge_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· β‰₯ Β·) #align bounded_ge_nhds_class BoundedGENhdsClass section Preorder variable [Preorder Ξ±] [Preorder Ξ²] [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] section LiminfLimsup section Indicator
Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
511
565
theorem limsup_eq_tendsto_sum_indicator_nat_atTop (s : β„• β†’ Set Ξ±) : limsup s atTop = { Ο‰ | Tendsto (fun n ↦ βˆ‘ k ∈ Finset.range n, (s (k + 1)).indicator (1 : Ξ± β†’ β„•) Ο‰) atTop atTop } := by
ext Ο‰ simp only [limsup_eq_iInf_iSup_of_nat, ge_iff_le, Set.iSup_eq_iUnion, Set.iInf_eq_iInter, Set.mem_iInter, Set.mem_iUnion, exists_prop] constructor Β· intro hΟ‰ refine tendsto_atTop_atTop_of_monotone' (fun n m hnm ↦ Finset.sum_mono_set_of_nonneg (fun i ↦ Set.indicator_nonneg (fun _ _ ↦ zero_le_one) _) (Finset.range_mono hnm)) ?_ rintro ⟨i, h⟩ simp only [mem_upperBounds, Set.mem_range, forall_exists_index, forall_apply_eq_imp_iff] at h induction' i with k hk Β· obtain ⟨j, hj₁, hjβ‚‚βŸ© := hΟ‰ 1 refine not_lt.2 (h <| j + 1) (lt_of_le_of_lt (Finset.sum_const_zero.symm : 0 = βˆ‘ k ∈ Finset.range (j + 1), 0).le ?_) refine Finset.sum_lt_sum (fun m _ ↦ Set.indicator_nonneg (fun _ _ ↦ zero_le_one) _) ⟨j - 1, Finset.mem_range.2 (lt_of_le_of_lt (Nat.sub_le _ _) j.lt_succ_self), ?_⟩ rw [Nat.sub_add_cancel hj₁, Set.indicator_of_mem hjβ‚‚] exact zero_lt_one Β· rw [imp_false] at hk push_neg at hk obtain ⟨i, hi⟩ := hk obtain ⟨j, hj₁, hjβ‚‚βŸ© := hΟ‰ (i + 1) replace hi : (βˆ‘ k ∈ Finset.range i, (s (k + 1)).indicator 1 Ο‰) = k + 1 := le_antisymm (h i) hi refine not_lt.2 (h <| j + 1) ?_ rw [← Finset.sum_range_add_sum_Ico _ (i.le_succ.trans (hj₁.trans j.le_succ)), hi] refine lt_add_of_pos_right _ ?_ rw [(Finset.sum_const_zero.symm : 0 = βˆ‘ k ∈ Finset.Ico i (j + 1), 0)] refine Finset.sum_lt_sum (fun m _ ↦ Set.indicator_nonneg (fun _ _ ↦ zero_le_one) _) ⟨j - 1, Finset.mem_Ico.2 ⟨(Nat.le_sub_iff_add_le (le_trans ((le_add_iff_nonneg_left _).2 zero_le') hj₁)).2 hj₁, lt_of_le_of_lt (Nat.sub_le _ _) j.lt_succ_self⟩, ?_⟩ rw [Nat.sub_add_cancel (le_trans ((le_add_iff_nonneg_left _).2 zero_le') hj₁), Set.indicator_of_mem hjβ‚‚] exact zero_lt_one Β· rintro hΟ‰ i rw [Set.mem_setOf_eq, tendsto_atTop_atTop] at hΟ‰ by_contra! hcon obtain ⟨j, h⟩ := hΟ‰ (i + 1) have : (βˆ‘ k ∈ Finset.range j, (s (k + 1)).indicator 1 Ο‰) ≀ i := by have hle : βˆ€ j ≀ i, (βˆ‘ k ∈ Finset.range j, (s (k + 1)).indicator 1 Ο‰) ≀ i := by refine fun j hij ↦ (Finset.sum_le_card_nsmul _ _ _ ?_ : _ ≀ (Finset.range j).card β€’ 1).trans ?_ Β· exact fun m _ ↦ Set.indicator_apply_le' (fun _ ↦ le_rfl) fun _ ↦ zero_le_one Β· simpa only [Finset.card_range, smul_eq_mul, mul_one] by_cases hij : j < i Β· exact hle _ hij.le Β· rw [← Finset.sum_range_add_sum_Ico _ (not_lt.1 hij)] suffices (βˆ‘ k ∈ Finset.Ico i j, (s (k + 1)).indicator 1 Ο‰) = 0 by rw [this, add_zero] exact hle _ le_rfl refine Finset.sum_eq_zero fun m hm ↦ ?_ exact Set.indicator_of_not_mem (hcon _ <| (Finset.mem_Ico.1 hm).1.trans m.le_succ) _ exact not_le.2 (lt_of_lt_of_le i.lt_succ_self <| h _ le_rfl) this
1,382
import Mathlib.Algebra.BigOperators.Intervals import Mathlib.Algebra.BigOperators.Ring import Mathlib.Algebra.Order.Group.Indicator import Mathlib.Order.LiminfLimsup import Mathlib.Order.Filter.Archimedean import Mathlib.Order.Filter.CountableInter import Mathlib.Topology.Algebra.Group.Basic import Mathlib.Data.Set.Lattice import Mathlib.Topology.Order.Monotone #align_import topology.algebra.order.liminf_limsup from "leanprover-community/mathlib"@"ce64cd319bb6b3e82f31c2d38e79080d377be451" open Filter TopologicalSpace open scoped Topology Classical universe u v variable {ΞΉ Ξ± Ξ² R S : Type*} {Ο€ : ΞΉ β†’ Type*} class BoundedLENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_le_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· ≀ Β·) #align bounded_le_nhds_class BoundedLENhdsClass class BoundedGENhdsClass (Ξ± : Type*) [Preorder Ξ±] [TopologicalSpace Ξ±] : Prop where isBounded_ge_nhds (a : Ξ±) : (𝓝 a).IsBounded (Β· β‰₯ Β·) #align bounded_ge_nhds_class BoundedGENhdsClass section Preorder variable [Preorder Ξ±] [Preorder Ξ²] [TopologicalSpace Ξ±] [TopologicalSpace Ξ²] section LiminfLimsup section Indicator theorem limsup_eq_tendsto_sum_indicator_nat_atTop (s : β„• β†’ Set Ξ±) : limsup s atTop = { Ο‰ | Tendsto (fun n ↦ βˆ‘ k ∈ Finset.range n, (s (k + 1)).indicator (1 : Ξ± β†’ β„•) Ο‰) atTop atTop } := by ext Ο‰ simp only [limsup_eq_iInf_iSup_of_nat, ge_iff_le, Set.iSup_eq_iUnion, Set.iInf_eq_iInter, Set.mem_iInter, Set.mem_iUnion, exists_prop] constructor Β· intro hΟ‰ refine tendsto_atTop_atTop_of_monotone' (fun n m hnm ↦ Finset.sum_mono_set_of_nonneg (fun i ↦ Set.indicator_nonneg (fun _ _ ↦ zero_le_one) _) (Finset.range_mono hnm)) ?_ rintro ⟨i, h⟩ simp only [mem_upperBounds, Set.mem_range, forall_exists_index, forall_apply_eq_imp_iff] at h induction' i with k hk Β· obtain ⟨j, hj₁, hjβ‚‚βŸ© := hΟ‰ 1 refine not_lt.2 (h <| j + 1) (lt_of_le_of_lt (Finset.sum_const_zero.symm : 0 = βˆ‘ k ∈ Finset.range (j + 1), 0).le ?_) refine Finset.sum_lt_sum (fun m _ ↦ Set.indicator_nonneg (fun _ _ ↦ zero_le_one) _) ⟨j - 1, Finset.mem_range.2 (lt_of_le_of_lt (Nat.sub_le _ _) j.lt_succ_self), ?_⟩ rw [Nat.sub_add_cancel hj₁, Set.indicator_of_mem hjβ‚‚] exact zero_lt_one Β· rw [imp_false] at hk push_neg at hk obtain ⟨i, hi⟩ := hk obtain ⟨j, hj₁, hjβ‚‚βŸ© := hΟ‰ (i + 1) replace hi : (βˆ‘ k ∈ Finset.range i, (s (k + 1)).indicator 1 Ο‰) = k + 1 := le_antisymm (h i) hi refine not_lt.2 (h <| j + 1) ?_ rw [← Finset.sum_range_add_sum_Ico _ (i.le_succ.trans (hj₁.trans j.le_succ)), hi] refine lt_add_of_pos_right _ ?_ rw [(Finset.sum_const_zero.symm : 0 = βˆ‘ k ∈ Finset.Ico i (j + 1), 0)] refine Finset.sum_lt_sum (fun m _ ↦ Set.indicator_nonneg (fun _ _ ↦ zero_le_one) _) ⟨j - 1, Finset.mem_Ico.2 ⟨(Nat.le_sub_iff_add_le (le_trans ((le_add_iff_nonneg_left _).2 zero_le') hj₁)).2 hj₁, lt_of_le_of_lt (Nat.sub_le _ _) j.lt_succ_self⟩, ?_⟩ rw [Nat.sub_add_cancel (le_trans ((le_add_iff_nonneg_left _).2 zero_le') hj₁), Set.indicator_of_mem hjβ‚‚] exact zero_lt_one Β· rintro hΟ‰ i rw [Set.mem_setOf_eq, tendsto_atTop_atTop] at hΟ‰ by_contra! hcon obtain ⟨j, h⟩ := hΟ‰ (i + 1) have : (βˆ‘ k ∈ Finset.range j, (s (k + 1)).indicator 1 Ο‰) ≀ i := by have hle : βˆ€ j ≀ i, (βˆ‘ k ∈ Finset.range j, (s (k + 1)).indicator 1 Ο‰) ≀ i := by refine fun j hij ↦ (Finset.sum_le_card_nsmul _ _ _ ?_ : _ ≀ (Finset.range j).card β€’ 1).trans ?_ Β· exact fun m _ ↦ Set.indicator_apply_le' (fun _ ↦ le_rfl) fun _ ↦ zero_le_one Β· simpa only [Finset.card_range, smul_eq_mul, mul_one] by_cases hij : j < i Β· exact hle _ hij.le Β· rw [← Finset.sum_range_add_sum_Ico _ (not_lt.1 hij)] suffices (βˆ‘ k ∈ Finset.Ico i j, (s (k + 1)).indicator 1 Ο‰) = 0 by rw [this, add_zero] exact hle _ le_rfl refine Finset.sum_eq_zero fun m hm ↦ ?_ exact Set.indicator_of_not_mem (hcon _ <| (Finset.mem_Ico.1 hm).1.trans m.le_succ) _ exact not_le.2 (lt_of_lt_of_le i.lt_succ_self <| h _ le_rfl) this #align limsup_eq_tendsto_sum_indicator_nat_at_top limsup_eq_tendsto_sum_indicator_nat_atTop
Mathlib/Topology/Algebra/Order/LiminfLimsup.lean
568
578
theorem limsup_eq_tendsto_sum_indicator_atTop (R : Type*) [StrictOrderedSemiring R] [Archimedean R] (s : β„• β†’ Set Ξ±) : limsup s atTop = { Ο‰ | Tendsto (fun n ↦ βˆ‘ k ∈ Finset.range n, (s (k + 1)).indicator (1 : Ξ± β†’ R) Ο‰) atTop atTop } := by
rw [limsup_eq_tendsto_sum_indicator_nat_atTop s] ext Ο‰ simp only [Set.mem_setOf_eq] rw [(_ : (fun n ↦ βˆ‘ k ∈ Finset.range n, (s (k + 1)).indicator (1 : Ξ± β†’ R) Ο‰) = fun n ↦ ↑(βˆ‘ k ∈ Finset.range n, (s (k + 1)).indicator (1 : Ξ± β†’ β„•) Ο‰))] Β· exact tendsto_natCast_atTop_iff.symm Β· ext n simp only [Set.indicator, Pi.one_apply, Finset.sum_boole, Nat.cast_id]
1,382
import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set open Filter hiding map open Function MeasurableSpace open scoped Classical symmDiff open Topology Filter ENNReal NNReal Interval MeasureTheory variable {Ξ± Ξ² Ξ³ Ξ΄ ΞΉ R R' : Type*} namespace MeasureTheory section variable {m : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ : Measure Ξ±} {s s₁ sβ‚‚ t : Set Ξ±} instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae ΞΌ) := ⟨fun _s hs => let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs ⟨tᢜ, compl_mem_ae_iff.2 htΞΌ, htm.compl, compl_subset_comm.1 hst⟩⟩ #align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
107
109
theorem ae_uIoc_iff [LinearOrder Ξ±] {a b : Ξ±} {P : Ξ± β†’ Prop} : (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ξ™ a b β†’ P x) ↔ (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc a b β†’ P x) ∧ βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc b a β†’ P x := by
simp only [uIoc_eq_union, mem_union, or_imp, eventually_and]
1,383
import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set open Filter hiding map open Function MeasurableSpace open scoped Classical symmDiff open Topology Filter ENNReal NNReal Interval MeasureTheory variable {Ξ± Ξ² Ξ³ Ξ΄ ΞΉ R R' : Type*} namespace MeasureTheory section variable {m : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ : Measure Ξ±} {s s₁ sβ‚‚ t : Set Ξ±} instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae ΞΌ) := ⟨fun _s hs => let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs ⟨tᢜ, compl_mem_ae_iff.2 htΞΌ, htm.compl, compl_subset_comm.1 hst⟩⟩ #align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated theorem ae_uIoc_iff [LinearOrder Ξ±] {a b : Ξ±} {P : Ξ± β†’ Prop} : (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ξ™ a b β†’ P x) ↔ (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc a b β†’ P x) ∧ βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc b a β†’ P x := by simp only [uIoc_eq_union, mem_union, or_imp, eventually_and] #align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff theorem measure_union (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet sβ‚‚) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€ h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union MeasureTheory.measure_union theorem measure_union' (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet s₁) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€' h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union' MeasureTheory.measure_union' theorem measure_inter_add_diff (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s ∩ t) + ΞΌ (s \ t) = ΞΌ s := measure_inter_add_diffβ‚€ _ ht.nullMeasurableSet #align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff theorem measure_diff_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s \ t) + ΞΌ (s ∩ t) = ΞΌ s := (add_comm _ _).trans (measure_inter_add_diff s ht) #align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
128
132
theorem measure_union_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by
rw [← measure_inter_add_diff (s βˆͺ t) ht, Set.union_inter_cancel_right, union_diff_right, ← measure_inter_add_diff s ht] ac_rfl
1,383
import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set open Filter hiding map open Function MeasurableSpace open scoped Classical symmDiff open Topology Filter ENNReal NNReal Interval MeasureTheory variable {Ξ± Ξ² Ξ³ Ξ΄ ΞΉ R R' : Type*} namespace MeasureTheory section variable {m : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ : Measure Ξ±} {s s₁ sβ‚‚ t : Set Ξ±} instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae ΞΌ) := ⟨fun _s hs => let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs ⟨tᢜ, compl_mem_ae_iff.2 htΞΌ, htm.compl, compl_subset_comm.1 hst⟩⟩ #align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated theorem ae_uIoc_iff [LinearOrder Ξ±] {a b : Ξ±} {P : Ξ± β†’ Prop} : (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ξ™ a b β†’ P x) ↔ (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc a b β†’ P x) ∧ βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc b a β†’ P x := by simp only [uIoc_eq_union, mem_union, or_imp, eventually_and] #align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff theorem measure_union (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet sβ‚‚) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€ h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union MeasureTheory.measure_union theorem measure_union' (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet s₁) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€' h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union' MeasureTheory.measure_union' theorem measure_inter_add_diff (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s ∩ t) + ΞΌ (s \ t) = ΞΌ s := measure_inter_add_diffβ‚€ _ ht.nullMeasurableSet #align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff theorem measure_diff_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s \ t) + ΞΌ (s ∩ t) = ΞΌ s := (add_comm _ _).trans (measure_inter_add_diff s ht) #align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter theorem measure_union_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by rw [← measure_inter_add_diff (s βˆͺ t) ht, Set.union_inter_cancel_right, union_diff_right, ← measure_inter_add_diff s ht] ac_rfl #align measure_theory.measure_union_add_inter MeasureTheory.measure_union_add_inter
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
135
137
theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set Ξ±) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by
rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm]
1,383
import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set open Filter hiding map open Function MeasurableSpace open scoped Classical symmDiff open Topology Filter ENNReal NNReal Interval MeasureTheory variable {Ξ± Ξ² Ξ³ Ξ΄ ΞΉ R R' : Type*} namespace MeasureTheory section variable {m : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ : Measure Ξ±} {s s₁ sβ‚‚ t : Set Ξ±} instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae ΞΌ) := ⟨fun _s hs => let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs ⟨tᢜ, compl_mem_ae_iff.2 htΞΌ, htm.compl, compl_subset_comm.1 hst⟩⟩ #align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated theorem ae_uIoc_iff [LinearOrder Ξ±] {a b : Ξ±} {P : Ξ± β†’ Prop} : (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ξ™ a b β†’ P x) ↔ (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc a b β†’ P x) ∧ βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc b a β†’ P x := by simp only [uIoc_eq_union, mem_union, or_imp, eventually_and] #align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff theorem measure_union (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet sβ‚‚) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€ h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union MeasureTheory.measure_union theorem measure_union' (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet s₁) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€' h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union' MeasureTheory.measure_union' theorem measure_inter_add_diff (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s ∩ t) + ΞΌ (s \ t) = ΞΌ s := measure_inter_add_diffβ‚€ _ ht.nullMeasurableSet #align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff theorem measure_diff_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s \ t) + ΞΌ (s ∩ t) = ΞΌ s := (add_comm _ _).trans (measure_inter_add_diff s ht) #align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter theorem measure_union_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by rw [← measure_inter_add_diff (s βˆͺ t) ht, Set.union_inter_cancel_right, union_diff_right, ← measure_inter_add_diff s ht] ac_rfl #align measure_theory.measure_union_add_inter MeasureTheory.measure_union_add_inter theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set Ξ±) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm] #align measure_theory.measure_union_add_inter' MeasureTheory.measure_union_add_inter' lemma measure_symmDiff_eq (hs : MeasurableSet s) (ht : MeasurableSet t) : ΞΌ (s βˆ† t) = ΞΌ (s \ t) + ΞΌ (t \ s) := by simpa only [symmDiff_def, sup_eq_union] using measure_union disjoint_sdiff_sdiff (ht.diff hs) lemma measure_symmDiff_le (s t u : Set Ξ±) : ΞΌ (s βˆ† u) ≀ ΞΌ (s βˆ† t) + ΞΌ (t βˆ† u) := le_trans (ΞΌ.mono <| symmDiff_triangle s t u) (measure_union_le (s βˆ† t) (t βˆ† u)) theorem measure_add_measure_compl (h : MeasurableSet s) : ΞΌ s + ΞΌ sᢜ = ΞΌ univ := measure_add_measure_complβ‚€ h.nullMeasurableSet #align measure_theory.measure_add_measure_compl MeasureTheory.measure_add_measure_compl
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
152
157
theorem measure_biUnionβ‚€ {s : Set Ξ²} {f : Ξ² β†’ Set Ξ±} (hs : s.Countable) (hd : s.Pairwise (AEDisjoint ΞΌ on f)) (h : βˆ€ b ∈ s, NullMeasurableSet (f b) ΞΌ) : ΞΌ (⋃ b ∈ s, f b) = βˆ‘' p : s, ΞΌ (f p) := by
haveI := hs.toEncodable rw [biUnion_eq_iUnion] exact measure_iUnionβ‚€ (hd.on_injective Subtype.coe_injective fun x => x.2) fun x => h x x.2
1,383
import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set open Filter hiding map open Function MeasurableSpace open scoped Classical symmDiff open Topology Filter ENNReal NNReal Interval MeasureTheory variable {Ξ± Ξ² Ξ³ Ξ΄ ΞΉ R R' : Type*} namespace MeasureTheory section variable {m : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ : Measure Ξ±} {s s₁ sβ‚‚ t : Set Ξ±} instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae ΞΌ) := ⟨fun _s hs => let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs ⟨tᢜ, compl_mem_ae_iff.2 htΞΌ, htm.compl, compl_subset_comm.1 hst⟩⟩ #align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated theorem ae_uIoc_iff [LinearOrder Ξ±] {a b : Ξ±} {P : Ξ± β†’ Prop} : (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ξ™ a b β†’ P x) ↔ (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc a b β†’ P x) ∧ βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc b a β†’ P x := by simp only [uIoc_eq_union, mem_union, or_imp, eventually_and] #align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff theorem measure_union (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet sβ‚‚) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€ h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union MeasureTheory.measure_union theorem measure_union' (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet s₁) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€' h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union' MeasureTheory.measure_union' theorem measure_inter_add_diff (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s ∩ t) + ΞΌ (s \ t) = ΞΌ s := measure_inter_add_diffβ‚€ _ ht.nullMeasurableSet #align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff theorem measure_diff_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s \ t) + ΞΌ (s ∩ t) = ΞΌ s := (add_comm _ _).trans (measure_inter_add_diff s ht) #align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter theorem measure_union_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by rw [← measure_inter_add_diff (s βˆͺ t) ht, Set.union_inter_cancel_right, union_diff_right, ← measure_inter_add_diff s ht] ac_rfl #align measure_theory.measure_union_add_inter MeasureTheory.measure_union_add_inter theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set Ξ±) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm] #align measure_theory.measure_union_add_inter' MeasureTheory.measure_union_add_inter' lemma measure_symmDiff_eq (hs : MeasurableSet s) (ht : MeasurableSet t) : ΞΌ (s βˆ† t) = ΞΌ (s \ t) + ΞΌ (t \ s) := by simpa only [symmDiff_def, sup_eq_union] using measure_union disjoint_sdiff_sdiff (ht.diff hs) lemma measure_symmDiff_le (s t u : Set Ξ±) : ΞΌ (s βˆ† u) ≀ ΞΌ (s βˆ† t) + ΞΌ (t βˆ† u) := le_trans (ΞΌ.mono <| symmDiff_triangle s t u) (measure_union_le (s βˆ† t) (t βˆ† u)) theorem measure_add_measure_compl (h : MeasurableSet s) : ΞΌ s + ΞΌ sᢜ = ΞΌ univ := measure_add_measure_complβ‚€ h.nullMeasurableSet #align measure_theory.measure_add_measure_compl MeasureTheory.measure_add_measure_compl theorem measure_biUnionβ‚€ {s : Set Ξ²} {f : Ξ² β†’ Set Ξ±} (hs : s.Countable) (hd : s.Pairwise (AEDisjoint ΞΌ on f)) (h : βˆ€ b ∈ s, NullMeasurableSet (f b) ΞΌ) : ΞΌ (⋃ b ∈ s, f b) = βˆ‘' p : s, ΞΌ (f p) := by haveI := hs.toEncodable rw [biUnion_eq_iUnion] exact measure_iUnionβ‚€ (hd.on_injective Subtype.coe_injective fun x => x.2) fun x => h x x.2 #align measure_theory.measure_bUnionβ‚€ MeasureTheory.measure_biUnionβ‚€ theorem measure_biUnion {s : Set Ξ²} {f : Ξ² β†’ Set Ξ±} (hs : s.Countable) (hd : s.PairwiseDisjoint f) (h : βˆ€ b ∈ s, MeasurableSet (f b)) : ΞΌ (⋃ b ∈ s, f b) = βˆ‘' p : s, ΞΌ (f p) := measure_biUnionβ‚€ hs hd.aedisjoint fun b hb => (h b hb).nullMeasurableSet #align measure_theory.measure_bUnion MeasureTheory.measure_biUnion
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
165
167
theorem measure_sUnionβ‚€ {S : Set (Set Ξ±)} (hs : S.Countable) (hd : S.Pairwise (AEDisjoint ΞΌ)) (h : βˆ€ s ∈ S, NullMeasurableSet s ΞΌ) : ΞΌ (⋃₀ S) = βˆ‘' s : S, ΞΌ s := by
rw [sUnion_eq_biUnion, measure_biUnionβ‚€ hs hd h]
1,383
import Mathlib.MeasureTheory.Measure.NullMeasurable import Mathlib.MeasureTheory.MeasurableSpace.Basic import Mathlib.Topology.Algebra.Order.LiminfLimsup #align_import measure_theory.measure.measure_space from "leanprover-community/mathlib"@"343e80208d29d2d15f8050b929aa50fe4ce71b55" noncomputable section open Set open Filter hiding map open Function MeasurableSpace open scoped Classical symmDiff open Topology Filter ENNReal NNReal Interval MeasureTheory variable {Ξ± Ξ² Ξ³ Ξ΄ ΞΉ R R' : Type*} namespace MeasureTheory section variable {m : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ : Measure Ξ±} {s s₁ sβ‚‚ t : Set Ξ±} instance ae_isMeasurablyGenerated : IsMeasurablyGenerated (ae ΞΌ) := ⟨fun _s hs => let ⟨t, hst, htm, htμ⟩ := exists_measurable_superset_of_null hs ⟨tᢜ, compl_mem_ae_iff.2 htΞΌ, htm.compl, compl_subset_comm.1 hst⟩⟩ #align measure_theory.ae_is_measurably_generated MeasureTheory.ae_isMeasurablyGenerated theorem ae_uIoc_iff [LinearOrder Ξ±] {a b : Ξ±} {P : Ξ± β†’ Prop} : (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ξ™ a b β†’ P x) ↔ (βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc a b β†’ P x) ∧ βˆ€α΅ x βˆ‚ΞΌ, x ∈ Ioc b a β†’ P x := by simp only [uIoc_eq_union, mem_union, or_imp, eventually_and] #align measure_theory.ae_uIoc_iff MeasureTheory.ae_uIoc_iff theorem measure_union (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet sβ‚‚) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€ h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union MeasureTheory.measure_union theorem measure_union' (hd : Disjoint s₁ sβ‚‚) (h : MeasurableSet s₁) : ΞΌ (s₁ βˆͺ sβ‚‚) = ΞΌ s₁ + ΞΌ sβ‚‚ := measure_unionβ‚€' h.nullMeasurableSet hd.aedisjoint #align measure_theory.measure_union' MeasureTheory.measure_union' theorem measure_inter_add_diff (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s ∩ t) + ΞΌ (s \ t) = ΞΌ s := measure_inter_add_diffβ‚€ _ ht.nullMeasurableSet #align measure_theory.measure_inter_add_diff MeasureTheory.measure_inter_add_diff theorem measure_diff_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s \ t) + ΞΌ (s ∩ t) = ΞΌ s := (add_comm _ _).trans (measure_inter_add_diff s ht) #align measure_theory.measure_diff_add_inter MeasureTheory.measure_diff_add_inter theorem measure_union_add_inter (s : Set Ξ±) (ht : MeasurableSet t) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by rw [← measure_inter_add_diff (s βˆͺ t) ht, Set.union_inter_cancel_right, union_diff_right, ← measure_inter_add_diff s ht] ac_rfl #align measure_theory.measure_union_add_inter MeasureTheory.measure_union_add_inter theorem measure_union_add_inter' (hs : MeasurableSet s) (t : Set Ξ±) : ΞΌ (s βˆͺ t) + ΞΌ (s ∩ t) = ΞΌ s + ΞΌ t := by rw [union_comm, inter_comm, measure_union_add_inter t hs, add_comm] #align measure_theory.measure_union_add_inter' MeasureTheory.measure_union_add_inter' lemma measure_symmDiff_eq (hs : MeasurableSet s) (ht : MeasurableSet t) : ΞΌ (s βˆ† t) = ΞΌ (s \ t) + ΞΌ (t \ s) := by simpa only [symmDiff_def, sup_eq_union] using measure_union disjoint_sdiff_sdiff (ht.diff hs) lemma measure_symmDiff_le (s t u : Set Ξ±) : ΞΌ (s βˆ† u) ≀ ΞΌ (s βˆ† t) + ΞΌ (t βˆ† u) := le_trans (ΞΌ.mono <| symmDiff_triangle s t u) (measure_union_le (s βˆ† t) (t βˆ† u)) theorem measure_add_measure_compl (h : MeasurableSet s) : ΞΌ s + ΞΌ sᢜ = ΞΌ univ := measure_add_measure_complβ‚€ h.nullMeasurableSet #align measure_theory.measure_add_measure_compl MeasureTheory.measure_add_measure_compl theorem measure_biUnionβ‚€ {s : Set Ξ²} {f : Ξ² β†’ Set Ξ±} (hs : s.Countable) (hd : s.Pairwise (AEDisjoint ΞΌ on f)) (h : βˆ€ b ∈ s, NullMeasurableSet (f b) ΞΌ) : ΞΌ (⋃ b ∈ s, f b) = βˆ‘' p : s, ΞΌ (f p) := by haveI := hs.toEncodable rw [biUnion_eq_iUnion] exact measure_iUnionβ‚€ (hd.on_injective Subtype.coe_injective fun x => x.2) fun x => h x x.2 #align measure_theory.measure_bUnionβ‚€ MeasureTheory.measure_biUnionβ‚€ theorem measure_biUnion {s : Set Ξ²} {f : Ξ² β†’ Set Ξ±} (hs : s.Countable) (hd : s.PairwiseDisjoint f) (h : βˆ€ b ∈ s, MeasurableSet (f b)) : ΞΌ (⋃ b ∈ s, f b) = βˆ‘' p : s, ΞΌ (f p) := measure_biUnionβ‚€ hs hd.aedisjoint fun b hb => (h b hb).nullMeasurableSet #align measure_theory.measure_bUnion MeasureTheory.measure_biUnion theorem measure_sUnionβ‚€ {S : Set (Set Ξ±)} (hs : S.Countable) (hd : S.Pairwise (AEDisjoint ΞΌ)) (h : βˆ€ s ∈ S, NullMeasurableSet s ΞΌ) : ΞΌ (⋃₀ S) = βˆ‘' s : S, ΞΌ s := by rw [sUnion_eq_biUnion, measure_biUnionβ‚€ hs hd h] #align measure_theory.measure_sUnionβ‚€ MeasureTheory.measure_sUnionβ‚€
Mathlib/MeasureTheory/Measure/MeasureSpace.lean
170
172
theorem measure_sUnion {S : Set (Set Ξ±)} (hs : S.Countable) (hd : S.Pairwise Disjoint) (h : βˆ€ s ∈ S, MeasurableSet s) : ΞΌ (⋃₀ S) = βˆ‘' s : S, ΞΌ s := by
rw [sUnion_eq_biUnion, measure_biUnion hs hd h]
1,383
import Mathlib.MeasureTheory.Measure.MeasureSpace #align_import measure_theory.covering.vitali_family from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open MeasureTheory Metric Set Filter TopologicalSpace MeasureTheory.Measure open Filter MeasureTheory Topology variable {Ξ± : Type*} [MetricSpace Ξ±] -- Porting note(#5171): this linter isn't ported yet. -- @[nolint has_nonempty_instance] structure VitaliFamily {m : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) where setsAt : Ξ± β†’ Set (Set Ξ±) measurableSet : βˆ€ x : Ξ±, βˆ€ s ∈ setsAt x, MeasurableSet s nonempty_interior : βˆ€ x : Ξ±, βˆ€ s ∈ setsAt x, (interior s).Nonempty nontrivial : βˆ€ (x : Ξ±), βˆ€ Ξ΅ > (0 : ℝ), βˆƒ s ∈ setsAt x, s βŠ† closedBall x Ξ΅ covering : βˆ€ (s : Set Ξ±) (f : Ξ± β†’ Set (Set Ξ±)), (βˆ€ x ∈ s, f x βŠ† setsAt x) β†’ (βˆ€ x ∈ s, βˆ€ Ξ΅ > (0 : ℝ), βˆƒ a ∈ f x, a βŠ† closedBall x Ξ΅) β†’ βˆƒ t : Set (Ξ± Γ— Set Ξ±), (βˆ€ p ∈ t, p.1 ∈ s) ∧ (t.PairwiseDisjoint fun p ↦ p.2) ∧ (βˆ€ p ∈ t, p.2 ∈ f p.1) ∧ ΞΌ (s \ ⋃ p ∈ t, p.2) = 0 #align vitali_family VitaliFamily namespace VitaliFamily variable {m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} def mono (v : VitaliFamily ΞΌ) (Ξ½ : Measure Ξ±) (hΞ½ : Ξ½ β‰ͺ ΞΌ) : VitaliFamily Ξ½ where __ := v covering s f h h' := let ⟨t, ts, disj, mem_f, hμ⟩ := v.covering s f h h' ⟨t, ts, disj, mem_f, hΞ½ hμ⟩ #align vitali_family.mono VitaliFamily.mono def FineSubfamilyOn (v : VitaliFamily ΞΌ) (f : Ξ± β†’ Set (Set Ξ±)) (s : Set Ξ±) : Prop := βˆ€ x ∈ s, βˆ€ Ξ΅ > 0, βˆƒ a ∈ v.setsAt x ∩ f x, a βŠ† closedBall x Ξ΅ #align vitali_family.fine_subfamily_on VitaliFamily.FineSubfamilyOn def enlarge (v : VitaliFamily ΞΌ) (Ξ΄ : ℝ) (Ξ΄pos : 0 < Ξ΄) : VitaliFamily ΞΌ where setsAt x := v.setsAt x βˆͺ { a | MeasurableSet a ∧ (interior a).Nonempty ∧ Β¬a βŠ† closedBall x Ξ΄ } measurableSet x a ha := by cases' ha with ha ha exacts [v.measurableSet _ _ ha, ha.1] nonempty_interior x a ha := by cases' ha with ha ha exacts [v.nonempty_interior _ _ ha, ha.2.1] nontrivial := by intro x Ξ΅ Ξ΅pos rcases v.nontrivial x Ξ΅ Ξ΅pos with ⟨a, ha, h'a⟩ exact ⟨a, mem_union_left _ ha, h'a⟩ covering := by intro s f fset ffine let g : Ξ± β†’ Set (Set Ξ±) := fun x => f x ∩ v.setsAt x have : βˆ€ x ∈ s, βˆ€ Ξ΅ : ℝ, Ξ΅ > 0 β†’ βˆƒ (a : Set Ξ±), a ∈ g x ∧ a βŠ† closedBall x Ξ΅ := by intro x hx Ξ΅ Ξ΅pos obtain ⟨a, af, ha⟩ : βˆƒ a ∈ f x, a βŠ† closedBall x (min Ξ΅ Ξ΄) := ffine x hx (min Ξ΅ Ξ΄) (lt_min Ξ΅pos Ξ΄pos) rcases fset x hx af with (h'a | h'a) Β· exact ⟨a, ⟨af, h'a⟩, ha.trans (closedBall_subset_closedBall (min_le_left _ _))⟩ Β· refine False.elim (h'a.2.2 ?_) exact ha.trans (closedBall_subset_closedBall (min_le_right _ _)) rcases v.covering s g (fun x _ => inter_subset_right) this with ⟨t, ts, tdisj, tg, ΞΌt⟩ exact ⟨t, ts, tdisj, fun p hp => (tg p hp).1, ΞΌt⟩ #align vitali_family.enlarge VitaliFamily.enlarge variable (v : VitaliFamily ΞΌ) def filterAt (x : Ξ±) : Filter (Set Ξ±) := (𝓝 x).smallSets βŠ“ π“Ÿ (v.setsAt x) #align vitali_family.filter_at VitaliFamily.filterAt
Mathlib/MeasureTheory/Covering/VitaliFamily.lean
226
228
theorem _root_.Filter.HasBasis.vitaliFamily {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} {x : Ξ±} (h : (𝓝 x).HasBasis p s) : (v.filterAt x).HasBasis p (fun i ↦ {t ∈ v.setsAt x | t βŠ† s i}) := by
simpa only [← Set.setOf_inter_eq_sep] using h.smallSets.inf_principal _
1,384
import Mathlib.MeasureTheory.Measure.MeasureSpace #align_import measure_theory.covering.vitali_family from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982" open MeasureTheory Metric Set Filter TopologicalSpace MeasureTheory.Measure open Filter MeasureTheory Topology variable {Ξ± : Type*} [MetricSpace Ξ±] -- Porting note(#5171): this linter isn't ported yet. -- @[nolint has_nonempty_instance] structure VitaliFamily {m : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) where setsAt : Ξ± β†’ Set (Set Ξ±) measurableSet : βˆ€ x : Ξ±, βˆ€ s ∈ setsAt x, MeasurableSet s nonempty_interior : βˆ€ x : Ξ±, βˆ€ s ∈ setsAt x, (interior s).Nonempty nontrivial : βˆ€ (x : Ξ±), βˆ€ Ξ΅ > (0 : ℝ), βˆƒ s ∈ setsAt x, s βŠ† closedBall x Ξ΅ covering : βˆ€ (s : Set Ξ±) (f : Ξ± β†’ Set (Set Ξ±)), (βˆ€ x ∈ s, f x βŠ† setsAt x) β†’ (βˆ€ x ∈ s, βˆ€ Ξ΅ > (0 : ℝ), βˆƒ a ∈ f x, a βŠ† closedBall x Ξ΅) β†’ βˆƒ t : Set (Ξ± Γ— Set Ξ±), (βˆ€ p ∈ t, p.1 ∈ s) ∧ (t.PairwiseDisjoint fun p ↦ p.2) ∧ (βˆ€ p ∈ t, p.2 ∈ f p.1) ∧ ΞΌ (s \ ⋃ p ∈ t, p.2) = 0 #align vitali_family VitaliFamily namespace VitaliFamily variable {m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} def mono (v : VitaliFamily ΞΌ) (Ξ½ : Measure Ξ±) (hΞ½ : Ξ½ β‰ͺ ΞΌ) : VitaliFamily Ξ½ where __ := v covering s f h h' := let ⟨t, ts, disj, mem_f, hμ⟩ := v.covering s f h h' ⟨t, ts, disj, mem_f, hΞ½ hμ⟩ #align vitali_family.mono VitaliFamily.mono def FineSubfamilyOn (v : VitaliFamily ΞΌ) (f : Ξ± β†’ Set (Set Ξ±)) (s : Set Ξ±) : Prop := βˆ€ x ∈ s, βˆ€ Ξ΅ > 0, βˆƒ a ∈ v.setsAt x ∩ f x, a βŠ† closedBall x Ξ΅ #align vitali_family.fine_subfamily_on VitaliFamily.FineSubfamilyOn def enlarge (v : VitaliFamily ΞΌ) (Ξ΄ : ℝ) (Ξ΄pos : 0 < Ξ΄) : VitaliFamily ΞΌ where setsAt x := v.setsAt x βˆͺ { a | MeasurableSet a ∧ (interior a).Nonempty ∧ Β¬a βŠ† closedBall x Ξ΄ } measurableSet x a ha := by cases' ha with ha ha exacts [v.measurableSet _ _ ha, ha.1] nonempty_interior x a ha := by cases' ha with ha ha exacts [v.nonempty_interior _ _ ha, ha.2.1] nontrivial := by intro x Ξ΅ Ξ΅pos rcases v.nontrivial x Ξ΅ Ξ΅pos with ⟨a, ha, h'a⟩ exact ⟨a, mem_union_left _ ha, h'a⟩ covering := by intro s f fset ffine let g : Ξ± β†’ Set (Set Ξ±) := fun x => f x ∩ v.setsAt x have : βˆ€ x ∈ s, βˆ€ Ξ΅ : ℝ, Ξ΅ > 0 β†’ βˆƒ (a : Set Ξ±), a ∈ g x ∧ a βŠ† closedBall x Ξ΅ := by intro x hx Ξ΅ Ξ΅pos obtain ⟨a, af, ha⟩ : βˆƒ a ∈ f x, a βŠ† closedBall x (min Ξ΅ Ξ΄) := ffine x hx (min Ξ΅ Ξ΄) (lt_min Ξ΅pos Ξ΄pos) rcases fset x hx af with (h'a | h'a) Β· exact ⟨a, ⟨af, h'a⟩, ha.trans (closedBall_subset_closedBall (min_le_left _ _))⟩ Β· refine False.elim (h'a.2.2 ?_) exact ha.trans (closedBall_subset_closedBall (min_le_right _ _)) rcases v.covering s g (fun x _ => inter_subset_right) this with ⟨t, ts, tdisj, tg, ΞΌt⟩ exact ⟨t, ts, tdisj, fun p hp => (tg p hp).1, ΞΌt⟩ #align vitali_family.enlarge VitaliFamily.enlarge variable (v : VitaliFamily ΞΌ) def filterAt (x : Ξ±) : Filter (Set Ξ±) := (𝓝 x).smallSets βŠ“ π“Ÿ (v.setsAt x) #align vitali_family.filter_at VitaliFamily.filterAt theorem _root_.Filter.HasBasis.vitaliFamily {ΞΉ : Sort*} {p : ΞΉ β†’ Prop} {s : ΞΉ β†’ Set Ξ±} {x : Ξ±} (h : (𝓝 x).HasBasis p s) : (v.filterAt x).HasBasis p (fun i ↦ {t ∈ v.setsAt x | t βŠ† s i}) := by simpa only [← Set.setOf_inter_eq_sep] using h.smallSets.inf_principal _ theorem filterAt_basis_closedBall (x : Ξ±) : (v.filterAt x).HasBasis (0 < Β·) ({a ∈ v.setsAt x | a βŠ† closedBall x Β·}) := nhds_basis_closedBall.vitaliFamily v
Mathlib/MeasureTheory/Covering/VitaliFamily.lean
234
236
theorem mem_filterAt_iff {x : Ξ±} {s : Set (Set Ξ±)} : s ∈ v.filterAt x ↔ βˆƒ Ξ΅ > (0 : ℝ), βˆ€ a ∈ v.setsAt x, a βŠ† closedBall x Ξ΅ β†’ a ∈ s := by
simp only [(v.filterAt_basis_closedBall x).mem_iff, ← and_imp, subset_def, mem_setOf]
1,384
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : Measure M := Measure.map (fun x : M Γ— M ↦ x.1 * x.2) (ΞΌ.prod Ξ½) scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.mconv scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.conv @[to_additive (attr := simp)]
Mathlib/MeasureTheory/Group/Convolution.lean
41
46
theorem dirac_one_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : (Measure.dirac 1) βˆ— ΞΌ = ΞΌ := by
unfold mconv rw [MeasureTheory.Measure.dirac_prod, map_map] Β· simp only [Function.comp_def, one_mul, map_id'] all_goals { measurability }
1,385
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : Measure M := Measure.map (fun x : M Γ— M ↦ x.1 * x.2) (ΞΌ.prod Ξ½) scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.mconv scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.conv @[to_additive (attr := simp)] theorem dirac_one_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : (Measure.dirac 1) βˆ— ΞΌ = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.dirac_prod, map_map] Β· simp only [Function.comp_def, one_mul, map_id'] all_goals { measurability } @[to_additive (attr := simp)]
Mathlib/MeasureTheory/Group/Convolution.lean
50
55
theorem mconv_dirac_one [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : ΞΌ βˆ— (Measure.dirac 1) = ΞΌ := by
unfold mconv rw [MeasureTheory.Measure.prod_dirac, map_map] Β· simp only [Function.comp_def, mul_one, map_id'] all_goals { measurability }
1,385
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : Measure M := Measure.map (fun x : M Γ— M ↦ x.1 * x.2) (ΞΌ.prod Ξ½) scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.mconv scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.conv @[to_additive (attr := simp)] theorem dirac_one_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : (Measure.dirac 1) βˆ— ΞΌ = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.dirac_prod, map_map] Β· simp only [Function.comp_def, one_mul, map_id'] all_goals { measurability } @[to_additive (attr := simp)] theorem mconv_dirac_one [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : ΞΌ βˆ— (Measure.dirac 1) = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.prod_dirac, map_map] Β· simp only [Function.comp_def, mul_one, map_id'] all_goals { measurability } @[to_additive (attr := simp) conv_zero]
Mathlib/MeasureTheory/Group/Convolution.lean
59
61
theorem mconv_zero (ΞΌ : Measure M) : (0 : Measure M) βˆ— ΞΌ = (0 : Measure M) := by
unfold mconv simp
1,385
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : Measure M := Measure.map (fun x : M Γ— M ↦ x.1 * x.2) (ΞΌ.prod Ξ½) scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.mconv scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.conv @[to_additive (attr := simp)] theorem dirac_one_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : (Measure.dirac 1) βˆ— ΞΌ = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.dirac_prod, map_map] Β· simp only [Function.comp_def, one_mul, map_id'] all_goals { measurability } @[to_additive (attr := simp)] theorem mconv_dirac_one [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : ΞΌ βˆ— (Measure.dirac 1) = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.prod_dirac, map_map] Β· simp only [Function.comp_def, mul_one, map_id'] all_goals { measurability } @[to_additive (attr := simp) conv_zero] theorem mconv_zero (ΞΌ : Measure M) : (0 : Measure M) βˆ— ΞΌ = (0 : Measure M) := by unfold mconv simp @[to_additive (attr := simp) zero_conv]
Mathlib/MeasureTheory/Group/Convolution.lean
65
67
theorem zero_mconv (ΞΌ : Measure M) : ΞΌ βˆ— (0 : Measure M) = (0 : Measure M) := by
unfold mconv simp
1,385
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : Measure M := Measure.map (fun x : M Γ— M ↦ x.1 * x.2) (ΞΌ.prod Ξ½) scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.mconv scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.conv @[to_additive (attr := simp)] theorem dirac_one_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : (Measure.dirac 1) βˆ— ΞΌ = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.dirac_prod, map_map] Β· simp only [Function.comp_def, one_mul, map_id'] all_goals { measurability } @[to_additive (attr := simp)] theorem mconv_dirac_one [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : ΞΌ βˆ— (Measure.dirac 1) = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.prod_dirac, map_map] Β· simp only [Function.comp_def, mul_one, map_id'] all_goals { measurability } @[to_additive (attr := simp) conv_zero] theorem mconv_zero (ΞΌ : Measure M) : (0 : Measure M) βˆ— ΞΌ = (0 : Measure M) := by unfold mconv simp @[to_additive (attr := simp) zero_conv] theorem zero_mconv (ΞΌ : Measure M) : ΞΌ βˆ— (0 : Measure M) = (0 : Measure M) := by unfold mconv simp @[to_additive conv_add]
Mathlib/MeasureTheory/Group/Convolution.lean
70
74
theorem mconv_add [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) (Ξ½ : Measure M) (ρ : Measure M) [SFinite ΞΌ] [SFinite Ξ½] [SFinite ρ] : ΞΌ βˆ— (Ξ½ + ρ) = ΞΌ βˆ— Ξ½ + ΞΌ βˆ— ρ := by
unfold mconv rw [prod_add, map_add] measurability
1,385
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : Measure M := Measure.map (fun x : M Γ— M ↦ x.1 * x.2) (ΞΌ.prod Ξ½) scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.mconv scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.conv @[to_additive (attr := simp)] theorem dirac_one_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : (Measure.dirac 1) βˆ— ΞΌ = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.dirac_prod, map_map] Β· simp only [Function.comp_def, one_mul, map_id'] all_goals { measurability } @[to_additive (attr := simp)] theorem mconv_dirac_one [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : ΞΌ βˆ— (Measure.dirac 1) = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.prod_dirac, map_map] Β· simp only [Function.comp_def, mul_one, map_id'] all_goals { measurability } @[to_additive (attr := simp) conv_zero] theorem mconv_zero (ΞΌ : Measure M) : (0 : Measure M) βˆ— ΞΌ = (0 : Measure M) := by unfold mconv simp @[to_additive (attr := simp) zero_conv] theorem zero_mconv (ΞΌ : Measure M) : ΞΌ βˆ— (0 : Measure M) = (0 : Measure M) := by unfold mconv simp @[to_additive conv_add] theorem mconv_add [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) (Ξ½ : Measure M) (ρ : Measure M) [SFinite ΞΌ] [SFinite Ξ½] [SFinite ρ] : ΞΌ βˆ— (Ξ½ + ρ) = ΞΌ βˆ— Ξ½ + ΞΌ βˆ— ρ := by unfold mconv rw [prod_add, map_add] measurability @[to_additive add_conv]
Mathlib/MeasureTheory/Group/Convolution.lean
77
81
theorem add_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) (Ξ½ : Measure M) (ρ : Measure M) [SFinite ΞΌ] [SFinite Ξ½] [SFinite ρ] : (ΞΌ + Ξ½) βˆ— ρ = ΞΌ βˆ— ρ + Ξ½ βˆ— ρ := by
unfold mconv rw [add_prod, map_add] measurability
1,385
import Mathlib.MeasureTheory.Constructions.Prod.Basic import Mathlib.MeasureTheory.Measure.MeasureSpace namespace MeasureTheory namespace Measure variable {M : Type*} [Monoid M] [MeasurableSpace M] @[to_additive conv "Additive convolution of measures."] noncomputable def mconv (ΞΌ : Measure M) (Ξ½ : Measure M) : Measure M := Measure.map (fun x : M Γ— M ↦ x.1 * x.2) (ΞΌ.prod Ξ½) scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.mconv scoped[MeasureTheory] infix:80 " βˆ— " => MeasureTheory.Measure.conv @[to_additive (attr := simp)] theorem dirac_one_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : (Measure.dirac 1) βˆ— ΞΌ = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.dirac_prod, map_map] Β· simp only [Function.comp_def, one_mul, map_id'] all_goals { measurability } @[to_additive (attr := simp)] theorem mconv_dirac_one [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) [SFinite ΞΌ] : ΞΌ βˆ— (Measure.dirac 1) = ΞΌ := by unfold mconv rw [MeasureTheory.Measure.prod_dirac, map_map] Β· simp only [Function.comp_def, mul_one, map_id'] all_goals { measurability } @[to_additive (attr := simp) conv_zero] theorem mconv_zero (ΞΌ : Measure M) : (0 : Measure M) βˆ— ΞΌ = (0 : Measure M) := by unfold mconv simp @[to_additive (attr := simp) zero_conv] theorem zero_mconv (ΞΌ : Measure M) : ΞΌ βˆ— (0 : Measure M) = (0 : Measure M) := by unfold mconv simp @[to_additive conv_add] theorem mconv_add [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) (Ξ½ : Measure M) (ρ : Measure M) [SFinite ΞΌ] [SFinite Ξ½] [SFinite ρ] : ΞΌ βˆ— (Ξ½ + ρ) = ΞΌ βˆ— Ξ½ + ΞΌ βˆ— ρ := by unfold mconv rw [prod_add, map_add] measurability @[to_additive add_conv] theorem add_mconv [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) (Ξ½ : Measure M) (ρ : Measure M) [SFinite ΞΌ] [SFinite Ξ½] [SFinite ρ] : (ΞΌ + Ξ½) βˆ— ρ = ΞΌ βˆ— ρ + Ξ½ βˆ— ρ := by unfold mconv rw [add_prod, map_add] measurability @[to_additive conv_comm]
Mathlib/MeasureTheory/Group/Convolution.lean
85
90
theorem mconv_comm {M : Type*} [CommMonoid M] [MeasurableSpace M] [MeasurableMulβ‚‚ M] (ΞΌ : Measure M) (Ξ½ : Measure M) [SFinite ΞΌ] [SFinite Ξ½] : ΞΌ βˆ— Ξ½ = Ξ½ βˆ— ΞΌ := by
unfold mconv rw [← prod_swap, map_map] Β· simp [Function.comp_def, mul_comm] all_goals { measurability }
1,385
import Mathlib.MeasureTheory.Measure.MeasureSpace open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function variable {R Ξ± Ξ² Ξ΄ Ξ³ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] [MeasurableSpace Ξ³] variable {ΞΌ μ₁ ΞΌβ‚‚ μ₃ Ξ½ Ξ½' ν₁ Ξ½β‚‚ : Measure Ξ±} {s s' t : Set Ξ±} namespace Measure noncomputable def restrictβ‚— {m0 : MeasurableSpace Ξ±} (s : Set Ξ±) : Measure Ξ± β†’β‚—[ℝβ‰₯0∞] Measure Ξ± := liftLinear (OuterMeasure.restrict s) fun ΞΌ s' hs' t => by suffices ΞΌ (s ∩ t) = ΞΌ (s ∩ t ∩ s') + ΞΌ ((s ∩ t) \ s') by simpa [← Set.inter_assoc, Set.inter_comm _ s, ← inter_diff_assoc] exact le_toOuterMeasure_caratheodory _ _ hs' _ #align measure_theory.measure.restrictβ‚— MeasureTheory.Measure.restrictβ‚— noncomputable def restrict {_m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (s : Set Ξ±) : Measure Ξ± := restrictβ‚— s ΞΌ #align measure_theory.measure.restrict MeasureTheory.Measure.restrict @[simp] theorem restrictβ‚—_apply {_m0 : MeasurableSpace Ξ±} (s : Set Ξ±) (ΞΌ : Measure Ξ±) : restrictβ‚— s ΞΌ = ΞΌ.restrict s := rfl #align measure_theory.measure.restrictβ‚—_apply MeasureTheory.Measure.restrictβ‚—_apply
Mathlib/MeasureTheory/Measure/Restrict.lean
56
59
theorem restrict_toOuterMeasure_eq_toOuterMeasure_restrict (h : MeasurableSet s) : (ΞΌ.restrict s).toOuterMeasure = OuterMeasure.restrict s ΞΌ.toOuterMeasure := by
simp_rw [restrict, restrictβ‚—, liftLinear, LinearMap.coe_mk, AddHom.coe_mk, toMeasure_toOuterMeasure, OuterMeasure.restrict_trim h, ΞΌ.trimmed]
1,386
import Mathlib.MeasureTheory.Measure.MeasureSpace open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function variable {R Ξ± Ξ² Ξ΄ Ξ³ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] [MeasurableSpace Ξ³] variable {ΞΌ μ₁ ΞΌβ‚‚ μ₃ Ξ½ Ξ½' ν₁ Ξ½β‚‚ : Measure Ξ±} {s s' t : Set Ξ±} namespace Measure noncomputable def restrictβ‚— {m0 : MeasurableSpace Ξ±} (s : Set Ξ±) : Measure Ξ± β†’β‚—[ℝβ‰₯0∞] Measure Ξ± := liftLinear (OuterMeasure.restrict s) fun ΞΌ s' hs' t => by suffices ΞΌ (s ∩ t) = ΞΌ (s ∩ t ∩ s') + ΞΌ ((s ∩ t) \ s') by simpa [← Set.inter_assoc, Set.inter_comm _ s, ← inter_diff_assoc] exact le_toOuterMeasure_caratheodory _ _ hs' _ #align measure_theory.measure.restrictβ‚— MeasureTheory.Measure.restrictβ‚— noncomputable def restrict {_m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (s : Set Ξ±) : Measure Ξ± := restrictβ‚— s ΞΌ #align measure_theory.measure.restrict MeasureTheory.Measure.restrict @[simp] theorem restrictβ‚—_apply {_m0 : MeasurableSpace Ξ±} (s : Set Ξ±) (ΞΌ : Measure Ξ±) : restrictβ‚— s ΞΌ = ΞΌ.restrict s := rfl #align measure_theory.measure.restrictβ‚—_apply MeasureTheory.Measure.restrictβ‚—_apply theorem restrict_toOuterMeasure_eq_toOuterMeasure_restrict (h : MeasurableSet s) : (ΞΌ.restrict s).toOuterMeasure = OuterMeasure.restrict s ΞΌ.toOuterMeasure := by simp_rw [restrict, restrictβ‚—, liftLinear, LinearMap.coe_mk, AddHom.coe_mk, toMeasure_toOuterMeasure, OuterMeasure.restrict_trim h, ΞΌ.trimmed] #align measure_theory.measure.restrict_to_outer_measure_eq_to_outer_measure_restrict MeasureTheory.Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict
Mathlib/MeasureTheory/Measure/Restrict.lean
62
64
theorem restrict_applyβ‚€ (ht : NullMeasurableSet t (ΞΌ.restrict s)) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by
rw [← restrictβ‚—_apply, restrictβ‚—, liftLinear_applyβ‚€ _ ht, OuterMeasure.restrict_apply, coe_toOuterMeasure]
1,386
import Mathlib.MeasureTheory.Measure.MeasureSpace open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function variable {R Ξ± Ξ² Ξ΄ Ξ³ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] [MeasurableSpace Ξ³] variable {ΞΌ μ₁ ΞΌβ‚‚ μ₃ Ξ½ Ξ½' ν₁ Ξ½β‚‚ : Measure Ξ±} {s s' t : Set Ξ±} namespace Measure noncomputable def restrictβ‚— {m0 : MeasurableSpace Ξ±} (s : Set Ξ±) : Measure Ξ± β†’β‚—[ℝβ‰₯0∞] Measure Ξ± := liftLinear (OuterMeasure.restrict s) fun ΞΌ s' hs' t => by suffices ΞΌ (s ∩ t) = ΞΌ (s ∩ t ∩ s') + ΞΌ ((s ∩ t) \ s') by simpa [← Set.inter_assoc, Set.inter_comm _ s, ← inter_diff_assoc] exact le_toOuterMeasure_caratheodory _ _ hs' _ #align measure_theory.measure.restrictβ‚— MeasureTheory.Measure.restrictβ‚— noncomputable def restrict {_m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (s : Set Ξ±) : Measure Ξ± := restrictβ‚— s ΞΌ #align measure_theory.measure.restrict MeasureTheory.Measure.restrict @[simp] theorem restrictβ‚—_apply {_m0 : MeasurableSpace Ξ±} (s : Set Ξ±) (ΞΌ : Measure Ξ±) : restrictβ‚— s ΞΌ = ΞΌ.restrict s := rfl #align measure_theory.measure.restrictβ‚—_apply MeasureTheory.Measure.restrictβ‚—_apply theorem restrict_toOuterMeasure_eq_toOuterMeasure_restrict (h : MeasurableSet s) : (ΞΌ.restrict s).toOuterMeasure = OuterMeasure.restrict s ΞΌ.toOuterMeasure := by simp_rw [restrict, restrictβ‚—, liftLinear, LinearMap.coe_mk, AddHom.coe_mk, toMeasure_toOuterMeasure, OuterMeasure.restrict_trim h, ΞΌ.trimmed] #align measure_theory.measure.restrict_to_outer_measure_eq_to_outer_measure_restrict MeasureTheory.Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict theorem restrict_applyβ‚€ (ht : NullMeasurableSet t (ΞΌ.restrict s)) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← restrictβ‚—_apply, restrictβ‚—, liftLinear_applyβ‚€ _ ht, OuterMeasure.restrict_apply, coe_toOuterMeasure] #align measure_theory.measure.restrict_applyβ‚€ MeasureTheory.Measure.restrict_applyβ‚€ @[simp] theorem restrict_apply (ht : MeasurableSet t) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_applyβ‚€ ht.nullMeasurableSet #align measure_theory.measure.restrict_apply MeasureTheory.Measure.restrict_apply theorem restrict_mono' {_m0 : MeasurableSpace Ξ±} ⦃s s' : Set α⦄ ⦃μ Ξ½ : Measure α⦄ (hs : s ≀ᡐ[ΞΌ] s') (hΞΌΞ½ : ΞΌ ≀ Ξ½) : ΞΌ.restrict s ≀ Ξ½.restrict s' := Measure.le_iff.2 fun t ht => calc ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_apply ht _ ≀ ΞΌ (t ∩ s') := (measure_mono_ae <| hs.mono fun _x hx ⟨hxt, hxs⟩ => ⟨hxt, hx hxs⟩) _ ≀ Ξ½ (t ∩ s') := le_iff'.1 hΞΌΞ½ (t ∩ s') _ = Ξ½.restrict s' t := (restrict_apply ht).symm #align measure_theory.measure.restrict_mono' MeasureTheory.Measure.restrict_mono' @[mono] theorem restrict_mono {_m0 : MeasurableSpace Ξ±} ⦃s s' : Set α⦄ (hs : s βŠ† s') ⦃μ Ξ½ : Measure α⦄ (hΞΌΞ½ : ΞΌ ≀ Ξ½) : ΞΌ.restrict s ≀ Ξ½.restrict s' := restrict_mono' (ae_of_all _ hs) hΞΌΞ½ #align measure_theory.measure.restrict_mono MeasureTheory.Measure.restrict_mono theorem restrict_mono_ae (h : s ≀ᡐ[ΞΌ] t) : ΞΌ.restrict s ≀ ΞΌ.restrict t := restrict_mono' h (le_refl ΞΌ) #align measure_theory.measure.restrict_mono_ae MeasureTheory.Measure.restrict_mono_ae theorem restrict_congr_set (h : s =ᡐ[ΞΌ] t) : ΞΌ.restrict s = ΞΌ.restrict t := le_antisymm (restrict_mono_ae h.le) (restrict_mono_ae h.symm.le) #align measure_theory.measure.restrict_congr_set MeasureTheory.Measure.restrict_congr_set @[simp]
Mathlib/MeasureTheory/Measure/Restrict.lean
104
107
theorem restrict_apply' (hs : MeasurableSet s) : μ.restrict s t = μ (t ∩ s) := by
rw [← toOuterMeasure_apply, Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict hs, OuterMeasure.restrict_apply s t _, toOuterMeasure_apply]
1,386
import Mathlib.MeasureTheory.Measure.MeasureSpace open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function variable {R Ξ± Ξ² Ξ΄ Ξ³ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] [MeasurableSpace Ξ³] variable {ΞΌ μ₁ ΞΌβ‚‚ μ₃ Ξ½ Ξ½' ν₁ Ξ½β‚‚ : Measure Ξ±} {s s' t : Set Ξ±} namespace Measure noncomputable def restrictβ‚— {m0 : MeasurableSpace Ξ±} (s : Set Ξ±) : Measure Ξ± β†’β‚—[ℝβ‰₯0∞] Measure Ξ± := liftLinear (OuterMeasure.restrict s) fun ΞΌ s' hs' t => by suffices ΞΌ (s ∩ t) = ΞΌ (s ∩ t ∩ s') + ΞΌ ((s ∩ t) \ s') by simpa [← Set.inter_assoc, Set.inter_comm _ s, ← inter_diff_assoc] exact le_toOuterMeasure_caratheodory _ _ hs' _ #align measure_theory.measure.restrictβ‚— MeasureTheory.Measure.restrictβ‚— noncomputable def restrict {_m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (s : Set Ξ±) : Measure Ξ± := restrictβ‚— s ΞΌ #align measure_theory.measure.restrict MeasureTheory.Measure.restrict @[simp] theorem restrictβ‚—_apply {_m0 : MeasurableSpace Ξ±} (s : Set Ξ±) (ΞΌ : Measure Ξ±) : restrictβ‚— s ΞΌ = ΞΌ.restrict s := rfl #align measure_theory.measure.restrictβ‚—_apply MeasureTheory.Measure.restrictβ‚—_apply theorem restrict_toOuterMeasure_eq_toOuterMeasure_restrict (h : MeasurableSet s) : (ΞΌ.restrict s).toOuterMeasure = OuterMeasure.restrict s ΞΌ.toOuterMeasure := by simp_rw [restrict, restrictβ‚—, liftLinear, LinearMap.coe_mk, AddHom.coe_mk, toMeasure_toOuterMeasure, OuterMeasure.restrict_trim h, ΞΌ.trimmed] #align measure_theory.measure.restrict_to_outer_measure_eq_to_outer_measure_restrict MeasureTheory.Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict theorem restrict_applyβ‚€ (ht : NullMeasurableSet t (ΞΌ.restrict s)) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← restrictβ‚—_apply, restrictβ‚—, liftLinear_applyβ‚€ _ ht, OuterMeasure.restrict_apply, coe_toOuterMeasure] #align measure_theory.measure.restrict_applyβ‚€ MeasureTheory.Measure.restrict_applyβ‚€ @[simp] theorem restrict_apply (ht : MeasurableSet t) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_applyβ‚€ ht.nullMeasurableSet #align measure_theory.measure.restrict_apply MeasureTheory.Measure.restrict_apply theorem restrict_mono' {_m0 : MeasurableSpace Ξ±} ⦃s s' : Set α⦄ ⦃μ Ξ½ : Measure α⦄ (hs : s ≀ᡐ[ΞΌ] s') (hΞΌΞ½ : ΞΌ ≀ Ξ½) : ΞΌ.restrict s ≀ Ξ½.restrict s' := Measure.le_iff.2 fun t ht => calc ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_apply ht _ ≀ ΞΌ (t ∩ s') := (measure_mono_ae <| hs.mono fun _x hx ⟨hxt, hxs⟩ => ⟨hxt, hx hxs⟩) _ ≀ Ξ½ (t ∩ s') := le_iff'.1 hΞΌΞ½ (t ∩ s') _ = Ξ½.restrict s' t := (restrict_apply ht).symm #align measure_theory.measure.restrict_mono' MeasureTheory.Measure.restrict_mono' @[mono] theorem restrict_mono {_m0 : MeasurableSpace Ξ±} ⦃s s' : Set α⦄ (hs : s βŠ† s') ⦃μ Ξ½ : Measure α⦄ (hΞΌΞ½ : ΞΌ ≀ Ξ½) : ΞΌ.restrict s ≀ Ξ½.restrict s' := restrict_mono' (ae_of_all _ hs) hΞΌΞ½ #align measure_theory.measure.restrict_mono MeasureTheory.Measure.restrict_mono theorem restrict_mono_ae (h : s ≀ᡐ[ΞΌ] t) : ΞΌ.restrict s ≀ ΞΌ.restrict t := restrict_mono' h (le_refl ΞΌ) #align measure_theory.measure.restrict_mono_ae MeasureTheory.Measure.restrict_mono_ae theorem restrict_congr_set (h : s =ᡐ[ΞΌ] t) : ΞΌ.restrict s = ΞΌ.restrict t := le_antisymm (restrict_mono_ae h.le) (restrict_mono_ae h.symm.le) #align measure_theory.measure.restrict_congr_set MeasureTheory.Measure.restrict_congr_set @[simp] theorem restrict_apply' (hs : MeasurableSet s) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← toOuterMeasure_apply, Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict hs, OuterMeasure.restrict_apply s t _, toOuterMeasure_apply] #align measure_theory.measure.restrict_apply' MeasureTheory.Measure.restrict_apply'
Mathlib/MeasureTheory/Measure/Restrict.lean
110
113
theorem restrict_applyβ‚€' (hs : NullMeasurableSet s ΞΌ) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by
rw [← restrict_congr_set hs.toMeasurable_ae_eq, restrict_apply' (measurableSet_toMeasurable _ _), measure_congr ((ae_eq_refl t).inter hs.toMeasurable_ae_eq)]
1,386
import Mathlib.MeasureTheory.Measure.MeasureSpace open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function variable {R Ξ± Ξ² Ξ΄ Ξ³ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] [MeasurableSpace Ξ³] variable {ΞΌ μ₁ ΞΌβ‚‚ μ₃ Ξ½ Ξ½' ν₁ Ξ½β‚‚ : Measure Ξ±} {s s' t : Set Ξ±} namespace Measure noncomputable def restrictβ‚— {m0 : MeasurableSpace Ξ±} (s : Set Ξ±) : Measure Ξ± β†’β‚—[ℝβ‰₯0∞] Measure Ξ± := liftLinear (OuterMeasure.restrict s) fun ΞΌ s' hs' t => by suffices ΞΌ (s ∩ t) = ΞΌ (s ∩ t ∩ s') + ΞΌ ((s ∩ t) \ s') by simpa [← Set.inter_assoc, Set.inter_comm _ s, ← inter_diff_assoc] exact le_toOuterMeasure_caratheodory _ _ hs' _ #align measure_theory.measure.restrictβ‚— MeasureTheory.Measure.restrictβ‚— noncomputable def restrict {_m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (s : Set Ξ±) : Measure Ξ± := restrictβ‚— s ΞΌ #align measure_theory.measure.restrict MeasureTheory.Measure.restrict @[simp] theorem restrictβ‚—_apply {_m0 : MeasurableSpace Ξ±} (s : Set Ξ±) (ΞΌ : Measure Ξ±) : restrictβ‚— s ΞΌ = ΞΌ.restrict s := rfl #align measure_theory.measure.restrictβ‚—_apply MeasureTheory.Measure.restrictβ‚—_apply theorem restrict_toOuterMeasure_eq_toOuterMeasure_restrict (h : MeasurableSet s) : (ΞΌ.restrict s).toOuterMeasure = OuterMeasure.restrict s ΞΌ.toOuterMeasure := by simp_rw [restrict, restrictβ‚—, liftLinear, LinearMap.coe_mk, AddHom.coe_mk, toMeasure_toOuterMeasure, OuterMeasure.restrict_trim h, ΞΌ.trimmed] #align measure_theory.measure.restrict_to_outer_measure_eq_to_outer_measure_restrict MeasureTheory.Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict theorem restrict_applyβ‚€ (ht : NullMeasurableSet t (ΞΌ.restrict s)) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← restrictβ‚—_apply, restrictβ‚—, liftLinear_applyβ‚€ _ ht, OuterMeasure.restrict_apply, coe_toOuterMeasure] #align measure_theory.measure.restrict_applyβ‚€ MeasureTheory.Measure.restrict_applyβ‚€ @[simp] theorem restrict_apply (ht : MeasurableSet t) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_applyβ‚€ ht.nullMeasurableSet #align measure_theory.measure.restrict_apply MeasureTheory.Measure.restrict_apply theorem restrict_mono' {_m0 : MeasurableSpace Ξ±} ⦃s s' : Set α⦄ ⦃μ Ξ½ : Measure α⦄ (hs : s ≀ᡐ[ΞΌ] s') (hΞΌΞ½ : ΞΌ ≀ Ξ½) : ΞΌ.restrict s ≀ Ξ½.restrict s' := Measure.le_iff.2 fun t ht => calc ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_apply ht _ ≀ ΞΌ (t ∩ s') := (measure_mono_ae <| hs.mono fun _x hx ⟨hxt, hxs⟩ => ⟨hxt, hx hxs⟩) _ ≀ Ξ½ (t ∩ s') := le_iff'.1 hΞΌΞ½ (t ∩ s') _ = Ξ½.restrict s' t := (restrict_apply ht).symm #align measure_theory.measure.restrict_mono' MeasureTheory.Measure.restrict_mono' @[mono] theorem restrict_mono {_m0 : MeasurableSpace Ξ±} ⦃s s' : Set α⦄ (hs : s βŠ† s') ⦃μ Ξ½ : Measure α⦄ (hΞΌΞ½ : ΞΌ ≀ Ξ½) : ΞΌ.restrict s ≀ Ξ½.restrict s' := restrict_mono' (ae_of_all _ hs) hΞΌΞ½ #align measure_theory.measure.restrict_mono MeasureTheory.Measure.restrict_mono theorem restrict_mono_ae (h : s ≀ᡐ[ΞΌ] t) : ΞΌ.restrict s ≀ ΞΌ.restrict t := restrict_mono' h (le_refl ΞΌ) #align measure_theory.measure.restrict_mono_ae MeasureTheory.Measure.restrict_mono_ae theorem restrict_congr_set (h : s =ᡐ[ΞΌ] t) : ΞΌ.restrict s = ΞΌ.restrict t := le_antisymm (restrict_mono_ae h.le) (restrict_mono_ae h.symm.le) #align measure_theory.measure.restrict_congr_set MeasureTheory.Measure.restrict_congr_set @[simp] theorem restrict_apply' (hs : MeasurableSet s) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← toOuterMeasure_apply, Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict hs, OuterMeasure.restrict_apply s t _, toOuterMeasure_apply] #align measure_theory.measure.restrict_apply' MeasureTheory.Measure.restrict_apply' theorem restrict_applyβ‚€' (hs : NullMeasurableSet s ΞΌ) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← restrict_congr_set hs.toMeasurable_ae_eq, restrict_apply' (measurableSet_toMeasurable _ _), measure_congr ((ae_eq_refl t).inter hs.toMeasurable_ae_eq)] #align measure_theory.measure.restrict_applyβ‚€' MeasureTheory.Measure.restrict_applyβ‚€' theorem restrict_le_self : ΞΌ.restrict s ≀ ΞΌ := Measure.le_iff.2 fun t ht => calc ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_apply ht _ ≀ ΞΌ t := measure_mono inter_subset_left #align measure_theory.measure.restrict_le_self MeasureTheory.Measure.restrict_le_self variable (ΞΌ)
Mathlib/MeasureTheory/Measure/Restrict.lean
124
130
theorem restrict_eq_self (h : s βŠ† t) : ΞΌ.restrict t s = ΞΌ s := (le_iff'.1 restrict_le_self s).antisymm <| calc ΞΌ s ≀ ΞΌ (toMeasurable (ΞΌ.restrict t) s ∩ t) := measure_mono (subset_inter (subset_toMeasurable _ _) h) _ = ΞΌ.restrict t s := by
rw [← restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable]
1,386
import Mathlib.MeasureTheory.Measure.MeasureSpace open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter MeasurableSpace ENNReal Function variable {R Ξ± Ξ² Ξ΄ Ξ³ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] [MeasurableSpace Ξ³] variable {ΞΌ μ₁ ΞΌβ‚‚ μ₃ Ξ½ Ξ½' ν₁ Ξ½β‚‚ : Measure Ξ±} {s s' t : Set Ξ±} namespace Measure noncomputable def restrictβ‚— {m0 : MeasurableSpace Ξ±} (s : Set Ξ±) : Measure Ξ± β†’β‚—[ℝβ‰₯0∞] Measure Ξ± := liftLinear (OuterMeasure.restrict s) fun ΞΌ s' hs' t => by suffices ΞΌ (s ∩ t) = ΞΌ (s ∩ t ∩ s') + ΞΌ ((s ∩ t) \ s') by simpa [← Set.inter_assoc, Set.inter_comm _ s, ← inter_diff_assoc] exact le_toOuterMeasure_caratheodory _ _ hs' _ #align measure_theory.measure.restrictβ‚— MeasureTheory.Measure.restrictβ‚— noncomputable def restrict {_m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) (s : Set Ξ±) : Measure Ξ± := restrictβ‚— s ΞΌ #align measure_theory.measure.restrict MeasureTheory.Measure.restrict @[simp] theorem restrictβ‚—_apply {_m0 : MeasurableSpace Ξ±} (s : Set Ξ±) (ΞΌ : Measure Ξ±) : restrictβ‚— s ΞΌ = ΞΌ.restrict s := rfl #align measure_theory.measure.restrictβ‚—_apply MeasureTheory.Measure.restrictβ‚—_apply theorem restrict_toOuterMeasure_eq_toOuterMeasure_restrict (h : MeasurableSet s) : (ΞΌ.restrict s).toOuterMeasure = OuterMeasure.restrict s ΞΌ.toOuterMeasure := by simp_rw [restrict, restrictβ‚—, liftLinear, LinearMap.coe_mk, AddHom.coe_mk, toMeasure_toOuterMeasure, OuterMeasure.restrict_trim h, ΞΌ.trimmed] #align measure_theory.measure.restrict_to_outer_measure_eq_to_outer_measure_restrict MeasureTheory.Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict theorem restrict_applyβ‚€ (ht : NullMeasurableSet t (ΞΌ.restrict s)) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← restrictβ‚—_apply, restrictβ‚—, liftLinear_applyβ‚€ _ ht, OuterMeasure.restrict_apply, coe_toOuterMeasure] #align measure_theory.measure.restrict_applyβ‚€ MeasureTheory.Measure.restrict_applyβ‚€ @[simp] theorem restrict_apply (ht : MeasurableSet t) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_applyβ‚€ ht.nullMeasurableSet #align measure_theory.measure.restrict_apply MeasureTheory.Measure.restrict_apply theorem restrict_mono' {_m0 : MeasurableSpace Ξ±} ⦃s s' : Set α⦄ ⦃μ Ξ½ : Measure α⦄ (hs : s ≀ᡐ[ΞΌ] s') (hΞΌΞ½ : ΞΌ ≀ Ξ½) : ΞΌ.restrict s ≀ Ξ½.restrict s' := Measure.le_iff.2 fun t ht => calc ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_apply ht _ ≀ ΞΌ (t ∩ s') := (measure_mono_ae <| hs.mono fun _x hx ⟨hxt, hxs⟩ => ⟨hxt, hx hxs⟩) _ ≀ Ξ½ (t ∩ s') := le_iff'.1 hΞΌΞ½ (t ∩ s') _ = Ξ½.restrict s' t := (restrict_apply ht).symm #align measure_theory.measure.restrict_mono' MeasureTheory.Measure.restrict_mono' @[mono] theorem restrict_mono {_m0 : MeasurableSpace Ξ±} ⦃s s' : Set α⦄ (hs : s βŠ† s') ⦃μ Ξ½ : Measure α⦄ (hΞΌΞ½ : ΞΌ ≀ Ξ½) : ΞΌ.restrict s ≀ Ξ½.restrict s' := restrict_mono' (ae_of_all _ hs) hΞΌΞ½ #align measure_theory.measure.restrict_mono MeasureTheory.Measure.restrict_mono theorem restrict_mono_ae (h : s ≀ᡐ[ΞΌ] t) : ΞΌ.restrict s ≀ ΞΌ.restrict t := restrict_mono' h (le_refl ΞΌ) #align measure_theory.measure.restrict_mono_ae MeasureTheory.Measure.restrict_mono_ae theorem restrict_congr_set (h : s =ᡐ[ΞΌ] t) : ΞΌ.restrict s = ΞΌ.restrict t := le_antisymm (restrict_mono_ae h.le) (restrict_mono_ae h.symm.le) #align measure_theory.measure.restrict_congr_set MeasureTheory.Measure.restrict_congr_set @[simp] theorem restrict_apply' (hs : MeasurableSet s) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← toOuterMeasure_apply, Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict hs, OuterMeasure.restrict_apply s t _, toOuterMeasure_apply] #align measure_theory.measure.restrict_apply' MeasureTheory.Measure.restrict_apply' theorem restrict_applyβ‚€' (hs : NullMeasurableSet s ΞΌ) : ΞΌ.restrict s t = ΞΌ (t ∩ s) := by rw [← restrict_congr_set hs.toMeasurable_ae_eq, restrict_apply' (measurableSet_toMeasurable _ _), measure_congr ((ae_eq_refl t).inter hs.toMeasurable_ae_eq)] #align measure_theory.measure.restrict_applyβ‚€' MeasureTheory.Measure.restrict_applyβ‚€' theorem restrict_le_self : ΞΌ.restrict s ≀ ΞΌ := Measure.le_iff.2 fun t ht => calc ΞΌ.restrict s t = ΞΌ (t ∩ s) := restrict_apply ht _ ≀ ΞΌ t := measure_mono inter_subset_left #align measure_theory.measure.restrict_le_self MeasureTheory.Measure.restrict_le_self variable (ΞΌ) theorem restrict_eq_self (h : s βŠ† t) : ΞΌ.restrict t s = ΞΌ s := (le_iff'.1 restrict_le_self s).antisymm <| calc ΞΌ s ≀ ΞΌ (toMeasurable (ΞΌ.restrict t) s ∩ t) := measure_mono (subset_inter (subset_toMeasurable _ _) h) _ = ΞΌ.restrict t s := by rw [← restrict_apply (measurableSet_toMeasurable _ _), measure_toMeasurable] #align measure_theory.measure.restrict_eq_self MeasureTheory.Measure.restrict_eq_self @[simp] theorem restrict_apply_self (s : Set Ξ±) : (ΞΌ.restrict s) s = ΞΌ s := restrict_eq_self ΞΌ Subset.rfl #align measure_theory.measure.restrict_apply_self MeasureTheory.Measure.restrict_apply_self variable {ΞΌ}
Mathlib/MeasureTheory/Measure/Restrict.lean
140
141
theorem restrict_apply_univ (s : Set Ξ±) : ΞΌ.restrict s univ = ΞΌ s := by
rw [restrict_apply MeasurableSet.univ, Set.univ_inter]
1,386
import Mathlib.MeasureTheory.Measure.Restrict #align_import measure_theory.measure.mutually_singular from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" open Set open MeasureTheory NNReal ENNReal namespace MeasureTheory namespace Measure variable {Ξ± : Type*} {m0 : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ Ξ½ ν₁ Ξ½β‚‚ : Measure Ξ±} def MutuallySingular {_ : MeasurableSpace Ξ±} (ΞΌ Ξ½ : Measure Ξ±) : Prop := βˆƒ s : Set Ξ±, MeasurableSet s ∧ ΞΌ s = 0 ∧ Ξ½ sᢜ = 0 #align measure_theory.measure.mutually_singular MeasureTheory.Measure.MutuallySingular @[inherit_doc MeasureTheory.Measure.MutuallySingular] scoped[MeasureTheory] infixl:60 " βŸ‚β‚˜ " => MeasureTheory.Measure.MutuallySingular namespace MutuallySingular
Mathlib/MeasureTheory/Measure/MutuallySingular.lean
48
52
theorem mk {s t : Set Ξ±} (hs : ΞΌ s = 0) (ht : Ξ½ t = 0) (hst : univ βŠ† s βˆͺ t) : MutuallySingular ΞΌ Ξ½ := by
use toMeasurable ΞΌ s, measurableSet_toMeasurable _ _, (measure_toMeasurable _).trans hs refine measure_mono_null (fun x hx => (hst trivial).resolve_left fun hxs => hx ?_) ht exact subset_toMeasurable _ _ hxs
1,387
import Mathlib.MeasureTheory.Measure.Restrict #align_import measure_theory.measure.mutually_singular from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" open Set open MeasureTheory NNReal ENNReal namespace MeasureTheory namespace Measure variable {Ξ± : Type*} {m0 : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ Ξ½ ν₁ Ξ½β‚‚ : Measure Ξ±} def MutuallySingular {_ : MeasurableSpace Ξ±} (ΞΌ Ξ½ : Measure Ξ±) : Prop := βˆƒ s : Set Ξ±, MeasurableSet s ∧ ΞΌ s = 0 ∧ Ξ½ sᢜ = 0 #align measure_theory.measure.mutually_singular MeasureTheory.Measure.MutuallySingular @[inherit_doc MeasureTheory.Measure.MutuallySingular] scoped[MeasureTheory] infixl:60 " βŸ‚β‚˜ " => MeasureTheory.Measure.MutuallySingular namespace MutuallySingular theorem mk {s t : Set Ξ±} (hs : ΞΌ s = 0) (ht : Ξ½ t = 0) (hst : univ βŠ† s βˆͺ t) : MutuallySingular ΞΌ Ξ½ := by use toMeasurable ΞΌ s, measurableSet_toMeasurable _ _, (measure_toMeasurable _).trans hs refine measure_mono_null (fun x hx => (hst trivial).resolve_left fun hxs => hx ?_) ht exact subset_toMeasurable _ _ hxs #align measure_theory.measure.mutually_singular.mk MeasureTheory.Measure.MutuallySingular.mk def nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : Set Ξ± := h.choose lemma measurableSet_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : MeasurableSet h.nullSet := h.choose_spec.1 @[simp] lemma measure_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : ΞΌ h.nullSet = 0 := h.choose_spec.2.1 @[simp] lemma measure_compl_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : Ξ½ h.nullSetᢜ = 0 := h.choose_spec.2.2 -- TODO: this is proved by simp, but is not simplified in other contexts without the @[simp] -- attribute. Also, the linter does not complain about that attribute. @[simp] lemma restrict_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : ΞΌ.restrict h.nullSet = 0 := by simp -- TODO: this is proved by simp, but is not simplified in other contexts without the @[simp] -- attribute. Also, the linter does not complain about that attribute. @[simp] lemma restrict_compl_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : Ξ½.restrict h.nullSetᢜ = 0 := by simp @[simp] theorem zero_right : ΞΌ βŸ‚β‚˜ 0 := βŸ¨βˆ…, MeasurableSet.empty, measure_empty, rfl⟩ #align measure_theory.measure.mutually_singular.zero_right MeasureTheory.Measure.MutuallySingular.zero_right @[symm] theorem symm (h : Ξ½ βŸ‚β‚˜ ΞΌ) : ΞΌ βŸ‚β‚˜ Ξ½ := let ⟨i, hi, his, hit⟩ := h ⟨iᢜ, hi.compl, hit, (compl_compl i).symm β–Έ his⟩ #align measure_theory.measure.mutually_singular.symm MeasureTheory.Measure.MutuallySingular.symm theorem comm : ΞΌ βŸ‚β‚˜ Ξ½ ↔ Ξ½ βŸ‚β‚˜ ΞΌ := ⟨fun h => h.symm, fun h => h.symm⟩ #align measure_theory.measure.mutually_singular.comm MeasureTheory.Measure.MutuallySingular.comm @[simp] theorem zero_left : 0 βŸ‚β‚˜ ΞΌ := zero_right.symm #align measure_theory.measure.mutually_singular.zero_left MeasureTheory.Measure.MutuallySingular.zero_left theorem mono_ac (h : μ₁ βŸ‚β‚˜ ν₁) (hΞΌ : ΞΌβ‚‚ β‰ͺ μ₁) (hΞ½ : Ξ½β‚‚ β‰ͺ ν₁) : ΞΌβ‚‚ βŸ‚β‚˜ Ξ½β‚‚ := let ⟨s, hs, h₁, hβ‚‚βŸ© := h ⟨s, hs, hΞΌ h₁, hΞ½ hβ‚‚βŸ© #align measure_theory.measure.mutually_singular.mono_ac MeasureTheory.Measure.MutuallySingular.mono_ac theorem mono (h : μ₁ βŸ‚β‚˜ ν₁) (hΞΌ : ΞΌβ‚‚ ≀ μ₁) (hΞ½ : Ξ½β‚‚ ≀ ν₁) : ΞΌβ‚‚ βŸ‚β‚˜ Ξ½β‚‚ := h.mono_ac hΞΌ.absolutelyContinuous hΞ½.absolutelyContinuous #align measure_theory.measure.mutually_singular.mono MeasureTheory.Measure.MutuallySingular.mono @[simp] lemma self_iff (ΞΌ : Measure Ξ±) : ΞΌ βŸ‚β‚˜ ΞΌ ↔ ΞΌ = 0 := by refine ⟨?_, fun h ↦ by (rw [h]; exact zero_left)⟩ rintro ⟨s, hs, hΞΌs, hΞΌs_compl⟩ suffices ΞΌ Set.univ = 0 by rwa [measure_univ_eq_zero] at this rw [← Set.union_compl_self s, measure_union disjoint_compl_right hs.compl, hΞΌs, hΞΌs_compl, add_zero] @[simp]
Mathlib/MeasureTheory/Measure/MutuallySingular.lean
114
120
theorem sum_left {ΞΉ : Type*} [Countable ΞΉ] {ΞΌ : ΞΉ β†’ Measure Ξ±} : sum ΞΌ βŸ‚β‚˜ Ξ½ ↔ βˆ€ i, ΞΌ i βŸ‚β‚˜ Ξ½ := by
refine ⟨fun h i => h.mono (le_sum _ _) le_rfl, fun H => ?_⟩ choose s hsm hsΞΌ hsΞ½ using H refine βŸ¨β‹‚ i, s i, MeasurableSet.iInter hsm, ?_, ?_⟩ Β· rw [sum_apply _ (MeasurableSet.iInter hsm), ENNReal.tsum_eq_zero] exact fun i => measure_mono_null (iInter_subset _ _) (hsΞΌ i) Β· rwa [compl_iInter, measure_iUnion_null_iff]
1,387
import Mathlib.MeasureTheory.Measure.Restrict #align_import measure_theory.measure.mutually_singular from "leanprover-community/mathlib"@"70a4f2197832bceab57d7f41379b2592d1110570" open Set open MeasureTheory NNReal ENNReal namespace MeasureTheory namespace Measure variable {Ξ± : Type*} {m0 : MeasurableSpace Ξ±} {ΞΌ μ₁ ΞΌβ‚‚ Ξ½ ν₁ Ξ½β‚‚ : Measure Ξ±} def MutuallySingular {_ : MeasurableSpace Ξ±} (ΞΌ Ξ½ : Measure Ξ±) : Prop := βˆƒ s : Set Ξ±, MeasurableSet s ∧ ΞΌ s = 0 ∧ Ξ½ sᢜ = 0 #align measure_theory.measure.mutually_singular MeasureTheory.Measure.MutuallySingular @[inherit_doc MeasureTheory.Measure.MutuallySingular] scoped[MeasureTheory] infixl:60 " βŸ‚β‚˜ " => MeasureTheory.Measure.MutuallySingular namespace MutuallySingular theorem mk {s t : Set Ξ±} (hs : ΞΌ s = 0) (ht : Ξ½ t = 0) (hst : univ βŠ† s βˆͺ t) : MutuallySingular ΞΌ Ξ½ := by use toMeasurable ΞΌ s, measurableSet_toMeasurable _ _, (measure_toMeasurable _).trans hs refine measure_mono_null (fun x hx => (hst trivial).resolve_left fun hxs => hx ?_) ht exact subset_toMeasurable _ _ hxs #align measure_theory.measure.mutually_singular.mk MeasureTheory.Measure.MutuallySingular.mk def nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : Set Ξ± := h.choose lemma measurableSet_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : MeasurableSet h.nullSet := h.choose_spec.1 @[simp] lemma measure_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : ΞΌ h.nullSet = 0 := h.choose_spec.2.1 @[simp] lemma measure_compl_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : Ξ½ h.nullSetᢜ = 0 := h.choose_spec.2.2 -- TODO: this is proved by simp, but is not simplified in other contexts without the @[simp] -- attribute. Also, the linter does not complain about that attribute. @[simp] lemma restrict_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : ΞΌ.restrict h.nullSet = 0 := by simp -- TODO: this is proved by simp, but is not simplified in other contexts without the @[simp] -- attribute. Also, the linter does not complain about that attribute. @[simp] lemma restrict_compl_nullSet (h : ΞΌ βŸ‚β‚˜ Ξ½) : Ξ½.restrict h.nullSetᢜ = 0 := by simp @[simp] theorem zero_right : ΞΌ βŸ‚β‚˜ 0 := βŸ¨βˆ…, MeasurableSet.empty, measure_empty, rfl⟩ #align measure_theory.measure.mutually_singular.zero_right MeasureTheory.Measure.MutuallySingular.zero_right @[symm] theorem symm (h : Ξ½ βŸ‚β‚˜ ΞΌ) : ΞΌ βŸ‚β‚˜ Ξ½ := let ⟨i, hi, his, hit⟩ := h ⟨iᢜ, hi.compl, hit, (compl_compl i).symm β–Έ his⟩ #align measure_theory.measure.mutually_singular.symm MeasureTheory.Measure.MutuallySingular.symm theorem comm : ΞΌ βŸ‚β‚˜ Ξ½ ↔ Ξ½ βŸ‚β‚˜ ΞΌ := ⟨fun h => h.symm, fun h => h.symm⟩ #align measure_theory.measure.mutually_singular.comm MeasureTheory.Measure.MutuallySingular.comm @[simp] theorem zero_left : 0 βŸ‚β‚˜ ΞΌ := zero_right.symm #align measure_theory.measure.mutually_singular.zero_left MeasureTheory.Measure.MutuallySingular.zero_left theorem mono_ac (h : μ₁ βŸ‚β‚˜ ν₁) (hΞΌ : ΞΌβ‚‚ β‰ͺ μ₁) (hΞ½ : Ξ½β‚‚ β‰ͺ ν₁) : ΞΌβ‚‚ βŸ‚β‚˜ Ξ½β‚‚ := let ⟨s, hs, h₁, hβ‚‚βŸ© := h ⟨s, hs, hΞΌ h₁, hΞ½ hβ‚‚βŸ© #align measure_theory.measure.mutually_singular.mono_ac MeasureTheory.Measure.MutuallySingular.mono_ac theorem mono (h : μ₁ βŸ‚β‚˜ ν₁) (hΞΌ : ΞΌβ‚‚ ≀ μ₁) (hΞ½ : Ξ½β‚‚ ≀ ν₁) : ΞΌβ‚‚ βŸ‚β‚˜ Ξ½β‚‚ := h.mono_ac hΞΌ.absolutelyContinuous hΞ½.absolutelyContinuous #align measure_theory.measure.mutually_singular.mono MeasureTheory.Measure.MutuallySingular.mono @[simp] lemma self_iff (ΞΌ : Measure Ξ±) : ΞΌ βŸ‚β‚˜ ΞΌ ↔ ΞΌ = 0 := by refine ⟨?_, fun h ↦ by (rw [h]; exact zero_left)⟩ rintro ⟨s, hs, hΞΌs, hΞΌs_compl⟩ suffices ΞΌ Set.univ = 0 by rwa [measure_univ_eq_zero] at this rw [← Set.union_compl_self s, measure_union disjoint_compl_right hs.compl, hΞΌs, hΞΌs_compl, add_zero] @[simp] theorem sum_left {ΞΉ : Type*} [Countable ΞΉ] {ΞΌ : ΞΉ β†’ Measure Ξ±} : sum ΞΌ βŸ‚β‚˜ Ξ½ ↔ βˆ€ i, ΞΌ i βŸ‚β‚˜ Ξ½ := by refine ⟨fun h i => h.mono (le_sum _ _) le_rfl, fun H => ?_⟩ choose s hsm hsΞΌ hsΞ½ using H refine βŸ¨β‹‚ i, s i, MeasurableSet.iInter hsm, ?_, ?_⟩ Β· rw [sum_apply _ (MeasurableSet.iInter hsm), ENNReal.tsum_eq_zero] exact fun i => measure_mono_null (iInter_subset _ _) (hsΞΌ i) Β· rwa [compl_iInter, measure_iUnion_null_iff] #align measure_theory.measure.mutually_singular.sum_left MeasureTheory.Measure.MutuallySingular.sum_left @[simp] theorem sum_right {ΞΉ : Type*} [Countable ΞΉ] {Ξ½ : ΞΉ β†’ Measure Ξ±} : ΞΌ βŸ‚β‚˜ sum Ξ½ ↔ βˆ€ i, ΞΌ βŸ‚β‚˜ Ξ½ i := comm.trans <| sum_left.trans <| forall_congr' fun _ => comm #align measure_theory.measure.mutually_singular.sum_right MeasureTheory.Measure.MutuallySingular.sum_right @[simp]
Mathlib/MeasureTheory/Measure/MutuallySingular.lean
129
130
theorem add_left_iff : μ₁ + ΞΌβ‚‚ βŸ‚β‚˜ Ξ½ ↔ μ₁ βŸ‚β‚˜ Ξ½ ∧ ΞΌβ‚‚ βŸ‚β‚˜ Ξ½ := by
rw [← sum_cond, sum_left, Bool.forall_bool, cond, cond, and_comm]
1,387
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±} section IsFiniteMeasure class IsFiniteMeasure (ΞΌ : Measure Ξ±) : Prop where measure_univ_lt_top : ΞΌ univ < ∞ #align measure_theory.is_finite_measure MeasureTheory.IsFiniteMeasure #align measure_theory.is_finite_measure.measure_univ_lt_top MeasureTheory.IsFiniteMeasure.measure_univ_lt_top
Mathlib/MeasureTheory/Measure/Typeclasses.lean
41
44
theorem not_isFiniteMeasure_iff : Β¬IsFiniteMeasure ΞΌ ↔ ΞΌ Set.univ = ∞ := by
refine ⟨fun h => ?_, fun h => fun h' => h'.measure_univ_lt_top.ne h⟩ by_contra h' exact h ⟨lt_top_iff_ne_top.mpr h'⟩
1,388
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±} section IsFiniteMeasure class IsFiniteMeasure (ΞΌ : Measure Ξ±) : Prop where measure_univ_lt_top : ΞΌ univ < ∞ #align measure_theory.is_finite_measure MeasureTheory.IsFiniteMeasure #align measure_theory.is_finite_measure.measure_univ_lt_top MeasureTheory.IsFiniteMeasure.measure_univ_lt_top theorem not_isFiniteMeasure_iff : Β¬IsFiniteMeasure ΞΌ ↔ ΞΌ Set.univ = ∞ := by refine ⟨fun h => ?_, fun h => fun h' => h'.measure_univ_lt_top.ne h⟩ by_contra h' exact h ⟨lt_top_iff_ne_top.mpr h'⟩ #align measure_theory.not_is_finite_measure_iff MeasureTheory.not_isFiniteMeasure_iff instance Restrict.isFiniteMeasure (ΞΌ : Measure Ξ±) [hs : Fact (ΞΌ s < ∞)] : IsFiniteMeasure (ΞΌ.restrict s) := ⟨by simpa using hs.elim⟩ #align measure_theory.restrict.is_finite_measure MeasureTheory.Restrict.isFiniteMeasure theorem measure_lt_top (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] (s : Set Ξ±) : ΞΌ s < ∞ := (measure_mono (subset_univ s)).trans_lt IsFiniteMeasure.measure_univ_lt_top #align measure_theory.measure_lt_top MeasureTheory.measure_lt_top instance isFiniteMeasureRestrict (ΞΌ : Measure Ξ±) (s : Set Ξ±) [h : IsFiniteMeasure ΞΌ] : IsFiniteMeasure (ΞΌ.restrict s) := ⟨by simpa using measure_lt_top ΞΌ s⟩ #align measure_theory.is_finite_measure_restrict MeasureTheory.isFiniteMeasureRestrict theorem measure_ne_top (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] (s : Set Ξ±) : ΞΌ s β‰  ∞ := ne_of_lt (measure_lt_top ΞΌ s) #align measure_theory.measure_ne_top MeasureTheory.measure_ne_top
Mathlib/MeasureTheory/Measure/Typeclasses.lean
65
72
theorem measure_compl_le_add_of_le_add [IsFiniteMeasure ΞΌ] (hs : MeasurableSet s) (ht : MeasurableSet t) {Ξ΅ : ℝβ‰₯0∞} (h : ΞΌ s ≀ ΞΌ t + Ξ΅) : ΞΌ tᢜ ≀ ΞΌ sᢜ + Ξ΅ := by
rw [measure_compl ht (measure_ne_top ΞΌ _), measure_compl hs (measure_ne_top ΞΌ _), tsub_le_iff_right] calc ΞΌ univ = ΞΌ univ - ΞΌ s + ΞΌ s := (tsub_add_cancel_of_le <| measure_mono s.subset_univ).symm _ ≀ ΞΌ univ - ΞΌ s + (ΞΌ t + Ξ΅) := add_le_add_left h _ _ = _ := by rw [add_right_comm, add_assoc]
1,388
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±} section IsFiniteMeasure class IsFiniteMeasure (ΞΌ : Measure Ξ±) : Prop where measure_univ_lt_top : ΞΌ univ < ∞ #align measure_theory.is_finite_measure MeasureTheory.IsFiniteMeasure #align measure_theory.is_finite_measure.measure_univ_lt_top MeasureTheory.IsFiniteMeasure.measure_univ_lt_top theorem not_isFiniteMeasure_iff : Β¬IsFiniteMeasure ΞΌ ↔ ΞΌ Set.univ = ∞ := by refine ⟨fun h => ?_, fun h => fun h' => h'.measure_univ_lt_top.ne h⟩ by_contra h' exact h ⟨lt_top_iff_ne_top.mpr h'⟩ #align measure_theory.not_is_finite_measure_iff MeasureTheory.not_isFiniteMeasure_iff instance Restrict.isFiniteMeasure (ΞΌ : Measure Ξ±) [hs : Fact (ΞΌ s < ∞)] : IsFiniteMeasure (ΞΌ.restrict s) := ⟨by simpa using hs.elim⟩ #align measure_theory.restrict.is_finite_measure MeasureTheory.Restrict.isFiniteMeasure theorem measure_lt_top (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] (s : Set Ξ±) : ΞΌ s < ∞ := (measure_mono (subset_univ s)).trans_lt IsFiniteMeasure.measure_univ_lt_top #align measure_theory.measure_lt_top MeasureTheory.measure_lt_top instance isFiniteMeasureRestrict (ΞΌ : Measure Ξ±) (s : Set Ξ±) [h : IsFiniteMeasure ΞΌ] : IsFiniteMeasure (ΞΌ.restrict s) := ⟨by simpa using measure_lt_top ΞΌ s⟩ #align measure_theory.is_finite_measure_restrict MeasureTheory.isFiniteMeasureRestrict theorem measure_ne_top (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] (s : Set Ξ±) : ΞΌ s β‰  ∞ := ne_of_lt (measure_lt_top ΞΌ s) #align measure_theory.measure_ne_top MeasureTheory.measure_ne_top theorem measure_compl_le_add_of_le_add [IsFiniteMeasure ΞΌ] (hs : MeasurableSet s) (ht : MeasurableSet t) {Ξ΅ : ℝβ‰₯0∞} (h : ΞΌ s ≀ ΞΌ t + Ξ΅) : ΞΌ tᢜ ≀ ΞΌ sᢜ + Ξ΅ := by rw [measure_compl ht (measure_ne_top ΞΌ _), measure_compl hs (measure_ne_top ΞΌ _), tsub_le_iff_right] calc ΞΌ univ = ΞΌ univ - ΞΌ s + ΞΌ s := (tsub_add_cancel_of_le <| measure_mono s.subset_univ).symm _ ≀ ΞΌ univ - ΞΌ s + (ΞΌ t + Ξ΅) := add_le_add_left h _ _ = _ := by rw [add_right_comm, add_assoc] #align measure_theory.measure_compl_le_add_of_le_add MeasureTheory.measure_compl_le_add_of_le_add theorem measure_compl_le_add_iff [IsFiniteMeasure ΞΌ] (hs : MeasurableSet s) (ht : MeasurableSet t) {Ξ΅ : ℝβ‰₯0∞} : ΞΌ sᢜ ≀ ΞΌ tᢜ + Ξ΅ ↔ ΞΌ t ≀ ΞΌ s + Ξ΅ := ⟨fun h => compl_compl s β–Έ compl_compl t β–Έ measure_compl_le_add_of_le_add hs.compl ht.compl h, measure_compl_le_add_of_le_add ht hs⟩ #align measure_theory.measure_compl_le_add_iff MeasureTheory.measure_compl_le_add_iff def measureUnivNNReal (ΞΌ : Measure Ξ±) : ℝβ‰₯0 := (ΞΌ univ).toNNReal #align measure_theory.measure_univ_nnreal MeasureTheory.measureUnivNNReal @[simp] theorem coe_measureUnivNNReal (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] : ↑(measureUnivNNReal ΞΌ) = ΞΌ univ := ENNReal.coe_toNNReal (measure_ne_top ΞΌ univ) #align measure_theory.coe_measure_univ_nnreal MeasureTheory.coe_measureUnivNNReal instance isFiniteMeasureZero : IsFiniteMeasure (0 : Measure Ξ±) := ⟨by simp⟩ #align measure_theory.is_finite_measure_zero MeasureTheory.isFiniteMeasureZero instance (priority := 50) isFiniteMeasureOfIsEmpty [IsEmpty Ξ±] : IsFiniteMeasure ΞΌ := by rw [eq_zero_of_isEmpty ΞΌ] infer_instance #align measure_theory.is_finite_measure_of_is_empty MeasureTheory.isFiniteMeasureOfIsEmpty @[simp] theorem measureUnivNNReal_zero : measureUnivNNReal (0 : Measure Ξ±) = 0 := rfl #align measure_theory.measure_univ_nnreal_zero MeasureTheory.measureUnivNNReal_zero instance isFiniteMeasureAdd [IsFiniteMeasure ΞΌ] [IsFiniteMeasure Ξ½] : IsFiniteMeasure (ΞΌ + Ξ½) where measure_univ_lt_top := by rw [Measure.coe_add, Pi.add_apply, ENNReal.add_lt_top] exact ⟨measure_lt_top _ _, measure_lt_top _ _⟩ #align measure_theory.is_finite_measure_add MeasureTheory.isFiniteMeasureAdd instance isFiniteMeasureSMulNNReal [IsFiniteMeasure ΞΌ] {r : ℝβ‰₯0} : IsFiniteMeasure (r β€’ ΞΌ) where measure_univ_lt_top := ENNReal.mul_lt_top ENNReal.coe_ne_top (measure_ne_top _ _) #align measure_theory.is_finite_measure_smul_nnreal MeasureTheory.isFiniteMeasureSMulNNReal instance IsFiniteMeasure.average : IsFiniteMeasure ((ΞΌ univ)⁻¹ β€’ ΞΌ) where measure_univ_lt_top := by rw [smul_apply, smul_eq_mul, ← ENNReal.div_eq_inv_mul] exact ENNReal.div_self_le_one.trans_lt ENNReal.one_lt_top instance isFiniteMeasureSMulOfNNRealTower {R} [SMul R ℝβ‰₯0] [SMul R ℝβ‰₯0∞] [IsScalarTower R ℝβ‰₯0 ℝβ‰₯0∞] [IsScalarTower R ℝβ‰₯0∞ ℝβ‰₯0∞] [IsFiniteMeasure ΞΌ] {r : R} : IsFiniteMeasure (r β€’ ΞΌ) := by rw [← smul_one_smul ℝβ‰₯0 r ΞΌ] infer_instance #align measure_theory.is_finite_measure_smul_of_nnreal_tower MeasureTheory.isFiniteMeasureSMulOfNNRealTower theorem isFiniteMeasure_of_le (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] (h : Ξ½ ≀ ΞΌ) : IsFiniteMeasure Ξ½ := { measure_univ_lt_top := (h Set.univ).trans_lt (measure_lt_top _ _) } #align measure_theory.is_finite_measure_of_le MeasureTheory.isFiniteMeasure_of_le @[instance]
Mathlib/MeasureTheory/Measure/Typeclasses.lean
132
139
theorem Measure.isFiniteMeasure_map {m : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) [IsFiniteMeasure ΞΌ] (f : Ξ± β†’ Ξ²) : IsFiniteMeasure (ΞΌ.map f) := by
by_cases hf : AEMeasurable f ΞΌ Β· constructor rw [map_apply_of_aemeasurable hf MeasurableSet.univ] exact measure_lt_top ΞΌ _ Β· rw [map_of_not_aemeasurable hf] exact MeasureTheory.isFiniteMeasureZero
1,388
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±} section NoAtoms class NoAtoms {m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) : Prop where measure_singleton : βˆ€ x, ΞΌ {x} = 0 #align measure_theory.has_no_atoms MeasureTheory.NoAtoms #align measure_theory.has_no_atoms.measure_singleton MeasureTheory.NoAtoms.measure_singleton export MeasureTheory.NoAtoms (measure_singleton) attribute [simp] measure_singleton variable [NoAtoms ΞΌ] theorem _root_.Set.Subsingleton.measure_zero (hs : s.Subsingleton) (ΞΌ : Measure Ξ±) [NoAtoms ΞΌ] : ΞΌ s = 0 := hs.induction_on (p := fun s => ΞΌ s = 0) measure_empty measure_singleton #align set.subsingleton.measure_zero Set.Subsingleton.measure_zero
Mathlib/MeasureTheory/Measure/Typeclasses.lean
378
379
theorem Measure.restrict_singleton' {a : Ξ±} : ΞΌ.restrict {a} = 0 := by
simp only [measure_singleton, Measure.restrict_eq_zero]
1,388
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±} section NoAtoms class NoAtoms {m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) : Prop where measure_singleton : βˆ€ x, ΞΌ {x} = 0 #align measure_theory.has_no_atoms MeasureTheory.NoAtoms #align measure_theory.has_no_atoms.measure_singleton MeasureTheory.NoAtoms.measure_singleton export MeasureTheory.NoAtoms (measure_singleton) attribute [simp] measure_singleton variable [NoAtoms ΞΌ] theorem _root_.Set.Subsingleton.measure_zero (hs : s.Subsingleton) (ΞΌ : Measure Ξ±) [NoAtoms ΞΌ] : ΞΌ s = 0 := hs.induction_on (p := fun s => ΞΌ s = 0) measure_empty measure_singleton #align set.subsingleton.measure_zero Set.Subsingleton.measure_zero theorem Measure.restrict_singleton' {a : Ξ±} : ΞΌ.restrict {a} = 0 := by simp only [measure_singleton, Measure.restrict_eq_zero] #align measure_theory.measure.restrict_singleton' MeasureTheory.Measure.restrict_singleton' instance Measure.restrict.instNoAtoms (s : Set Ξ±) : NoAtoms (ΞΌ.restrict s) := by refine ⟨fun x => ?_⟩ obtain ⟨t, hxt, ht1, ht2⟩ := exists_measurable_superset_of_null (measure_singleton x : ΞΌ {x} = 0) apply measure_mono_null hxt rw [Measure.restrict_apply ht1] apply measure_mono_null inter_subset_left ht2 #align measure_theory.measure.restrict.has_no_atoms MeasureTheory.Measure.restrict.instNoAtoms
Mathlib/MeasureTheory/Measure/Typeclasses.lean
390
393
theorem _root_.Set.Countable.measure_zero (h : s.Countable) (ΞΌ : Measure Ξ±) [NoAtoms ΞΌ] : ΞΌ s = 0 := by
rw [← biUnion_of_singleton s, measure_biUnion_null_iff h] simp
1,388
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±} section NoAtoms class NoAtoms {m0 : MeasurableSpace Ξ±} (ΞΌ : Measure Ξ±) : Prop where measure_singleton : βˆ€ x, ΞΌ {x} = 0 #align measure_theory.has_no_atoms MeasureTheory.NoAtoms #align measure_theory.has_no_atoms.measure_singleton MeasureTheory.NoAtoms.measure_singleton export MeasureTheory.NoAtoms (measure_singleton) attribute [simp] measure_singleton variable [NoAtoms ΞΌ] theorem _root_.Set.Subsingleton.measure_zero (hs : s.Subsingleton) (ΞΌ : Measure Ξ±) [NoAtoms ΞΌ] : ΞΌ s = 0 := hs.induction_on (p := fun s => ΞΌ s = 0) measure_empty measure_singleton #align set.subsingleton.measure_zero Set.Subsingleton.measure_zero theorem Measure.restrict_singleton' {a : Ξ±} : ΞΌ.restrict {a} = 0 := by simp only [measure_singleton, Measure.restrict_eq_zero] #align measure_theory.measure.restrict_singleton' MeasureTheory.Measure.restrict_singleton' instance Measure.restrict.instNoAtoms (s : Set Ξ±) : NoAtoms (ΞΌ.restrict s) := by refine ⟨fun x => ?_⟩ obtain ⟨t, hxt, ht1, ht2⟩ := exists_measurable_superset_of_null (measure_singleton x : ΞΌ {x} = 0) apply measure_mono_null hxt rw [Measure.restrict_apply ht1] apply measure_mono_null inter_subset_left ht2 #align measure_theory.measure.restrict.has_no_atoms MeasureTheory.Measure.restrict.instNoAtoms theorem _root_.Set.Countable.measure_zero (h : s.Countable) (ΞΌ : Measure Ξ±) [NoAtoms ΞΌ] : ΞΌ s = 0 := by rw [← biUnion_of_singleton s, measure_biUnion_null_iff h] simp #align set.countable.measure_zero Set.Countable.measure_zero
Mathlib/MeasureTheory/Measure/Typeclasses.lean
396
398
theorem _root_.Set.Countable.ae_not_mem (h : s.Countable) (ΞΌ : Measure Ξ±) [NoAtoms ΞΌ] : βˆ€α΅ x βˆ‚ΞΌ, x βˆ‰ s := by
simpa only [ae_iff, Classical.not_not] using h.measure_zero ΞΌ
1,388
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±}
Mathlib/MeasureTheory/Measure/Typeclasses.lean
491
498
theorem ite_ae_eq_of_measure_zero {Ξ³} (f : Ξ± β†’ Ξ³) (g : Ξ± β†’ Ξ³) (s : Set Ξ±) [DecidablePred (Β· ∈ s)] (hs_zero : ΞΌ s = 0) : (fun x => ite (x ∈ s) (f x) (g x)) =ᡐ[ΞΌ] g := by
have h_ss : sᢜ βŠ† { a : Ξ± | ite (a ∈ s) (f a) (g a) = g a } := fun x hx => by simp [(Set.mem_compl_iff _ _).mp hx] refine measure_mono_null ?_ hs_zero conv_rhs => rw [← compl_compl s] rwa [Set.compl_subset_compl]
1,388
import Mathlib.MeasureTheory.Measure.Restrict open scoped ENNReal NNReal Topology open Set MeasureTheory Measure Filter Function MeasurableSpace ENNReal variable {Ξ± Ξ² Ξ΄ ΞΉ : Type*} namespace MeasureTheory variable {m0 : MeasurableSpace Ξ±} [MeasurableSpace Ξ²] {ΞΌ Ξ½ ν₁ Ξ½β‚‚: Measure Ξ±} {s t : Set Ξ±} theorem ite_ae_eq_of_measure_zero {Ξ³} (f : Ξ± β†’ Ξ³) (g : Ξ± β†’ Ξ³) (s : Set Ξ±) [DecidablePred (Β· ∈ s)] (hs_zero : ΞΌ s = 0) : (fun x => ite (x ∈ s) (f x) (g x)) =ᡐ[ΞΌ] g := by have h_ss : sᢜ βŠ† { a : Ξ± | ite (a ∈ s) (f a) (g a) = g a } := fun x hx => by simp [(Set.mem_compl_iff _ _).mp hx] refine measure_mono_null ?_ hs_zero conv_rhs => rw [← compl_compl s] rwa [Set.compl_subset_compl] #align measure_theory.ite_ae_eq_of_measure_zero MeasureTheory.ite_ae_eq_of_measure_zero
Mathlib/MeasureTheory/Measure/Typeclasses.lean
501
508
theorem ite_ae_eq_of_measure_compl_zero {Ξ³} (f : Ξ± β†’ Ξ³) (g : Ξ± β†’ Ξ³) (s : Set Ξ±) [DecidablePred (Β· ∈ s)] (hs_zero : ΞΌ sᢜ = 0) : (fun x => ite (x ∈ s) (f x) (g x)) =ᡐ[ΞΌ] f := by
rw [← mem_ae_iff] at hs_zero filter_upwards [hs_zero] intros split_ifs rfl
1,388
import Mathlib.MeasureTheory.Measure.Typeclasses #align_import measure_theory.decomposition.unsigned_hahn from "leanprover-community/mathlib"@"0f1becb755b3d008b242c622e248a70556ad19e6" open Set Filter open scoped Classical open Topology ENNReal namespace MeasureTheory variable {Ξ± : Type*} [MeasurableSpace Ξ±] {ΞΌ Ξ½ : Measure Ξ±}
Mathlib/MeasureTheory/Decomposition/UnsignedHahn.lean
37
176
theorem hahn_decomposition [IsFiniteMeasure ΞΌ] [IsFiniteMeasure Ξ½] : βˆƒ s, MeasurableSet s ∧ (βˆ€ t, MeasurableSet t β†’ t βŠ† s β†’ Ξ½ t ≀ ΞΌ t) ∧ βˆ€ t, MeasurableSet t β†’ t βŠ† sᢜ β†’ ΞΌ t ≀ Ξ½ t := by
let d : Set Ξ± β†’ ℝ := fun s => ((ΞΌ s).toNNReal : ℝ) - (Ξ½ s).toNNReal let c : Set ℝ := d '' { s | MeasurableSet s } let Ξ³ : ℝ := sSup c have hΞΌ : βˆ€ s, ΞΌ s β‰  ∞ := measure_ne_top ΞΌ have hΞ½ : βˆ€ s, Ξ½ s β‰  ∞ := measure_ne_top Ξ½ have to_nnreal_ΞΌ : βˆ€ s, ((ΞΌ s).toNNReal : ℝβ‰₯0∞) = ΞΌ s := fun s => ENNReal.coe_toNNReal <| hΞΌ _ have to_nnreal_Ξ½ : βˆ€ s, ((Ξ½ s).toNNReal : ℝβ‰₯0∞) = Ξ½ s := fun s => ENNReal.coe_toNNReal <| hΞ½ _ have d_split : βˆ€ s t, MeasurableSet s β†’ MeasurableSet t β†’ d s = d (s \ t) + d (s ∩ t) := by intro s t _hs ht dsimp only [d] rw [← measure_inter_add_diff s ht, ← measure_inter_add_diff s ht, ENNReal.toNNReal_add (hΞΌ _) (hΞΌ _), ENNReal.toNNReal_add (hΞ½ _) (hΞ½ _), NNReal.coe_add, NNReal.coe_add] simp only [sub_eq_add_neg, neg_add] abel have d_Union : βˆ€ s : β„• β†’ Set Ξ±, Monotone s β†’ Tendsto (fun n => d (s n)) atTop (𝓝 (d (⋃ n, s n))) := by intro s hm refine Tendsto.sub ?_ ?_ <;> refine NNReal.tendsto_coe.2 <| (ENNReal.tendsto_toNNReal ?_).comp <| tendsto_measure_iUnion hm Β· exact hΞΌ _ Β· exact hΞ½ _ have d_Inter : βˆ€ s : β„• β†’ Set Ξ±, (βˆ€ n, MeasurableSet (s n)) β†’ (βˆ€ n m, n ≀ m β†’ s m βŠ† s n) β†’ Tendsto (fun n => d (s n)) atTop (𝓝 (d (β‹‚ n, s n))) := by intro s hs hm refine Tendsto.sub ?_ ?_ <;> refine NNReal.tendsto_coe.2 <| (ENNReal.tendsto_toNNReal <| ?_).comp <| tendsto_measure_iInter hs hm ?_ exacts [hΞΌ _, ⟨0, hΞΌ _⟩, hΞ½ _, ⟨0, hΞ½ _⟩] have bdd_c : BddAbove c := by use (ΞΌ univ).toNNReal rintro r ⟨s, _hs, rfl⟩ refine le_trans (sub_le_self _ <| NNReal.coe_nonneg _) ?_ rw [NNReal.coe_le_coe, ← ENNReal.coe_le_coe, to_nnreal_ΞΌ, to_nnreal_ΞΌ] exact measure_mono (subset_univ _) have c_nonempty : c.Nonempty := Nonempty.image _ ⟨_, MeasurableSet.empty⟩ have d_le_Ξ³ : βˆ€ s, MeasurableSet s β†’ d s ≀ Ξ³ := fun s hs => le_csSup bdd_c ⟨s, hs, rfl⟩ have : βˆ€ n : β„•, βˆƒ s : Set Ξ±, MeasurableSet s ∧ Ξ³ - (1 / 2) ^ n < d s := by intro n have : Ξ³ - (1 / 2) ^ n < Ξ³ := sub_lt_self Ξ³ (pow_pos (half_pos zero_lt_one) n) rcases exists_lt_of_lt_csSup c_nonempty this with ⟨r, ⟨s, hs, rfl⟩, hlt⟩ exact ⟨s, hs, hlt⟩ rcases Classical.axiom_of_choice this with ⟨e, he⟩ change β„• β†’ Set Ξ± at e have he₁ : βˆ€ n, MeasurableSet (e n) := fun n => (he n).1 have heβ‚‚ : βˆ€ n, Ξ³ - (1 / 2) ^ n < d (e n) := fun n => (he n).2 let f : β„• β†’ β„• β†’ Set Ξ± := fun n m => (Finset.Ico n (m + 1)).inf e have hf : βˆ€ n m, MeasurableSet (f n m) := by intro n m simp only [f, Finset.inf_eq_iInf] exact MeasurableSet.biInter (to_countable _) fun i _ => he₁ _ have f_subset_f : βˆ€ {a b c d}, a ≀ b β†’ c ≀ d β†’ f a d βŠ† f b c := by intro a b c d hab hcd simp_rw [f, Finset.inf_eq_iInf] exact biInter_subset_biInter_left (Finset.Ico_subset_Ico hab <| Nat.succ_le_succ hcd) have f_succ : βˆ€ n m, n ≀ m β†’ f n (m + 1) = f n m ∩ e (m + 1) := by intro n m hnm have : n ≀ m + 1 := le_of_lt (Nat.succ_le_succ hnm) simp_rw [f, Nat.Ico_succ_right_eq_insert_Ico this, Finset.inf_insert, Set.inter_comm] rfl have le_d_f : βˆ€ n m, m ≀ n β†’ Ξ³ - 2 * (1 / 2) ^ m + (1 / 2) ^ n ≀ d (f m n) := by intro n m h refine Nat.le_induction ?_ ?_ n h Β· have := heβ‚‚ m simp_rw [f, Nat.Ico_succ_singleton, Finset.inf_singleton] linarith Β· intro n (hmn : m ≀ n) ih have : Ξ³ + (Ξ³ - 2 * (1 / 2) ^ m + (1 / 2) ^ (n + 1)) ≀ Ξ³ + d (f m (n + 1)) := by calc Ξ³ + (Ξ³ - 2 * (1 / 2) ^ m + (1 / 2) ^ (n + 1)) = Ξ³ + (Ξ³ - 2 * (1 / 2) ^ m + ((1 / 2) ^ n - (1 / 2) ^ (n + 1))) := by rw [pow_succ, mul_one_div, _root_.sub_half] _ = Ξ³ - (1 / 2) ^ (n + 1) + (Ξ³ - 2 * (1 / 2) ^ m + (1 / 2) ^ n) := by simp only [sub_eq_add_neg]; abel _ ≀ d (e (n + 1)) + d (f m n) := add_le_add (le_of_lt <| heβ‚‚ _) ih _ ≀ d (e (n + 1)) + d (f m n \ e (n + 1)) + d (f m (n + 1)) := by rw [f_succ _ _ hmn, d_split (f m n) (e (n + 1)) (hf _ _) (he₁ _), add_assoc] _ = d (e (n + 1) βˆͺ f m n) + d (f m (n + 1)) := by rw [d_split (e (n + 1) βˆͺ f m n) (e (n + 1)), union_diff_left, union_inter_cancel_left] Β· abel Β· exact (he₁ _).union (hf _ _) Β· exact he₁ _ _ ≀ Ξ³ + d (f m (n + 1)) := add_le_add_right (d_le_Ξ³ _ <| (he₁ _).union (hf _ _)) _ exact (add_le_add_iff_left Ξ³).1 this let s := ⋃ m, β‹‚ n, f m n have Ξ³_le_d_s : Ξ³ ≀ d s := by have hΞ³ : Tendsto (fun m : β„• => Ξ³ - 2 * (1 / 2) ^ m) atTop (𝓝 Ξ³) := by suffices Tendsto (fun m : β„• => Ξ³ - 2 * (1 / 2) ^ m) atTop (𝓝 (Ξ³ - 2 * 0)) by simpa only [mul_zero, tsub_zero] exact tendsto_const_nhds.sub <| tendsto_const_nhds.mul <| tendsto_pow_atTop_nhds_zero_of_lt_one (le_of_lt <| half_pos <| zero_lt_one) (half_lt_self zero_lt_one) have hd : Tendsto (fun m => d (β‹‚ n, f m n)) atTop (𝓝 (d (⋃ m, β‹‚ n, f m n))) := by refine d_Union _ ?_ exact fun n m hnm => subset_iInter fun i => Subset.trans (iInter_subset (f n) i) <| f_subset_f hnm <| le_rfl refine le_of_tendsto_of_tendsto' hΞ³ hd fun m => ?_ have : Tendsto (fun n => d (f m n)) atTop (𝓝 (d (β‹‚ n, f m n))) := by refine d_Inter _ ?_ ?_ Β· intro n exact hf _ _ Β· intro n m hnm exact f_subset_f le_rfl hnm refine ge_of_tendsto this (eventually_atTop.2 ⟨m, fun n hmn => ?_⟩) change Ξ³ - 2 * (1 / 2) ^ m ≀ d (f m n) refine le_trans ?_ (le_d_f _ _ hmn) exact le_add_of_le_of_nonneg le_rfl (pow_nonneg (le_of_lt <| half_pos <| zero_lt_one) _) have hs : MeasurableSet s := MeasurableSet.iUnion fun n => MeasurableSet.iInter fun m => hf _ _ refine ⟨s, hs, ?_, ?_⟩ Β· intro t ht hts have : 0 ≀ d t := (add_le_add_iff_left Ξ³).1 <| calc Ξ³ + 0 ≀ d s := by rw [add_zero]; exact Ξ³_le_d_s _ = d (s \ t) + d t := by rw [d_split _ _ hs ht, inter_eq_self_of_subset_right hts] _ ≀ Ξ³ + d t := add_le_add (d_le_Ξ³ _ (hs.diff ht)) le_rfl rw [← to_nnreal_ΞΌ, ← to_nnreal_Ξ½, ENNReal.coe_le_coe, ← NNReal.coe_le_coe] simpa only [d, le_sub_iff_add_le, zero_add] using this Β· intro t ht hts have : d t ≀ 0 := (add_le_add_iff_left Ξ³).1 <| calc Ξ³ + d t ≀ d s + d t := by gcongr _ = d (s βˆͺ t) := by rw [d_split _ _ (hs.union ht) ht, union_diff_right, union_inter_cancel_right, (subset_compl_iff_disjoint_left.1 hts).sdiff_eq_left] _ ≀ Ξ³ + 0 := by rw [add_zero]; exact d_le_Ξ³ _ (hs.union ht) rw [← to_nnreal_ΞΌ, ← to_nnreal_Ξ½, ENNReal.coe_le_coe, ← NNReal.coe_le_coe] simpa only [d, sub_le_iff_le_add, zero_add] using this
1,389
import Mathlib.MeasureTheory.Measure.Typeclasses #align_import measure_theory.measure.sub from "leanprover-community/mathlib"@"562bbf524c595c153470e53d36c57b6f891cc480" open Set namespace MeasureTheory namespace Measure noncomputable instance instSub {Ξ± : Type*} [MeasurableSpace Ξ±] : Sub (Measure Ξ±) := ⟨fun ΞΌ Ξ½ => sInf { Ο„ | ΞΌ ≀ Ο„ + Ξ½ }⟩ #align measure_theory.measure.has_sub MeasureTheory.Measure.instSub variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ Ξ½ : Measure Ξ±} {s : Set Ξ±} theorem sub_def : ΞΌ - Ξ½ = sInf { d | ΞΌ ≀ d + Ξ½ } := rfl #align measure_theory.measure.sub_def MeasureTheory.Measure.sub_def theorem sub_le_of_le_add {d} (h : ΞΌ ≀ d + Ξ½) : ΞΌ - Ξ½ ≀ d := sInf_le h #align measure_theory.measure.sub_le_of_le_add MeasureTheory.Measure.sub_le_of_le_add theorem sub_eq_zero_of_le (h : ΞΌ ≀ Ξ½) : ΞΌ - Ξ½ = 0 := nonpos_iff_eq_zero'.1 <| sub_le_of_le_add <| by rwa [zero_add] #align measure_theory.measure.sub_eq_zero_of_le MeasureTheory.Measure.sub_eq_zero_of_le theorem sub_le : ΞΌ - Ξ½ ≀ ΞΌ := sub_le_of_le_add <| Measure.le_add_right le_rfl #align measure_theory.measure.sub_le MeasureTheory.Measure.sub_le @[simp] theorem sub_top : ΞΌ - ⊀ = 0 := sub_eq_zero_of_le le_top #align measure_theory.measure.sub_top MeasureTheory.Measure.sub_top @[simp] theorem zero_sub : 0 - ΞΌ = 0 := sub_eq_zero_of_le ΞΌ.zero_le #align measure_theory.measure.zero_sub MeasureTheory.Measure.zero_sub @[simp] theorem sub_self : ΞΌ - ΞΌ = 0 := sub_eq_zero_of_le le_rfl #align measure_theory.measure.sub_self MeasureTheory.Measure.sub_self
Mathlib/MeasureTheory/Measure/Sub.lean
71
97
theorem sub_apply [IsFiniteMeasure Ξ½] (h₁ : MeasurableSet s) (hβ‚‚ : Ξ½ ≀ ΞΌ) : (ΞΌ - Ξ½) s = ΞΌ s - Ξ½ s := by
-- We begin by defining `measure_sub`, which will be equal to `(ΞΌ - Ξ½)`. let measure_sub : Measure Ξ± := MeasureTheory.Measure.ofMeasurable (fun (t : Set Ξ±) (_ : MeasurableSet t) => ΞΌ t - Ξ½ t) (by simp) (fun g h_meas h_disj ↦ by simp only [measure_iUnion h_disj h_meas] rw [ENNReal.tsum_sub _ (hβ‚‚ <| g Β·)] rw [← measure_iUnion h_disj h_meas] apply measure_ne_top) -- Now, we demonstrate `ΞΌ - Ξ½ = measure_sub`, and apply it. have h_measure_sub_add : Ξ½ + measure_sub = ΞΌ := by ext1 t h_t_measurable_set simp only [Pi.add_apply, coe_add] rw [MeasureTheory.Measure.ofMeasurable_apply _ h_t_measurable_set, add_comm, tsub_add_cancel_of_le (hβ‚‚ t)] have h_measure_sub_eq : ΞΌ - Ξ½ = measure_sub := by rw [MeasureTheory.Measure.sub_def] apply le_antisymm Β· apply sInf_le simp [le_refl, add_comm, h_measure_sub_add] apply le_sInf intro d h_d rw [← h_measure_sub_add, mem_setOf_eq, add_comm d] at h_d apply Measure.le_of_add_le_add_left h_d rw [h_measure_sub_eq] apply Measure.ofMeasurable_apply _ h₁
1,390
import Mathlib.MeasureTheory.Measure.Typeclasses #align_import measure_theory.measure.sub from "leanprover-community/mathlib"@"562bbf524c595c153470e53d36c57b6f891cc480" open Set namespace MeasureTheory namespace Measure noncomputable instance instSub {Ξ± : Type*} [MeasurableSpace Ξ±] : Sub (Measure Ξ±) := ⟨fun ΞΌ Ξ½ => sInf { Ο„ | ΞΌ ≀ Ο„ + Ξ½ }⟩ #align measure_theory.measure.has_sub MeasureTheory.Measure.instSub variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ Ξ½ : Measure Ξ±} {s : Set Ξ±} theorem sub_def : ΞΌ - Ξ½ = sInf { d | ΞΌ ≀ d + Ξ½ } := rfl #align measure_theory.measure.sub_def MeasureTheory.Measure.sub_def theorem sub_le_of_le_add {d} (h : ΞΌ ≀ d + Ξ½) : ΞΌ - Ξ½ ≀ d := sInf_le h #align measure_theory.measure.sub_le_of_le_add MeasureTheory.Measure.sub_le_of_le_add theorem sub_eq_zero_of_le (h : ΞΌ ≀ Ξ½) : ΞΌ - Ξ½ = 0 := nonpos_iff_eq_zero'.1 <| sub_le_of_le_add <| by rwa [zero_add] #align measure_theory.measure.sub_eq_zero_of_le MeasureTheory.Measure.sub_eq_zero_of_le theorem sub_le : ΞΌ - Ξ½ ≀ ΞΌ := sub_le_of_le_add <| Measure.le_add_right le_rfl #align measure_theory.measure.sub_le MeasureTheory.Measure.sub_le @[simp] theorem sub_top : ΞΌ - ⊀ = 0 := sub_eq_zero_of_le le_top #align measure_theory.measure.sub_top MeasureTheory.Measure.sub_top @[simp] theorem zero_sub : 0 - ΞΌ = 0 := sub_eq_zero_of_le ΞΌ.zero_le #align measure_theory.measure.zero_sub MeasureTheory.Measure.zero_sub @[simp] theorem sub_self : ΞΌ - ΞΌ = 0 := sub_eq_zero_of_le le_rfl #align measure_theory.measure.sub_self MeasureTheory.Measure.sub_self theorem sub_apply [IsFiniteMeasure Ξ½] (h₁ : MeasurableSet s) (hβ‚‚ : Ξ½ ≀ ΞΌ) : (ΞΌ - Ξ½) s = ΞΌ s - Ξ½ s := by -- We begin by defining `measure_sub`, which will be equal to `(ΞΌ - Ξ½)`. let measure_sub : Measure Ξ± := MeasureTheory.Measure.ofMeasurable (fun (t : Set Ξ±) (_ : MeasurableSet t) => ΞΌ t - Ξ½ t) (by simp) (fun g h_meas h_disj ↦ by simp only [measure_iUnion h_disj h_meas] rw [ENNReal.tsum_sub _ (hβ‚‚ <| g Β·)] rw [← measure_iUnion h_disj h_meas] apply measure_ne_top) -- Now, we demonstrate `ΞΌ - Ξ½ = measure_sub`, and apply it. have h_measure_sub_add : Ξ½ + measure_sub = ΞΌ := by ext1 t h_t_measurable_set simp only [Pi.add_apply, coe_add] rw [MeasureTheory.Measure.ofMeasurable_apply _ h_t_measurable_set, add_comm, tsub_add_cancel_of_le (hβ‚‚ t)] have h_measure_sub_eq : ΞΌ - Ξ½ = measure_sub := by rw [MeasureTheory.Measure.sub_def] apply le_antisymm Β· apply sInf_le simp [le_refl, add_comm, h_measure_sub_add] apply le_sInf intro d h_d rw [← h_measure_sub_add, mem_setOf_eq, add_comm d] at h_d apply Measure.le_of_add_le_add_left h_d rw [h_measure_sub_eq] apply Measure.ofMeasurable_apply _ h₁ #align measure_theory.measure.sub_apply MeasureTheory.Measure.sub_apply
Mathlib/MeasureTheory/Measure/Sub.lean
100
102
theorem sub_add_cancel_of_le [IsFiniteMeasure Ξ½] (h₁ : Ξ½ ≀ ΞΌ) : ΞΌ - Ξ½ + Ξ½ = ΞΌ := by
ext1 s h_s_meas rw [add_apply, sub_apply h_s_meas h₁, tsub_add_cancel_of_le (h₁ s)]
1,390
import Mathlib.MeasureTheory.Measure.Typeclasses #align_import measure_theory.measure.sub from "leanprover-community/mathlib"@"562bbf524c595c153470e53d36c57b6f891cc480" open Set namespace MeasureTheory namespace Measure noncomputable instance instSub {Ξ± : Type*} [MeasurableSpace Ξ±] : Sub (Measure Ξ±) := ⟨fun ΞΌ Ξ½ => sInf { Ο„ | ΞΌ ≀ Ο„ + Ξ½ }⟩ #align measure_theory.measure.has_sub MeasureTheory.Measure.instSub variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ Ξ½ : Measure Ξ±} {s : Set Ξ±} theorem sub_def : ΞΌ - Ξ½ = sInf { d | ΞΌ ≀ d + Ξ½ } := rfl #align measure_theory.measure.sub_def MeasureTheory.Measure.sub_def theorem sub_le_of_le_add {d} (h : ΞΌ ≀ d + Ξ½) : ΞΌ - Ξ½ ≀ d := sInf_le h #align measure_theory.measure.sub_le_of_le_add MeasureTheory.Measure.sub_le_of_le_add theorem sub_eq_zero_of_le (h : ΞΌ ≀ Ξ½) : ΞΌ - Ξ½ = 0 := nonpos_iff_eq_zero'.1 <| sub_le_of_le_add <| by rwa [zero_add] #align measure_theory.measure.sub_eq_zero_of_le MeasureTheory.Measure.sub_eq_zero_of_le theorem sub_le : ΞΌ - Ξ½ ≀ ΞΌ := sub_le_of_le_add <| Measure.le_add_right le_rfl #align measure_theory.measure.sub_le MeasureTheory.Measure.sub_le @[simp] theorem sub_top : ΞΌ - ⊀ = 0 := sub_eq_zero_of_le le_top #align measure_theory.measure.sub_top MeasureTheory.Measure.sub_top @[simp] theorem zero_sub : 0 - ΞΌ = 0 := sub_eq_zero_of_le ΞΌ.zero_le #align measure_theory.measure.zero_sub MeasureTheory.Measure.zero_sub @[simp] theorem sub_self : ΞΌ - ΞΌ = 0 := sub_eq_zero_of_le le_rfl #align measure_theory.measure.sub_self MeasureTheory.Measure.sub_self theorem sub_apply [IsFiniteMeasure Ξ½] (h₁ : MeasurableSet s) (hβ‚‚ : Ξ½ ≀ ΞΌ) : (ΞΌ - Ξ½) s = ΞΌ s - Ξ½ s := by -- We begin by defining `measure_sub`, which will be equal to `(ΞΌ - Ξ½)`. let measure_sub : Measure Ξ± := MeasureTheory.Measure.ofMeasurable (fun (t : Set Ξ±) (_ : MeasurableSet t) => ΞΌ t - Ξ½ t) (by simp) (fun g h_meas h_disj ↦ by simp only [measure_iUnion h_disj h_meas] rw [ENNReal.tsum_sub _ (hβ‚‚ <| g Β·)] rw [← measure_iUnion h_disj h_meas] apply measure_ne_top) -- Now, we demonstrate `ΞΌ - Ξ½ = measure_sub`, and apply it. have h_measure_sub_add : Ξ½ + measure_sub = ΞΌ := by ext1 t h_t_measurable_set simp only [Pi.add_apply, coe_add] rw [MeasureTheory.Measure.ofMeasurable_apply _ h_t_measurable_set, add_comm, tsub_add_cancel_of_le (hβ‚‚ t)] have h_measure_sub_eq : ΞΌ - Ξ½ = measure_sub := by rw [MeasureTheory.Measure.sub_def] apply le_antisymm Β· apply sInf_le simp [le_refl, add_comm, h_measure_sub_add] apply le_sInf intro d h_d rw [← h_measure_sub_add, mem_setOf_eq, add_comm d] at h_d apply Measure.le_of_add_le_add_left h_d rw [h_measure_sub_eq] apply Measure.ofMeasurable_apply _ h₁ #align measure_theory.measure.sub_apply MeasureTheory.Measure.sub_apply theorem sub_add_cancel_of_le [IsFiniteMeasure Ξ½] (h₁ : Ξ½ ≀ ΞΌ) : ΞΌ - Ξ½ + Ξ½ = ΞΌ := by ext1 s h_s_meas rw [add_apply, sub_apply h_s_meas h₁, tsub_add_cancel_of_le (h₁ s)] #align measure_theory.measure.sub_add_cancel_of_le MeasureTheory.Measure.sub_add_cancel_of_le
Mathlib/MeasureTheory/Measure/Sub.lean
105
134
theorem restrict_sub_eq_restrict_sub_restrict (h_meas_s : MeasurableSet s) : (ΞΌ - Ξ½).restrict s = ΞΌ.restrict s - Ξ½.restrict s := by
repeat rw [sub_def] have h_nonempty : { d | ΞΌ ≀ d + Ξ½ }.Nonempty := ⟨μ, Measure.le_add_right le_rfl⟩ rw [restrict_sInf_eq_sInf_restrict h_nonempty h_meas_s] apply le_antisymm Β· refine sInf_le_sInf_of_forall_exists_le ?_ intro Ξ½' h_Ξ½'_in rw [mem_setOf_eq] at h_Ξ½'_in refine ⟨ν'.restrict s, ?_, restrict_le_self⟩ refine ⟨ν' + (⊀ : Measure Ξ±).restrict sᢜ, ?_, ?_⟩ Β· rw [mem_setOf_eq, add_right_comm, Measure.le_iff] intro t h_meas_t repeat rw [← measure_inter_add_diff t h_meas_s] refine add_le_add ?_ ?_ Β· rw [add_apply, add_apply] apply le_add_right _ rw [← restrict_eq_self ΞΌ inter_subset_right, ← restrict_eq_self Ξ½ inter_subset_right] apply h_Ξ½'_in Β· rw [add_apply, restrict_apply (h_meas_t.diff h_meas_s), diff_eq, inter_assoc, inter_self, ← add_apply] have h_mu_le_add_top : ΞΌ ≀ Ξ½' + Ξ½ + ⊀ := by simp only [add_top, le_top] exact Measure.le_iff'.1 h_mu_le_add_top _ Β· ext1 t h_meas_t simp [restrict_apply h_meas_t, restrict_apply (h_meas_t.inter h_meas_s), inter_assoc] Β· refine sInf_le_sInf_of_forall_exists_le ?_ refine forall_mem_image.2 fun t h_t_in => ⟨t.restrict s, ?_, le_rfl⟩ rw [Set.mem_setOf_eq, ← restrict_add] exact restrict_mono Subset.rfl h_t_in
1,390
import Mathlib.MeasureTheory.Measure.Typeclasses #align_import measure_theory.measure.sub from "leanprover-community/mathlib"@"562bbf524c595c153470e53d36c57b6f891cc480" open Set namespace MeasureTheory namespace Measure noncomputable instance instSub {Ξ± : Type*} [MeasurableSpace Ξ±] : Sub (Measure Ξ±) := ⟨fun ΞΌ Ξ½ => sInf { Ο„ | ΞΌ ≀ Ο„ + Ξ½ }⟩ #align measure_theory.measure.has_sub MeasureTheory.Measure.instSub variable {Ξ± : Type*} {m : MeasurableSpace Ξ±} {ΞΌ Ξ½ : Measure Ξ±} {s : Set Ξ±} theorem sub_def : ΞΌ - Ξ½ = sInf { d | ΞΌ ≀ d + Ξ½ } := rfl #align measure_theory.measure.sub_def MeasureTheory.Measure.sub_def theorem sub_le_of_le_add {d} (h : ΞΌ ≀ d + Ξ½) : ΞΌ - Ξ½ ≀ d := sInf_le h #align measure_theory.measure.sub_le_of_le_add MeasureTheory.Measure.sub_le_of_le_add theorem sub_eq_zero_of_le (h : ΞΌ ≀ Ξ½) : ΞΌ - Ξ½ = 0 := nonpos_iff_eq_zero'.1 <| sub_le_of_le_add <| by rwa [zero_add] #align measure_theory.measure.sub_eq_zero_of_le MeasureTheory.Measure.sub_eq_zero_of_le theorem sub_le : ΞΌ - Ξ½ ≀ ΞΌ := sub_le_of_le_add <| Measure.le_add_right le_rfl #align measure_theory.measure.sub_le MeasureTheory.Measure.sub_le @[simp] theorem sub_top : ΞΌ - ⊀ = 0 := sub_eq_zero_of_le le_top #align measure_theory.measure.sub_top MeasureTheory.Measure.sub_top @[simp] theorem zero_sub : 0 - ΞΌ = 0 := sub_eq_zero_of_le ΞΌ.zero_le #align measure_theory.measure.zero_sub MeasureTheory.Measure.zero_sub @[simp] theorem sub_self : ΞΌ - ΞΌ = 0 := sub_eq_zero_of_le le_rfl #align measure_theory.measure.sub_self MeasureTheory.Measure.sub_self theorem sub_apply [IsFiniteMeasure Ξ½] (h₁ : MeasurableSet s) (hβ‚‚ : Ξ½ ≀ ΞΌ) : (ΞΌ - Ξ½) s = ΞΌ s - Ξ½ s := by -- We begin by defining `measure_sub`, which will be equal to `(ΞΌ - Ξ½)`. let measure_sub : Measure Ξ± := MeasureTheory.Measure.ofMeasurable (fun (t : Set Ξ±) (_ : MeasurableSet t) => ΞΌ t - Ξ½ t) (by simp) (fun g h_meas h_disj ↦ by simp only [measure_iUnion h_disj h_meas] rw [ENNReal.tsum_sub _ (hβ‚‚ <| g Β·)] rw [← measure_iUnion h_disj h_meas] apply measure_ne_top) -- Now, we demonstrate `ΞΌ - Ξ½ = measure_sub`, and apply it. have h_measure_sub_add : Ξ½ + measure_sub = ΞΌ := by ext1 t h_t_measurable_set simp only [Pi.add_apply, coe_add] rw [MeasureTheory.Measure.ofMeasurable_apply _ h_t_measurable_set, add_comm, tsub_add_cancel_of_le (hβ‚‚ t)] have h_measure_sub_eq : ΞΌ - Ξ½ = measure_sub := by rw [MeasureTheory.Measure.sub_def] apply le_antisymm Β· apply sInf_le simp [le_refl, add_comm, h_measure_sub_add] apply le_sInf intro d h_d rw [← h_measure_sub_add, mem_setOf_eq, add_comm d] at h_d apply Measure.le_of_add_le_add_left h_d rw [h_measure_sub_eq] apply Measure.ofMeasurable_apply _ h₁ #align measure_theory.measure.sub_apply MeasureTheory.Measure.sub_apply theorem sub_add_cancel_of_le [IsFiniteMeasure Ξ½] (h₁ : Ξ½ ≀ ΞΌ) : ΞΌ - Ξ½ + Ξ½ = ΞΌ := by ext1 s h_s_meas rw [add_apply, sub_apply h_s_meas h₁, tsub_add_cancel_of_le (h₁ s)] #align measure_theory.measure.sub_add_cancel_of_le MeasureTheory.Measure.sub_add_cancel_of_le theorem restrict_sub_eq_restrict_sub_restrict (h_meas_s : MeasurableSet s) : (ΞΌ - Ξ½).restrict s = ΞΌ.restrict s - Ξ½.restrict s := by repeat rw [sub_def] have h_nonempty : { d | ΞΌ ≀ d + Ξ½ }.Nonempty := ⟨μ, Measure.le_add_right le_rfl⟩ rw [restrict_sInf_eq_sInf_restrict h_nonempty h_meas_s] apply le_antisymm Β· refine sInf_le_sInf_of_forall_exists_le ?_ intro Ξ½' h_Ξ½'_in rw [mem_setOf_eq] at h_Ξ½'_in refine ⟨ν'.restrict s, ?_, restrict_le_self⟩ refine ⟨ν' + (⊀ : Measure Ξ±).restrict sᢜ, ?_, ?_⟩ Β· rw [mem_setOf_eq, add_right_comm, Measure.le_iff] intro t h_meas_t repeat rw [← measure_inter_add_diff t h_meas_s] refine add_le_add ?_ ?_ Β· rw [add_apply, add_apply] apply le_add_right _ rw [← restrict_eq_self ΞΌ inter_subset_right, ← restrict_eq_self Ξ½ inter_subset_right] apply h_Ξ½'_in Β· rw [add_apply, restrict_apply (h_meas_t.diff h_meas_s), diff_eq, inter_assoc, inter_self, ← add_apply] have h_mu_le_add_top : ΞΌ ≀ Ξ½' + Ξ½ + ⊀ := by simp only [add_top, le_top] exact Measure.le_iff'.1 h_mu_le_add_top _ Β· ext1 t h_meas_t simp [restrict_apply h_meas_t, restrict_apply (h_meas_t.inter h_meas_s), inter_assoc] Β· refine sInf_le_sInf_of_forall_exists_le ?_ refine forall_mem_image.2 fun t h_t_in => ⟨t.restrict s, ?_, le_rfl⟩ rw [Set.mem_setOf_eq, ← restrict_add] exact restrict_mono Subset.rfl h_t_in #align measure_theory.measure.restrict_sub_eq_restrict_sub_restrict MeasureTheory.Measure.restrict_sub_eq_restrict_sub_restrict
Mathlib/MeasureTheory/Measure/Sub.lean
137
139
theorem sub_apply_eq_zero_of_restrict_le_restrict (h_le : ΞΌ.restrict s ≀ Ξ½.restrict s) (h_meas_s : MeasurableSet s) : (ΞΌ - Ξ½) s = 0 := by
rw [← restrict_apply_self, restrict_sub_eq_restrict_sub_restrict, sub_eq_zero_of_le] <;> simp [*]
1,390
import Mathlib.MeasureTheory.Constructions.Cylinders import Mathlib.MeasureTheory.Measure.Typeclasses open Set namespace MeasureTheory variable {ΞΉ : Type*} {Ξ± : ΞΉ β†’ Type*} [βˆ€ i, MeasurableSpace (Ξ± i)] {P : βˆ€ J : Finset ΞΉ, Measure (βˆ€ j : J, Ξ± j)} def IsProjectiveMeasureFamily (P : βˆ€ J : Finset ΞΉ, Measure (βˆ€ j : J, Ξ± j)) : Prop := βˆ€ (I J : Finset ΞΉ) (hJI : J βŠ† I), P J = (P I).map (fun (x : βˆ€ i : I, Ξ± i) (j : J) ↦ x ⟨j, hJI j.2⟩) def IsProjectiveLimit (ΞΌ : Measure (βˆ€ i, Ξ± i)) (P : βˆ€ J : Finset ΞΉ, Measure (βˆ€ j : J, Ξ± j)) : Prop := βˆ€ I : Finset ΞΉ, (ΞΌ.map fun x : βˆ€ i, Ξ± i ↦ fun i : I ↦ x i) = P I namespace IsProjectiveLimit variable {ΞΌ Ξ½ : Measure (βˆ€ i, Ξ± i)} lemma measure_cylinder (h : IsProjectiveLimit ΞΌ P) (I : Finset ΞΉ) {s : Set (βˆ€ i : I, Ξ± i)} (hs : MeasurableSet s) : ΞΌ (cylinder I s) = P I s := by rw [cylinder, ← Measure.map_apply _ hs, h I] exact measurable_pi_lambda _ (fun _ ↦ measurable_pi_apply _) lemma measure_univ_eq (hΞΌ : IsProjectiveLimit ΞΌ P) (I : Finset ΞΉ) : ΞΌ univ = P I univ := by rw [← cylinder_univ I, hΞΌ.measure_cylinder _ MeasurableSet.univ] lemma isFiniteMeasure [βˆ€ i, IsFiniteMeasure (P i)] (hΞΌ : IsProjectiveLimit ΞΌ P) : IsFiniteMeasure ΞΌ := by constructor rw [hΞΌ.measure_univ_eq (βˆ… : Finset ΞΉ)] exact measure_lt_top _ _ lemma isProbabilityMeasure [βˆ€ i, IsProbabilityMeasure (P i)] (hΞΌ : IsProjectiveLimit ΞΌ P) : IsProbabilityMeasure ΞΌ := by constructor rw [hΞΌ.measure_univ_eq (βˆ… : Finset ΞΉ)] exact measure_univ lemma measure_univ_unique (hΞΌ : IsProjectiveLimit ΞΌ P) (hΞ½ : IsProjectiveLimit Ξ½ P) : ΞΌ univ = Ξ½ univ := by rw [hΞΌ.measure_univ_eq (βˆ… : Finset ΞΉ), hΞ½.measure_univ_eq (βˆ… : Finset ΞΉ)]
Mathlib/MeasureTheory/Constructions/Projective.lean
143
150
theorem unique [βˆ€ i, IsFiniteMeasure (P i)] (hΞΌ : IsProjectiveLimit ΞΌ P) (hΞ½ : IsProjectiveLimit Ξ½ P) : ΞΌ = Ξ½ := by
haveI : IsFiniteMeasure ΞΌ := hΞΌ.isFiniteMeasure refine ext_of_generate_finite (measurableCylinders Ξ±) generateFrom_measurableCylinders.symm isPiSystem_measurableCylinders (fun s hs ↦ ?_) (hΞΌ.measure_univ_unique hΞ½) obtain ⟨I, S, hS, rfl⟩ := (mem_measurableCylinders _).mp hs rw [hΞΌ.measure_cylinder _ hS, hΞ½.measure_cylinder _ hS]
1,391
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp]
Mathlib/MeasureTheory/Measure/Trim.lean
37
38
theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by
simp [Measure.trim]
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp] theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by simp [Measure.trim] #align measure_theory.trim_eq_self MeasureTheory.trim_eq_self variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s : Set Ξ±}
Mathlib/MeasureTheory/Measure/Trim.lean
43
45
theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (ΞΌ : Measure Ξ±) (hm : m ≀ m0) : @Measure.toOuterMeasure _ m (ΞΌ.trim hm) = @OuterMeasure.trim _ m ΞΌ.toOuterMeasure := by
rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)]
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp] theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by simp [Measure.trim] #align measure_theory.trim_eq_self MeasureTheory.trim_eq_self variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s : Set Ξ±} theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (ΞΌ : Measure Ξ±) (hm : m ≀ m0) : @Measure.toOuterMeasure _ m (ΞΌ.trim hm) = @OuterMeasure.trim _ m ΞΌ.toOuterMeasure := by rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)] #align measure_theory.to_outer_measure_trim_eq_trim_to_outer_measure MeasureTheory.toOuterMeasure_trim_eq_trim_toOuterMeasure @[simp]
Mathlib/MeasureTheory/Measure/Trim.lean
49
50
theorem zero_trim (hm : m ≀ m0) : (0 : Measure Ξ±).trim hm = (0 : @Measure Ξ± m) := by
simp [Measure.trim, @OuterMeasure.toMeasure_zero _ m]
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp] theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by simp [Measure.trim] #align measure_theory.trim_eq_self MeasureTheory.trim_eq_self variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s : Set Ξ±} theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (ΞΌ : Measure Ξ±) (hm : m ≀ m0) : @Measure.toOuterMeasure _ m (ΞΌ.trim hm) = @OuterMeasure.trim _ m ΞΌ.toOuterMeasure := by rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)] #align measure_theory.to_outer_measure_trim_eq_trim_to_outer_measure MeasureTheory.toOuterMeasure_trim_eq_trim_toOuterMeasure @[simp] theorem zero_trim (hm : m ≀ m0) : (0 : Measure Ξ±).trim hm = (0 : @Measure Ξ± m) := by simp [Measure.trim, @OuterMeasure.toMeasure_zero _ m] #align measure_theory.zero_trim MeasureTheory.zero_trim
Mathlib/MeasureTheory/Measure/Trim.lean
53
54
theorem trim_measurableSet_eq (hm : m ≀ m0) (hs : @MeasurableSet Ξ± m s) : ΞΌ.trim hm s = ΞΌ s := by
rw [Measure.trim, toMeasure_apply (ms := m) _ _ hs, Measure.coe_toOuterMeasure]
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp] theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by simp [Measure.trim] #align measure_theory.trim_eq_self MeasureTheory.trim_eq_self variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s : Set Ξ±} theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (ΞΌ : Measure Ξ±) (hm : m ≀ m0) : @Measure.toOuterMeasure _ m (ΞΌ.trim hm) = @OuterMeasure.trim _ m ΞΌ.toOuterMeasure := by rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)] #align measure_theory.to_outer_measure_trim_eq_trim_to_outer_measure MeasureTheory.toOuterMeasure_trim_eq_trim_toOuterMeasure @[simp] theorem zero_trim (hm : m ≀ m0) : (0 : Measure Ξ±).trim hm = (0 : @Measure Ξ± m) := by simp [Measure.trim, @OuterMeasure.toMeasure_zero _ m] #align measure_theory.zero_trim MeasureTheory.zero_trim theorem trim_measurableSet_eq (hm : m ≀ m0) (hs : @MeasurableSet Ξ± m s) : ΞΌ.trim hm s = ΞΌ s := by rw [Measure.trim, toMeasure_apply (ms := m) _ _ hs, Measure.coe_toOuterMeasure] #align measure_theory.trim_measurable_set_eq MeasureTheory.trim_measurableSet_eq
Mathlib/MeasureTheory/Measure/Trim.lean
57
59
theorem le_trim (hm : m ≀ m0) : ΞΌ s ≀ ΞΌ.trim hm s := by
simp_rw [Measure.trim] exact @le_toMeasure_apply _ m _ _ _
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp] theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by simp [Measure.trim] #align measure_theory.trim_eq_self MeasureTheory.trim_eq_self variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s : Set Ξ±} theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (ΞΌ : Measure Ξ±) (hm : m ≀ m0) : @Measure.toOuterMeasure _ m (ΞΌ.trim hm) = @OuterMeasure.trim _ m ΞΌ.toOuterMeasure := by rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)] #align measure_theory.to_outer_measure_trim_eq_trim_to_outer_measure MeasureTheory.toOuterMeasure_trim_eq_trim_toOuterMeasure @[simp] theorem zero_trim (hm : m ≀ m0) : (0 : Measure Ξ±).trim hm = (0 : @Measure Ξ± m) := by simp [Measure.trim, @OuterMeasure.toMeasure_zero _ m] #align measure_theory.zero_trim MeasureTheory.zero_trim theorem trim_measurableSet_eq (hm : m ≀ m0) (hs : @MeasurableSet Ξ± m s) : ΞΌ.trim hm s = ΞΌ s := by rw [Measure.trim, toMeasure_apply (ms := m) _ _ hs, Measure.coe_toOuterMeasure] #align measure_theory.trim_measurable_set_eq MeasureTheory.trim_measurableSet_eq theorem le_trim (hm : m ≀ m0) : ΞΌ s ≀ ΞΌ.trim hm s := by simp_rw [Measure.trim] exact @le_toMeasure_apply _ m _ _ _ #align measure_theory.le_trim MeasureTheory.le_trim theorem measure_eq_zero_of_trim_eq_zero (hm : m ≀ m0) (h : ΞΌ.trim hm s = 0) : ΞΌ s = 0 := le_antisymm ((le_trim hm).trans (le_of_eq h)) (zero_le _) #align measure_theory.measure_eq_zero_of_trim_eq_zero MeasureTheory.measure_eq_zero_of_trim_eq_zero theorem measure_trim_toMeasurable_eq_zero {hm : m ≀ m0} (hs : ΞΌ.trim hm s = 0) : ΞΌ (@toMeasurable Ξ± m (ΞΌ.trim hm) s) = 0 := measure_eq_zero_of_trim_eq_zero hm (by rwa [@measure_toMeasurable _ m]) #align measure_theory.measure_trim_to_measurable_eq_zero MeasureTheory.measure_trim_toMeasurable_eq_zero theorem ae_of_ae_trim (hm : m ≀ m0) {ΞΌ : Measure Ξ±} {P : Ξ± β†’ Prop} (h : βˆ€α΅ x βˆ‚ΞΌ.trim hm, P x) : βˆ€α΅ x βˆ‚ΞΌ, P x := measure_eq_zero_of_trim_eq_zero hm h #align measure_theory.ae_of_ae_trim MeasureTheory.ae_of_ae_trim theorem ae_eq_of_ae_eq_trim {E} {hm : m ≀ m0} {f₁ fβ‚‚ : Ξ± β†’ E} (h12 : f₁ =ᡐ[ΞΌ.trim hm] fβ‚‚) : f₁ =ᡐ[ΞΌ] fβ‚‚ := measure_eq_zero_of_trim_eq_zero hm h12 #align measure_theory.ae_eq_of_ae_eq_trim MeasureTheory.ae_eq_of_ae_eq_trim theorem ae_le_of_ae_le_trim {E} [LE E] {hm : m ≀ m0} {f₁ fβ‚‚ : Ξ± β†’ E} (h12 : f₁ ≀ᡐ[ΞΌ.trim hm] fβ‚‚) : f₁ ≀ᡐ[ΞΌ] fβ‚‚ := measure_eq_zero_of_trim_eq_zero hm h12 #align measure_theory.ae_le_of_ae_le_trim MeasureTheory.ae_le_of_ae_le_trim
Mathlib/MeasureTheory/Measure/Trim.lean
86
90
theorem trim_trim {m₁ mβ‚‚ : MeasurableSpace Ξ±} {hm₁₂ : m₁ ≀ mβ‚‚} {hmβ‚‚ : mβ‚‚ ≀ m0} : (ΞΌ.trim hmβ‚‚).trim hm₁₂ = ΞΌ.trim (hm₁₂.trans hmβ‚‚) := by
refine @Measure.ext _ m₁ _ _ (fun t ht => ?_) rw [trim_measurableSet_eq hm₁₂ ht, trim_measurableSet_eq (hm₁₂.trans hmβ‚‚) ht, trim_measurableSet_eq hmβ‚‚ (hm₁₂ t ht)]
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp] theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by simp [Measure.trim] #align measure_theory.trim_eq_self MeasureTheory.trim_eq_self variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s : Set Ξ±} theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (ΞΌ : Measure Ξ±) (hm : m ≀ m0) : @Measure.toOuterMeasure _ m (ΞΌ.trim hm) = @OuterMeasure.trim _ m ΞΌ.toOuterMeasure := by rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)] #align measure_theory.to_outer_measure_trim_eq_trim_to_outer_measure MeasureTheory.toOuterMeasure_trim_eq_trim_toOuterMeasure @[simp] theorem zero_trim (hm : m ≀ m0) : (0 : Measure Ξ±).trim hm = (0 : @Measure Ξ± m) := by simp [Measure.trim, @OuterMeasure.toMeasure_zero _ m] #align measure_theory.zero_trim MeasureTheory.zero_trim theorem trim_measurableSet_eq (hm : m ≀ m0) (hs : @MeasurableSet Ξ± m s) : ΞΌ.trim hm s = ΞΌ s := by rw [Measure.trim, toMeasure_apply (ms := m) _ _ hs, Measure.coe_toOuterMeasure] #align measure_theory.trim_measurable_set_eq MeasureTheory.trim_measurableSet_eq theorem le_trim (hm : m ≀ m0) : ΞΌ s ≀ ΞΌ.trim hm s := by simp_rw [Measure.trim] exact @le_toMeasure_apply _ m _ _ _ #align measure_theory.le_trim MeasureTheory.le_trim theorem measure_eq_zero_of_trim_eq_zero (hm : m ≀ m0) (h : ΞΌ.trim hm s = 0) : ΞΌ s = 0 := le_antisymm ((le_trim hm).trans (le_of_eq h)) (zero_le _) #align measure_theory.measure_eq_zero_of_trim_eq_zero MeasureTheory.measure_eq_zero_of_trim_eq_zero theorem measure_trim_toMeasurable_eq_zero {hm : m ≀ m0} (hs : ΞΌ.trim hm s = 0) : ΞΌ (@toMeasurable Ξ± m (ΞΌ.trim hm) s) = 0 := measure_eq_zero_of_trim_eq_zero hm (by rwa [@measure_toMeasurable _ m]) #align measure_theory.measure_trim_to_measurable_eq_zero MeasureTheory.measure_trim_toMeasurable_eq_zero theorem ae_of_ae_trim (hm : m ≀ m0) {ΞΌ : Measure Ξ±} {P : Ξ± β†’ Prop} (h : βˆ€α΅ x βˆ‚ΞΌ.trim hm, P x) : βˆ€α΅ x βˆ‚ΞΌ, P x := measure_eq_zero_of_trim_eq_zero hm h #align measure_theory.ae_of_ae_trim MeasureTheory.ae_of_ae_trim theorem ae_eq_of_ae_eq_trim {E} {hm : m ≀ m0} {f₁ fβ‚‚ : Ξ± β†’ E} (h12 : f₁ =ᡐ[ΞΌ.trim hm] fβ‚‚) : f₁ =ᡐ[ΞΌ] fβ‚‚ := measure_eq_zero_of_trim_eq_zero hm h12 #align measure_theory.ae_eq_of_ae_eq_trim MeasureTheory.ae_eq_of_ae_eq_trim theorem ae_le_of_ae_le_trim {E} [LE E] {hm : m ≀ m0} {f₁ fβ‚‚ : Ξ± β†’ E} (h12 : f₁ ≀ᡐ[ΞΌ.trim hm] fβ‚‚) : f₁ ≀ᡐ[ΞΌ] fβ‚‚ := measure_eq_zero_of_trim_eq_zero hm h12 #align measure_theory.ae_le_of_ae_le_trim MeasureTheory.ae_le_of_ae_le_trim theorem trim_trim {m₁ mβ‚‚ : MeasurableSpace Ξ±} {hm₁₂ : m₁ ≀ mβ‚‚} {hmβ‚‚ : mβ‚‚ ≀ m0} : (ΞΌ.trim hmβ‚‚).trim hm₁₂ = ΞΌ.trim (hm₁₂.trans hmβ‚‚) := by refine @Measure.ext _ m₁ _ _ (fun t ht => ?_) rw [trim_measurableSet_eq hm₁₂ ht, trim_measurableSet_eq (hm₁₂.trans hmβ‚‚) ht, trim_measurableSet_eq hmβ‚‚ (hm₁₂ t ht)] #align measure_theory.trim_trim MeasureTheory.trim_trim
Mathlib/MeasureTheory/Measure/Trim.lean
93
98
theorem restrict_trim (hm : m ≀ m0) (ΞΌ : Measure Ξ±) (hs : @MeasurableSet Ξ± m s) : @Measure.restrict Ξ± m (ΞΌ.trim hm) s = (ΞΌ.restrict s).trim hm := by
refine @Measure.ext _ m _ _ (fun t ht => ?_) rw [@Measure.restrict_apply Ξ± m _ _ _ ht, trim_measurableSet_eq hm ht, Measure.restrict_apply (hm t ht), trim_measurableSet_eq hm (@MeasurableSet.inter Ξ± m t s ht hs)]
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp] theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by simp [Measure.trim] #align measure_theory.trim_eq_self MeasureTheory.trim_eq_self variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s : Set Ξ±} theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (ΞΌ : Measure Ξ±) (hm : m ≀ m0) : @Measure.toOuterMeasure _ m (ΞΌ.trim hm) = @OuterMeasure.trim _ m ΞΌ.toOuterMeasure := by rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)] #align measure_theory.to_outer_measure_trim_eq_trim_to_outer_measure MeasureTheory.toOuterMeasure_trim_eq_trim_toOuterMeasure @[simp] theorem zero_trim (hm : m ≀ m0) : (0 : Measure Ξ±).trim hm = (0 : @Measure Ξ± m) := by simp [Measure.trim, @OuterMeasure.toMeasure_zero _ m] #align measure_theory.zero_trim MeasureTheory.zero_trim theorem trim_measurableSet_eq (hm : m ≀ m0) (hs : @MeasurableSet Ξ± m s) : ΞΌ.trim hm s = ΞΌ s := by rw [Measure.trim, toMeasure_apply (ms := m) _ _ hs, Measure.coe_toOuterMeasure] #align measure_theory.trim_measurable_set_eq MeasureTheory.trim_measurableSet_eq theorem le_trim (hm : m ≀ m0) : ΞΌ s ≀ ΞΌ.trim hm s := by simp_rw [Measure.trim] exact @le_toMeasure_apply _ m _ _ _ #align measure_theory.le_trim MeasureTheory.le_trim theorem measure_eq_zero_of_trim_eq_zero (hm : m ≀ m0) (h : ΞΌ.trim hm s = 0) : ΞΌ s = 0 := le_antisymm ((le_trim hm).trans (le_of_eq h)) (zero_le _) #align measure_theory.measure_eq_zero_of_trim_eq_zero MeasureTheory.measure_eq_zero_of_trim_eq_zero theorem measure_trim_toMeasurable_eq_zero {hm : m ≀ m0} (hs : ΞΌ.trim hm s = 0) : ΞΌ (@toMeasurable Ξ± m (ΞΌ.trim hm) s) = 0 := measure_eq_zero_of_trim_eq_zero hm (by rwa [@measure_toMeasurable _ m]) #align measure_theory.measure_trim_to_measurable_eq_zero MeasureTheory.measure_trim_toMeasurable_eq_zero theorem ae_of_ae_trim (hm : m ≀ m0) {ΞΌ : Measure Ξ±} {P : Ξ± β†’ Prop} (h : βˆ€α΅ x βˆ‚ΞΌ.trim hm, P x) : βˆ€α΅ x βˆ‚ΞΌ, P x := measure_eq_zero_of_trim_eq_zero hm h #align measure_theory.ae_of_ae_trim MeasureTheory.ae_of_ae_trim theorem ae_eq_of_ae_eq_trim {E} {hm : m ≀ m0} {f₁ fβ‚‚ : Ξ± β†’ E} (h12 : f₁ =ᡐ[ΞΌ.trim hm] fβ‚‚) : f₁ =ᡐ[ΞΌ] fβ‚‚ := measure_eq_zero_of_trim_eq_zero hm h12 #align measure_theory.ae_eq_of_ae_eq_trim MeasureTheory.ae_eq_of_ae_eq_trim theorem ae_le_of_ae_le_trim {E} [LE E] {hm : m ≀ m0} {f₁ fβ‚‚ : Ξ± β†’ E} (h12 : f₁ ≀ᡐ[ΞΌ.trim hm] fβ‚‚) : f₁ ≀ᡐ[ΞΌ] fβ‚‚ := measure_eq_zero_of_trim_eq_zero hm h12 #align measure_theory.ae_le_of_ae_le_trim MeasureTheory.ae_le_of_ae_le_trim theorem trim_trim {m₁ mβ‚‚ : MeasurableSpace Ξ±} {hm₁₂ : m₁ ≀ mβ‚‚} {hmβ‚‚ : mβ‚‚ ≀ m0} : (ΞΌ.trim hmβ‚‚).trim hm₁₂ = ΞΌ.trim (hm₁₂.trans hmβ‚‚) := by refine @Measure.ext _ m₁ _ _ (fun t ht => ?_) rw [trim_measurableSet_eq hm₁₂ ht, trim_measurableSet_eq (hm₁₂.trans hmβ‚‚) ht, trim_measurableSet_eq hmβ‚‚ (hm₁₂ t ht)] #align measure_theory.trim_trim MeasureTheory.trim_trim theorem restrict_trim (hm : m ≀ m0) (ΞΌ : Measure Ξ±) (hs : @MeasurableSet Ξ± m s) : @Measure.restrict Ξ± m (ΞΌ.trim hm) s = (ΞΌ.restrict s).trim hm := by refine @Measure.ext _ m _ _ (fun t ht => ?_) rw [@Measure.restrict_apply Ξ± m _ _ _ ht, trim_measurableSet_eq hm ht, Measure.restrict_apply (hm t ht), trim_measurableSet_eq hm (@MeasurableSet.inter Ξ± m t s ht hs)] #align measure_theory.restrict_trim MeasureTheory.restrict_trim instance isFiniteMeasure_trim (hm : m ≀ m0) [IsFiniteMeasure ΞΌ] : IsFiniteMeasure (ΞΌ.trim hm) where measure_univ_lt_top := by rw [trim_measurableSet_eq hm (@MeasurableSet.univ _ m)] exact measure_lt_top _ _ #align measure_theory.is_finite_measure_trim MeasureTheory.isFiniteMeasure_trim
Mathlib/MeasureTheory/Measure/Trim.lean
107
121
theorem sigmaFiniteTrim_mono {m mβ‚‚ m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} (hm : m ≀ m0) (hmβ‚‚ : mβ‚‚ ≀ m) [SigmaFinite (ΞΌ.trim (hmβ‚‚.trans hm))] : SigmaFinite (ΞΌ.trim hm) := by
refine ⟨⟨?_⟩⟩ refine { set := spanningSets (ΞΌ.trim (hmβ‚‚.trans hm)) set_mem := fun _ => Set.mem_univ _ finite := fun i => ?_ spanning := iUnion_spanningSets _ } calc (ΞΌ.trim hm) (spanningSets (ΞΌ.trim (hmβ‚‚.trans hm)) i) = ((ΞΌ.trim hm).trim hmβ‚‚) (spanningSets (ΞΌ.trim (hmβ‚‚.trans hm)) i) := by rw [@trim_measurableSet_eq Ξ± mβ‚‚ m (ΞΌ.trim hm) _ hmβ‚‚ (measurable_spanningSets _ _)] _ = (ΞΌ.trim (hmβ‚‚.trans hm)) (spanningSets (ΞΌ.trim (hmβ‚‚.trans hm)) i) := by rw [@trim_trim _ _ ΞΌ _ _ hmβ‚‚ hm] _ < ∞ := measure_spanningSets_lt_top _ _
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses open scoped ENNReal namespace MeasureTheory variable {Ξ± : Type*} noncomputable def Measure.trim {m m0 : MeasurableSpace Ξ±} (ΞΌ : @Measure Ξ± m0) (hm : m ≀ m0) : @Measure Ξ± m := @OuterMeasure.toMeasure Ξ± m ΞΌ.toOuterMeasure (hm.trans (le_toOuterMeasure_caratheodory ΞΌ)) #align measure_theory.measure.trim MeasureTheory.Measure.trim @[simp] theorem trim_eq_self [MeasurableSpace Ξ±] {ΞΌ : Measure Ξ±} : ΞΌ.trim le_rfl = ΞΌ := by simp [Measure.trim] #align measure_theory.trim_eq_self MeasureTheory.trim_eq_self variable {m m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} {s : Set Ξ±} theorem toOuterMeasure_trim_eq_trim_toOuterMeasure (ΞΌ : Measure Ξ±) (hm : m ≀ m0) : @Measure.toOuterMeasure _ m (ΞΌ.trim hm) = @OuterMeasure.trim _ m ΞΌ.toOuterMeasure := by rw [Measure.trim, toMeasure_toOuterMeasure (ms := m)] #align measure_theory.to_outer_measure_trim_eq_trim_to_outer_measure MeasureTheory.toOuterMeasure_trim_eq_trim_toOuterMeasure @[simp] theorem zero_trim (hm : m ≀ m0) : (0 : Measure Ξ±).trim hm = (0 : @Measure Ξ± m) := by simp [Measure.trim, @OuterMeasure.toMeasure_zero _ m] #align measure_theory.zero_trim MeasureTheory.zero_trim theorem trim_measurableSet_eq (hm : m ≀ m0) (hs : @MeasurableSet Ξ± m s) : ΞΌ.trim hm s = ΞΌ s := by rw [Measure.trim, toMeasure_apply (ms := m) _ _ hs, Measure.coe_toOuterMeasure] #align measure_theory.trim_measurable_set_eq MeasureTheory.trim_measurableSet_eq theorem le_trim (hm : m ≀ m0) : ΞΌ s ≀ ΞΌ.trim hm s := by simp_rw [Measure.trim] exact @le_toMeasure_apply _ m _ _ _ #align measure_theory.le_trim MeasureTheory.le_trim theorem measure_eq_zero_of_trim_eq_zero (hm : m ≀ m0) (h : ΞΌ.trim hm s = 0) : ΞΌ s = 0 := le_antisymm ((le_trim hm).trans (le_of_eq h)) (zero_le _) #align measure_theory.measure_eq_zero_of_trim_eq_zero MeasureTheory.measure_eq_zero_of_trim_eq_zero theorem measure_trim_toMeasurable_eq_zero {hm : m ≀ m0} (hs : ΞΌ.trim hm s = 0) : ΞΌ (@toMeasurable Ξ± m (ΞΌ.trim hm) s) = 0 := measure_eq_zero_of_trim_eq_zero hm (by rwa [@measure_toMeasurable _ m]) #align measure_theory.measure_trim_to_measurable_eq_zero MeasureTheory.measure_trim_toMeasurable_eq_zero theorem ae_of_ae_trim (hm : m ≀ m0) {ΞΌ : Measure Ξ±} {P : Ξ± β†’ Prop} (h : βˆ€α΅ x βˆ‚ΞΌ.trim hm, P x) : βˆ€α΅ x βˆ‚ΞΌ, P x := measure_eq_zero_of_trim_eq_zero hm h #align measure_theory.ae_of_ae_trim MeasureTheory.ae_of_ae_trim theorem ae_eq_of_ae_eq_trim {E} {hm : m ≀ m0} {f₁ fβ‚‚ : Ξ± β†’ E} (h12 : f₁ =ᡐ[ΞΌ.trim hm] fβ‚‚) : f₁ =ᡐ[ΞΌ] fβ‚‚ := measure_eq_zero_of_trim_eq_zero hm h12 #align measure_theory.ae_eq_of_ae_eq_trim MeasureTheory.ae_eq_of_ae_eq_trim theorem ae_le_of_ae_le_trim {E} [LE E] {hm : m ≀ m0} {f₁ fβ‚‚ : Ξ± β†’ E} (h12 : f₁ ≀ᡐ[ΞΌ.trim hm] fβ‚‚) : f₁ ≀ᡐ[ΞΌ] fβ‚‚ := measure_eq_zero_of_trim_eq_zero hm h12 #align measure_theory.ae_le_of_ae_le_trim MeasureTheory.ae_le_of_ae_le_trim theorem trim_trim {m₁ mβ‚‚ : MeasurableSpace Ξ±} {hm₁₂ : m₁ ≀ mβ‚‚} {hmβ‚‚ : mβ‚‚ ≀ m0} : (ΞΌ.trim hmβ‚‚).trim hm₁₂ = ΞΌ.trim (hm₁₂.trans hmβ‚‚) := by refine @Measure.ext _ m₁ _ _ (fun t ht => ?_) rw [trim_measurableSet_eq hm₁₂ ht, trim_measurableSet_eq (hm₁₂.trans hmβ‚‚) ht, trim_measurableSet_eq hmβ‚‚ (hm₁₂ t ht)] #align measure_theory.trim_trim MeasureTheory.trim_trim theorem restrict_trim (hm : m ≀ m0) (ΞΌ : Measure Ξ±) (hs : @MeasurableSet Ξ± m s) : @Measure.restrict Ξ± m (ΞΌ.trim hm) s = (ΞΌ.restrict s).trim hm := by refine @Measure.ext _ m _ _ (fun t ht => ?_) rw [@Measure.restrict_apply Ξ± m _ _ _ ht, trim_measurableSet_eq hm ht, Measure.restrict_apply (hm t ht), trim_measurableSet_eq hm (@MeasurableSet.inter Ξ± m t s ht hs)] #align measure_theory.restrict_trim MeasureTheory.restrict_trim instance isFiniteMeasure_trim (hm : m ≀ m0) [IsFiniteMeasure ΞΌ] : IsFiniteMeasure (ΞΌ.trim hm) where measure_univ_lt_top := by rw [trim_measurableSet_eq hm (@MeasurableSet.univ _ m)] exact measure_lt_top _ _ #align measure_theory.is_finite_measure_trim MeasureTheory.isFiniteMeasure_trim theorem sigmaFiniteTrim_mono {m mβ‚‚ m0 : MeasurableSpace Ξ±} {ΞΌ : Measure Ξ±} (hm : m ≀ m0) (hmβ‚‚ : mβ‚‚ ≀ m) [SigmaFinite (ΞΌ.trim (hmβ‚‚.trans hm))] : SigmaFinite (ΞΌ.trim hm) := by refine ⟨⟨?_⟩⟩ refine { set := spanningSets (ΞΌ.trim (hmβ‚‚.trans hm)) set_mem := fun _ => Set.mem_univ _ finite := fun i => ?_ spanning := iUnion_spanningSets _ } calc (ΞΌ.trim hm) (spanningSets (ΞΌ.trim (hmβ‚‚.trans hm)) i) = ((ΞΌ.trim hm).trim hmβ‚‚) (spanningSets (ΞΌ.trim (hmβ‚‚.trans hm)) i) := by rw [@trim_measurableSet_eq Ξ± mβ‚‚ m (ΞΌ.trim hm) _ hmβ‚‚ (measurable_spanningSets _ _)] _ = (ΞΌ.trim (hmβ‚‚.trans hm)) (spanningSets (ΞΌ.trim (hmβ‚‚.trans hm)) i) := by rw [@trim_trim _ _ ΞΌ _ _ hmβ‚‚ hm] _ < ∞ := measure_spanningSets_lt_top _ _ #align measure_theory.sigma_finite_trim_mono MeasureTheory.sigmaFiniteTrim_mono
Mathlib/MeasureTheory/Measure/Trim.lean
124
128
theorem sigmaFinite_trim_bot_iff : SigmaFinite (ΞΌ.trim bot_le) ↔ IsFiniteMeasure ΞΌ := by
rw [sigmaFinite_bot_iff] refine ⟨fun h => ⟨?_⟩, fun h => ⟨?_⟩⟩ <;> have h_univ := h.measure_univ_lt_top · rwa [trim_measurableSet_eq bot_le MeasurableSet.univ] at h_univ · rwa [trim_measurableSet_eq bot_le MeasurableSet.univ]
1,392
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {Ξ± Ξ² Ξ΄ : Type*} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} {a : Ξ±} namespace MeasureTheory namespace Measure def dirac (a : Ξ±) : Measure Ξ± := (OuterMeasure.dirac a).toMeasure (by simp) #align measure_theory.measure.dirac MeasureTheory.Measure.dirac instance : MeasureSpace PUnit := ⟨dirac PUnit.unit⟩ theorem le_dirac_apply {a} : s.indicator 1 a ≀ dirac a s := OuterMeasure.dirac_apply a s β–Έ le_toMeasure_apply _ _ _ #align measure_theory.measure.le_dirac_apply MeasureTheory.Measure.le_dirac_apply @[simp] theorem dirac_apply' (a : Ξ±) (hs : MeasurableSet s) : dirac a s = s.indicator 1 a := toMeasure_apply _ _ hs #align measure_theory.measure.dirac_apply' MeasureTheory.Measure.dirac_apply' @[simp]
Mathlib/MeasureTheory/Measure/Dirac.lean
45
49
theorem dirac_apply_of_mem {a : α} (h : a ∈ s) : dirac a s = 1 := by
have : βˆ€ t : Set Ξ±, a ∈ t β†’ t.indicator (1 : Ξ± β†’ ℝβ‰₯0∞) a = 1 := fun t ht => indicator_of_mem ht 1 refine le_antisymm (this univ trivial β–Έ ?_) (this s h β–Έ le_dirac_apply) rw [← dirac_apply' a MeasurableSet.univ] exact measure_mono (subset_univ s)
1,393
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {Ξ± Ξ² Ξ΄ : Type*} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} {a : Ξ±} namespace MeasureTheory namespace Measure def dirac (a : Ξ±) : Measure Ξ± := (OuterMeasure.dirac a).toMeasure (by simp) #align measure_theory.measure.dirac MeasureTheory.Measure.dirac instance : MeasureSpace PUnit := ⟨dirac PUnit.unit⟩ theorem le_dirac_apply {a} : s.indicator 1 a ≀ dirac a s := OuterMeasure.dirac_apply a s β–Έ le_toMeasure_apply _ _ _ #align measure_theory.measure.le_dirac_apply MeasureTheory.Measure.le_dirac_apply @[simp] theorem dirac_apply' (a : Ξ±) (hs : MeasurableSet s) : dirac a s = s.indicator 1 a := toMeasure_apply _ _ hs #align measure_theory.measure.dirac_apply' MeasureTheory.Measure.dirac_apply' @[simp] theorem dirac_apply_of_mem {a : Ξ±} (h : a ∈ s) : dirac a s = 1 := by have : βˆ€ t : Set Ξ±, a ∈ t β†’ t.indicator (1 : Ξ± β†’ ℝβ‰₯0∞) a = 1 := fun t ht => indicator_of_mem ht 1 refine le_antisymm (this univ trivial β–Έ ?_) (this s h β–Έ le_dirac_apply) rw [← dirac_apply' a MeasurableSet.univ] exact measure_mono (subset_univ s) #align measure_theory.measure.dirac_apply_of_mem MeasureTheory.Measure.dirac_apply_of_mem @[simp]
Mathlib/MeasureTheory/Measure/Dirac.lean
53
59
theorem dirac_apply [MeasurableSingletonClass Ξ±] (a : Ξ±) (s : Set Ξ±) : dirac a s = s.indicator 1 a := by
by_cases h : a ∈ s; Β· rw [dirac_apply_of_mem h, indicator_of_mem h, Pi.one_apply] rw [indicator_of_not_mem h, ← nonpos_iff_eq_zero] calc dirac a s ≀ dirac a {a}ᢜ := measure_mono (subset_compl_comm.1 <| singleton_subset_iff.2 h) _ = 0 := by simp [dirac_apply' _ (measurableSet_singleton _).compl]
1,393
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {Ξ± Ξ² Ξ΄ : Type*} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} {a : Ξ±} namespace MeasureTheory namespace Measure def dirac (a : Ξ±) : Measure Ξ± := (OuterMeasure.dirac a).toMeasure (by simp) #align measure_theory.measure.dirac MeasureTheory.Measure.dirac instance : MeasureSpace PUnit := ⟨dirac PUnit.unit⟩ theorem le_dirac_apply {a} : s.indicator 1 a ≀ dirac a s := OuterMeasure.dirac_apply a s β–Έ le_toMeasure_apply _ _ _ #align measure_theory.measure.le_dirac_apply MeasureTheory.Measure.le_dirac_apply @[simp] theorem dirac_apply' (a : Ξ±) (hs : MeasurableSet s) : dirac a s = s.indicator 1 a := toMeasure_apply _ _ hs #align measure_theory.measure.dirac_apply' MeasureTheory.Measure.dirac_apply' @[simp] theorem dirac_apply_of_mem {a : Ξ±} (h : a ∈ s) : dirac a s = 1 := by have : βˆ€ t : Set Ξ±, a ∈ t β†’ t.indicator (1 : Ξ± β†’ ℝβ‰₯0∞) a = 1 := fun t ht => indicator_of_mem ht 1 refine le_antisymm (this univ trivial β–Έ ?_) (this s h β–Έ le_dirac_apply) rw [← dirac_apply' a MeasurableSet.univ] exact measure_mono (subset_univ s) #align measure_theory.measure.dirac_apply_of_mem MeasureTheory.Measure.dirac_apply_of_mem @[simp] theorem dirac_apply [MeasurableSingletonClass Ξ±] (a : Ξ±) (s : Set Ξ±) : dirac a s = s.indicator 1 a := by by_cases h : a ∈ s; Β· rw [dirac_apply_of_mem h, indicator_of_mem h, Pi.one_apply] rw [indicator_of_not_mem h, ← nonpos_iff_eq_zero] calc dirac a s ≀ dirac a {a}ᢜ := measure_mono (subset_compl_comm.1 <| singleton_subset_iff.2 h) _ = 0 := by simp [dirac_apply' _ (measurableSet_singleton _).compl] #align measure_theory.measure.dirac_apply MeasureTheory.Measure.dirac_apply theorem map_dirac {f : Ξ± β†’ Ξ²} (hf : Measurable f) (a : Ξ±) : (dirac a).map f = dirac (f a) := ext fun s hs => by simp [hs, map_apply hf hs, hf hs, indicator_apply] #align measure_theory.measure.map_dirac MeasureTheory.Measure.map_dirac lemma map_const (ΞΌ : Measure Ξ±) (c : Ξ²) : ΞΌ.map (fun _ ↦ c) = (ΞΌ Set.univ) β€’ dirac c := by ext s hs simp only [aemeasurable_const, measurable_const, Measure.coe_smul, Pi.smul_apply, dirac_apply' _ hs, smul_eq_mul] classical rw [Measure.map_apply measurable_const hs, Set.preimage_const] by_cases hsc : c ∈ s Β· rw [(Set.indicator_eq_one_iff_mem _).mpr hsc, mul_one, if_pos hsc] Β· rw [if_neg hsc, (Set.indicator_eq_zero_iff_not_mem _).mpr hsc, measure_empty, mul_zero] @[simp]
Mathlib/MeasureTheory/Measure/Dirac.lean
77
83
theorem restrict_singleton (ΞΌ : Measure Ξ±) (a : Ξ±) : ΞΌ.restrict {a} = ΞΌ {a} β€’ dirac a := by
ext1 s hs by_cases ha : a ∈ s Β· have : s ∩ {a} = {a} := by simpa simp [*] Β· have : s ∩ {a} = βˆ… := inter_singleton_eq_empty.2 ha simp [*]
1,393
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {Ξ± Ξ² Ξ΄ : Type*} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} {a : Ξ±} namespace MeasureTheory namespace Measure def dirac (a : Ξ±) : Measure Ξ± := (OuterMeasure.dirac a).toMeasure (by simp) #align measure_theory.measure.dirac MeasureTheory.Measure.dirac instance : MeasureSpace PUnit := ⟨dirac PUnit.unit⟩ theorem le_dirac_apply {a} : s.indicator 1 a ≀ dirac a s := OuterMeasure.dirac_apply a s β–Έ le_toMeasure_apply _ _ _ #align measure_theory.measure.le_dirac_apply MeasureTheory.Measure.le_dirac_apply @[simp] theorem dirac_apply' (a : Ξ±) (hs : MeasurableSet s) : dirac a s = s.indicator 1 a := toMeasure_apply _ _ hs #align measure_theory.measure.dirac_apply' MeasureTheory.Measure.dirac_apply' @[simp] theorem dirac_apply_of_mem {a : Ξ±} (h : a ∈ s) : dirac a s = 1 := by have : βˆ€ t : Set Ξ±, a ∈ t β†’ t.indicator (1 : Ξ± β†’ ℝβ‰₯0∞) a = 1 := fun t ht => indicator_of_mem ht 1 refine le_antisymm (this univ trivial β–Έ ?_) (this s h β–Έ le_dirac_apply) rw [← dirac_apply' a MeasurableSet.univ] exact measure_mono (subset_univ s) #align measure_theory.measure.dirac_apply_of_mem MeasureTheory.Measure.dirac_apply_of_mem @[simp] theorem dirac_apply [MeasurableSingletonClass Ξ±] (a : Ξ±) (s : Set Ξ±) : dirac a s = s.indicator 1 a := by by_cases h : a ∈ s; Β· rw [dirac_apply_of_mem h, indicator_of_mem h, Pi.one_apply] rw [indicator_of_not_mem h, ← nonpos_iff_eq_zero] calc dirac a s ≀ dirac a {a}ᢜ := measure_mono (subset_compl_comm.1 <| singleton_subset_iff.2 h) _ = 0 := by simp [dirac_apply' _ (measurableSet_singleton _).compl] #align measure_theory.measure.dirac_apply MeasureTheory.Measure.dirac_apply theorem map_dirac {f : Ξ± β†’ Ξ²} (hf : Measurable f) (a : Ξ±) : (dirac a).map f = dirac (f a) := ext fun s hs => by simp [hs, map_apply hf hs, hf hs, indicator_apply] #align measure_theory.measure.map_dirac MeasureTheory.Measure.map_dirac lemma map_const (ΞΌ : Measure Ξ±) (c : Ξ²) : ΞΌ.map (fun _ ↦ c) = (ΞΌ Set.univ) β€’ dirac c := by ext s hs simp only [aemeasurable_const, measurable_const, Measure.coe_smul, Pi.smul_apply, dirac_apply' _ hs, smul_eq_mul] classical rw [Measure.map_apply measurable_const hs, Set.preimage_const] by_cases hsc : c ∈ s Β· rw [(Set.indicator_eq_one_iff_mem _).mpr hsc, mul_one, if_pos hsc] Β· rw [if_neg hsc, (Set.indicator_eq_zero_iff_not_mem _).mpr hsc, measure_empty, mul_zero] @[simp] theorem restrict_singleton (ΞΌ : Measure Ξ±) (a : Ξ±) : ΞΌ.restrict {a} = ΞΌ {a} β€’ dirac a := by ext1 s hs by_cases ha : a ∈ s Β· have : s ∩ {a} = {a} := by simpa simp [*] Β· have : s ∩ {a} = βˆ… := inter_singleton_eq_empty.2 ha simp [*] #align measure_theory.measure.restrict_singleton MeasureTheory.Measure.restrict_singleton
Mathlib/MeasureTheory/Measure/Dirac.lean
87
92
theorem map_eq_sum [Countable Ξ²] [MeasurableSingletonClass Ξ²] (ΞΌ : Measure Ξ±) (f : Ξ± β†’ Ξ²) (hf : Measurable f) : ΞΌ.map f = sum fun b : Ξ² => ΞΌ (f ⁻¹' {b}) β€’ dirac b := by
ext s have : βˆ€ y ∈ s, MeasurableSet (f ⁻¹' {y}) := fun y _ => hf (measurableSet_singleton _) simp [← tsum_measure_preimage_singleton (to_countable s) this, *, tsum_subtype s fun b => ΞΌ (f ⁻¹' {b}), ← indicator_mul_right s fun b => ΞΌ (f ⁻¹' {b})]
1,393
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {Ξ± Ξ² Ξ΄ : Type*} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} {a : Ξ±} namespace MeasureTheory namespace Measure def dirac (a : Ξ±) : Measure Ξ± := (OuterMeasure.dirac a).toMeasure (by simp) #align measure_theory.measure.dirac MeasureTheory.Measure.dirac instance : MeasureSpace PUnit := ⟨dirac PUnit.unit⟩ theorem le_dirac_apply {a} : s.indicator 1 a ≀ dirac a s := OuterMeasure.dirac_apply a s β–Έ le_toMeasure_apply _ _ _ #align measure_theory.measure.le_dirac_apply MeasureTheory.Measure.le_dirac_apply @[simp] theorem dirac_apply' (a : Ξ±) (hs : MeasurableSet s) : dirac a s = s.indicator 1 a := toMeasure_apply _ _ hs #align measure_theory.measure.dirac_apply' MeasureTheory.Measure.dirac_apply' @[simp] theorem dirac_apply_of_mem {a : Ξ±} (h : a ∈ s) : dirac a s = 1 := by have : βˆ€ t : Set Ξ±, a ∈ t β†’ t.indicator (1 : Ξ± β†’ ℝβ‰₯0∞) a = 1 := fun t ht => indicator_of_mem ht 1 refine le_antisymm (this univ trivial β–Έ ?_) (this s h β–Έ le_dirac_apply) rw [← dirac_apply' a MeasurableSet.univ] exact measure_mono (subset_univ s) #align measure_theory.measure.dirac_apply_of_mem MeasureTheory.Measure.dirac_apply_of_mem @[simp] theorem dirac_apply [MeasurableSingletonClass Ξ±] (a : Ξ±) (s : Set Ξ±) : dirac a s = s.indicator 1 a := by by_cases h : a ∈ s; Β· rw [dirac_apply_of_mem h, indicator_of_mem h, Pi.one_apply] rw [indicator_of_not_mem h, ← nonpos_iff_eq_zero] calc dirac a s ≀ dirac a {a}ᢜ := measure_mono (subset_compl_comm.1 <| singleton_subset_iff.2 h) _ = 0 := by simp [dirac_apply' _ (measurableSet_singleton _).compl] #align measure_theory.measure.dirac_apply MeasureTheory.Measure.dirac_apply theorem map_dirac {f : Ξ± β†’ Ξ²} (hf : Measurable f) (a : Ξ±) : (dirac a).map f = dirac (f a) := ext fun s hs => by simp [hs, map_apply hf hs, hf hs, indicator_apply] #align measure_theory.measure.map_dirac MeasureTheory.Measure.map_dirac lemma map_const (ΞΌ : Measure Ξ±) (c : Ξ²) : ΞΌ.map (fun _ ↦ c) = (ΞΌ Set.univ) β€’ dirac c := by ext s hs simp only [aemeasurable_const, measurable_const, Measure.coe_smul, Pi.smul_apply, dirac_apply' _ hs, smul_eq_mul] classical rw [Measure.map_apply measurable_const hs, Set.preimage_const] by_cases hsc : c ∈ s Β· rw [(Set.indicator_eq_one_iff_mem _).mpr hsc, mul_one, if_pos hsc] Β· rw [if_neg hsc, (Set.indicator_eq_zero_iff_not_mem _).mpr hsc, measure_empty, mul_zero] @[simp] theorem restrict_singleton (ΞΌ : Measure Ξ±) (a : Ξ±) : ΞΌ.restrict {a} = ΞΌ {a} β€’ dirac a := by ext1 s hs by_cases ha : a ∈ s Β· have : s ∩ {a} = {a} := by simpa simp [*] Β· have : s ∩ {a} = βˆ… := inter_singleton_eq_empty.2 ha simp [*] #align measure_theory.measure.restrict_singleton MeasureTheory.Measure.restrict_singleton theorem map_eq_sum [Countable Ξ²] [MeasurableSingletonClass Ξ²] (ΞΌ : Measure Ξ±) (f : Ξ± β†’ Ξ²) (hf : Measurable f) : ΞΌ.map f = sum fun b : Ξ² => ΞΌ (f ⁻¹' {b}) β€’ dirac b := by ext s have : βˆ€ y ∈ s, MeasurableSet (f ⁻¹' {y}) := fun y _ => hf (measurableSet_singleton _) simp [← tsum_measure_preimage_singleton (to_countable s) this, *, tsum_subtype s fun b => ΞΌ (f ⁻¹' {b}), ← indicator_mul_right s fun b => ΞΌ (f ⁻¹' {b})] #align measure_theory.measure.map_eq_sum MeasureTheory.Measure.map_eq_sum @[simp]
Mathlib/MeasureTheory/Measure/Dirac.lean
97
98
theorem sum_smul_dirac [Countable Ξ±] [MeasurableSingletonClass Ξ±] (ΞΌ : Measure Ξ±) : (sum fun a => ΞΌ {a} β€’ dirac a) = ΞΌ := by
simpa using (map_eq_sum ΞΌ id measurable_id).symm
1,393
import Mathlib.MeasureTheory.Measure.Typeclasses import Mathlib.MeasureTheory.Measure.MutuallySingular import Mathlib.MeasureTheory.MeasurableSpace.CountablyGenerated open Function Set open scoped ENNReal Classical noncomputable section variable {Ξ± Ξ² Ξ΄ : Type*} [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} {a : Ξ±} namespace MeasureTheory namespace Measure def dirac (a : Ξ±) : Measure Ξ± := (OuterMeasure.dirac a).toMeasure (by simp) #align measure_theory.measure.dirac MeasureTheory.Measure.dirac instance : MeasureSpace PUnit := ⟨dirac PUnit.unit⟩ theorem le_dirac_apply {a} : s.indicator 1 a ≀ dirac a s := OuterMeasure.dirac_apply a s β–Έ le_toMeasure_apply _ _ _ #align measure_theory.measure.le_dirac_apply MeasureTheory.Measure.le_dirac_apply @[simp] theorem dirac_apply' (a : Ξ±) (hs : MeasurableSet s) : dirac a s = s.indicator 1 a := toMeasure_apply _ _ hs #align measure_theory.measure.dirac_apply' MeasureTheory.Measure.dirac_apply' @[simp] theorem dirac_apply_of_mem {a : Ξ±} (h : a ∈ s) : dirac a s = 1 := by have : βˆ€ t : Set Ξ±, a ∈ t β†’ t.indicator (1 : Ξ± β†’ ℝβ‰₯0∞) a = 1 := fun t ht => indicator_of_mem ht 1 refine le_antisymm (this univ trivial β–Έ ?_) (this s h β–Έ le_dirac_apply) rw [← dirac_apply' a MeasurableSet.univ] exact measure_mono (subset_univ s) #align measure_theory.measure.dirac_apply_of_mem MeasureTheory.Measure.dirac_apply_of_mem @[simp] theorem dirac_apply [MeasurableSingletonClass Ξ±] (a : Ξ±) (s : Set Ξ±) : dirac a s = s.indicator 1 a := by by_cases h : a ∈ s; Β· rw [dirac_apply_of_mem h, indicator_of_mem h, Pi.one_apply] rw [indicator_of_not_mem h, ← nonpos_iff_eq_zero] calc dirac a s ≀ dirac a {a}ᢜ := measure_mono (subset_compl_comm.1 <| singleton_subset_iff.2 h) _ = 0 := by simp [dirac_apply' _ (measurableSet_singleton _).compl] #align measure_theory.measure.dirac_apply MeasureTheory.Measure.dirac_apply theorem map_dirac {f : Ξ± β†’ Ξ²} (hf : Measurable f) (a : Ξ±) : (dirac a).map f = dirac (f a) := ext fun s hs => by simp [hs, map_apply hf hs, hf hs, indicator_apply] #align measure_theory.measure.map_dirac MeasureTheory.Measure.map_dirac lemma map_const (ΞΌ : Measure Ξ±) (c : Ξ²) : ΞΌ.map (fun _ ↦ c) = (ΞΌ Set.univ) β€’ dirac c := by ext s hs simp only [aemeasurable_const, measurable_const, Measure.coe_smul, Pi.smul_apply, dirac_apply' _ hs, smul_eq_mul] classical rw [Measure.map_apply measurable_const hs, Set.preimage_const] by_cases hsc : c ∈ s Β· rw [(Set.indicator_eq_one_iff_mem _).mpr hsc, mul_one, if_pos hsc] Β· rw [if_neg hsc, (Set.indicator_eq_zero_iff_not_mem _).mpr hsc, measure_empty, mul_zero] @[simp] theorem restrict_singleton (ΞΌ : Measure Ξ±) (a : Ξ±) : ΞΌ.restrict {a} = ΞΌ {a} β€’ dirac a := by ext1 s hs by_cases ha : a ∈ s Β· have : s ∩ {a} = {a} := by simpa simp [*] Β· have : s ∩ {a} = βˆ… := inter_singleton_eq_empty.2 ha simp [*] #align measure_theory.measure.restrict_singleton MeasureTheory.Measure.restrict_singleton theorem map_eq_sum [Countable Ξ²] [MeasurableSingletonClass Ξ²] (ΞΌ : Measure Ξ±) (f : Ξ± β†’ Ξ²) (hf : Measurable f) : ΞΌ.map f = sum fun b : Ξ² => ΞΌ (f ⁻¹' {b}) β€’ dirac b := by ext s have : βˆ€ y ∈ s, MeasurableSet (f ⁻¹' {y}) := fun y _ => hf (measurableSet_singleton _) simp [← tsum_measure_preimage_singleton (to_countable s) this, *, tsum_subtype s fun b => ΞΌ (f ⁻¹' {b}), ← indicator_mul_right s fun b => ΞΌ (f ⁻¹' {b})] #align measure_theory.measure.map_eq_sum MeasureTheory.Measure.map_eq_sum @[simp] theorem sum_smul_dirac [Countable Ξ±] [MeasurableSingletonClass Ξ±] (ΞΌ : Measure Ξ±) : (sum fun a => ΞΌ {a} β€’ dirac a) = ΞΌ := by simpa using (map_eq_sum ΞΌ id measurable_id).symm #align measure_theory.measure.sum_smul_dirac MeasureTheory.Measure.sum_smul_dirac
Mathlib/MeasureTheory/Measure/Dirac.lean
103
110
theorem tsum_indicator_apply_singleton [Countable Ξ±] [MeasurableSingletonClass Ξ±] (ΞΌ : Measure Ξ±) (s : Set Ξ±) (hs : MeasurableSet s) : (βˆ‘' x : Ξ±, s.indicator (fun x => ΞΌ {x}) x) = ΞΌ s := calc (βˆ‘' x : Ξ±, s.indicator (fun x => ΞΌ {x}) x) = Measure.sum (fun a => ΞΌ {a} β€’ Measure.dirac a) s := by
simp only [Measure.sum_apply _ hs, Measure.smul_apply, smul_eq_mul, Measure.dirac_apply, Set.indicator_apply, mul_ite, Pi.one_apply, mul_one, mul_zero] _ = ΞΌ s := by rw [ΞΌ.sum_smul_dirac]
1,393
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply
Mathlib/MeasureTheory/Measure/Count.lean
39
40
theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by
simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply]
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this
Mathlib/MeasureTheory/Measure/Count.lean
44
44
theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by
rw [count_apply MeasurableSet.empty, tsum_empty]
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by rw [count_apply MeasurableSet.empty, tsum_empty] #align measure_theory.measure.count_empty MeasureTheory.Measure.count_empty @[simp]
Mathlib/MeasureTheory/Measure/Count.lean
48
53
theorem count_apply_finset' {s : Finset Ξ±} (s_mble : MeasurableSet (s : Set Ξ±)) : count (↑s : Set Ξ±) = s.card := calc count (↑s : Set Ξ±) = βˆ‘' i : (↑s : Set Ξ±), 1 := count_apply s_mble _ = βˆ‘ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by
simp
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by rw [count_apply MeasurableSet.empty, tsum_empty] #align measure_theory.measure.count_empty MeasureTheory.Measure.count_empty @[simp] theorem count_apply_finset' {s : Finset Ξ±} (s_mble : MeasurableSet (s : Set Ξ±)) : count (↑s : Set Ξ±) = s.card := calc count (↑s : Set Ξ±) = βˆ‘' i : (↑s : Set Ξ±), 1 := count_apply s_mble _ = βˆ‘ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by simp #align measure_theory.measure.count_apply_finset' MeasureTheory.Measure.count_apply_finset' @[simp] theorem count_apply_finset [MeasurableSingletonClass Ξ±] (s : Finset Ξ±) : count (↑s : Set Ξ±) = s.card := count_apply_finset' s.measurableSet #align measure_theory.measure.count_apply_finset MeasureTheory.Measure.count_apply_finset
Mathlib/MeasureTheory/Measure/Count.lean
62
65
theorem count_apply_finite' {s : Set Ξ±} (s_fin : s.Finite) (s_mble : MeasurableSet s) : count s = s_fin.toFinset.card := by
simp [← @count_apply_finset' _ _ s_fin.toFinset (by simpa only [Finite.coe_toFinset] using s_mble)]
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by rw [count_apply MeasurableSet.empty, tsum_empty] #align measure_theory.measure.count_empty MeasureTheory.Measure.count_empty @[simp] theorem count_apply_finset' {s : Finset Ξ±} (s_mble : MeasurableSet (s : Set Ξ±)) : count (↑s : Set Ξ±) = s.card := calc count (↑s : Set Ξ±) = βˆ‘' i : (↑s : Set Ξ±), 1 := count_apply s_mble _ = βˆ‘ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by simp #align measure_theory.measure.count_apply_finset' MeasureTheory.Measure.count_apply_finset' @[simp] theorem count_apply_finset [MeasurableSingletonClass Ξ±] (s : Finset Ξ±) : count (↑s : Set Ξ±) = s.card := count_apply_finset' s.measurableSet #align measure_theory.measure.count_apply_finset MeasureTheory.Measure.count_apply_finset theorem count_apply_finite' {s : Set Ξ±} (s_fin : s.Finite) (s_mble : MeasurableSet s) : count s = s_fin.toFinset.card := by simp [← @count_apply_finset' _ _ s_fin.toFinset (by simpa only [Finite.coe_toFinset] using s_mble)] #align measure_theory.measure.count_apply_finite' MeasureTheory.Measure.count_apply_finite'
Mathlib/MeasureTheory/Measure/Count.lean
68
69
theorem count_apply_finite [MeasurableSingletonClass Ξ±] (s : Set Ξ±) (hs : s.Finite) : count s = hs.toFinset.card := by
rw [← count_apply_finset, Finite.coe_toFinset]
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by rw [count_apply MeasurableSet.empty, tsum_empty] #align measure_theory.measure.count_empty MeasureTheory.Measure.count_empty @[simp] theorem count_apply_finset' {s : Finset Ξ±} (s_mble : MeasurableSet (s : Set Ξ±)) : count (↑s : Set Ξ±) = s.card := calc count (↑s : Set Ξ±) = βˆ‘' i : (↑s : Set Ξ±), 1 := count_apply s_mble _ = βˆ‘ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by simp #align measure_theory.measure.count_apply_finset' MeasureTheory.Measure.count_apply_finset' @[simp] theorem count_apply_finset [MeasurableSingletonClass Ξ±] (s : Finset Ξ±) : count (↑s : Set Ξ±) = s.card := count_apply_finset' s.measurableSet #align measure_theory.measure.count_apply_finset MeasureTheory.Measure.count_apply_finset theorem count_apply_finite' {s : Set Ξ±} (s_fin : s.Finite) (s_mble : MeasurableSet s) : count s = s_fin.toFinset.card := by simp [← @count_apply_finset' _ _ s_fin.toFinset (by simpa only [Finite.coe_toFinset] using s_mble)] #align measure_theory.measure.count_apply_finite' MeasureTheory.Measure.count_apply_finite' theorem count_apply_finite [MeasurableSingletonClass Ξ±] (s : Set Ξ±) (hs : s.Finite) : count s = hs.toFinset.card := by rw [← count_apply_finset, Finite.coe_toFinset] #align measure_theory.measure.count_apply_finite MeasureTheory.Measure.count_apply_finite
Mathlib/MeasureTheory/Measure/Count.lean
73
80
theorem count_apply_infinite (hs : s.Infinite) : count s = ∞ := by
refine top_unique (le_of_tendsto' ENNReal.tendsto_nat_nhds_top fun n => ?_) rcases hs.exists_subset_card_eq n with ⟨t, ht, rfl⟩ calc (t.card : ℝβ‰₯0∞) = βˆ‘ i ∈ t, 1 := by simp _ = βˆ‘' i : (t : Set Ξ±), 1 := (t.tsum_subtype 1).symm _ ≀ count (t : Set Ξ±) := le_count_apply _ ≀ count s := measure_mono ht
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by rw [count_apply MeasurableSet.empty, tsum_empty] #align measure_theory.measure.count_empty MeasureTheory.Measure.count_empty @[simp] theorem count_apply_finset' {s : Finset Ξ±} (s_mble : MeasurableSet (s : Set Ξ±)) : count (↑s : Set Ξ±) = s.card := calc count (↑s : Set Ξ±) = βˆ‘' i : (↑s : Set Ξ±), 1 := count_apply s_mble _ = βˆ‘ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by simp #align measure_theory.measure.count_apply_finset' MeasureTheory.Measure.count_apply_finset' @[simp] theorem count_apply_finset [MeasurableSingletonClass Ξ±] (s : Finset Ξ±) : count (↑s : Set Ξ±) = s.card := count_apply_finset' s.measurableSet #align measure_theory.measure.count_apply_finset MeasureTheory.Measure.count_apply_finset theorem count_apply_finite' {s : Set Ξ±} (s_fin : s.Finite) (s_mble : MeasurableSet s) : count s = s_fin.toFinset.card := by simp [← @count_apply_finset' _ _ s_fin.toFinset (by simpa only [Finite.coe_toFinset] using s_mble)] #align measure_theory.measure.count_apply_finite' MeasureTheory.Measure.count_apply_finite' theorem count_apply_finite [MeasurableSingletonClass Ξ±] (s : Set Ξ±) (hs : s.Finite) : count s = hs.toFinset.card := by rw [← count_apply_finset, Finite.coe_toFinset] #align measure_theory.measure.count_apply_finite MeasureTheory.Measure.count_apply_finite theorem count_apply_infinite (hs : s.Infinite) : count s = ∞ := by refine top_unique (le_of_tendsto' ENNReal.tendsto_nat_nhds_top fun n => ?_) rcases hs.exists_subset_card_eq n with ⟨t, ht, rfl⟩ calc (t.card : ℝβ‰₯0∞) = βˆ‘ i ∈ t, 1 := by simp _ = βˆ‘' i : (t : Set Ξ±), 1 := (t.tsum_subtype 1).symm _ ≀ count (t : Set Ξ±) := le_count_apply _ ≀ count s := measure_mono ht #align measure_theory.measure.count_apply_infinite MeasureTheory.Measure.count_apply_infinite @[simp]
Mathlib/MeasureTheory/Measure/Count.lean
84
88
theorem count_apply_eq_top' (s_mble : MeasurableSet s) : count s = ∞ ↔ s.Infinite := by
by_cases hs : s.Finite Β· simp [Set.Infinite, hs, count_apply_finite' hs s_mble] Β· change s.Infinite at hs simp [hs, count_apply_infinite]
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by rw [count_apply MeasurableSet.empty, tsum_empty] #align measure_theory.measure.count_empty MeasureTheory.Measure.count_empty @[simp] theorem count_apply_finset' {s : Finset Ξ±} (s_mble : MeasurableSet (s : Set Ξ±)) : count (↑s : Set Ξ±) = s.card := calc count (↑s : Set Ξ±) = βˆ‘' i : (↑s : Set Ξ±), 1 := count_apply s_mble _ = βˆ‘ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by simp #align measure_theory.measure.count_apply_finset' MeasureTheory.Measure.count_apply_finset' @[simp] theorem count_apply_finset [MeasurableSingletonClass Ξ±] (s : Finset Ξ±) : count (↑s : Set Ξ±) = s.card := count_apply_finset' s.measurableSet #align measure_theory.measure.count_apply_finset MeasureTheory.Measure.count_apply_finset theorem count_apply_finite' {s : Set Ξ±} (s_fin : s.Finite) (s_mble : MeasurableSet s) : count s = s_fin.toFinset.card := by simp [← @count_apply_finset' _ _ s_fin.toFinset (by simpa only [Finite.coe_toFinset] using s_mble)] #align measure_theory.measure.count_apply_finite' MeasureTheory.Measure.count_apply_finite' theorem count_apply_finite [MeasurableSingletonClass Ξ±] (s : Set Ξ±) (hs : s.Finite) : count s = hs.toFinset.card := by rw [← count_apply_finset, Finite.coe_toFinset] #align measure_theory.measure.count_apply_finite MeasureTheory.Measure.count_apply_finite theorem count_apply_infinite (hs : s.Infinite) : count s = ∞ := by refine top_unique (le_of_tendsto' ENNReal.tendsto_nat_nhds_top fun n => ?_) rcases hs.exists_subset_card_eq n with ⟨t, ht, rfl⟩ calc (t.card : ℝβ‰₯0∞) = βˆ‘ i ∈ t, 1 := by simp _ = βˆ‘' i : (t : Set Ξ±), 1 := (t.tsum_subtype 1).symm _ ≀ count (t : Set Ξ±) := le_count_apply _ ≀ count s := measure_mono ht #align measure_theory.measure.count_apply_infinite MeasureTheory.Measure.count_apply_infinite @[simp] theorem count_apply_eq_top' (s_mble : MeasurableSet s) : count s = ∞ ↔ s.Infinite := by by_cases hs : s.Finite Β· simp [Set.Infinite, hs, count_apply_finite' hs s_mble] Β· change s.Infinite at hs simp [hs, count_apply_infinite] #align measure_theory.measure.count_apply_eq_top' MeasureTheory.Measure.count_apply_eq_top' @[simp]
Mathlib/MeasureTheory/Measure/Count.lean
92
96
theorem count_apply_eq_top [MeasurableSingletonClass Ξ±] : count s = ∞ ↔ s.Infinite := by
by_cases hs : s.Finite Β· exact count_apply_eq_top' hs.measurableSet Β· change s.Infinite at hs simp [hs, count_apply_infinite]
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by rw [count_apply MeasurableSet.empty, tsum_empty] #align measure_theory.measure.count_empty MeasureTheory.Measure.count_empty @[simp] theorem count_apply_finset' {s : Finset Ξ±} (s_mble : MeasurableSet (s : Set Ξ±)) : count (↑s : Set Ξ±) = s.card := calc count (↑s : Set Ξ±) = βˆ‘' i : (↑s : Set Ξ±), 1 := count_apply s_mble _ = βˆ‘ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by simp #align measure_theory.measure.count_apply_finset' MeasureTheory.Measure.count_apply_finset' @[simp] theorem count_apply_finset [MeasurableSingletonClass Ξ±] (s : Finset Ξ±) : count (↑s : Set Ξ±) = s.card := count_apply_finset' s.measurableSet #align measure_theory.measure.count_apply_finset MeasureTheory.Measure.count_apply_finset theorem count_apply_finite' {s : Set Ξ±} (s_fin : s.Finite) (s_mble : MeasurableSet s) : count s = s_fin.toFinset.card := by simp [← @count_apply_finset' _ _ s_fin.toFinset (by simpa only [Finite.coe_toFinset] using s_mble)] #align measure_theory.measure.count_apply_finite' MeasureTheory.Measure.count_apply_finite' theorem count_apply_finite [MeasurableSingletonClass Ξ±] (s : Set Ξ±) (hs : s.Finite) : count s = hs.toFinset.card := by rw [← count_apply_finset, Finite.coe_toFinset] #align measure_theory.measure.count_apply_finite MeasureTheory.Measure.count_apply_finite theorem count_apply_infinite (hs : s.Infinite) : count s = ∞ := by refine top_unique (le_of_tendsto' ENNReal.tendsto_nat_nhds_top fun n => ?_) rcases hs.exists_subset_card_eq n with ⟨t, ht, rfl⟩ calc (t.card : ℝβ‰₯0∞) = βˆ‘ i ∈ t, 1 := by simp _ = βˆ‘' i : (t : Set Ξ±), 1 := (t.tsum_subtype 1).symm _ ≀ count (t : Set Ξ±) := le_count_apply _ ≀ count s := measure_mono ht #align measure_theory.measure.count_apply_infinite MeasureTheory.Measure.count_apply_infinite @[simp] theorem count_apply_eq_top' (s_mble : MeasurableSet s) : count s = ∞ ↔ s.Infinite := by by_cases hs : s.Finite Β· simp [Set.Infinite, hs, count_apply_finite' hs s_mble] Β· change s.Infinite at hs simp [hs, count_apply_infinite] #align measure_theory.measure.count_apply_eq_top' MeasureTheory.Measure.count_apply_eq_top' @[simp] theorem count_apply_eq_top [MeasurableSingletonClass Ξ±] : count s = ∞ ↔ s.Infinite := by by_cases hs : s.Finite Β· exact count_apply_eq_top' hs.measurableSet Β· change s.Infinite at hs simp [hs, count_apply_infinite] #align measure_theory.measure.count_apply_eq_top MeasureTheory.Measure.count_apply_eq_top @[simp] theorem count_apply_lt_top' (s_mble : MeasurableSet s) : count s < ∞ ↔ s.Finite := calc count s < ∞ ↔ count s β‰  ∞ := lt_top_iff_ne_top _ ↔ Β¬s.Infinite := not_congr (count_apply_eq_top' s_mble) _ ↔ s.Finite := Classical.not_not #align measure_theory.measure.count_apply_lt_top' MeasureTheory.Measure.count_apply_lt_top' @[simp] theorem count_apply_lt_top [MeasurableSingletonClass Ξ±] : count s < ∞ ↔ s.Finite := calc count s < ∞ ↔ count s β‰  ∞ := lt_top_iff_ne_top _ ↔ Β¬s.Infinite := not_congr count_apply_eq_top _ ↔ s.Finite := Classical.not_not #align measure_theory.measure.count_apply_lt_top MeasureTheory.Measure.count_apply_lt_top
Mathlib/MeasureTheory/Measure/Count.lean
115
119
theorem empty_of_count_eq_zero' (s_mble : MeasurableSet s) (hsc : count s = 0) : s = βˆ… := by
have hs : s.Finite := by rw [← count_apply_lt_top' s_mble, hsc] exact WithTop.zero_lt_top simpa [count_apply_finite' hs s_mble] using hsc
1,394
import Mathlib.MeasureTheory.Measure.Dirac set_option autoImplicit true open Set open scoped ENNReal Classical variable [MeasurableSpace Ξ±] [MeasurableSpace Ξ²] {s : Set Ξ±} noncomputable section namespace MeasureTheory.Measure def count : Measure Ξ± := sum dirac #align measure_theory.measure.count MeasureTheory.Measure.count theorem le_count_apply : βˆ‘' _ : s, (1 : ℝβ‰₯0∞) ≀ count s := calc (βˆ‘' _ : s, 1 : ℝβ‰₯0∞) = βˆ‘' i, indicator s 1 i := tsum_subtype s 1 _ ≀ βˆ‘' i, dirac i s := ENNReal.tsum_le_tsum fun _ => le_dirac_apply _ ≀ count s := le_sum_apply _ _ #align measure_theory.measure.le_count_apply MeasureTheory.Measure.le_count_apply theorem count_apply (hs : MeasurableSet s) : count s = βˆ‘' i : s, 1 := by simp only [count, sum_apply, hs, dirac_apply', ← tsum_subtype s (1 : Ξ± β†’ ℝβ‰₯0∞), Pi.one_apply] #align measure_theory.measure.count_apply MeasureTheory.Measure.count_apply -- @[simp] -- Porting note (#10618): simp can prove this theorem count_empty : count (βˆ… : Set Ξ±) = 0 := by rw [count_apply MeasurableSet.empty, tsum_empty] #align measure_theory.measure.count_empty MeasureTheory.Measure.count_empty @[simp] theorem count_apply_finset' {s : Finset Ξ±} (s_mble : MeasurableSet (s : Set Ξ±)) : count (↑s : Set Ξ±) = s.card := calc count (↑s : Set Ξ±) = βˆ‘' i : (↑s : Set Ξ±), 1 := count_apply s_mble _ = βˆ‘ i ∈ s, 1 := s.tsum_subtype 1 _ = s.card := by simp #align measure_theory.measure.count_apply_finset' MeasureTheory.Measure.count_apply_finset' @[simp] theorem count_apply_finset [MeasurableSingletonClass Ξ±] (s : Finset Ξ±) : count (↑s : Set Ξ±) = s.card := count_apply_finset' s.measurableSet #align measure_theory.measure.count_apply_finset MeasureTheory.Measure.count_apply_finset theorem count_apply_finite' {s : Set Ξ±} (s_fin : s.Finite) (s_mble : MeasurableSet s) : count s = s_fin.toFinset.card := by simp [← @count_apply_finset' _ _ s_fin.toFinset (by simpa only [Finite.coe_toFinset] using s_mble)] #align measure_theory.measure.count_apply_finite' MeasureTheory.Measure.count_apply_finite' theorem count_apply_finite [MeasurableSingletonClass Ξ±] (s : Set Ξ±) (hs : s.Finite) : count s = hs.toFinset.card := by rw [← count_apply_finset, Finite.coe_toFinset] #align measure_theory.measure.count_apply_finite MeasureTheory.Measure.count_apply_finite theorem count_apply_infinite (hs : s.Infinite) : count s = ∞ := by refine top_unique (le_of_tendsto' ENNReal.tendsto_nat_nhds_top fun n => ?_) rcases hs.exists_subset_card_eq n with ⟨t, ht, rfl⟩ calc (t.card : ℝβ‰₯0∞) = βˆ‘ i ∈ t, 1 := by simp _ = βˆ‘' i : (t : Set Ξ±), 1 := (t.tsum_subtype 1).symm _ ≀ count (t : Set Ξ±) := le_count_apply _ ≀ count s := measure_mono ht #align measure_theory.measure.count_apply_infinite MeasureTheory.Measure.count_apply_infinite @[simp] theorem count_apply_eq_top' (s_mble : MeasurableSet s) : count s = ∞ ↔ s.Infinite := by by_cases hs : s.Finite Β· simp [Set.Infinite, hs, count_apply_finite' hs s_mble] Β· change s.Infinite at hs simp [hs, count_apply_infinite] #align measure_theory.measure.count_apply_eq_top' MeasureTheory.Measure.count_apply_eq_top' @[simp] theorem count_apply_eq_top [MeasurableSingletonClass Ξ±] : count s = ∞ ↔ s.Infinite := by by_cases hs : s.Finite Β· exact count_apply_eq_top' hs.measurableSet Β· change s.Infinite at hs simp [hs, count_apply_infinite] #align measure_theory.measure.count_apply_eq_top MeasureTheory.Measure.count_apply_eq_top @[simp] theorem count_apply_lt_top' (s_mble : MeasurableSet s) : count s < ∞ ↔ s.Finite := calc count s < ∞ ↔ count s β‰  ∞ := lt_top_iff_ne_top _ ↔ Β¬s.Infinite := not_congr (count_apply_eq_top' s_mble) _ ↔ s.Finite := Classical.not_not #align measure_theory.measure.count_apply_lt_top' MeasureTheory.Measure.count_apply_lt_top' @[simp] theorem count_apply_lt_top [MeasurableSingletonClass Ξ±] : count s < ∞ ↔ s.Finite := calc count s < ∞ ↔ count s β‰  ∞ := lt_top_iff_ne_top _ ↔ Β¬s.Infinite := not_congr count_apply_eq_top _ ↔ s.Finite := Classical.not_not #align measure_theory.measure.count_apply_lt_top MeasureTheory.Measure.count_apply_lt_top theorem empty_of_count_eq_zero' (s_mble : MeasurableSet s) (hsc : count s = 0) : s = βˆ… := by have hs : s.Finite := by rw [← count_apply_lt_top' s_mble, hsc] exact WithTop.zero_lt_top simpa [count_apply_finite' hs s_mble] using hsc #align measure_theory.measure.empty_of_count_eq_zero' MeasureTheory.Measure.empty_of_count_eq_zero'
Mathlib/MeasureTheory/Measure/Count.lean
122
126
theorem empty_of_count_eq_zero [MeasurableSingletonClass Ξ±] (hsc : count s = 0) : s = βˆ… := by
have hs : s.Finite := by rw [← count_apply_lt_top, hsc] exact WithTop.zero_lt_top simpa [count_apply_finite _ hs] using hsc
1,394
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp]
Mathlib/Probability/CondCount.lean
59
59
theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by
simp [condCount]
1,395
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp] theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by simp [condCount] #align probability_theory.cond_count_empty_meas ProbabilityTheory.condCount_empty_meas
Mathlib/Probability/CondCount.lean
62
62
theorem condCount_empty {s : Set Ξ©} : condCount s βˆ… = 0 := by
simp
1,395
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp] theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by simp [condCount] #align probability_theory.cond_count_empty_meas ProbabilityTheory.condCount_empty_meas theorem condCount_empty {s : Set Ξ©} : condCount s βˆ… = 0 := by simp #align probability_theory.cond_count_empty ProbabilityTheory.condCount_empty
Mathlib/Probability/CondCount.lean
65
67
theorem finite_of_condCount_ne_zero {s t : Set Ξ©} (h : condCount s t β‰  0) : s.Finite := by
by_contra hs' simp [condCount, cond, Measure.count_apply_infinite hs'] at h
1,395
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp] theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by simp [condCount] #align probability_theory.cond_count_empty_meas ProbabilityTheory.condCount_empty_meas theorem condCount_empty {s : Set Ξ©} : condCount s βˆ… = 0 := by simp #align probability_theory.cond_count_empty ProbabilityTheory.condCount_empty theorem finite_of_condCount_ne_zero {s t : Set Ξ©} (h : condCount s t β‰  0) : s.Finite := by by_contra hs' simp [condCount, cond, Measure.count_apply_infinite hs'] at h #align probability_theory.finite_of_cond_count_ne_zero ProbabilityTheory.finite_of_condCount_ne_zero
Mathlib/Probability/CondCount.lean
70
76
theorem condCount_univ [Fintype Ξ©] {s : Set Ξ©} : condCount Set.univ s = Measure.count s / Fintype.card Ξ© := by
rw [condCount, cond_apply _ MeasurableSet.univ, ← ENNReal.div_eq_inv_mul, Set.univ_inter] congr rw [← Finset.coe_univ, Measure.count_apply, Finset.univ.tsum_subtype' fun _ => (1 : ENNReal)] Β· simp [Finset.card_univ] Β· exact (@Finset.coe_univ Ξ© _).symm β–Έ MeasurableSet.univ
1,395
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp] theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by simp [condCount] #align probability_theory.cond_count_empty_meas ProbabilityTheory.condCount_empty_meas theorem condCount_empty {s : Set Ξ©} : condCount s βˆ… = 0 := by simp #align probability_theory.cond_count_empty ProbabilityTheory.condCount_empty theorem finite_of_condCount_ne_zero {s t : Set Ξ©} (h : condCount s t β‰  0) : s.Finite := by by_contra hs' simp [condCount, cond, Measure.count_apply_infinite hs'] at h #align probability_theory.finite_of_cond_count_ne_zero ProbabilityTheory.finite_of_condCount_ne_zero theorem condCount_univ [Fintype Ξ©] {s : Set Ξ©} : condCount Set.univ s = Measure.count s / Fintype.card Ξ© := by rw [condCount, cond_apply _ MeasurableSet.univ, ← ENNReal.div_eq_inv_mul, Set.univ_inter] congr rw [← Finset.coe_univ, Measure.count_apply, Finset.univ.tsum_subtype' fun _ => (1 : ENNReal)] Β· simp [Finset.card_univ] Β· exact (@Finset.coe_univ Ξ© _).symm β–Έ MeasurableSet.univ #align probability_theory.cond_count_univ ProbabilityTheory.condCount_univ variable [MeasurableSingletonClass Ξ©]
Mathlib/Probability/CondCount.lean
81
86
theorem condCount_isProbabilityMeasure {s : Set Ξ©} (hs : s.Finite) (hs' : s.Nonempty) : IsProbabilityMeasure (condCount s) := { measure_univ := by
rw [condCount, cond_apply _ hs.measurableSet, Set.inter_univ, ENNReal.inv_mul_cancel] Β· exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h Β· exact (Measure.count_apply_lt_top.2 hs).ne }
1,395
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp] theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by simp [condCount] #align probability_theory.cond_count_empty_meas ProbabilityTheory.condCount_empty_meas theorem condCount_empty {s : Set Ξ©} : condCount s βˆ… = 0 := by simp #align probability_theory.cond_count_empty ProbabilityTheory.condCount_empty theorem finite_of_condCount_ne_zero {s t : Set Ξ©} (h : condCount s t β‰  0) : s.Finite := by by_contra hs' simp [condCount, cond, Measure.count_apply_infinite hs'] at h #align probability_theory.finite_of_cond_count_ne_zero ProbabilityTheory.finite_of_condCount_ne_zero theorem condCount_univ [Fintype Ξ©] {s : Set Ξ©} : condCount Set.univ s = Measure.count s / Fintype.card Ξ© := by rw [condCount, cond_apply _ MeasurableSet.univ, ← ENNReal.div_eq_inv_mul, Set.univ_inter] congr rw [← Finset.coe_univ, Measure.count_apply, Finset.univ.tsum_subtype' fun _ => (1 : ENNReal)] Β· simp [Finset.card_univ] Β· exact (@Finset.coe_univ Ξ© _).symm β–Έ MeasurableSet.univ #align probability_theory.cond_count_univ ProbabilityTheory.condCount_univ variable [MeasurableSingletonClass Ξ©] theorem condCount_isProbabilityMeasure {s : Set Ξ©} (hs : s.Finite) (hs' : s.Nonempty) : IsProbabilityMeasure (condCount s) := { measure_univ := by rw [condCount, cond_apply _ hs.measurableSet, Set.inter_univ, ENNReal.inv_mul_cancel] Β· exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h Β· exact (Measure.count_apply_lt_top.2 hs).ne } #align probability_theory.cond_count_is_probability_measure ProbabilityTheory.condCount_isProbabilityMeasure
Mathlib/Probability/CondCount.lean
89
95
theorem condCount_singleton (Ο‰ : Ξ©) (t : Set Ξ©) [Decidable (Ο‰ ∈ t)] : condCount {Ο‰} t = if Ο‰ ∈ t then 1 else 0 := by
rw [condCount, cond_apply _ (measurableSet_singleton Ο‰), Measure.count_singleton, inv_one, one_mul] split_ifs Β· rw [(by simpa : ({Ο‰} : Set Ξ©) ∩ t = {Ο‰}), Measure.count_singleton] Β· rw [(by simpa : ({Ο‰} : Set Ξ©) ∩ t = βˆ…), Measure.count_empty]
1,395
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp] theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by simp [condCount] #align probability_theory.cond_count_empty_meas ProbabilityTheory.condCount_empty_meas theorem condCount_empty {s : Set Ξ©} : condCount s βˆ… = 0 := by simp #align probability_theory.cond_count_empty ProbabilityTheory.condCount_empty theorem finite_of_condCount_ne_zero {s t : Set Ξ©} (h : condCount s t β‰  0) : s.Finite := by by_contra hs' simp [condCount, cond, Measure.count_apply_infinite hs'] at h #align probability_theory.finite_of_cond_count_ne_zero ProbabilityTheory.finite_of_condCount_ne_zero theorem condCount_univ [Fintype Ξ©] {s : Set Ξ©} : condCount Set.univ s = Measure.count s / Fintype.card Ξ© := by rw [condCount, cond_apply _ MeasurableSet.univ, ← ENNReal.div_eq_inv_mul, Set.univ_inter] congr rw [← Finset.coe_univ, Measure.count_apply, Finset.univ.tsum_subtype' fun _ => (1 : ENNReal)] Β· simp [Finset.card_univ] Β· exact (@Finset.coe_univ Ξ© _).symm β–Έ MeasurableSet.univ #align probability_theory.cond_count_univ ProbabilityTheory.condCount_univ variable [MeasurableSingletonClass Ξ©] theorem condCount_isProbabilityMeasure {s : Set Ξ©} (hs : s.Finite) (hs' : s.Nonempty) : IsProbabilityMeasure (condCount s) := { measure_univ := by rw [condCount, cond_apply _ hs.measurableSet, Set.inter_univ, ENNReal.inv_mul_cancel] Β· exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h Β· exact (Measure.count_apply_lt_top.2 hs).ne } #align probability_theory.cond_count_is_probability_measure ProbabilityTheory.condCount_isProbabilityMeasure theorem condCount_singleton (Ο‰ : Ξ©) (t : Set Ξ©) [Decidable (Ο‰ ∈ t)] : condCount {Ο‰} t = if Ο‰ ∈ t then 1 else 0 := by rw [condCount, cond_apply _ (measurableSet_singleton Ο‰), Measure.count_singleton, inv_one, one_mul] split_ifs Β· rw [(by simpa : ({Ο‰} : Set Ξ©) ∩ t = {Ο‰}), Measure.count_singleton] Β· rw [(by simpa : ({Ο‰} : Set Ξ©) ∩ t = βˆ…), Measure.count_empty] #align probability_theory.cond_count_singleton ProbabilityTheory.condCount_singleton variable {s t u : Set Ξ©}
Mathlib/Probability/CondCount.lean
100
101
theorem condCount_inter_self (hs : s.Finite) : condCount s (s ∩ t) = condCount s t := by
rw [condCount, cond_inter_self _ hs.measurableSet]
1,395
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp] theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by simp [condCount] #align probability_theory.cond_count_empty_meas ProbabilityTheory.condCount_empty_meas theorem condCount_empty {s : Set Ξ©} : condCount s βˆ… = 0 := by simp #align probability_theory.cond_count_empty ProbabilityTheory.condCount_empty theorem finite_of_condCount_ne_zero {s t : Set Ξ©} (h : condCount s t β‰  0) : s.Finite := by by_contra hs' simp [condCount, cond, Measure.count_apply_infinite hs'] at h #align probability_theory.finite_of_cond_count_ne_zero ProbabilityTheory.finite_of_condCount_ne_zero theorem condCount_univ [Fintype Ξ©] {s : Set Ξ©} : condCount Set.univ s = Measure.count s / Fintype.card Ξ© := by rw [condCount, cond_apply _ MeasurableSet.univ, ← ENNReal.div_eq_inv_mul, Set.univ_inter] congr rw [← Finset.coe_univ, Measure.count_apply, Finset.univ.tsum_subtype' fun _ => (1 : ENNReal)] Β· simp [Finset.card_univ] Β· exact (@Finset.coe_univ Ξ© _).symm β–Έ MeasurableSet.univ #align probability_theory.cond_count_univ ProbabilityTheory.condCount_univ variable [MeasurableSingletonClass Ξ©] theorem condCount_isProbabilityMeasure {s : Set Ξ©} (hs : s.Finite) (hs' : s.Nonempty) : IsProbabilityMeasure (condCount s) := { measure_univ := by rw [condCount, cond_apply _ hs.measurableSet, Set.inter_univ, ENNReal.inv_mul_cancel] Β· exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h Β· exact (Measure.count_apply_lt_top.2 hs).ne } #align probability_theory.cond_count_is_probability_measure ProbabilityTheory.condCount_isProbabilityMeasure theorem condCount_singleton (Ο‰ : Ξ©) (t : Set Ξ©) [Decidable (Ο‰ ∈ t)] : condCount {Ο‰} t = if Ο‰ ∈ t then 1 else 0 := by rw [condCount, cond_apply _ (measurableSet_singleton Ο‰), Measure.count_singleton, inv_one, one_mul] split_ifs Β· rw [(by simpa : ({Ο‰} : Set Ξ©) ∩ t = {Ο‰}), Measure.count_singleton] Β· rw [(by simpa : ({Ο‰} : Set Ξ©) ∩ t = βˆ…), Measure.count_empty] #align probability_theory.cond_count_singleton ProbabilityTheory.condCount_singleton variable {s t u : Set Ξ©} theorem condCount_inter_self (hs : s.Finite) : condCount s (s ∩ t) = condCount s t := by rw [condCount, cond_inter_self _ hs.measurableSet] #align probability_theory.cond_count_inter_self ProbabilityTheory.condCount_inter_self
Mathlib/Probability/CondCount.lean
104
107
theorem condCount_self (hs : s.Finite) (hs' : s.Nonempty) : condCount s s = 1 := by
rw [condCount, cond_apply _ hs.measurableSet, Set.inter_self, ENNReal.inv_mul_cancel] Β· exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h Β· exact (Measure.count_apply_lt_top.2 hs).ne
1,395
import Mathlib.Probability.ConditionalProbability import Mathlib.MeasureTheory.Measure.Count #align_import probability.cond_count from "leanprover-community/mathlib"@"117e93f82b5f959f8193857370109935291f0cc4" noncomputable section open ProbabilityTheory open MeasureTheory MeasurableSpace namespace ProbabilityTheory variable {Ξ© : Type*} [MeasurableSpace Ξ©] def condCount (s : Set Ξ©) : Measure Ξ© := Measure.count[|s] #align probability_theory.cond_count ProbabilityTheory.condCount @[simp] theorem condCount_empty_meas : (condCount βˆ… : Measure Ξ©) = 0 := by simp [condCount] #align probability_theory.cond_count_empty_meas ProbabilityTheory.condCount_empty_meas theorem condCount_empty {s : Set Ξ©} : condCount s βˆ… = 0 := by simp #align probability_theory.cond_count_empty ProbabilityTheory.condCount_empty theorem finite_of_condCount_ne_zero {s t : Set Ξ©} (h : condCount s t β‰  0) : s.Finite := by by_contra hs' simp [condCount, cond, Measure.count_apply_infinite hs'] at h #align probability_theory.finite_of_cond_count_ne_zero ProbabilityTheory.finite_of_condCount_ne_zero theorem condCount_univ [Fintype Ξ©] {s : Set Ξ©} : condCount Set.univ s = Measure.count s / Fintype.card Ξ© := by rw [condCount, cond_apply _ MeasurableSet.univ, ← ENNReal.div_eq_inv_mul, Set.univ_inter] congr rw [← Finset.coe_univ, Measure.count_apply, Finset.univ.tsum_subtype' fun _ => (1 : ENNReal)] Β· simp [Finset.card_univ] Β· exact (@Finset.coe_univ Ξ© _).symm β–Έ MeasurableSet.univ #align probability_theory.cond_count_univ ProbabilityTheory.condCount_univ variable [MeasurableSingletonClass Ξ©] theorem condCount_isProbabilityMeasure {s : Set Ξ©} (hs : s.Finite) (hs' : s.Nonempty) : IsProbabilityMeasure (condCount s) := { measure_univ := by rw [condCount, cond_apply _ hs.measurableSet, Set.inter_univ, ENNReal.inv_mul_cancel] Β· exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h Β· exact (Measure.count_apply_lt_top.2 hs).ne } #align probability_theory.cond_count_is_probability_measure ProbabilityTheory.condCount_isProbabilityMeasure theorem condCount_singleton (Ο‰ : Ξ©) (t : Set Ξ©) [Decidable (Ο‰ ∈ t)] : condCount {Ο‰} t = if Ο‰ ∈ t then 1 else 0 := by rw [condCount, cond_apply _ (measurableSet_singleton Ο‰), Measure.count_singleton, inv_one, one_mul] split_ifs Β· rw [(by simpa : ({Ο‰} : Set Ξ©) ∩ t = {Ο‰}), Measure.count_singleton] Β· rw [(by simpa : ({Ο‰} : Set Ξ©) ∩ t = βˆ…), Measure.count_empty] #align probability_theory.cond_count_singleton ProbabilityTheory.condCount_singleton variable {s t u : Set Ξ©} theorem condCount_inter_self (hs : s.Finite) : condCount s (s ∩ t) = condCount s t := by rw [condCount, cond_inter_self _ hs.measurableSet] #align probability_theory.cond_count_inter_self ProbabilityTheory.condCount_inter_self theorem condCount_self (hs : s.Finite) (hs' : s.Nonempty) : condCount s s = 1 := by rw [condCount, cond_apply _ hs.measurableSet, Set.inter_self, ENNReal.inv_mul_cancel] Β· exact fun h => hs'.ne_empty <| Measure.empty_of_count_eq_zero h Β· exact (Measure.count_apply_lt_top.2 hs).ne #align probability_theory.cond_count_self ProbabilityTheory.condCount_self
Mathlib/Probability/CondCount.lean
110
115
theorem condCount_eq_one_of (hs : s.Finite) (hs' : s.Nonempty) (ht : s βŠ† t) : condCount s t = 1 := by
haveI := condCount_isProbabilityMeasure hs hs' refine eq_of_le_of_not_lt prob_le_one ?_ rw [not_lt, ← condCount_self hs hs'] exact measure_mono ht
1,395