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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.