@@ -3,6 +3,7 @@ From mathcomp Require Import all_ssreflect all_algebra finmap.
33From mathcomp.classical Require Import boolp classical_sets functions.
44From mathcomp.classical Require Import cardinality fsbigop mathcomp_extra.
55Require Import reals ereal signed topology normedtype sequences esum numfun.
6+ Require Import itv.
67From HB Require Import structures.
78
89(***************************************************************************** *)
@@ -137,6 +138,8 @@ From HB Require Import structures.
137138(* probability T R == probability measure over the measurableType T with *)
138139(* value in R : realType *)
139140(* Measure_isProbability == factor for probability measures *)
141+ (* bernoulli p1 == the p-Bernoulli probability where p1 is a proof that *)
142+ (* p : {nonneg R} is <= 1 *)
140143(* *)
141144(* mu.-negligible A == A is mu negligible *)
142145(* {ae mu, forall x, P x} == P holds almost everywhere for the measure mu, *)
@@ -2826,6 +2829,26 @@ HB.instance Definition _ x :=
28262829
28272830End pdirac.
28282831
2832+ Section bernoulli.
2833+ Variables (R : realType) (p : {i01 R}).
2834+
2835+ Definition bernoulli : set _ -> \bar R := measure_add
2836+ (mscale (NngNum (itv_ge0 p)) (dirac true))
2837+ (mscale (NngNum (itv_ge0 ((`1-(p%:inum))%:i01))) (dirac false)).
2838+
2839+ HB.instance Definition _ := Measure.on bernoulli.
2840+
2841+ Let bernoulli_setT : bernoulli [set: _] = 1.
2842+ Proof .
2843+ rewrite /bernoulli/= /measure_add/= /msum 2!big_ord_recr/= big_ord0 add0e/=.
2844+ by rewrite /mscale/= !diracT !mule1 -EFinD add_onemK.
2845+ Qed .
2846+
2847+ HB.instance Definition _ :=
2848+ @Measure_isProbability.Build _ _ R bernoulli bernoulli_setT.
2849+
2850+ End bernoulli.
2851+
28292852Lemma sigma_finite_counting (R : realType) :
28302853 sigma_finite [set: nat] (@counting _ R).
28312854Proof .
0 commit comments