Skip to content

Commit d687620

Browse files
committed
beta distribution
1 parent fae5628 commit d687620

File tree

5 files changed

+963
-20
lines changed

5 files changed

+963
-20
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@
5757
+ `measure_extension.v`
5858
+ `measurable_function.v`
5959
+ `measure.v`
60+
- in `lebesgue_integral_theory/lebesgue_integral_nonneg.v`:
61+
+ lemmas `ge0_nondecreasing_set_nondecreasing_integral`,
62+
`ge0_nondecreasing_set_cvg_integral`,
63+
`le0_nondecreasing_set_nonincreasing_integral`,
64+
`le0_nondecreasing_set_cvg_integral`
65+
- in `pseudometric_normed_Zmodule.v`:
66+
+ lemma `continuous_comp_cvg`
67+
68+
- in `derive.v`:
69+
+ lemma `derive1_onem`
70+
71+
- in `ftc.v`:
72+
+ lemmas `integration_by_substitution_onem`, `Rintegration_by_substitution_onem`
6073

6174
### Changed
6275

@@ -305,6 +318,27 @@
305318

306319
### Renamed
307320

321+
- in `measure.v`
322+
+ definition `ess_sup` moved to `ess_sup_inf.v`
323+
324+
- in `convex.v`
325+
+ lemma `conv_gt0` to `convR_gt0`
326+
- in `tvs.v`
327+
+ HB class `TopologicalNmodule` moved to `PreTopologicalNmodule`
328+
+ HB class `TopologicalZmodule` moved to `PreTopologicalZmodule`
329+
+ HB class `TopologicalLmodule` moved to `PreTopologicalLmodule`
330+
+ structure `topologicalLmodule` moved to `preTopologicalLmodule`
331+
+ HB class `UniformNmodule` moved to `PreUniformNmodule`
332+
+ HB class `UniformZmodule` moved to `PreUniformZmodule`
333+
+ HB class `UniformLmodule` moved to `PreUniformLmodule`
334+
335+
- in `probability.v`:
336+
+ `bernoulli` -> `bernoulli_prob`
337+
+ `bernoulli_probE` -> `bernoulliE`
338+
+ `integral_bernoulli_prob` -> `integral_bernoulli_prob`
339+
+ `measurable_bernoulli` -> `measurable_bernoulli_prob`
340+
+ `measurable_bernoulli2` -> `measurable_bernoulli_prob2`
341+
308342
### Generalized
309343

310344
- in `pseudometric_normed_Zmodule.v`:

theories/derive.v

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,12 @@ Proof. by have /derivableP := @derivable_id x v; rewrite derive_val. Qed.
12671267

12681268
End derive_id.
12691269

