Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
d1e6ff2
feat: integral of the binomial distribution
EtienneC30 Apr 2, 2026
fa5b4c1
wip
EtienneC30 Apr 2, 2026
bf05a43
feat: cardinality of subsets of a given cardinality
EtienneC30 Apr 2, 2026
46e0488
naming
EtienneC30 Apr 2, 2026
609eac9
Merge branch 'powersetncard' into binomial
EtienneC30 Apr 2, 2026
d705029
fix linter
EtienneC30 Apr 2, 2026
ba9d68f
feat: another version of the cardinality of the difference
EtienneC30 Apr 2, 2026
6c9794f
Merge branch 'ncard_diff' into binomial
EtienneC30 Apr 2, 2026
8266ae6
wip
EtienneC30 Apr 2, 2026
33a6e82
feat: lemmas related to setBernoulli
EtienneC30 Apr 2, 2026
8433256
Merge branch 'setBer' into binomial
EtienneC30 Apr 2, 2026
8094db3
wip
EtienneC30 Apr 2, 2026
1271cd4
feat: any set is pairwise disjoint under the singleton function
EtienneC30 Apr 2, 2026
daff212
Merge branch 'pd_singleton' into binomial
EtienneC30 Apr 2, 2026
7cd46f1
wip
EtienneC30 Apr 7, 2026
1330b7f
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Apr 7, 2026
d218f9c
cleanup
EtienneC30 Apr 7, 2026
fdd50af
move
EtienneC30 Apr 7, 2026
2c032a5
feat: mapping a finite sum of measures
EtienneC30 Apr 7, 2026
e51c08f
Merge branch 'map_sum' into binomial2
EtienneC30 Apr 7, 2026
5c6c767
deprecate PMF.binomial
EtienneC30 Apr 7, 2026
0db5b97
same
EtienneC30 Apr 7, 2026
a83ff5c
lint
EtienneC30 Apr 7, 2026
150012a
feat: define Bernoulli distribution
EtienneC30 Apr 7, 2026
3093c5c
feat: scalar multiplication of an `NNReal` against `1 : ENNReal`
EtienneC30 Apr 7, 2026
554f5be
fix
EtienneC30 Apr 7, 2026
57cf556
remove set_option
EtienneC30 Apr 7, 2026
0fd281b
Merge branch 'smul_one' into bernoulli
EtienneC30 Apr 7, 2026
f665b84
useless lemma
EtienneC30 Apr 7, 2026
1fa2e9b
mk_all
EtienneC30 Apr 7, 2026
5662363
fix
EtienneC30 Apr 7, 2026
b7982c6
Merge branch 'smul_one' into bernoulli
EtienneC30 Apr 7, 2026
45d3795
fix
EtienneC30 Apr 7, 2026
8c4511e
fix
EtienneC30 Apr 7, 2026
e243ade
fix
EtienneC30 Apr 7, 2026
e64006d
Merge branch 'bernoulli' into ber_bin
EtienneC30 Apr 7, 2026
5681f79
wip
EtienneC30 Apr 7, 2026
949158d
wip
EtienneC30 Apr 8, 2026
10e3e4d
wip
EtienneC30 Apr 8, 2026
ea88f5f
feat: a sum of independent Bernoulli random variables is a binomial r…
EtienneC30 Apr 8, 2026
71069a5
wip
EtienneC30 Apr 8, 2026
3877391
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Apr 8, 2026
a9d41ba
wip
EtienneC30 Apr 8, 2026
83e07dc
wip
EtienneC30 Apr 9, 2026
f9c8462
wip
EtienneC30 Apr 9, 2026
89f33f0
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Apr 30, 2026
26cea69
fix
EtienneC30 Apr 30, 2026
0d7989a
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 May 28, 2026
120932b
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 May 29, 2026
b95fade
min imports
EtienneC30 May 29, 2026
47c894b
fix
EtienneC30 May 29, 2026
b8468ef
wip
EtienneC30 May 29, 2026
fe2acce
wip
EtienneC30 May 29, 2026
e62fe08
wip
EtienneC30 May 29, 2026
6270a3a
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 May 29, 2026
0d0a1e6
better
EtienneC30 May 31, 2026
9c5c1c1
fix deprecations
EtienneC30 May 31, 2026
de5d631
cleanup
EtienneC30 May 31, 2026
5235651
imports
EtienneC30 May 31, 2026
1a9b5b8
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 May 31, 2026
d7ff49a
fix
EtienneC30 May 31, 2026
68a6490
Merge branch 'binomial2' into ber_bin
EtienneC30 May 31, 2026
59168e8
wip
EtienneC30 May 31, 2026
da7766a
feat: a random variable whose law is a dirac is ae constant
EtienneC30 May 31, 2026
777cf9e
Merge branch 'haslaw_ae' into ber_bin
EtienneC30 May 31, 2026
fbba8ce
wip
EtienneC30 May 31, 2026
15b0889
wip
EtienneC30 May 31, 2026
5c9f2dd
wip
EtienneC30 Jun 1, 2026
964b6da
review
EtienneC30 Jun 1, 2026
36c2dcc
Merge branch 'haslaw_ae' into ber_bin
EtienneC30 Jun 1, 2026
e9218d6
cleaned up
EtienneC30 Jun 1, 2026
eefb24f
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Jun 1, 2026
28a6c18
fix
EtienneC30 Jun 1, 2026
05e559e
fix simp linter
EtienneC30 Jun 1, 2026
fe609ae
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Jun 2, 2026
20816c9
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Jun 4, 2026
a93da53
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Jun 5, 2026
c0c0043
fix
EtienneC30 Jun 5, 2026
3209189
add simp lemmas
EtienneC30 Jun 6, 2026
463ca94
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Jun 6, 2026
202894b
Merge branch 'binomial2' into ber_bin
EtienneC30 Jun 6, 2026
8ed046f
wip
EtienneC30 Jun 6, 2026
4d2e39b
wip
EtienneC30 Jun 6, 2026
d26454c
move proof to setBernoulli
EtienneC30 Jun 6, 2026
1b83363
remove unnecessary lemmas
EtienneC30 Jun 6, 2026
4606525
Merge branch 'binomial2' into ber_bin
EtienneC30 Jun 6, 2026
527e247
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Jun 8, 2026
13b176e
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Jul 2, 2026
2705843
remove import
EtienneC30 Jul 3, 2026
e77ea07
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Aug 12, 2026
c3dcd85
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Aug 19, 2026
94beecf
fix
EtienneC30 Aug 19, 2026
3adc2cb
lint
EtienneC30 Aug 19, 2026
eb2a40b
feat: the Dirac measure and Measure.real
EtienneC30 Aug 20, 2026
e1b5f9c
Merge branch 'dirac-real' into ber_bin
EtienneC30 Aug 20, 2026
46273fd
chore: use bernoulliMeasure instead of ite
EtienneC30 Aug 20, 2026
32ec618
Merge branch 'ber-notation' into ber_bin
EtienneC30 Aug 20, 2026
1034c59
cleanup
EtienneC30 Aug 20, 2026
020270a
nit
EtienneC30 Aug 20, 2026
e7c4883
wip
EtienneC30 Aug 20, 2026
cde284c
wip
EtienneC30 Aug 20, 2026
8a3d137
wip
EtienneC30 Aug 21, 2026
8f90e65
done
EtienneC30 Aug 21, 2026
a7a1970
feat: lemmas about memLp
EtienneC30 Aug 21, 2026
3b4b02c
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Aug 21, 2026
56f0a81
Merge branch 'ber_bin' into var-bin
EtienneC30 Aug 21, 2026
2727dd8
clean
EtienneC30 Aug 21, 2026
65e1219
Merge branch 'lp-add-measure' into var-bin
EtienneC30 Aug 21, 2026
e16139b
ok
EtienneC30 Aug 21, 2026
e644f79
wip
EtienneC30 Aug 21, 2026
83ff758
done
EtienneC30 Aug 21, 2026
73de69d
Merge branch 'ber_bin' into var-bin
EtienneC30 Aug 21, 2026
79f0f68
fix
EtienneC30 Aug 21, 2026
81bf4e6
lint
EtienneC30 Aug 21, 2026
d19ad51
Merge branch 'ber_bin' into var-bin
EtienneC30 Aug 21, 2026
6e0999e
fix
EtienneC30 Aug 21, 2026
5f02e41
fix
EtienneC30 Aug 21, 2026
60568b4
Merge branch 'master' of https://github.com/leanprover-community/math…
EtienneC30 Aug 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Mathlib/Analysis/MeanInequalitiesPow.lean
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ theorem LpAddConst_zero : LpAddConst 0 = 1 := by
intro h
exact lt_irrefl _ h.1

