statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
strong_law_aux7 : ∀ᵐ ω, tendsto (λ (n : ℕ), (∑ i in range n, X i ω) / n) at_top (𝓝 (𝔼[X 0]))
begin obtain ⟨c, -, cone, clim⟩ : ∃ (c : ℕ → ℝ), strict_anti c ∧ (∀ (n : ℕ), 1 < c n) ∧ tendsto c at_top (𝓝 1) := exists_seq_strict_anti_tendsto (1 : ℝ), have : ∀ k, ∀ᵐ ω, tendsto (λ (n : ℕ), (∑ i in range ⌊c k ^ n⌋₊, X i ω) / ⌊c k ^ n⌋₊) at_top (𝓝 (𝔼[X 0])) := λ k, strong_law_aux6 X hint hindep hi...
lemma
strong_law_aux7
probability
src/probability/strong_law.lean
[ "probability.ident_distrib", "measure_theory.integral.interval_integral", "analysis.specific_limits.floor_pow", "analysis.p_series", "analysis.asymptotics.specific_asymptotics" ]
[ "exists_seq_strict_anti_tendsto", "strict_anti", "strong_law_aux6", "tendsto_div_of_monotone_of_tendsto_div_floor_pow" ]
`Xᵢ` satisfies the strong law of large numbers along all integers. This follows from the corresponding fact along the sequences `c^n`, and the fact that any integer can be sandwiched between `c^n` and `c^(n+1)` with comparably small error if `c` is close enough to `1` (which is formalized in `tendsto_div_of_monotone_of...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strong_law_ae (X : ℕ → Ω → ℝ) (hint : integrable (X 0)) (hindep : pairwise (λ i j, indep_fun (X i) (X j))) (hident : ∀ i, ident_distrib (X i) (X 0)) : ∀ᵐ ω, tendsto (λ (n : ℕ), (∑ i in range n, X i ω) / n) at_top (𝓝 (𝔼[X 0]))
begin let pos : ℝ → ℝ := (λ x, max x 0), let neg : ℝ → ℝ := (λ x, max (-x) 0), have posm : measurable pos := measurable_id'.max measurable_const, have negm : measurable neg := measurable_id'.neg.max measurable_const, have A : ∀ᵐ ω, tendsto (λ (n : ℕ), (∑ i in range n, (pos ∘ (X i)) ω) / n) at_top (𝓝 (𝔼[...
theorem
strong_law_ae
probability
src/probability/strong_law.lean
[ "probability.ident_distrib", "measure_theory.integral.interval_integral", "analysis.specific_limits.floor_pow", "analysis.p_series", "analysis.asymptotics.specific_asymptotics" ]
[ "measurable", "measurable_const", "pairwise", "strong_law_aux7", "sub_div" ]
*Strong law of large numbers*, almost sure version: if `X n` is a sequence of independent identically distributed integrable real-valued random variables, then `∑ i in range n, X i / n` converges almost surely to `𝔼[X 0]`. We give here the strong version, due to Etemadi, that only requires pairwise independence.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strong_law_Lp {p : ℝ≥0∞} (hp : 1 ≤ p) (hp' : p ≠ ∞) (X : ℕ → Ω → ℝ) (hℒp : mem_ℒp (X 0) p) (hindep : pairwise (λ i j, indep_fun (X i) (X j))) (hident : ∀ i, ident_distrib (X i) (X 0)) : tendsto (λ n, snorm (λ ω, (∑ i in range n, X i ω) / n - 𝔼[X 0]) p ℙ) at_top (𝓝 0)
begin have hmeas : ∀ i, ae_strongly_measurable (X i) ℙ := λ i, (hident i).ae_strongly_measurable_iff.2 hℒp.1, have hint : integrable (X 0) ℙ := hℒp.integrable hp, have havg : ∀ n, ae_strongly_measurable (λ ω, (∑ i in range n, X i ω) / n) ℙ, { intro n, simp_rw div_eq_mul_inv, exact ae_strongly_measur...
theorem
strong_law_Lp
probability
src/probability/strong_law.lean
[ "probability.ident_distrib", "measure_theory.integral.interval_integral", "analysis.specific_limits.floor_pow", "analysis.p_series", "analysis.asymptotics.specific_asymptotics" ]
[ "div_eq_mul_inv", "pairwise", "pi.coe_nat", "pi.div_apply", "strong_law_ae" ]
*Strong law of large numbers*, Lᵖ version: if `X n` is a sequence of independent identically distributed real-valued random variables in Lᵖ, then `∑ i in range n, X i / n` converges in Lᵖ to `𝔼[X 0]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
evariance {Ω : Type*} {m : measurable_space Ω} (X : Ω → ℝ) (μ : measure Ω) : ℝ≥0∞
∫⁻ ω, ‖X ω - μ[X]‖₊^2 ∂μ
def
probability_theory.evariance
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "measurable_space" ]
The `ℝ≥0∞`-valued variance of a real-valued random variable defined as the Lebesgue integral of `(X - 𝔼[X])^2`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
variance {Ω : Type*} {m : measurable_space Ω} (X : Ω → ℝ) (μ : measure Ω) : ℝ
(evariance X μ).to_real
def
probability_theory.variance
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "measurable_space" ]
The `ℝ`-valued variance of a real-valued random variable defined by applying `ennreal.to_real` to `evariance`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
_root_.measure_theory.mem_ℒp.evariance_lt_top [is_finite_measure μ] (hX : mem_ℒp X 2 μ) : evariance X μ < ∞
begin have := ennreal.pow_lt_top (hX.sub $ mem_ℒp_const $ μ[X]).2 2, rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ennreal.two_ne_top, ← ennreal.rpow_two] at this, simp only [pi.sub_apply, ennreal.to_real_bit0, ennreal.one_to_real, one_div] at this, rw [← ennreal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 ...
lemma
measure_theory.mem_ℒp.evariance_lt_top
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.one_to_real", "ennreal.pow_lt_top", "ennreal.rpow_mul", "ennreal.rpow_one", "ennreal.rpow_two", "ennreal.to_real_bit0", "ennreal.two_ne_top", "inv_mul_cancel", "one_div", "two_ne_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
evariance_eq_top [is_finite_measure μ] (hXm : ae_strongly_measurable X μ) (hX : ¬ mem_ℒp X 2 μ) : evariance X μ = ∞
begin by_contra h, rw [← ne.def, ← lt_top_iff_ne_top] at h, have : mem_ℒp (λ ω, X ω - μ[X]) 2 μ, { refine ⟨hXm.sub ae_strongly_measurable_const, _⟩, rw snorm_eq_lintegral_rpow_nnnorm two_ne_zero ennreal.two_ne_top, simp only [ennreal.to_real_bit0, ennreal.one_to_real, ennreal.rpow_two, ne.def], exac...
lemma
probability_theory.evariance_eq_top
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "by_contra", "ennreal.one_to_real", "ennreal.rpow_lt_top_of_nonneg", "ennreal.rpow_two", "ennreal.to_real_bit0", "ennreal.two_ne_top", "lt_top_iff_ne_top", "two_ne_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
evariance_lt_top_iff_mem_ℒp [is_finite_measure μ] (hX : ae_strongly_measurable X μ) : evariance X μ < ∞ ↔ mem_ℒp X 2 μ
begin refine ⟨_, measure_theory.mem_ℒp.evariance_lt_top⟩, contrapose, rw [not_lt, top_le_iff], exact evariance_eq_top hX end
lemma
probability_theory.evariance_lt_top_iff_mem_ℒp
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "top_le_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
_root_.measure_theory.mem_ℒp.of_real_variance_eq [is_finite_measure μ] (hX : mem_ℒp X 2 μ) : ennreal.of_real (variance X μ) = evariance X μ
by { rw [variance, ennreal.of_real_to_real], exact hX.evariance_lt_top.ne, }
lemma
measure_theory.mem_ℒp.of_real_variance_eq
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.of_real", "ennreal.of_real_to_real" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
evariance_eq_lintegral_of_real (X : Ω → ℝ) (μ : measure Ω) : evariance X μ = ∫⁻ ω, ennreal.of_real ((X ω - μ[X])^2) ∂μ
begin rw evariance, congr, ext1 ω, rw [pow_two, ← ennreal.coe_mul, ← nnnorm_mul, ← pow_two], congr, exact (real.to_nnreal_eq_nnnorm_of_nonneg $ sq_nonneg _).symm, end
lemma
probability_theory.evariance_eq_lintegral_of_real
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.coe_mul", "ennreal.of_real", "nnnorm_mul", "pow_two", "real.to_nnreal_eq_nnnorm_of_nonneg", "sq_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
_root_.measure_theory.mem_ℒp.variance_eq_of_integral_eq_zero (hX : mem_ℒp X 2 μ) (hXint : μ[X] = 0) : variance X μ = μ[X^2]
begin rw [variance, evariance_eq_lintegral_of_real, ← of_real_integral_eq_lintegral_of_real, ennreal.to_real_of_real]; simp_rw [hXint, sub_zero], { refl }, { exact integral_nonneg (λ ω, pow_two_nonneg _) }, { convert hX.integrable_norm_rpow two_ne_zero ennreal.two_ne_top, ext ω, simp only [pi.sub_...
lemma
measure_theory.mem_ℒp.variance_eq_of_integral_eq_zero
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.one_to_real", "ennreal.to_real_bit0", "ennreal.to_real_of_real", "ennreal.two_ne_top", "pow_bit0_abs", "real.norm_eq_abs", "real.rpow_two", "two_ne_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
_root_.measure_theory.mem_ℒp.variance_eq [is_finite_measure μ] (hX : mem_ℒp X 2 μ) : variance X μ = μ[(X - (λ ω, μ[X]))^2]
begin rw [variance, evariance_eq_lintegral_of_real, ← of_real_integral_eq_lintegral_of_real, ennreal.to_real_of_real], { refl }, { exact integral_nonneg (λ ω, pow_two_nonneg _) }, { convert (hX.sub $ mem_ℒp_const (μ[X])).integrable_norm_rpow two_ne_zero ennreal.two_ne_top, ext ω, simp only [pi...
lemma
measure_theory.mem_ℒp.variance_eq
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.one_to_real", "ennreal.to_real_bit0", "ennreal.to_real_of_real", "ennreal.two_ne_top", "pow_bit0_abs", "real.norm_eq_abs", "real.rpow_two", "two_ne_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
evariance_zero : evariance 0 μ = 0
by simp [evariance]
lemma
probability_theory.evariance_zero
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
evariance_eq_zero_iff (hX : ae_measurable X μ) : evariance X μ = 0 ↔ X =ᵐ[μ] λ ω, μ[X]
begin rw [evariance, lintegral_eq_zero_iff'], split; intro hX; filter_upwards [hX] with ω hω, { simp only [pi.zero_apply, pow_eq_zero_iff, nat.succ_pos', ennreal.coe_eq_zero, nnnorm_eq_zero, sub_eq_zero] at hω, exact hω }, { rw hω, simp }, { measurability } end
lemma
probability_theory.evariance_eq_zero_iff
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ae_measurable", "ennreal.coe_eq_zero", "measurability", "nat.succ_pos'", "pow_eq_zero_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
evariance_mul (c : ℝ) (X : Ω → ℝ) (μ : measure Ω) : evariance (λ ω, c * X ω) μ = ennreal.of_real (c^2) * evariance X μ
begin rw [evariance, evariance, ← lintegral_const_mul' _ _ ennreal.of_real_lt_top.ne], congr, ext1 ω, rw [ennreal.of_real, ← ennreal.coe_pow, ← ennreal.coe_pow, ← ennreal.coe_mul], congr, rw [← sq_abs, ← real.rpow_two, real.to_nnreal_rpow_of_nonneg (abs_nonneg _), nnreal.rpow_two, ← mul_pow, real.to_nnr...
lemma
probability_theory.evariance_mul
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "abs_nonneg", "ennreal.coe_mul", "ennreal.coe_pow", "ennreal.of_real", "integral_smul_const", "mul_comm", "mul_pow", "nnnorm_norm", "nnreal.rpow_two", "norm_abs_eq_norm", "norm_mul", "real.rpow_two", "real.to_nnreal_mul_nnnorm", "real.to_nnreal_rpow_of_nonneg", "smul_eq_mul", "sq_abs" ...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
variance_zero (μ : measure Ω) : variance 0 μ = 0
by simp only [variance, evariance_zero, ennreal.zero_to_real]
lemma
probability_theory.variance_zero
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.zero_to_real" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
variance_nonneg (X : Ω → ℝ) (μ : measure Ω) : 0 ≤ variance X μ
ennreal.to_real_nonneg
lemma
probability_theory.variance_nonneg
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.to_real_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
variance_mul (c : ℝ) (X : Ω → ℝ) (μ : measure Ω) : variance (λ ω, c * X ω) μ = c^2 * variance X μ
begin rw [variance, evariance_mul, ennreal.to_real_mul, ennreal.to_real_of_real (sq_nonneg _)], refl, end
lemma
probability_theory.variance_mul
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.to_real_mul", "ennreal.to_real_of_real", "sq_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
variance_smul (c : ℝ) (X : Ω → ℝ) (μ : measure Ω) : variance (c • X) μ = c^2 * variance X μ
variance_mul c X μ
lemma
probability_theory.variance_smul
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
variance_smul' {A : Type*} [comm_semiring A] [algebra A ℝ] (c : A) (X : Ω → ℝ) (μ : measure Ω) : variance (c • X) μ = c^2 • variance X μ
begin convert variance_smul (algebra_map A ℝ c) X μ, { ext1 x, simp only [algebra_map_smul], }, { simp only [algebra.smul_def, map_pow], } end
lemma
probability_theory.variance_smul'
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "algebra", "algebra.smul_def", "algebra_map", "algebra_map_smul", "comm_semiring", "map_pow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
variance_def' [is_probability_measure (ℙ : measure Ω)] {X : Ω → ℝ} (hX : mem_ℒp X 2) : Var[X] = 𝔼[X^2] - 𝔼[X]^2
begin rw [hX.variance_eq, sub_sq', integral_sub', integral_add'], rotate, { exact hX.integrable_sq }, { convert integrable_const (𝔼[X] ^ 2), apply_instance }, { apply hX.integrable_sq.add, convert integrable_const (𝔼[X] ^ 2), apply_instance }, { exact ((hX.integrable one_le_two).const_mul 2).mul...
lemma
probability_theory.variance_def'
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "algebra.id.smul_eq_mul", "ennreal.one_to_real", "one_le_two", "one_mul", "pi.bit0_apply", "pi.mul_apply", "pi.one_apply", "pi.pow_apply", "ring", "sub_sq'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
variance_le_expectation_sq [is_probability_measure (ℙ : measure Ω)] {X : Ω → ℝ} (hm : ae_strongly_measurable X ℙ) : Var[X] ≤ 𝔼[X^2]
begin by_cases hX : mem_ℒp X 2, { rw variance_def' hX, simp only [sq_nonneg, sub_le_self_iff] }, rw [variance, evariance_eq_lintegral_of_real, ← integral_eq_lintegral_of_nonneg_ae], by_cases hint : integrable X, swap, { simp only [integral_undef hint, pi.pow_apply, pi.sub_apply, sub_zero] }, { rw integr...
lemma
probability_theory.variance_le_expectation_sq
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ae_measurable.pow_const", "pi.pow_apply", "sq_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
evariance_def' [is_probability_measure (ℙ : measure Ω)] {X : Ω → ℝ} (hX : ae_strongly_measurable X ℙ) : eVar[X] = (∫⁻ ω, ‖X ω‖₊^2) - ennreal.of_real (𝔼[X]^2)
begin by_cases hℒ : mem_ℒp X 2, { rw [← hℒ.of_real_variance_eq, variance_def' hℒ, ennreal.of_real_sub _ (sq_nonneg _)], congr, simp_rw ← ennreal.coe_pow, rw lintegral_coe_eq_integral, { congr' 2 with ω, simp only [pi.pow_apply, nnreal.coe_pow, coe_nnnorm, real.norm_eq_abs, pow_bit0_abs] }, ...
lemma
probability_theory.evariance_def'
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "ennreal.coe_pow", "ennreal.of_real", "ennreal.of_real_sub", "ennreal.one_to_real", "ennreal.rpow_eq_top_iff", "ennreal.rpow_two", "ennreal.sub_eq_top_iff", "ennreal.to_real_bit0", "ennreal.two_ne_top", "inv_lt_zero", "inv_pos", "nnreal.coe_pow", "not_and", "not_and_distrib", "one_div", ...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
meas_ge_le_evariance_div_sq {X : Ω → ℝ} (hX : ae_strongly_measurable X ℙ) {c : ℝ≥0} (hc : c ≠ 0) : ℙ {ω | ↑c ≤ |X ω - 𝔼[X]|} ≤ eVar[X] / c ^ 2
begin have A : (c : ℝ≥0∞) ≠ 0, { rwa [ne.def, ennreal.coe_eq_zero] }, have B : ae_strongly_measurable (λ (ω : Ω), 𝔼[X]) ℙ := ae_strongly_measurable_const, convert meas_ge_le_mul_pow_snorm ℙ two_ne_zero ennreal.two_ne_top (hX.sub B) A, { ext ω, simp only [pi.sub_apply, ennreal.coe_le_coe, ← real.norm_eq_abs...
theorem
probability_theory.meas_ge_le_evariance_div_sq
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "div_eq_mul_inv", "ennreal.coe_eq_zero", "ennreal.coe_le_coe", "ennreal.inv_pow", "ennreal.of_real_coe_nnreal", "ennreal.one_to_real", "ennreal.rpow_mul", "ennreal.rpow_one", "ennreal.rpow_two", "ennreal.to_real_bit0", "ennreal.two_ne_top", "inv_mul_cancel", "mul_comm", "nnreal.coe_le_coe"...
*Chebyshev's inequality* for `ℝ≥0∞`-valued variance.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
meas_ge_le_variance_div_sq [is_finite_measure (ℙ : measure Ω)] {X : Ω → ℝ} (hX : mem_ℒp X 2) {c : ℝ} (hc : 0 < c) : ℙ {ω | c ≤ |X ω - 𝔼[X]|} ≤ ennreal.of_real (Var[X] / c ^ 2)
begin rw [ennreal.of_real_div_of_pos (sq_pos_of_ne_zero _ hc.ne.symm), hX.of_real_variance_eq], convert @meas_ge_le_evariance_div_sq _ _ _ hX.1 (c.to_nnreal) (by simp [hc]), { simp only [real.coe_to_nnreal', max_le_iff, abs_nonneg, and_true] }, { rw ennreal.of_real_pow hc.le, refl } end
theorem
probability_theory.meas_ge_le_variance_div_sq
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "abs_nonneg", "ennreal.of_real", "ennreal.of_real_div_of_pos", "ennreal.of_real_pow", "max_le_iff", "real.coe_to_nnreal'", "sq_pos_of_ne_zero" ]
*Chebyshev's inequality* : one can control the deviation probability of a real random variable from its expectation in terms of the variance.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_fun.variance_add [is_probability_measure (ℙ : measure Ω)] {X Y : Ω → ℝ} (hX : mem_ℒp X 2) (hY : mem_ℒp Y 2) (h : indep_fun X Y) : Var[X + Y] = Var[X] + Var[Y]
calc Var[X + Y] = 𝔼[λ a, (X a)^2 + (Y a)^2 + 2 * X a * Y a] - 𝔼[X+Y]^2 : by simp [variance_def' (hX.add hY), add_sq'] ... = (𝔼[X^2] + 𝔼[Y^2] + 2 * 𝔼[X * Y]) - (𝔼[X] + 𝔼[Y])^2 : begin simp only [pi.add_apply, pi.pow_apply, pi.mul_apply, mul_assoc], rw [integral_add, integral_add, integral_add, integral_mul_...
theorem
probability_theory.indep_fun.variance_add
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "add_sq'", "mul_assoc", "one_le_two", "pi.mul_apply", "pi.pow_apply", "ring" ]
The variance of the sum of two independent random variables is the sum of the variances.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_fun.variance_sum [is_probability_measure (ℙ : measure Ω)] {ι : Type*} {X : ι → Ω → ℝ} {s : finset ι} (hs : ∀ i ∈ s, mem_ℒp (X i) 2) (h : set.pairwise ↑s (λ i j, indep_fun (X i) (X j))) : Var[∑ i in s, X i] = ∑ i in s, Var[X i]
begin classical, induction s using finset.induction_on with k s ks IH, { simp only [finset.sum_empty, variance_zero] }, rw [variance_def' (mem_ℒp_finset_sum' _ hs), sum_insert ks, sum_insert ks], simp only [add_sq'], calc 𝔼[X k ^ 2 + (∑ i in s, X i) ^ 2 + 2 * X k * ∑ i in s, X i] - 𝔼[X k + ∑ i in s, X i] ...
theorem
probability_theory.indep_fun.variance_sum
probability
src/probability/variance.lean
[ "probability.notation", "probability.integration", "measure_theory.function.l2_space" ]
[ "add_sq'", "finset", "finset.induction_on", "mul_assoc", "one_le_two", "pi.bit0_apply", "pi.mul_apply", "pi.one_apply", "ring", "set.pairwise", "set.subset_insert" ]
The variance of a finite sum of pairwise independent random variables is the sum of the variances.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_sets [measurable_space Ω] (π : ι → set (set Ω)) (μ : measure Ω . volume_tac) : Prop
∀ (s : finset ι) {f : ι → set Ω} (H : ∀ i, i ∈ s → f i ∈ π i), μ (⋂ i ∈ s, f i) = ∏ i in s, μ (f i)
def
probability_theory.Indep_sets
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "finset", "measurable_space" ]
A family of sets of sets `π : ι → set (set Ω)` is independent with respect to a measure `μ` if for any finite set of indices `s = {i_1, ..., i_n}`, for any sets `f i_1 ∈ π i_1, ..., f i_n ∈ π i_n`, then `μ (⋂ i in s, f i) = ∏ i in s, μ (f i) `. It will be used for families of pi_systems.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets [measurable_space Ω] (s1 s2 : set (set Ω)) (μ : measure Ω . volume_tac) : Prop
∀ t1 t2 : set Ω, t1 ∈ s1 → t2 ∈ s2 → μ (t1 ∩ t2) = μ t1 * μ t2
def
probability_theory.indep_sets
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
Two sets of sets `s₁, s₂` are independent with respect to a measure `μ` if for any sets `t₁ ∈ p₁, t₂ ∈ s₂`, then `μ (t₁ ∩ t₂) = μ (t₁) * μ (t₂)`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep (m : ι → measurable_space Ω) [measurable_space Ω] (μ : measure Ω . volume_tac) : Prop
Indep_sets (λ x, {s | measurable_set[m x] s}) μ
def
probability_theory.Indep
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_space" ]
A family of measurable space structures (i.e. of σ-algebras) is independent with respect to a measure `μ` (typically defined on a finer σ-algebra) if the family of sets of measurable sets they define is independent. `m : ι → measurable_space Ω` is independent with respect to measure `μ` if for any finite set of indices...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep (m₁ m₂ : measurable_space Ω) [measurable_space Ω] (μ : measure Ω . volume_tac) : Prop
indep_sets {s | measurable_set[m₁] s} {s | measurable_set[m₂] s} μ
def
probability_theory.indep
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_space" ]
Two measurable space structures (or σ-algebras) `m₁, m₂` are independent with respect to a measure `μ` (defined on a third σ-algebra) if for any sets `t₁ ∈ m₁, t₂ ∈ m₂`, `μ (t₁ ∩ t₂) = μ (t₁) * μ (t₂)`
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_set [measurable_space Ω] (s : ι → set Ω) (μ : measure Ω . volume_tac) : Prop
Indep (λ i, generate_from {s i}) μ
def
probability_theory.Indep_set
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
A family of sets is independent if the family of measurable space structures they generate is independent. For a set `s`, the generated measurable space has measurable sets `∅, s, sᶜ, univ`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_set [measurable_space Ω] (s t : set Ω) (μ : measure Ω . volume_tac) : Prop
indep (generate_from {s}) (generate_from {t}) μ
def
probability_theory.indep_set
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
Two sets are independent if the two measurable space structures they generate are independent. For a set `s`, the generated measurable space structure has measurable sets `∅, s, sᶜ, univ`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_fun [measurable_space Ω] {β : ι → Type*} (m : Π (x : ι), measurable_space (β x)) (f : Π (x : ι), Ω → β x) (μ : measure Ω . volume_tac) : Prop
Indep (λ x, measurable_space.comap (f x) (m x)) μ
def
probability_theory.Indep_fun
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "measurable_space.comap" ]
A family of functions defined on the same space `Ω` and taking values in possibly different spaces, each with a measurable space structure, is independent if the family of measurable space structures they generate on `Ω` is independent. For a function `g` with codomain having measurable space structure `m`, the generat...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_fun {β γ} [measurable_space Ω] [mβ : measurable_space β] [mγ : measurable_space γ] (f : Ω → β) (g : Ω → γ) (μ : measure Ω . volume_tac) : Prop
indep (measurable_space.comap f mβ) (measurable_space.comap g mγ) μ
def
probability_theory.indep_fun
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "measurable_space.comap" ]
Two functions are independent if the two measurable space structures they generate are independent. For a function `f` with codomain having measurable space structure `m`, the generated measurable space structure is `measurable_space.comap f m`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.symm {s₁ s₂ : set (set Ω)} [measurable_space Ω] {μ : measure Ω} (h : indep_sets s₁ s₂ μ) : indep_sets s₂ s₁ μ
by { intros t1 t2 ht1 ht2, rw [set.inter_comm, mul_comm], exact h t2 t1 ht2 ht1, }
lemma
probability_theory.indep_sets.symm
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "mul_comm", "set.inter_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep.symm {m₁ m₂ : measurable_space Ω} [measurable_space Ω] {μ : measure Ω} (h : indep m₁ m₂ μ) : indep m₂ m₁ μ
indep_sets.symm h
lemma
probability_theory.indep.symm
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_bot_right (m' : measurable_space Ω) {m : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] : indep m' ⊥ μ
begin intros s t hs ht, rw [set.mem_set_of_eq, measurable_space.measurable_set_bot_iff] at ht, cases ht, { rw [ht, set.inter_empty, measure_empty, mul_zero], }, { rw [ht, set.inter_univ, measure_univ, mul_one], }, end
lemma
probability_theory.indep_bot_right
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "measurable_space.measurable_set_bot_iff", "mul_one", "mul_zero", "set.inter_empty", "set.inter_univ" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_bot_left (m' : measurable_space Ω) {m : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] : indep ⊥ m' μ
(indep_bot_right m').symm
lemma
probability_theory.indep_bot_left
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_set_empty_right {m : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] (s : set Ω) : indep_set s ∅ μ
by { simp only [indep_set, generate_from_singleton_empty], exact indep_bot_right _, }
lemma
probability_theory.indep_set_empty_right
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_set_empty_left {m : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] (s : set Ω) : indep_set ∅ s μ
(indep_set_empty_right s).symm
lemma
probability_theory.indep_set_empty_left
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets_of_indep_sets_of_le_left {s₁ s₂ s₃: set (set Ω)} [measurable_space Ω] {μ : measure Ω} (h_indep : indep_sets s₁ s₂ μ) (h31 : s₃ ⊆ s₁) : indep_sets s₃ s₂ μ
λ t1 t2 ht1 ht2, h_indep t1 t2 (set.mem_of_subset_of_mem h31 ht1) ht2
lemma
probability_theory.indep_sets_of_indep_sets_of_le_left
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "set.mem_of_subset_of_mem" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets_of_indep_sets_of_le_right {s₁ s₂ s₃: set (set Ω)} [measurable_space Ω] {μ : measure Ω} (h_indep : indep_sets s₁ s₂ μ) (h32 : s₃ ⊆ s₂) : indep_sets s₁ s₃ μ
λ t1 t2 ht1 ht2, h_indep t1 t2 ht1 (set.mem_of_subset_of_mem h32 ht2)
lemma
probability_theory.indep_sets_of_indep_sets_of_le_right
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "set.mem_of_subset_of_mem" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_of_indep_of_le_left {m₁ m₂ m₃: measurable_space Ω} [measurable_space Ω] {μ : measure Ω} (h_indep : indep m₁ m₂ μ) (h31 : m₃ ≤ m₁) : indep m₃ m₂ μ
λ t1 t2 ht1 ht2, h_indep t1 t2 (h31 _ ht1) ht2
lemma
probability_theory.indep_of_indep_of_le_left
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_of_indep_of_le_right {m₁ m₂ m₃: measurable_space Ω} [measurable_space Ω] {μ : measure Ω} (h_indep : indep m₁ m₂ μ) (h32 : m₃ ≤ m₂) : indep m₁ m₃ μ
λ t1 t2 ht1 ht2, h_indep t1 t2 ht1 (h32 _ ht2)
lemma
probability_theory.indep_of_indep_of_le_right
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.union [measurable_space Ω] {s₁ s₂ s' : set (set Ω)} {μ : measure Ω} (h₁ : indep_sets s₁ s' μ) (h₂ : indep_sets s₂ s' μ) : indep_sets (s₁ ∪ s₂) s' μ
begin intros t1 t2 ht1 ht2, cases (set.mem_union _ _ _).mp ht1 with ht1₁ ht1₂, { exact h₁ t1 t2 ht1₁ ht2, }, { exact h₂ t1 t2 ht1₂ ht2, }, end
lemma
probability_theory.indep_sets.union
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "set.mem_union" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.union_iff [measurable_space Ω] {s₁ s₂ s' : set (set Ω)} {μ : measure Ω} : indep_sets (s₁ ∪ s₂) s' μ ↔ indep_sets s₁ s' μ ∧ indep_sets s₂ s' μ
⟨λ h, ⟨indep_sets_of_indep_sets_of_le_left h (set.subset_union_left s₁ s₂), indep_sets_of_indep_sets_of_le_left h (set.subset_union_right s₁ s₂)⟩, λ h, indep_sets.union h.left h.right⟩
lemma
probability_theory.indep_sets.union_iff
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "set.subset_union_left", "set.subset_union_right" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.Union [measurable_space Ω] {s : ι → set (set Ω)} {s' : set (set Ω)} {μ : measure Ω} (hyp : ∀ n, indep_sets (s n) s' μ) : indep_sets (⋃ n, s n) s' μ
begin intros t1 t2 ht1 ht2, rw set.mem_Union at ht1, cases ht1 with n ht1, exact hyp n t1 t2 ht1 ht2, end
lemma
probability_theory.indep_sets.Union
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "set.mem_Union" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.bUnion [measurable_space Ω] {s : ι → set (set Ω)} {s' : set (set Ω)} {μ : measure Ω} {u : set ι} (hyp : ∀ n ∈ u, indep_sets (s n) s' μ) : indep_sets (⋃ n ∈ u, s n) s' μ
begin intros t1 t2 ht1 ht2, simp_rw set.mem_Union at ht1, rcases ht1 with ⟨n, hpn, ht1⟩, exact hyp n hpn t1 t2 ht1 ht2, end
lemma
probability_theory.indep_sets.bUnion
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "set.mem_Union" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.inter [measurable_space Ω] {s₁ s' : set (set Ω)} (s₂ : set (set Ω)) {μ : measure Ω} (h₁ : indep_sets s₁ s' μ) : indep_sets (s₁ ∩ s₂) s' μ
λ t1 t2 ht1 ht2, h₁ t1 t2 ((set.mem_inter_iff _ _ _).mp ht1).left ht2
lemma
probability_theory.indep_sets.inter
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "set.mem_inter_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.Inter [measurable_space Ω] {s : ι → set (set Ω)} {s' : set (set Ω)} {μ : measure Ω} (h : ∃ n, indep_sets (s n) s' μ) : indep_sets (⋂ n, s n) s' μ
by {intros t1 t2 ht1 ht2, cases h with n h, exact h t1 t2 (set.mem_Inter.mp ht1 n) ht2 }
lemma
probability_theory.indep_sets.Inter
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.bInter [measurable_space Ω] {s : ι → set (set Ω)} {s' : set (set Ω)} {μ : measure Ω} {u : set ι} (h : ∃ n ∈ u, indep_sets (s n) s' μ) : indep_sets (⋂ n ∈ u, s n) s' μ
begin intros t1 t2 ht1 ht2, rcases h with ⟨n, hn, h⟩, exact h t1 t2 (set.bInter_subset_of_mem hn ht1) ht2, end
lemma
probability_theory.indep_sets.bInter
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "set.bInter_subset_of_mem" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets_singleton_iff [measurable_space Ω] {s t : set Ω} {μ : measure Ω} : indep_sets {s} {t} μ ↔ μ (s ∩ t) = μ s * μ t
⟨λ h, h s t rfl rfl, λ h s1 t1 hs1 ht1, by rwa [set.mem_singleton_iff.mp hs1, set.mem_singleton_iff.mp ht1]⟩
lemma
probability_theory.indep_sets_singleton_iff
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_sets.indep_sets {s : ι → set (set Ω)} [measurable_space Ω] {μ : measure Ω} (h_indep : Indep_sets s μ) {i j : ι} (hij : i ≠ j) : indep_sets (s i) (s j) μ
begin classical, intros t₁ t₂ ht₁ ht₂, have hf_m : ∀ (x : ι), x ∈ {i, j} → (ite (x=i) t₁ t₂) ∈ s x, { intros x hx, cases finset.mem_insert.mp hx with hx hx, { simp [hx, ht₁], }, { simp [finset.mem_singleton.mp hx, hij.symm, ht₂], }, }, have h1 : t₁ = ite (i = i) t₁ t₂, by simp only [if_true, eq_se...
lemma
probability_theory.Indep_sets.indep_sets
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "finset", "finset.mem_singleton", "finset.prod_insert", "finset.prod_singleton", "finset.set_bInter_insert", "finset.set_bInter_singleton", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep.indep {m : ι → measurable_space Ω} [measurable_space Ω] {μ : measure Ω} (h_indep : Indep m μ) {i j : ι} (hij : i ≠ j) : indep (m i) (m j) μ
begin change indep_sets ((λ x, measurable_set[m x]) i) ((λ x, measurable_set[m x]) j) μ, exact Indep_sets.indep_sets h_indep hij, end
lemma
probability_theory.Indep.indep
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_fun.indep_fun {m₀ : measurable_space Ω} {μ : measure Ω} {β : ι → Type*} {m : Π x, measurable_space (β x)} {f : Π i, Ω → β i} (hf_Indep : Indep_fun m f μ) {i j : ι} (hij : i ≠ j) : indep_fun (f i) (f j) μ
hf_Indep.indep hij
lemma
probability_theory.Indep_fun.indep_fun
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep.Indep_sets [measurable_space Ω] {μ : measure Ω} {m : ι → measurable_space Ω} {s : ι → set (set Ω)} (hms : ∀ n, m n = generate_from (s n)) (h_indep : Indep m μ) : Indep_sets s μ
λ S f hfs, h_indep S $ λ x hxS, ((hms x).symm ▸ measurable_set_generate_from (hfs x hxS) : measurable_set[m x] (f x))
lemma
probability_theory.Indep.Indep_sets
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep.indep_sets [measurable_space Ω] {μ : measure Ω} {s1 s2 : set (set Ω)} (h_indep : indep (generate_from s1) (generate_from s2) μ) : indep_sets s1 s2 μ
λ t1 t2 ht1 ht2, h_indep t1 t2 (measurable_set_generate_from ht1) (measurable_set_generate_from ht2)
lemma
probability_theory.indep.indep_sets
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.indep_aux {m2 : measurable_space Ω} {m : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] {p1 p2 : set (set Ω)} (h2 : m2 ≤ m) (hp2 : is_pi_system p2) (hpm2 : m2 = generate_from p2) (hyp : indep_sets p1 p2 μ) {t1 t2 : set Ω} (ht1 : t1 ∈ p1) (ht2m : measurable_set[m2] t2) : μ (t1 ∩ t2) = ...
begin let μ_inter := μ.restrict t1, let ν := (μ t1) • μ, have h_univ : μ_inter set.univ = ν set.univ, by rw [measure.restrict_apply_univ, measure.smul_apply, smul_eq_mul, measure_univ, mul_one], haveI : is_finite_measure μ_inter := @restrict.is_finite_measure Ω _ t1 μ ⟨measure_lt_top μ t1⟩, rw [set.inter_co...
lemma
probability_theory.indep_sets.indep_aux
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "is_pi_system", "measurable_set", "measurable_space", "mul_one", "set.inter_comm", "smul_eq_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.indep {m1 m2 : measurable_space Ω} {m : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] {p1 p2 : set (set Ω)} (h1 : m1 ≤ m) (h2 : m2 ≤ m) (hp1 : is_pi_system p1) (hp2 : is_pi_system p2) (hpm1 : m1 = generate_from p1) (hpm2 : m2 = generate_from p2) (hyp : indep_sets p1 p2 μ) : indep m1 ...
begin intros t1 t2 ht1 ht2, let μ_inter := μ.restrict t2, let ν := (μ t2) • μ, have h_univ : μ_inter set.univ = ν set.univ, by rw [measure.restrict_apply_univ, measure.smul_apply, smul_eq_mul, measure_univ, mul_one], haveI : is_finite_measure μ_inter := @restrict.is_finite_measure Ω _ t2 μ ⟨measure_lt_top μ...
lemma
probability_theory.indep_sets.indep
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "is_pi_system", "measurable_set", "measurable_space", "mul_comm", "mul_one", "smul_eq_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.indep' {m : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] {p1 p2 : set (set Ω)} (hp1m : ∀ s ∈ p1, measurable_set s) (hp2m : ∀ s ∈ p2, measurable_set s) (hp1 : is_pi_system p1) (hp2 : is_pi_system p2) (hyp : indep_sets p1 p2 μ) : indep (generate_from p1) (generate_from p2) μ
hyp.indep (generate_from_le hp1m) (generate_from_le hp2m) hp1 hp2 rfl rfl
lemma
probability_theory.indep_sets.indep'
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "is_pi_system", "measurable_set", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets_pi_Union_Inter_of_disjoint [is_probability_measure μ] {s : ι → set (set Ω)} {S T : set ι} (h_indep : Indep_sets s μ) (hST : disjoint S T) : indep_sets (pi_Union_Inter s S) (pi_Union_Inter s T) μ
begin rintros t1 t2 ⟨p1, hp1, f1, ht1_m, ht1_eq⟩ ⟨p2, hp2, f2, ht2_m, ht2_eq⟩, classical, let g := λ i, ite (i ∈ p1) (f1 i) set.univ ∩ ite (i ∈ p2) (f2 i) set.univ, have h_P_inter : μ (t1 ∩ t2) = ∏ n in p1 ∪ p2, μ (g n), { have hgm : ∀ i ∈ p1 ∪ p2, g i ∈ s i, { intros i hi_mem_union, rw finset.mem_u...
lemma
probability_theory.indep_sets_pi_Union_Inter_of_disjoint
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "disjoint", "finset.mem_union", "finset.prod_ite_mem", "finset.prod_mul_distrib", "finset.union_inter_cancel_left", "finset.union_inter_cancel_right", "mul_one", "one_mul", "pi_Union_Inter", "set.inter_univ", "set.mem_Inter", "set.mem_inter_iff", "set.mem_ite_univ_right", "set.univ_inter" ...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_set.indep_generate_from_of_disjoint [is_probability_measure μ] {s : ι → set Ω} (hsm : ∀ n, measurable_set (s n)) (hs : Indep_set s μ) (S T : set ι) (hST : disjoint S T) : indep (generate_from {t | ∃ n ∈ S, s n = t}) (generate_from {t | ∃ k ∈ T, s k = t}) μ
begin rw [← generate_from_pi_Union_Inter_singleton_left, ← generate_from_pi_Union_Inter_singleton_left], refine indep_sets.indep' (λ t ht, generate_from_pi_Union_Inter_le _ _ _ _ (measurable_set_generate_from ht)) (λ t ht, generate_from_pi_Union_Inter_le _ _ _ _ (measurable_set_generate_from ht)) _ ...
lemma
probability_theory.Indep_set.indep_generate_from_of_disjoint
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "disjoint", "generate_from_pi_Union_Inter_le", "generate_from_pi_Union_Inter_singleton_left", "is_pi_system.singleton", "is_pi_system_pi_Union_Inter", "measurable_set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_supr_of_disjoint [is_probability_measure μ] {m : ι → measurable_space Ω} (h_le : ∀ i, m i ≤ m0) (h_indep : Indep m μ) {S T : set ι} (hST : disjoint S T) : indep (⨆ i ∈ S, m i) (⨆ i ∈ T, m i) μ
begin refine indep_sets.indep (supr₂_le (λ i _, h_le i)) (supr₂_le (λ i _, h_le i)) _ _ (generate_from_pi_Union_Inter_measurable_set m S).symm (generate_from_pi_Union_Inter_measurable_set m T).symm _, { exact is_pi_system_pi_Union_Inter _ (λ n, @is_pi_system_measurable_set Ω (m n)) _, }, { exact is_pi_sys...
lemma
probability_theory.indep_supr_of_disjoint
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "disjoint", "generate_from_pi_Union_Inter_measurable_set", "is_pi_system_pi_Union_Inter", "measurable_space", "supr₂_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_supr_of_directed_le {Ω} {m : ι → measurable_space Ω} {m' m0 : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] (h_indep : ∀ i, indep (m i) m' μ) (h_le : ∀ i, m i ≤ m0) (h_le' : m' ≤ m0) (hm : directed (≤) m) : indep (⨆ i, m i) m' μ
begin let p : ι → set (set Ω) := λ n, {t | measurable_set[m n] t}, have hp : ∀ n, is_pi_system (p n) := λ n, @is_pi_system_measurable_set Ω (m n), have h_gen_n : ∀ n, m n = generate_from (p n), from λ n, (@generate_from_measurable_set Ω (m n)).symm, have hp_supr_pi : is_pi_system (⋃ n, p n) := is_pi_system_...
lemma
probability_theory.indep_supr_of_directed_le
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "directed", "is_pi_system", "is_pi_system_Union_of_directed_le", "measurable_set", "measurable_space", "supr_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_set.indep_generate_from_lt [preorder ι] [is_probability_measure μ] {s : ι → set Ω} (hsm : ∀ n, measurable_set (s n)) (hs : Indep_set s μ) (i : ι) : indep (generate_from {s i}) (generate_from {t | ∃ j < i, s j = t}) μ
begin convert hs.indep_generate_from_of_disjoint hsm {i} {j | j < i} (set.disjoint_singleton_left.mpr (lt_irrefl _)), simp only [set.mem_singleton_iff, exists_prop, exists_eq_left, set.set_of_eq_eq_singleton'], end
lemma
probability_theory.Indep_set.indep_generate_from_lt
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "exists_eq_left", "exists_prop", "measurable_set", "set.mem_singleton_iff", "set.set_of_eq_eq_singleton'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_set.indep_generate_from_le [linear_order ι] [is_probability_measure μ] {s : ι → set Ω} (hsm : ∀ n, measurable_set (s n)) (hs : Indep_set s μ) (i : ι) {k : ι} (hk : i < k) : indep (generate_from {s k}) (generate_from {t | ∃ j ≤ i, s j = t}) μ
begin convert hs.indep_generate_from_of_disjoint hsm {k} {j | j ≤ i} (set.disjoint_singleton_left.mpr hk.not_le), simp only [set.mem_singleton_iff, exists_prop, exists_eq_left, set.set_of_eq_eq_singleton'], end
lemma
probability_theory.Indep_set.indep_generate_from_le
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "exists_eq_left", "exists_prop", "measurable_set", "set.mem_singleton_iff", "set.set_of_eq_eq_singleton'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_set.indep_generate_from_le_nat [is_probability_measure μ] {s : ℕ → set Ω} (hsm : ∀ n, measurable_set (s n)) (hs : Indep_set s μ) (n : ℕ): indep (generate_from {s (n + 1)}) (generate_from {t | ∃ k ≤ n, s k = t}) μ
hs.indep_generate_from_le hsm _ n.lt_succ_self
lemma
probability_theory.Indep_set.indep_generate_from_le_nat
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_supr_of_monotone [semilattice_sup ι] {Ω} {m : ι → measurable_space Ω} {m' m0 : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] (h_indep : ∀ i, indep (m i) m' μ) (h_le : ∀ i, m i ≤ m0) (h_le' : m' ≤ m0) (hm : monotone m) : indep (⨆ i, m i) m' μ
indep_supr_of_directed_le h_indep h_le h_le' (monotone.directed_le hm)
lemma
probability_theory.indep_supr_of_monotone
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space", "monotone", "monotone.directed_le", "semilattice_sup" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_supr_of_antitone [semilattice_inf ι] {Ω} {m : ι → measurable_space Ω} {m' m0 : measurable_space Ω} {μ : measure Ω} [is_probability_measure μ] (h_indep : ∀ i, indep (m i) m' μ) (h_le : ∀ i, m i ≤ m0) (h_le' : m' ≤ m0) (hm : antitone m) : indep (⨆ i, m i) m' μ
indep_supr_of_directed_le h_indep h_le h_le' (directed_of_inf hm)
lemma
probability_theory.indep_supr_of_antitone
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "antitone", "directed_of_inf", "measurable_space", "semilattice_inf" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_sets.pi_Union_Inter_of_not_mem {π : ι → set (set Ω)} {a : ι} {S : finset ι} (hp_ind : Indep_sets π μ) (haS : a ∉ S) : indep_sets (pi_Union_Inter π S) (π a) μ
begin rintros t1 t2 ⟨s, hs_mem, ft1, hft1_mem, ht1_eq⟩ ht2_mem_pia, rw [finset.coe_subset] at hs_mem, classical, let f := λ n, ite (n = a) t2 (ite (n ∈ s) (ft1 n) set.univ), have h_f_mem : ∀ n ∈ insert a s, f n ∈ π n, { intros n hn_mem_insert, simp_rw f, cases (finset.mem_insert.mp hn_mem_insert) wi...
lemma
probability_theory.Indep_sets.pi_Union_Inter_of_not_mem
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "finset", "finset.coe_subset", "finset.prod_insert", "finset.set_bInter_insert", "mul_comm", "pi_Union_Inter", "set.inter_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_sets.Indep [is_probability_measure μ] (m : ι → measurable_space Ω) (h_le : ∀ i, m i ≤ m0) (π : ι → set (set Ω)) (h_pi : ∀ n, is_pi_system (π n)) (h_generate : ∀ i, m i = generate_from (π i)) (h_ind : Indep_sets π μ) : Indep m μ
begin classical, refine finset.induction _ _, { simp only [measure_univ, implies_true_iff, set.Inter_false, set.Inter_univ, finset.prod_empty, eq_self_iff_true], }, intros a S ha_notin_S h_rec f hf_m, have hf_m_S : ∀ x ∈ S, measurable_set[m x] (f x) := λ x hx, hf_m x (by simp [hx]), rw [finset.set_bIn...
theorem
probability_theory.Indep_sets.Indep
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "finset.induction", "finset.mem_insert_self", "finset.prod_empty", "finset.prod_insert", "finset.set_bInter_insert", "generate_from_pi_Union_Inter_le", "is_pi_system", "is_pi_system_pi_Union_Inter", "le_generate_from_pi_Union_Inter", "measurable_set", "measurable_space", "pi_Union_Inter", "s...
The measurable space structures generated by independent pi-systems are independent.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_set_iff_indep_sets_singleton {m0 : measurable_space Ω} (hs_meas : measurable_set s) (ht_meas : measurable_set t) (μ : measure Ω . volume_tac) [is_probability_measure μ] : indep_set s t μ ↔ indep_sets {s} {t} μ
⟨indep.indep_sets, λ h, indep_sets.indep (generate_from_le (λ u hu, by rwa set.mem_singleton_iff.mp hu)) (generate_from_le (λ u hu, by rwa set.mem_singleton_iff.mp hu)) (is_pi_system.singleton s) (is_pi_system.singleton t) rfl rfl h⟩
lemma
probability_theory.indep_set_iff_indep_sets_singleton
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "is_pi_system.singleton", "measurable_set", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_set_iff_measure_inter_eq_mul {m0 : measurable_space Ω} (hs_meas : measurable_set s) (ht_meas : measurable_set t) (μ : measure Ω . volume_tac) [is_probability_measure μ] : indep_set s t μ ↔ μ (s ∩ t) = μ s * μ t
(indep_set_iff_indep_sets_singleton hs_meas ht_meas μ).trans indep_sets_singleton_iff
lemma
probability_theory.indep_set_iff_measure_inter_eq_mul
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_sets.indep_set_of_mem {m0 : measurable_space Ω} (hs : s ∈ S) (ht : t ∈ T) (hs_meas : measurable_set s) (ht_meas : measurable_set t) (μ : measure Ω . volume_tac) [is_probability_measure μ] (h_indep : indep_sets S T μ) : indep_set s t μ
(indep_set_iff_measure_inter_eq_mul hs_meas ht_meas μ).mpr (h_indep s t hs ht)
lemma
probability_theory.indep_sets.indep_set_of_mem
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep.indep_set_of_measurable_set {m₁ m₂ m0 : measurable_space Ω} {μ : measure Ω} (h_indep : indep m₁ m₂ μ) {s t : set Ω} (hs : measurable_set[m₁] s) (ht : measurable_set[m₂] t) : indep_set s t μ
begin refine λ s' t' hs' ht', h_indep s' t' _ _, { refine generate_from_induction (λ u, measurable_set[m₁] u) {s} _ _ _ _ hs', { simp only [hs, set.mem_singleton_iff, set.mem_set_of_eq, forall_eq], }, { exact @measurable_set.empty _ m₁, }, { exact λ u hu, hu.compl, }, { exact λ f hf, measurable_set....
lemma
probability_theory.indep.indep_set_of_measurable_set
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "forall_eq", "measurable_set", "measurable_set.Union", "measurable_set.empty", "measurable_space", "set.mem_singleton_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_iff_forall_indep_set (m₁ m₂ : measurable_space Ω) {m0 : measurable_space Ω} (μ : measure Ω) : indep m₁ m₂ μ ↔ ∀ s t, measurable_set[m₁] s → measurable_set[m₂] t → indep_set s t μ
⟨λ h, λ s t hs ht, h.indep_set_of_measurable_set hs ht, λ h s t hs ht, h s t hs ht s t (measurable_set_generate_from (set.mem_singleton s)) (measurable_set_generate_from (set.mem_singleton t))⟩
lemma
probability_theory.indep_iff_forall_indep_set
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_space", "set.mem_singleton" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_sets.meas_Inter [fintype ι] (h : Indep_sets π μ) (hf : ∀ i, f i ∈ π i) : μ (⋂ i, f i) = ∏ i, μ (f i)
by simp [← h _ (λ i _, hf _)]
lemma
probability_theory.Indep_sets.meas_Inter
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "fintype" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_comap_mem_iff : Indep (λ i, measurable_space.comap (∈ f i) ⊤) μ ↔ Indep_set f μ
by { simp_rw ←generate_from_singleton, refl }
lemma
probability_theory.Indep_comap_mem_iff
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space.comap" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_sets_singleton_iff : Indep_sets (λ i, {f i}) μ ↔ ∀ t, μ (⋂ i ∈ t, f i) = ∏ i in t, μ (f i)
forall_congr $ λ t, ⟨λ h, h $ λ _ _, mem_singleton _, λ h f hf, begin refine eq.trans _ (h.trans $ finset.prod_congr rfl $ λ i hi, congr_arg _ $ (hf i hi).symm), rw Inter₂_congr hf, end⟩
lemma
probability_theory.Indep_sets_singleton_iff
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "finset.prod_congr" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_set_iff_Indep_sets_singleton (hf : ∀ i, measurable_set (f i)) : Indep_set f μ ↔ Indep_sets (λ i, {f i}) μ
⟨Indep.Indep_sets $ λ _, rfl, Indep_sets.Indep _ (λ i, generate_from_le $ by { rintro t (rfl : t = _), exact hf _}) _ (λ _, is_pi_system.singleton _) $ λ _, rfl⟩
lemma
probability_theory.Indep_set_iff_Indep_sets_singleton
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "is_pi_system.singleton", "measurable_set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_set_iff_measure_Inter_eq_prod (hf : ∀ i, measurable_set (f i)) : Indep_set f μ ↔ ∀ s, μ (⋂ i ∈ s, f i) = ∏ i in s, μ (f i)
(Indep_set_iff_Indep_sets_singleton hf).trans Indep_sets_singleton_iff
lemma
probability_theory.Indep_set_iff_measure_Inter_eq_prod
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_sets.Indep_set_of_mem (hfπ : ∀ i, f i ∈ π i) (hf : ∀ i, measurable_set (f i)) (hπ : Indep_sets π μ) : Indep_set f μ
(Indep_set_iff_measure_Inter_eq_prod hf).2 $ λ t, hπ _ $ λ i _, hfπ _
lemma
probability_theory.Indep_sets.Indep_set_of_mem
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_fun_iff_measure_inter_preimage_eq_mul {mβ : measurable_space β} {mβ' : measurable_space β'} : indep_fun f g μ ↔ ∀ s t, measurable_set s → measurable_set t → μ (f ⁻¹' s ∩ g ⁻¹' t) = μ (f ⁻¹' s) * μ (g ⁻¹' t)
begin split; intro h, { refine λ s t hs ht, h (f ⁻¹' s) (g ⁻¹' t) ⟨s, hs, rfl⟩ ⟨t, ht, rfl⟩, }, { rintros _ _ ⟨s, hs, rfl⟩ ⟨t, ht, rfl⟩, exact h s t hs ht, }, end
lemma
probability_theory.indep_fun_iff_measure_inter_preimage_eq_mul
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_fun_iff_measure_inter_preimage_eq_mul {ι : Type*} {β : ι → Type*} (m : Π x, measurable_space (β x)) (f : Π i, Ω → β i) : Indep_fun m f μ ↔ ∀ (S : finset ι) {sets : Π i : ι, set (β i)} (H : ∀ i, i ∈ S → measurable_set[m i] (sets i)), μ (⋂ i ∈ S, (f i) ⁻¹' (sets i)) = ∏ i in S, μ ((f i) ⁻¹' (sets i))
begin refine ⟨λ h S sets h_meas, h _ (λ i hi_mem, ⟨sets i, h_meas i hi_mem, rfl⟩), _⟩, intros h S setsΩ h_meas, classical, let setsβ : (Π i : ι, set (β i)) := λ i, dite (i ∈ S) (λ hi_mem, (h_meas i hi_mem).some) (λ _, set.univ), have h_measβ : ∀ i ∈ S, measurable_set[m i] (setsβ i), { intros i hi_mem, ...
lemma
probability_theory.Indep_fun_iff_measure_inter_preimage_eq_mul
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "finset", "finset.prod_congr", "measurable_set", "measurable_space", "set.mem_Inter" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_fun_iff_indep_set_preimage {mβ : measurable_space β} {mβ' : measurable_space β'} [is_probability_measure μ] (hf : measurable f) (hg : measurable g) : indep_fun f g μ ↔ ∀ s t, measurable_set s → measurable_set t → indep_set (f ⁻¹' s) (g ⁻¹' t) μ
begin refine indep_fun_iff_measure_inter_preimage_eq_mul.trans _, split; intros h s t hs ht; specialize h s t hs ht, { rwa indep_set_iff_measure_inter_eq_mul (hf hs) (hg ht) μ, }, { rwa ← indep_set_iff_measure_inter_eq_mul (hf hs) (hg ht) μ, }, end
lemma
probability_theory.indep_fun_iff_indep_set_preimage
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable", "measurable_set", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_fun.symm {mβ : measurable_space β} {f g : Ω → β} (hfg : indep_fun f g μ) : indep_fun g f μ
hfg.symm
lemma
probability_theory.indep_fun.symm
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_fun.ae_eq {mβ : measurable_space β} {f g f' g' : Ω → β} (hfg : indep_fun f g μ) (hf : f =ᵐ[μ] f') (hg : g =ᵐ[μ] g') : indep_fun f' g' μ
begin rintro _ _ ⟨A, hA, rfl⟩ ⟨B, hB, rfl⟩, have h1 : f ⁻¹' A =ᵐ[μ] f' ⁻¹' A := hf.fun_comp A, have h2 : g ⁻¹' B =ᵐ[μ] g' ⁻¹' B := hg.fun_comp B, rw [← measure_congr h1, ← measure_congr h2, ← measure_congr (h1.inter h2)], exact hfg _ _ ⟨_, hA, rfl⟩ ⟨_, hB, rfl⟩ end
lemma
probability_theory.indep_fun.ae_eq
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_fun.comp {mβ : measurable_space β} {mβ' : measurable_space β'} {mγ : measurable_space γ} {mγ' : measurable_space γ'} {φ : β → γ} {ψ : β' → γ'} (hfg : indep_fun f g μ) (hφ : measurable φ) (hψ : measurable ψ) : indep_fun (φ ∘ f) (ψ ∘ g) μ
begin rintro _ _ ⟨A, hA, rfl⟩ ⟨B, hB, rfl⟩, apply hfg, { exact ⟨φ ⁻¹' A, hφ hA, set.preimage_comp.symm⟩ }, { exact ⟨ψ ⁻¹' B, hψ hB, set.preimage_comp.symm⟩ } end
lemma
probability_theory.indep_fun.comp
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_fun.indep_fun_finset [is_probability_measure μ] {ι : Type*} {β : ι → Type*} {m : Π i, measurable_space (β i)} {f : Π i, Ω → β i} (S T : finset ι) (hST : disjoint S T) (hf_Indep : Indep_fun m f μ) (hf_meas : ∀ i, measurable (f i)) : indep_fun (λ a (i : S), f i a) (λ a (i : T), f i a) μ
begin -- We introduce π-systems, build from the π-system of boxes which generates `measurable_space.pi`. let πSβ := (set.pi (set.univ : set S) '' (set.pi (set.univ : set S) (λ i, {s : set (β i) | measurable_set[m i] s}))), let πS := {s : set Ω | ∃ t ∈ πSβ, (λ a (i : S), f i a) ⁻¹' t = s}, have hπS_pi : is_p...
lemma
probability_theory.Indep_fun.indep_fun_finset
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "disjoint", "exists_prop", "finset", "finset.mem_union", "finset.prod_congr", "finset.prod_union", "is_pi_system", "measurable", "measurable_set", "measurable_space", "set.inter_univ", "set.mem_Inter", "set.mem_image", "set.mem_inter_iff", "set.mem_preimage", "set.mem_univ", "set.mem...
If `f` is a family of mutually independent random variables (`Indep_fun m f μ`) and `S, T` are two disjoint finite index sets, then the tuple formed by `f i` for `i ∈ S` is independent of the tuple `(f i)_i` for `i ∈ T`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_fun.indep_fun_prod [is_probability_measure μ] {ι : Type*} {β : ι → Type*} {m : Π i, measurable_space (β i)} {f : Π i, Ω → β i} (hf_Indep : Indep_fun m f μ) (hf_meas : ∀ i, measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) : indep_fun (λ a, (f i a, f j a)) (f k) μ
begin classical, have h_right : f k = (λ p : (Π j : ({k} : finset ι), β j), p ⟨k, finset.mem_singleton_self k⟩) ∘ (λ a (j : ({k} : finset ι)), f j a) := rfl, have h_meas_right : measurable (λ p : (Π j : ({k} : finset ι), β j), p ⟨k, finset.mem_singleton_self k⟩), from measurable_pi_apply ⟨k, finset....
lemma
probability_theory.Indep_fun.indep_fun_prod
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "finset", "finset.disjoint_singleton_right", "finset.mem_insert", "finset.mem_insert_of_mem", "finset.mem_insert_self", "finset.mem_singleton", "finset.mem_singleton_self", "measurable", "measurable.prod", "measurable_pi_apply", "measurable_space", "not_or_distrib", "prod.mk.inj_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_fun.mul [is_probability_measure μ] {ι : Type*} {β : Type*} {m : measurable_space β} [has_mul β] [has_measurable_mul₂ β] {f : ι → Ω → β} (hf_Indep : Indep_fun (λ _, m) f μ) (hf_meas : ∀ i, measurable (f i)) (i j k : ι) (hik : i ≠ k) (hjk : j ≠ k) : indep_fun (f i * f j) (f k) μ
begin have : indep_fun (λ ω, (f i ω, f j ω)) (f k) μ := hf_Indep.indep_fun_prod hf_meas i j k hik hjk, change indep_fun ((λ p : β × β, p.fst * p.snd) ∘ (λ ω, (f i ω, f j ω))) (id ∘ (f k)) μ, exact indep_fun.comp this (measurable_fst.mul measurable_snd) measurable_id, end
lemma
probability_theory.Indep_fun.mul
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "has_measurable_mul₂", "measurable", "measurable_id", "measurable_snd", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_fun.indep_fun_finset_prod_of_not_mem [is_probability_measure μ] {ι : Type*} {β : Type*} {m : measurable_space β} [comm_monoid β] [has_measurable_mul₂ β] {f : ι → Ω → β} (hf_Indep : Indep_fun (λ _, m) f μ) (hf_meas : ∀ i, measurable (f i)) {s : finset ι} {i : ι} (hi : i ∉ s) : indep_fun (∏ j in s, f j) (f ...
begin classical, have h_right : f i = (λ p : (Π j : ({i} : finset ι), β), p ⟨i, finset.mem_singleton_self i⟩) ∘ (λ a (j : ({i} : finset ι)), f j a) := rfl, have h_meas_right : measurable (λ p : (Π j : ({i} : finset ι), β), p ⟨i, finset.mem_singleton_self i⟩), from measurable_pi_apply ⟨i, finset.mem_...
lemma
probability_theory.Indep_fun.indep_fun_finset_prod_of_not_mem
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "comm_monoid", "finset", "finset.mem_singleton_self", "finset.prod_apply", "finset.prod_coe_sort", "finset.univ", "has_measurable_mul₂", "measurable", "measurable_pi_apply", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_fun.indep_fun_prod_range_succ [is_probability_measure μ] {β : Type*} {m : measurable_space β} [comm_monoid β] [has_measurable_mul₂ β] {f : ℕ → Ω → β} (hf_Indep : Indep_fun (λ _, m) f μ) (hf_meas : ∀ i, measurable (f i)) (n : ℕ) : indep_fun (∏ j in finset.range n, f j) (f n) μ
hf_Indep.indep_fun_finset_prod_of_not_mem hf_meas finset.not_mem_range_self
lemma
probability_theory.Indep_fun.indep_fun_prod_range_succ
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "comm_monoid", "finset.not_mem_range_self", "finset.range", "has_measurable_mul₂", "measurable", "measurable_space" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Indep_set.Indep_fun_indicator [has_zero β] [has_one β] {m : measurable_space β} {s : ι → set Ω} (hs : Indep_set s μ) : Indep_fun (λ n, m) (λ n, (s n).indicator (λ ω, 1)) μ
begin classical, rw Indep_fun_iff_measure_inter_preimage_eq_mul, rintro S π hπ, simp_rw set.indicator_const_preimage_eq_union, refine @hs S (λ i, ite (1 ∈ π i) (s i) ∅ ∪ ite ((0 : β) ∈ π i) (s i)ᶜ ∅) (λ i hi, _), have hsi : measurable_set[generate_from {s i}] (s i), from measurable_set_generate_from (se...
lemma
probability_theory.Indep_set.Indep_fun_indicator
probability.independence
src/probability/independence/basic.lean
[ "measure_theory.constructions.pi" ]
[ "measurable_set", "measurable_set.empty", "measurable_set.ite'", "measurable_set.union", "measurable_space", "set.mem_singleton" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
measure_eq_zero_or_one_or_top_of_indep_set_self {t : set Ω} (h_indep : indep_set t t μ) : μ t = 0 ∨ μ t = 1 ∨ μ t = ∞
begin specialize h_indep t t (measurable_set_generate_from (set.mem_singleton t)) (measurable_set_generate_from (set.mem_singleton t)), by_cases h0 : μ t = 0, { exact or.inl h0, }, by_cases h_top : μ t = ∞, { exact or.inr (or.inr h_top), }, rw [← one_mul (μ (t ∩ t)), set.inter_self, ennreal.mul_eq_mul_r...
lemma
probability_theory.measure_eq_zero_or_one_or_top_of_indep_set_self
probability.independence
src/probability/independence/zero_one.lean
[ "probability.independence.basic" ]
[ "ennreal.mul_eq_mul_right", "one_mul", "set.inter_self", "set.mem_singleton" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
measure_eq_zero_or_one_of_indep_set_self [is_finite_measure μ] {t : set Ω} (h_indep : indep_set t t μ) : μ t = 0 ∨ μ t = 1
begin have h_0_1_top := measure_eq_zero_or_one_or_top_of_indep_set_self h_indep, simpa [measure_ne_top μ] using h_0_1_top, end
lemma
probability_theory.measure_eq_zero_or_one_of_indep_set_self
probability.independence
src/probability/independence/zero_one.lean
[ "probability.independence.basic" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_bsupr_compl (h_le : ∀ n, s n ≤ m0) (h_indep : Indep s μ) (t : set ι) : indep (⨆ n ∈ t, s n) (⨆ n ∈ tᶜ, s n) μ
indep_supr_of_disjoint h_le h_indep disjoint_compl_right
lemma
probability_theory.indep_bsupr_compl
probability.independence
src/probability/independence/zero_one.lean
[ "probability.independence.basic" ]
[ "disjoint_compl_right" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_bsupr_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : Indep s μ) (hf : ∀ t, p t → tᶜ ∈ f) {t : set ι} (ht : p t) : indep (⨆ n ∈ t, s n) (limsup s f) μ
begin refine indep_of_indep_of_le_right (indep_bsupr_compl h_le h_indep t) _, refine Limsup_le_of_le (by is_bounded_default) _, simp only [set.mem_compl_iff, eventually_map], exact eventually_of_mem (hf t ht) le_supr₂, end
lemma
probability_theory.indep_bsupr_limsup
probability.independence
src/probability/independence/zero_one.lean
[ "probability.independence.basic" ]
[ "le_supr₂", "set.mem_compl_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
indep_supr_directed_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : Indep s μ) (hf : ∀ t, p t → tᶜ ∈ f) (hns : directed (≤) ns) (hnsp : ∀ a, p (ns a)) : indep (⨆ a, ⨆ n ∈ (ns a), s n) (limsup s f) μ
begin refine indep_supr_of_directed_le _ _ _ _, { exact λ a, indep_bsupr_limsup h_le h_indep hf (hnsp a), }, { exact λ a, supr₂_le (λ n hn, h_le n), }, { exact limsup_le_supr.trans (supr_le h_le), }, { intros a b, obtain ⟨c, hc⟩ := hns a b, refine ⟨c, _, _⟩; refine supr_mono (λ n, supr_mono' (λ hn, ⟨_...
lemma
probability_theory.indep_supr_directed_limsup
probability.independence
src/probability/independence/zero_one.lean
[ "probability.independence.basic" ]
[ "directed", "supr_le", "supr_mono", "supr_mono'", "supr₂_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83