Skip to content

Commit d399298

Browse files
authored
minor gen (#1792)
1 parent eed7915 commit d399298

File tree

4 files changed

+34
-19
lines changed

4 files changed

+34
-19
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,15 @@
106106
+ definition `jacobian`
107107
+ lemmas `deriveEjacobian`, `differentiable_coord`
108108

109+
- in `ftc.v`:
110+
+ lemmas `parameterized_integral_continuous`,
111+
`integration_by_substitution_decreasing`,
112+
`integration_by_substitution_oppr`,
113+
`integration_by_substitution_increasing`,
114+
`integration_by_substitution_onem`,
115+
`Rintegration_by_substitution_onem`
116+
117+
109118
### Deprecated
110119

111120
### Removed

theories/ftc.v

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,13 @@ near: x; exists d => // z; rewrite /ball_/= => + zb.
454454
by rewrite gtr0_norm// ?subr_gt0.
455455
Unshelve. all: by end_near. Qed.
456456

457-
Lemma parameterized_integral_continuous a b (f : R -> R) : a < b ->
457+
Lemma parameterized_integral_continuous a b (f : R -> R) : a <= b ->
458458
mu.-integrable `[a, b] (EFin \o f) ->
459459
{within `[a, b], continuous (fun x => int a x f)}.
460460
Proof.
461-
move=> ab intf; apply/(continuous_within_itvP _ ab); split; first last.
461+
rewrite le_eqVlt => /predU1P[<- _|ab intf].
462+
by rewrite set_itv1; exact: continuous_subspace1.
463+
apply/(continuous_within_itvP _ ab); split; first last.
462464
exact: parameterized_integral_cvg_at_left.
463465
apply/cvg_at_right_filter.
464466
rewrite {2}/int /parameterized_integral interval_set1 Rintegral_set1.
@@ -1048,7 +1050,7 @@ Context {R : realType}.
10481050
Notation mu := lebesgue_measure.
10491051
Implicit Types (F G f : R -> R) (a b : R).
10501052