1270+
Lemma derive1_onem {R : numFieldType} :
1271+
(fun x => 1 - x : R^o)^`()%classic = cst (-1).
1272+
Proof.
1273+
by apply/funext => x; rewrite derive1E deriveB// derive_id derive_cst sub0r.
1274+
Qed.
1275+
12701276
Section Derive_lemmasVR.
12711277
Variables (R : numFieldType) (V : normedModType R).
12721278
Implicit Types (f g : V -> R) (x v : V).
@@ -1332,13 +1338,26 @@ rewrite scalerA -scalerDl mulrCA -[f x * _]exprS.
13321338
by rewrite [in LHS]mulr_natl exprfctE -mulrSr mulr_natl.
13331339
Qed.
13341340

1341+
(*Global Instance is_deriveX f n x v (df : R) :
1342+
is_derive x v f df -> is_derive x v (f ^+ n.+1) ((n.+1%:R * f x ^+n) *: df).
1343+
Proof.
1344+
move=> dfx; elim: n => [|n ihn]; first by rewrite expr1 expr0 mulr1 scale1r.
1345+
rewrite exprS; apply: is_derive_eq.
1346+
rewrite scalerA -scalerDl mulrCA -[f x * _]exprS.
1347+
by rewrite [in LHS]mulr_natl exprfctE -mulrSr mulr_natl.
1348+
Qed.*)
1349+
13351350
Lemma derivableX f n x v : derivable f x v -> derivable (f ^+ n) x v.
13361351
Proof. by case: n => [_|n /derivableP]; [rewrite expr0|]. Qed.
13371352

13381353
Lemma deriveX f n x v : derivable f x v ->
13391354
'D_v (f ^+ n) x = (n%:R * f x ^+ n.-1) *: 'D_v f x.
13401355
Proof. by move=> /derivableP df; rewrite derive_val. Qed.
13411356

1357+
(*Lemma deriveX f n x v : derivable f x v ->
1358+
'D_v (f ^+ n.+1) x = (n.+1%:R * f x ^+ n) *: 'D_v f x.
1359+
Proof. by move=> /derivableP df; rewrite derive_val. Qed.*)
1360+
13421361
Fact der_inv f x v : f x != 0 -> derivable f x v ->
13431362
(fun h => h^-1 *: (((fun y => (f y)^-1) \o shift x) (h *: v) - (f x)^-1)) @
13441363
0^' --> - (f x) ^-2 *: 'D_v f x.

theories/ftc.v

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,46 @@ Qed.
17931793

17941794
End integration_by_substitution.
17951795

1796+
Section integration_by_substitution_onem.
1797+
Context {R : realType}.
1798+
Let mu := (@lebesgue_measure R).
1799+
Local Open Scope ereal_scope.
1800+
1801+
Lemma integration_by_substitution_onem (G : R -> R) (r : R) :
1802+
(0 < r <= 1)%R ->
1803+
{within `[0%R, r], continuous G} ->
1804+
(\int[mu]_(x in `[0%R, r]) (G x)%:E =
1805+
\int[mu]_(x in `[(1 - r)%R, 1%R]) (G (1 - x))%:E).
1806+
Proof.
1807+
move=> r01 cG.
1808+
have := @integration_by_substitution_decreasing R (fun x => 1 - x)%R G (1 - r) 1.
1809+
rewrite subKr subrr => -> //.
1810+
- by apply: eq_integral => x xr; rewrite !fctE derive1_onem opprK mulr1.
1811+
- by rewrite ltrBlDl ltrDr; case/andP : r01.
1812+
- by move=> x y _ _ xy; rewrite ler_ltB.
1813+
- by rewrite derive1_onem; move=> ? ?; exact: cvg_cst.
1814+
- by rewrite derive1_onem; exact: is_cvg_cst.
1815+
- by rewrite derive1_onem; exact: is_cvg_cst.
1816+
- split => /=.
1817+
+ by move=> x xr1; exact: derivableB.
1818+
+ apply: cvg_at_right_filter; rewrite subKr.
1819+
apply: (@continuous_comp_cvg _ R^o R^o _ (fun x => 1 - x)%R)=> //=.
1820+
by move=> x; apply: (@continuousB _ R^o) => //; exact: cvg_cst.
1821+
by under eq_fun do rewrite subKr; exact: cvg_id.
1822+
+ by apply: cvg_at_left_filter; apply: (@cvgB _ R^o) => //; exact: cvg_cst.
1823+
Qed.
1824+
1825+
Lemma Rintegration_by_substitution_onem (G : R -> R) (r : R) :
1826+
(0 < r <= 1)%R ->
1827+
{within `[0%R, r], continuous G} ->
1828+
(\int[mu]_(x in `[0%R, r]) (G x) =
1829+
\int[mu]_(x in `[(1 - r)%R, 1%R]) (G (1 - x)))%R.
1830+
Proof.
1831+
by move=> r01 cG; rewrite [in LHS]/Rintegral integration_by_substitution_onem.
1832+
Qed.
1833+
1834+
End integration_by_substitution_onem.
1835+
17961836
Section ge0_integralT_even.
17971837
Context {R : realType}.
17981838
Let mu := @lebesgue_measure R.

theories/normedtype_theory/pseudometric_normed_Zmodule.v

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,20 @@ Arguments cvgr_neq0 {R V T F FF f}.
817817
#[global] Hint Extern 0 (ProperFilter _^'+) =>
818818
(apply: at_right_proper_filter) : typeclass_instances.
819819

820+
Lemma continuous_comp_cvg {R : numFieldType} (U V : pseudoMetricNormedZmodType R)
821+
(f : U -> V) (g : R -> U) (r : R) (l : V) : continuous f ->
822+
(f \o g) x @[x --> r] --> l -> f x @[x --> g r] --> l.
823+
Proof.
824+
move=> cf fgl; apply/(@cvgrPdist_le _ V) => /= e e0.
825+
have e20 : 0 < e / 2 by rewrite divr_gt0.
826+
move/(@cvgrPdist_le _ V) : fgl => /(_ _ e20) fgl.
827+
have /(@cvgrPdist_le _ V) /(_ _ e20) fgf := cf (g r).
828+
rewrite !near_simpl/=; near=> t.
829+
rewrite -(@subrK _ (f (g r)) l) -(addrA (_ + _)) (le_trans (ler_normD _ _))//.
830+
rewrite (splitr e) lerD//; last by near: t.
831+
by case: fgl => d /= d0; apply; rewrite /ball_/= subrr normr0.
832+
Unshelve. all: by end_near. Qed.
833+
820834
Section closure_left_right_open.
821835
Variable R : realFieldType.
822836
Implicit Types z : R.

0 commit comments

Comments
 (0)