|
84 | 84 | { exact finset.sum_congr rfl (λ x hx, set.indicator_of_mem hx _) }
|
85 | 85 | end
|
86 | 86 |
|
| 87 | +lemma to_outer_measure_apply_singleton (a : α) : p.to_outer_measure {a} = p a := |
| 88 | +begin |
| 89 | + refine (p.to_outer_measure_apply {a}).trans ((tsum_eq_single a $ λ b hb, _).trans _), |
| 90 | + { exact ite_eq_right_iff.2 (λ hb', false.elim $ hb hb') }, |
| 91 | + { exact ite_eq_left_iff.2 (λ ha', false.elim $ ha' rfl) } |
| 92 | +end |
| 93 | + |
87 | 94 | lemma to_outer_measure_apply_eq_zero_iff : p.to_outer_measure s = 0 ↔ disjoint p.support s :=
|
88 | 95 | begin
|
89 | 96 | rw [to_outer_measure_apply', ennreal.coe_eq_zero,
|
@@ -163,6 +170,16 @@ lemma to_measure_apply (hs : measurable_set s) : p.to_measure s = ∑' x, s.indi
|
163 | 170 | lemma to_measure_apply' (hs : measurable_set s) : p.to_measure s = ↑(∑' x, s.indicator p x) :=
|
164 | 171 | (p.to_measure_apply_eq_to_outer_measure_apply s hs).trans (p.to_outer_measure_apply' s)
|
165 | 172 |
|
| 173 | +lemma to_measure_apply_singleton (a : α) (h : measurable_set ({a} : set α)) : |
| 174 | + p.to_measure {a} = p a := |
| 175 | +by simp [to_measure_apply_eq_to_outer_measure_apply p {a} h, |
| 176 | + to_outer_measure_apply_singleton] |
| 177 | + |
| 178 | +lemma to_measure_apply_eq_zero_iff (hs : measurable_set s) : |
| 179 | + p.to_measure s = 0 ↔ disjoint p.support s := |
| 180 | +by rw [to_measure_apply_eq_to_outer_measure_apply p s hs, |
| 181 | + to_outer_measure_apply_eq_zero_iff] |
| 182 | + |
166 | 183 | lemma to_measure_apply_eq_one_iff (hs : measurable_set s) : p.to_measure s = 1 ↔ p.support ⊆ s :=
|
167 | 184 | (p.to_measure_apply_eq_to_outer_measure_apply s hs : p.to_measure s = p.to_outer_measure s).symm
|
168 | 185 | ▸ (p.to_outer_measure_apply_eq_one_iff s)
|
@@ -212,4 +229,15 @@ instance to_measure.is_probability_measure (p : pmf α) : is_probability_measure
|
212 | 229 |
|
213 | 230 | end measure
|
214 | 231 |
|
| 232 | +lemma apply_eq_one_iff (p : pmf α) (a : α) : |
| 233 | + p a = 1 ↔ p.support = {a} := |
| 234 | +begin |
| 235 | + refine ⟨λ h, _, λ h, _⟩, |
| 236 | + { have : {a} ⊆ p.support := λ x hx, (p.mem_support_iff x).2 (ne_zero_of_eq_one $ hx.symm ▸ h), |
| 237 | + refine antisymm ((p.to_outer_measure_apply_eq_one_iff {a}).1 _) this, |
| 238 | + simpa only [to_outer_measure_apply_singleton, ennreal.coe_eq_one] using h }, |
| 239 | + { simpa only [← ennreal.coe_eq_one, ← to_outer_measure_apply_singleton, |
| 240 | + to_outer_measure_apply_eq_one_iff] using subset_of_eq h } |
| 241 | +end |
| 242 | + |
215 | 243 | end pmf
|
0 commit comments