theorem LpAddConst_ne_zero {p : ℝ≥0∞} : LpAddConst p ≠ 0 := by
rw [LpAddConst]
split_ifs <;> positivity

theorem LpAddConst_lt_top (p : ℝ≥0∞) : LpAddConst p < ∞ := by
rw [LpAddConst]
split_ifs with h
Expand Down
8 changes: 8 additions & 0 deletions Mathlib/MeasureTheory/Function/EssSup.lean
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ theorem essSup_congr_ae {f g : α → β} (hfg : f =ᵐ[μ] g) : essSup f μ = e
theorem essInf_congr_ae {f g : α → β} (hfg : f =ᵐ[μ] g) : essInf f μ = essInf g μ :=
@essSup_congr_ae α βᵒᵈ _ _ _ _ _ hfg

@[simp]
lemma essSup_dirac [MeasurableSingletonClass α] (a : α) : essSup f (Measure.dirac a) = f a := by
simp [essSup]

@[simp]
lemma essInf_dirac [MeasurableSingletonClass α] (a : α) : essInf f (Measure.dirac a) = f a := by
simp [essInf]

@[simp]
theorem essSup_const' [NeZero μ] (c : β) : essSup (fun _ : α => c) μ = c :=
limsup_const _
Expand Down
50 changes: 50 additions & 0 deletions Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public import Mathlib.MeasureTheory.Function.AEEqFun
public import Mathlib.MeasureTheory.Function.LpSeminorm.Defs
public import Mathlib.MeasureTheory.Function.SpecialFunctions.Basic

