Mathlib.Probability.UniformOn
27 declarations. Mathlib docs · Source
def ProbabilityTheory.uniformOn E1 #
{Ω : Type u_1} → [inst : MeasurableSpace Ω] → Set Ω → MeasureTheory.Measure Ω
Given a set s, uniformOn s is the uniform measure on s, defined as the counting measure
conditioned by s. One should think of uniformOn s t as the proportion of s that is contained
in t.
This is a probability measure when s is finite and nonempty and is given by
ProbabilityTheory.uniformOn_isProbabilityMeasure.
instance ProbabilityTheory.instIsZeroOrProbabilityMeasureUniformOn E0 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] (s : Set Ω),
MeasureTheory.IsZeroOrProbabilityMeasure (ProbabilityTheory.uniformOn s)
theorem ProbabilityTheory.uniformOn_empty_meas E0 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω], ProbabilityTheory.uniformOn ∅ = 0
theorem ProbabilityTheory.uniformOn_empty E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] {s : Set Ω}, (ProbabilityTheory.uniformOn s) ∅ = 0
theorem ProbabilityTheory.uniformOn_eq_zero' E0 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] {s : Set Ω},
MeasurableSet s → (ProbabilityTheory.uniformOn s = 0 ↔ s.Infinite ∨ s = ∅)
See uniformOn_eq_zero for a version assuming MeasurableSingletonClass Ω instead of
MeasurableSet s.
theorem ProbabilityTheory.uniformOn_eq_zero E0 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] {s : Set Ω} [MeasurableSingletonClass Ω],
ProbabilityTheory.uniformOn s = 0 ↔ s.Infinite ∨ s = ∅
See uniformOn_eq_zero' for a version assuming MeasurableSet s instead of
MeasurableSingletonClass Ω.
theorem ProbabilityTheory.finite_of_uniformOn_ne_zero E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] {s t : Set Ω}, (ProbabilityTheory.uniformOn s) t ≠ 0 → s.Finite
theorem ProbabilityTheory.uniformOn_univ E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [inst_1 : Fintype Ω] {s : Set Ω},
(ProbabilityTheory.uniformOn Set.univ) s = MeasureTheory.Measure.count s / ↑(Fintype.card Ω)
theorem ProbabilityTheory.isProbabilityMeasure_uniformOn' E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] {s : Set Ω},
s.Finite → s.Nonempty → MeasurableSet s → MeasureTheory.IsProbabilityMeasure (ProbabilityTheory.uniformOn s)
instance ProbabilityTheory.instIsProbabilityMeasure_uniformOn_univ E0 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [Finite Ω] [Nonempty Ω],
MeasureTheory.IsProbabilityMeasure (ProbabilityTheory.uniformOn Set.univ)
theorem ProbabilityTheory.uniformOn_apply_finset' E1 #
∀ {Ω : Type u_2} [inst : DecidableEq Ω] {x : MeasurableSpace Ω} {s t : Finset Ω},
MeasurableSet ↑s → MeasurableSet ↑t → (ProbabilityTheory.uniformOn ↑s) ↑t = ↑(s ∩ t).card / ↑s.card
theorem ProbabilityTheory.uniformOn_apply_finset E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] [inst_2 : DecidableEq Ω] {s t : Finset Ω},
(ProbabilityTheory.uniformOn ↑s) ↑t = ↑(s ∩ t).card / ↑s.card
theorem ProbabilityTheory.isProbabilityMeasure_uniformOn E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s : Set Ω},
s.Finite → s.Nonempty → MeasureTheory.IsProbabilityMeasure (ProbabilityTheory.uniformOn s)
theorem ProbabilityTheory.uniformOn_singleton E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] (ω : Ω) (t : Set Ω)
[inst_2 : Decidable (ω ∈ t)], (ProbabilityTheory.uniformOn {ω}) t = if ω ∈ t then 1 else 0
theorem ProbabilityTheory.uniformOn_inter_self E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s t : Set Ω},
s.Finite → (ProbabilityTheory.uniformOn s) (s ∩ t) = (ProbabilityTheory.uniformOn s) t
theorem ProbabilityTheory.uniformOn_self E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s : Set Ω},
s.Finite → s.Nonempty → (ProbabilityTheory.uniformOn s) s = 1
theorem ProbabilityTheory.uniformOn_eq_one_of E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s t : Set Ω},
s.Finite → s.Nonempty → s ⊆ t → (ProbabilityTheory.uniformOn s) t = 1
theorem ProbabilityTheory.pred_true_of_uniformOn_eq_one E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s t : Set Ω},
(ProbabilityTheory.uniformOn s) t = 1 → s ⊆ t
theorem ProbabilityTheory.uniformOn_eq_zero_iff E0 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s t : Set Ω},
s.Finite → ((ProbabilityTheory.uniformOn s) t = 0 ↔ s ∩ t = ∅)
theorem ProbabilityTheory.uniformOn_of_univ E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s : Set Ω},
s.Finite → s.Nonempty → (ProbabilityTheory.uniformOn s) Set.univ = 1
theorem ProbabilityTheory.uniformOn_inter E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s t u : Set Ω},
s.Finite →
(ProbabilityTheory.uniformOn s) (t ∩ u) =
(ProbabilityTheory.uniformOn (s ∩ t)) u * (ProbabilityTheory.uniformOn s) t
theorem ProbabilityTheory.uniformOn_inter' E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s t u : Set Ω},
s.Finite →
(ProbabilityTheory.uniformOn s) (t ∩ u) =
(ProbabilityTheory.uniformOn (s ∩ u)) t * (ProbabilityTheory.uniformOn s) u
theorem ProbabilityTheory.uniformOn_union E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s t u : Set Ω},
s.Finite →
Disjoint t u →
(ProbabilityTheory.uniformOn s) (t ∪ u) = (ProbabilityTheory.uniformOn s) t + (ProbabilityTheory.uniformOn s) u
theorem ProbabilityTheory.uniformOn_compl E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s : Set Ω} (t : Set Ω),
s.Finite → s.Nonempty → (ProbabilityTheory.uniformOn s) t + (ProbabilityTheory.uniformOn s) tᶜ = 1
theorem ProbabilityTheory.uniformOn_disjoint_union E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s t u : Set Ω},
s.Finite →
t.Finite →
Disjoint s t →
(ProbabilityTheory.uniformOn s) u * (ProbabilityTheory.uniformOn (s ∪ t)) s +
(ProbabilityTheory.uniformOn t) u * (ProbabilityTheory.uniformOn (s ∪ t)) t =
(ProbabilityTheory.uniformOn (s ∪ t)) u
theorem ProbabilityTheory.uniformOn_add_compl_eq E0 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {s : Set Ω} (u t : Set Ω),
s.Finite →
(ProbabilityTheory.uniformOn (s ∩ u)) t * (ProbabilityTheory.uniformOn s) u +
(ProbabilityTheory.uniformOn (s ∩ uᶜ)) t * (ProbabilityTheory.uniformOn s) uᶜ =
(ProbabilityTheory.uniformOn s) t
A version of the law of total probability for counting probabilities.
theorem ProbabilityTheory.uniformOn_pi E1 #
∀ {Ω : Type u_1} [inst : MeasurableSpace Ω] [MeasurableSingletonClass Ω] {ι : Type u_2} [inst_2 : Fintype ι] [Finite Ω]
{f : ι → Set Ω},
ProbabilityTheory.uniformOn (Set.univ.pi f) = MeasureTheory.Measure.pi fun i ↦ ProbabilityTheory.uniformOn (f i)
The uniform measure on a product of sets is the product of the uniform measures.