@@ -721,8 +721,8 @@ apply: measurable_fun_comp; last exact: measurable_fun_opp.
721721by apply: continuous_measurable_fun; exact: continuous_expR.
722722Qed .
723723
724- Definition poisson3 := poisson 4 3. (* 0.168 *)
725- Definition poisson10 := poisson 4 10. (* 0.019 *)
724+ Definition poisson3 := poisson 4 3%:R . (* 0.168 *)
725+ Definition poisson10 := poisson 4 10%:R . (* 0.019 *)
726726
727727End poisson.
728728
@@ -771,7 +771,7 @@ Definition sample_and_return : R.-sfker T ~> _ :=
771771 (ret var2of2) (* T * B -> B *) .
772772
773773Lemma sample_and_returnE t U : sample_and_return t U =
774- (2 / 7)%:E * \d_true U + (5 / 7)%:E * \d_false U.
774+ (2 / 7%:R )%:E * \d_true U + (5%:R / 7%:R )%:E * \d_false U.
775775Proof .
776776rewrite /sample_and_return.
777777rewrite letin_sample_bernoulli/=.
@@ -797,8 +797,8 @@ Definition sample_and_branch :
797797 (ite var2of2 (ret k3) (ret k10)).
798798
799799Lemma sample_and_branchE t U : sample_and_branch t U =
800- (2 / 7)%:E * \d_(3 : R) U +
801- (5 / 7)%:E * \d_(10 : R) U.
800+ (2 / 7%:R )%:E * \d_(3%:R : R) U +
801+ (5%:R / 7%:R )%:E * \d_(10%:R : R) U.
802802Proof .
803803rewrite /sample_and_branch letin_sample_bernoulli/=.
804804rewrite !iteE/= !retE.
@@ -836,8 +836,8 @@ Definition kstaton_bus_poisson : R.-sfker (mR R) ~> mbool :=
836836 kstaton_bus _ mpoisson4.
837837
838838Let kstaton_bus_poissonE t U : kstaton_bus_poisson t U =
839- (2 / 7)%:E * (poisson4 3)%:E * \d_true U +
840- (5 / 7)%:E * (poisson4 10)%:E * \d_false U.
839+ (2 / 7%:R )%:E * (poisson4 3%:R )%:E * \d_true U +
840+ (5%:R / 7%:R )%:E * (poisson4 10%:R )%:E * \d_false U.
841841Proof .
842842rewrite /kstaton_bus.
843843rewrite letin_sample_bernoulli.
@@ -857,11 +857,11 @@ Qed.
857857(* false -> 5/7 * 0.019 = 5/7 * 10^4 e^-10 / 4! *)
858858
859859Lemma staton_busE P (t : R) U :
860- let N := ((2 / 7) * poisson4 3 +
861- (5 / 7) * poisson4 10)%R in
860+ let N := ((2 / 7%:R ) * poisson4 3%:R +
861+ (5%:R / 7%:R ) * poisson4 10%:R )%R in
862862 staton_bus mpoisson4 P t U =
863- ((2 / 7)%:E * (poisson4 3)%:E * \d_true U +
864- (5 / 7)%:E * (poisson4 10)%:E * \d_false U) * N^-1%:E.
863+ ((2 / 7%:R )%:E * (poisson4 3%:R )%:E * \d_true U +
864+ (5%:R / 7%:R )%:E * (poisson4 10%:R )%:E * \d_false U) * N^-1%:E.
865865Proof .
866866rewrite /staton_bus normalizeE /= !kstaton_bus_poissonE !diracT !mule1 ifF //.
867867apply/negbTE; rewrite gt_eqF// lte_fin.
@@ -886,8 +886,8 @@ Definition kstaton_bus_exponential : R.-sfker (mR R) ~> mbool :=
886886 kstaton_bus _ mexp1560.
887887
888888Let kstaton_bus_exponentialE t U : kstaton_bus_exponential t U =
889- (2 / 7)%:E * (exp1560 3)%:E * \d_true U +
890- (5 / 7)%:E * (exp1560 10)%:E * \d_false U.
889+ (2 / 7%:R )%:E * (exp1560 3%:R )%:E * \d_true U +
890+ (5%:R / 7%:R )%:E * (exp1560 10%:R )%:E * \d_false U.
891891Proof .
892892rewrite /kstaton_bus.
893893rewrite letin_sample_bernoulli.
@@ -907,11 +907,11 @@ Qed.
907907(* false -> 2/7 * 0.168 = 2/7 * 3^4 e^-3 / 4! *)
908908
909909Lemma staton_bus_exponentialE P (t : R) U :
910- let N := ((2 / 7) * exp1560 3 +
911- (5 / 7) * exp1560 10)%R in
910+ let N := ((2 / 7%:R ) * exp1560 3%:R +
911+ (5%:R / 7%:R ) * exp1560 10%:R )%R in
912912 staton_bus mexp1560 P t U =
913- ((2 / 7)%:E * (exp1560 3)%:E * \d_true U +
914- (5 / 7)%:E * (exp1560 10)%:E * \d_false U) * N^-1%:E.
913+ ((2 / 7%:R )%:E * (exp1560 3%:R )%:E * \d_true U +
914+ (5%:R / 7%:R )%:E * (exp1560 10%:R )%:E * \d_false U) * N^-1%:E.
915915Proof .
916916rewrite /staton_bus.
917917rewrite normalizeE /= !kstaton_bus_exponentialE !diracT !mule1 ifF //.
0 commit comments