import Mathlib.Analysis.MeanInequalitiesPow
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Lemmas

/-!
# Basic theorems about ℒp space
-/
Expand Down Expand Up @@ -142,6 +145,17 @@ variable {ε : Type*} [TopologicalSpace ε] [ContinuousENorm ε]
@[simp] lemma memLp_measure_zero {f : α → ε} : MemLp f p (0 : Measure α) := by
simp [MemLp]

@[simp]
lemma memLp_dirac [MeasurableSingletonClass α] {a : α} {f : α → ε} (hf : ‖f a‖ₑ < ∞) :
MemLp f p (Measure.dirac a) := by
refine ⟨aestronglyMeasurable_dirac, ?_⟩
rw [eLpNorm]
split_ifs with hq hq'
· simp
· simpa
· simp [eLpNorm']
finiteness

end ContinuousENorm

end Zero
Expand Down Expand Up @@ -701,6 +715,10 @@ theorem MemLp.smul_measure {f : α → ε} {c : ℝ≥0∞} (hf : MemLp f p μ)
MemLp f p (c • μ) :=
hf.of_measure_le_smul hc le_rfl

theorem MemLp.smul_measure_nnreal {f : α → ε} {c : ℝ≥0} (hf : MemLp f p μ) :
MemLp f p (c • μ) :=
hf.of_measure_le_smul (by simp) le_rfl

variable {ε : Type*} [ENorm ε] in
theorem eLpNorm_one_add_measure (f : α → ε) (μ ν : Measure α) :
eLpNorm f 1 (μ + ν) = eLpNorm f 1 μ + eLpNorm f 1 ν := by
Expand Down Expand Up @@ -838,6 +856,38 @@ theorem eLpNorm_eq_zero_iff {f : α → ε} (hf : AEStronglyMeasurable f μ) (h0
rw [eLpNorm_eq_eLpNorm' h0 h_top]
exact eLpNorm'_eq_zero_iff (ENNReal.toReal_pos h0 h_top) hf

lemma eLpNormEssSup_add_measure {ε : Type*} [TopologicalSpace ε] [ContinuousENorm ε] {f : α → ε} :
eLpNormEssSup f (μ + ν) = max (eLpNormEssSup f μ) (eLpNormEssSup f ν) := by
refine le_antisymm (eLpNormEssSup_le_of_ae_enorm_bound ?_) ?_
· rw [ae_add_measure_iff]
constructor
· filter_upwards [enorm_ae_le_eLpNormEssSup f μ] with x hx
grw [hx, ← le_max_left]
· filter_upwards [enorm_ae_le_eLpNormEssSup f ν] with x hx
grw [hx, ← le_max_right]
· exact max_le_iff.2 ⟨eLpNormEssSup_mono_measure _ (.add_right .rfl _),
eLpNormEssSup_mono_measure _ (.add_right' .rfl _)⟩

lemma MemLp.add_measure (h1 : MemLp f p μ) (h2 : MemLp f p ν) : MemLp f p (μ + ν) := by
refine ⟨h1.aestronglyMeasurable.add_measure h2.aestronglyMeasurable, ?_⟩
rw [eLpNorm]
split_ifs with hp hp'
· simp
· rw [hp'] at h1 h2
grw [eLpNormEssSup_add_measure, max_le_add_of_nonneg (by simp) (by simp),
← eLpNorm_exponent_top, ← eLpNorm_exponent_top, h1.2, top_add]
exact h2.2.ne
· grw [eLpNorm', lintegral_add_measure, ENNReal.rpow_add_le_mul_rpow_add_rpow' _ _ (by simp),
← eLpNorm', ← eLpNorm', ← eLpNorm_eq_eLpNorm' hp hp', ← eLpNorm_eq_eLpNorm' hp hp', h1.2]
· simp
· exact h2.2.ne
· exact ENNReal.LpAddConst_ne_zero
· exact (ENNReal.LpAddConst_lt_top _).ne

lemma memLp_add_measure : MemLp f p (μ + ν) ↔ MemLp f p μ ∧ MemLp f p ν where
mp h := ⟨h.left_of_add_measure, h.right_of_add_measure⟩
mpr h := h.1.add_measure h.2

end ENormedAddMonoid

section MapMeasure
Expand Down
5 changes: 5 additions & 0 deletions Mathlib/MeasureTheory/Function/LpSeminorm/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def eLpNormEssSup (f : α → ε) (μ : Measure α) :=
lemma eLpNormEssSup_eq_essSup_enorm (f : α → ε) (μ : Measure α) :
eLpNormEssSup f μ = essSup (‖f ·‖ₑ) μ := rfl

@[simp]
lemma eLpNormEssSup_dirac [MeasurableSingletonClass α] (f : α → ε) (a : α) :
eLpNormEssSup f (Measure.dirac a) = ‖f a‖ₑ := by
simp [eLpNormEssSup]

/-- `ℒp` seminorm, equal to `0` for `p=0`, to `(∫ ‖f a‖^p ∂μ) ^ (1/p)` for `0 < p < ∞` and to
`essSup ‖f‖ μ` for `p = ∞`. -/
def eLpNorm {_ : MeasurableSpace α}
Expand Down
10 changes: 10 additions & 0 deletions Mathlib/MeasureTheory/Measure/Dirac.lean
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ theorem dirac_apply_of_mem {a : α} (h : a ∈ s) : dirac a s = 1 := by
rw [← dirac_apply' a MeasurableSet.univ]
exact measure_mono (subset_univ s)

@[simp]
theorem dirac_real_apply_of_mem {a : α} (h : a ∈ s) : (dirac a).real s = 1 := by
simp [measureReal_def, h]

@[simp]
theorem dirac_apply [MeasurableSingletonClass α] (a : α) (s : Set α) :
dirac a s = s.indicator 1 a := by
Expand All @@ -79,6 +83,12 @@ theorem dirac_apply [MeasurableSingletonClass α] (a : α) (s : Set α) :
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]

@[simp]
theorem dirac_real_apply [MeasurableSingletonClass α] (a : α) (s : Set α) :
(dirac a).real s = s.indicator 1 a := by
simp [measureReal_def, Set.indicator]
split_ifs <;> simp

@[simp] lemma dirac_ne_zero : dirac a ≠ 0 :=
fun h ↦ by simpa [h] using dirac_apply_of_mem (mem_univ a)

Expand Down
18 changes: 18 additions & 0 deletions Mathlib/Order/LiminfLimsup.lean
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ def limsSup (f : Filter α) : α :=
def limsInf (f : Filter α) : α :=
sSup { a | ∀ᶠ n in f, a ≤ n }

@[simp]
lemma limsSup_pure (a : α) : limsSup (pure a) = a := by
simp only [limsSup, eventually_pure]
exact csInf_Ici

@[simp]
lemma limsInf_pure (a : α) : limsInf (pure a) = a := by
simp only [limsInf, eventually_pure]
exact csSup_Iic

/-- The `limsup` of a function `u` along a filter `f` is the infimum of the `a` such that
the inequality `u x ≤ a` eventually holds for `f`. -/
def limsup (u : β → α) (f : Filter β) : α :=
Expand All @@ -83,6 +93,14 @@ section

variable {f : Filter β} {u : β → α} {p : β → Prop}

@[simp]
lemma limsup_pure (b : β) : limsup u (pure b) = u b := by
simp [limsup]

@[simp]
lemma liminf_pure (b : β) : liminf u (pure b) = u b := by
simp [liminf]

theorem limsup_eq : limsup u f = sInf { a | ∀ᶠ n in f, u n ≤ a } :=
rfl

Expand Down
73 changes: 70 additions & 3 deletions Mathlib/Probability/Distributions/Bernoulli.lean
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Authors: Etienne Marion, David Ledvinka
module

public import Mathlib.MeasureTheory.Integral.Bochner.Basic
public import Mathlib.Probability.HasLaw
public import Mathlib.Topology.UnitInterval

/-!
Expand Down Expand Up @@ -161,14 +162,28 @@ theorem map_bernoulliMeasure' (x y : X) {f : X → Y} (hf : Measurable f) (p : I
Ber(x, y, p).map f = bernoulliMeasure (f x) (f y) p := by
simp [bernoulliMeasure_def, Measure.map_add _ _ hf, Measure.map_smul, map_dirac' hf]

lemma eq_bernoulliMeasure {μ : Measure X}
(h1 : ∀ s, MeasurableSet s → x ∈ s → y ∈ s → μ s = 1)
(h2 : ∀ s, MeasurableSet s → x ∈ s → y ∉ s → μ s = toNNReal p)
(h3 : ∀ s, MeasurableSet s → x ∉ s → y ∈ s → μ s = toNNReal (σ p))
(h4 : ∀ s, MeasurableSet s → x ∉ s → y ∉ s → μ s = 0) :
μ = Ber(x, y, p) := by
ext s hs
by_cases hx : x ∈ s <;> by_cases hy : y ∈ s <;> simp_all

section Integral

variable {E : Type*} [NormedAddCommGroup E]

@[simp]
lemma memLp_bernoulliMeasure [MeasurableSingletonClass X] (x y : X) (p : I) (f : X → E) (q : ℝ≥0∞) :
MemLp f q Ber(x, y, p) := by
simp [bernoulliMeasure_def, memLp_add_measure, MemLp.smul_measure_nnreal]

@[simp]
lemma integrable_bernoulliMeasure [MeasurableSingletonClass X] (x y : X) (p : I) (f : X → E) :
Integrable f Ber(x, y, p) := by
simp [bernoulliMeasure_def, integrable_add_measure, integrable_dirac,
Integrable.smul_measure_nnreal]
Integrable f Ber(x, y, p) :=
memLp_one_iff_integrable.1 (memLp_bernoulliMeasure ..)

variable [NormedSpace ℝ E] [CompleteSpace E]

Expand All @@ -178,6 +193,58 @@ lemma integral_bernoulliMeasure [MeasurableSingletonClass X] (x y : X) (p : I) (
· simp [NNReal.smul_def]
all_goals exact (integrable_dirac (by simp)).smul_measure_nnreal

lemma integral_id_bernoulliMeasure : ∫ x : ℝ, x ∂Ber(1, 0, p) = p := by
simp [integral_bernoulliMeasure]

lemma variance_id_bernoulliMeasure : Var[id; Ber(1, 0, p)] = p * (1 - p) := by
rw [variance_eq_integral (by fun_prop)]
simp [integral_bernoulliMeasure]
ring

end Integral

section HasLaw

/-! ### Bernoulli random variables -/

variable {Ω : Type*} {mΩ : MeasurableSpace Ω} {P : Measure Ω}

lemma HasLaw.memLp_comp_bernoulliMeasure {E : Type*} [NormedAddCommGroup E]
[MeasurableSingletonClass X] {f : Ω → X} (g : X → E) (q : ℝ≥0∞) (hf : HasLaw f Ber(x, y, p) P) :
MemLp (g ∘ f) q P :=
hf.memLp_comp (by simp)

lemma HasLaw.memLp_bernoulliMeasure [NormedAddCommGroup X] [MeasurableSingletonClass X] {f : Ω → X}
(q : ℝ≥0∞) (hf : HasLaw f Ber(x, y, p) P) :
MemLp f q P := hf.memLp_comp_bernoulliMeasure id q

lemma HasLaw.integrable_comp_bernoulliMeasure {E : Type*} [NormedAddCommGroup E]
[MeasurableSingletonClass X] {f : Ω → X} (g : X → E) (hf : HasLaw f Ber(x, y, p) P) :
Integrable (g ∘ f) P :=
hf.integrable_comp (by simp)

lemma HasLaw.integrable_bernoulliMeasure [NormedAddCommGroup X] [MeasurableSingletonClass X]
{f : Ω → X} (hf : HasLaw f Ber(x, y, p) P) :
Integrable f P := hf.integrable_comp_bernoulliMeasure id

/-- The constant indicator of a set follows a Bernoulli distribution. -/
theorem hasLaw_indicator_bernoulliMeasure [IsProbabilityMeasure P] {M : Type*} [Zero M]
[MeasurableSpace M] (c : M) {s : Set Ω} (hs : NullMeasurableSet s P) :
HasLaw (s.indicator (fun _ ↦ c)) Ber(c, 0, ⟨P.real s, by simp⟩) P := by
classical
have h : AEMeasurable (s.indicator fun _ ↦ c) P := aemeasurable_const.indicator₀ hs
refine ⟨h, eq_bernoulliMeasure ?_ ?_ ?_ ?_⟩
all_goals
intro t ht h1 h2
simp_all [map_apply_of_aemeasurable h ht, Set.indicator_const_preimage_eq_union,
measure_compl₀ hs, ENNReal.coe_nnreal_eq, ENNReal.ofReal_sub]

/-- The constant indicator of a set follows a Bernoulli distribution. -/
theorem hasLaw_indicator_one_bernoulliMeasure [IsProbabilityMeasure P] {M : Type*} [Zero M] [One M]
[MeasurableSpace M] {s : Set Ω} (hs : NullMeasurableSet s P) :
HasLaw (s.indicator (1 : Ω → M)) Ber(1, 0, ⟨P.real s, by simp⟩) P :=
hasLaw_indicator_bernoulliMeasure 1 hs

end HasLaw

end ProbabilityTheory
Loading
Loading