1051-
Lemma integration_by_substitution_decreasing F G a b : (a < b)%R ->
1053+
Lemma integration_by_substitution_decreasing F G a b : (a <= b)%R ->
10521054
{in `[a, b] &, {homo F : x y /~ (x < y)%R}} ->
10531055
{in `]a, b[, continuous F^`()} ->
10541056
cvg (F^`() x @[x --> a^'+]) ->
@@ -1058,6 +1060,7 @@ Lemma integration_by_substitution_decreasing F G a b : (a < b)%R ->
10581060
\int[mu]_(x in `[F b, F a]) (G x)%:E =
10591061
\int[mu]_(x in `[a, b]) (((G \o F) * - F^`()) x)%:E.
10601062
Proof.
1063+
rewrite le_eqVlt => /predU1P[<- *|]; first by rewrite !set_itv1 !integral_set1.
10611064
move=> ab decrF cF' /cvg_ex[/= r F'ar] /cvg_ex[/= l F'bl] Fab cG.
10621065
have cF := derivable_oo_LRcontinuous_within Fab.
10631066
have FbFa : (F b < F a)%R by apply: decrF; rewrite //= in_itv/= (ltW ab) lexx.
@@ -1083,15 +1086,15 @@ have PGFbFa : derivable_oo_LRcontinuous PG (F b) (F a).
10831086
apply: (continuous_FTC1 xFa intG _ _).1 => /=.
10841087
by move: xFbFa; rewrite lte_fin in_itv/= => /andP[].
10851088
exact: (within_continuous_continuous _ _ xFbFa).
1086-
- have := parameterized_integral_continuous FbFa intG.
1089+
- have := parameterized_integral_continuous (ltW FbFa) intG.
10871090
by move=> /(continuous_within_itvP _ FbFa)[].
10881091
- exact: parameterized_integral_cvg_at_left.
10891092
rewrite (@continuous_FTC2 _ _ PG _ _ FbFa cG); last 2 first.
10901093
- split.
10911094
+ move=> x /[dup]xFbFa; rewrite in_itv/= => /andP[Fbx xFa].
10921095
apply: (continuous_FTC1 xFa intG Fbx _).1.
10931096
by move: cG => /(continuous_within_itvP _ FbFa)[+ _ _]; exact.
1094-
+ have := parameterized_integral_continuous FbFa intG.
1097+
+ have := parameterized_integral_continuous (ltW FbFa) intG.
10951098
by move=> /(continuous_within_itvP _ FbFa)[].
10961099
+ exact: parameterized_integral_cvg_at_left.
10971100
- move=> x xFbFa.
@@ -1180,7 +1183,7 @@ apply: eq_integral_itv_bounded.
11801183
- by move=> x /[!inE] xab; rewrite mulrN !fctE fE.
11811184
Unshelve. all: end_near. Qed.
11821185

1183-
Lemma integration_by_substitution_oppr G a b : (a < b)%R ->
1186+
Lemma integration_by_substitution_oppr G a b : (a <= b)%R ->
11841187
{within `[(- b)%R, (- a)%R], continuous G} ->
11851188
\int[mu]_(x in `[(- b)%R, (- a)%R]) (G x)%:E =
11861189
\int[mu]_(x in `[a, b]) ((G \o -%R) x)%:E.
@@ -1199,7 +1202,7 @@ rewrite (@integration_by_substitution_decreasing -%R)//.
11991202
+ by rewrite -at_rightN; exact: cvg_at_right_filter.
12001203
Qed.
12011204

1202-
Lemma integration_by_substitution_increasing F G a b : (a < b)%R ->
1205+
Lemma integration_by_substitution_increasing F G a b : (a <= b)%R ->
12031206
{in `[a, b] &, {homo F : x y / (x < y)%R}} ->
12041207
{in `]a, b[, continuous F^`()} ->
12051208
cvg (F^`() x @[x --> a^'+]) ->
@@ -1209,6 +1212,7 @@ Lemma integration_by_substitution_increasing F G a b : (a < b)%R ->
12091212
\int[mu]_(x in `[F a, F b]) (G x)%:E =
12101213
\int[mu]_(x in `[a, b]) (((G \o F) * F^`()) x)%:E.
12111214
Proof.
1215+
rewrite le_eqVlt => /predU1P[<- *|]; first by rewrite !set_itv1 !integral_set1.
12121216
move=> ab incrF cF' /cvg_ex[/= r F'ar] /cvg_ex[/= l F'bl] Fab cG.
12131217
transitivity (\int[mu]_(x in `[F a, F b]) (((G \o -%R) \o -%R) x)%:E).
12141218
by apply/eq_integral => x ? /=; rewrite opprK.
@@ -1223,7 +1227,7 @@ have cGN : {within `[- F b, - F a]%classic%R, continuous (G \o -%R)}.
12231227
by rewrite /= opprK => /cvg_at_leftNP.
12241228
- move/(continuous_within_itvP _ FaFb) : cG => [_ + _].
12251229
by rewrite /= opprK => /cvg_at_rightNP.
1226-
rewrite -integration_by_substitution_oppr//.
1230+
rewrite -(integration_by_substitution_oppr (ltW FaFb))//.
12271231
rewrite (@integration_by_substitution_decreasing (- F)%R); first last.
12281232
- exact: cGN.
12291233
- split; [|by apply: cvgN; case: Fab..].
@@ -1243,7 +1247,7 @@ rewrite (@integration_by_substitution_decreasing (- F)%R); first last.
12431247
near=> y; rewrite fctE !derive1E deriveN//.
12441248
by case: Fab => + _ _; apply; near: y; exact: near_in_itvoo.
12451249
- by move=> x y xab yab yx; rewrite ltrN2 incrF.
1246-
- by [].
1250+
- exact/ltW.
12471251
have mGF : measurable_fun `]a, b[ (G \o F).
12481252
apply: (@measurable_comp _ _ _ _ _ _ `]F a, F b[%classic) => //.
12491253
- move=> /= _ [x] /[!in_itv]/= /andP[ax xb] <-.
@@ -1398,7 +1402,7 @@ rewrite integration_by_substitution_decreasing.
13981402
rewrite measurable_funU//; split; last exact: measurable_fun_set1.
13991403
by apply: measurable_funS (mGFNF' n) => //; exact: subset_itv_oo_co.
14001404
+ by apply: measurable_funS (mGFNF' n) => //; exact: subset_itv_oo_co.
1401-
- by rewrite ltrDl.
1405+
- by rewrite lerDl.
14021406
- move=> x y /=; rewrite !in_itv/= => /andP[ax _] /andP[ay _] yx.
14031407
by apply: decrF; rewrite //in_itv/= ?ax ?ay.
14041408
- move=> x; rewrite in_itv/= => /andP[ax _].
@@ -1798,16 +1802,17 @@ Let mu := (@lebesgue_measure R).
17981802
Local Open Scope ereal_scope.
17991803

18001804
Lemma integration_by_substitution_onem (G : R -> R) (r : R) :
1801-
(0 < r <= 1)%R ->
1805+
(0 <= r <= 1)%R ->
18021806
{within `[0%R, r], continuous G} ->
18031807
\int[mu]_(x in `[0%R, r]) (G x)%:E =
18041808
\int[mu]_(x in `[`1-r, 1%R]) (G `1-x)%:E.
18051809
Proof.
1806-
move=> r01 cG.
1810+
move=> /andP[]; rewrite le_eqVlt => /predU1P[<- *|r0 r1 cG].
1811+
by rewrite onem0 2!set_itv1 2!integral_set1.
18071812
have := @integration_by_substitution_decreasing R onem G `1-r 1.
18081813
rewrite onemK onem1 => -> //.
18091814
- by apply: eq_integral => x xr; rewrite !fctE derive1_onem opprK mulr1.
1810-
- by rewrite ltrBlDl ltrDr; case/andP : r01.
1815+
- by rewrite lerBlDl lerDr ltW.
18111816
- by move=> x y _ _ xy; rewrite ler_ltB.
18121817
- by rewrite derive1_onem; move=> ? ?; exact: cvg_cst.
18131818
- by rewrite derive1_onem; exact: is_cvg_cst.
@@ -1822,7 +1827,7 @@ rewrite onemK onem1 => -> //.
18221827
Qed.
18231828

18241829
Lemma Rintegration_by_substitution_onem (G : R -> R) (r : R) :
1825-
(0 < r <= 1)%R ->
1830+
(0 <= r <= 1)%R ->
18261831
{within `[0%R, r], continuous G} ->
18271832
(\int[mu]_(x in `[0, r]) (G x) =
18281833
\int[mu]_(x in `[`1-r, 1]) (G `1-x))%R.

theories/gauss_integral.v

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Definition integral0_gauss x := \int[mu]_(t in `[0, x]) gauss_fun t.
7070
Lemma integral0_gauss_ge0 x : 0 <= integral0_gauss x.
7171
Proof. by apply: Rintegral_ge0 => //= r _; rewrite expR_ge0. Qed.
7272

73-
Let continuous_integral0_gauss x : (0 < x)%R ->
73+
Let continuous_integral0_gauss x : (0 <= x)%R ->
7474
{within `[0, x], continuous integral0_gauss}.
7575
Proof.
7676
move=> x0; rewrite /integral0_gauss.
@@ -244,7 +244,7 @@ rewrite /integral0_gauss [in LHS]/Rintegral.
244244
have derM : ( *%R^~ x)^`() = cst x.
245245
by apply/funext => z; rewrite derive1Mr// derive1_id mul1r.
246246
have := @integration_by_substitution_increasing R (fun t => t * x)
247-
gauss_fun _ _ ltr01.
247+
gauss_fun _ _ ler01.
248248
rewrite -/mu mul0r mul1r => ->//=; last 6 first.
249249
- move=> a b; rewrite !in_itv/= => /andP[a0 a1] /andP[b0 b1] ab.
250250
by rewrite ltr_pM2r.
@@ -308,7 +308,8 @@ apply: (@squeeze_cvgr _ _ _ _ (cst 0) gauss_fun).
308308
- exact: cvg_gauss_fun.
309309
Unshelve. all: end_near. Qed.
310310

311-
Lemma cvg_integral0_gauss_sqr : (integral0_gauss x) ^+ 2 @[x --> +oo] --> pi / 4.
311+
Lemma cvg_integral0_gauss_sqr :
312+
(integral0_gauss x) ^+ 2 @[x --> +oo] --> pi / 4.
312313
Proof.
313314
have h_h0 x : 0 < x -> h x = h 0.
314315
move=> x0.
@@ -324,7 +325,7 @@ have h_h0 x : 0 < x -> h x = h 0.
324325
apply: continuousD; last first.
325326
rewrite /prop_for /continuous_at expr2.
326327
under [X in X @ _ --> _]eq_fun do rewrite expr2.
327-
by apply: cvgM; exact: continuous_integral0_gauss.
328+
by apply: cvgM; apply: continuous_integral0_gauss; exact: ltW.
328329
by apply: derivable_within_continuous => u _; exact: derivable_integral01_u.
329330
move=> c; rewrite in_itv/= => /andP[c0 cx].
330331
by rewrite derive_h// mul0r => /eqP; rewrite subr_eq0 => /eqP.

theories/probability.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2352,7 +2352,7 @@ Proof.
23522352
rewrite -[LHS]Rintegral_mkcond Rintegration_by_substitution_onem//=.
23532353
- rewrite onem1 -[RHS]Rintegral_mkcond; apply: eq_Rintegral => x x01.
23542354
by rewrite XMonemXC.
2355-
- by rewrite ltr01 lexx.
2355+
- by rewrite ler01 lexx.
23562356
- exact: within_continuous_XMonemX.
23572357
Qed.
23582358

0 commit comments

Comments
 (0)