Skip to content

Commit 4510bf6

Browse files
committed
adding Import numFieldNormedType.Exports. solve the ^o problem
1 parent 3388bf1 commit 4510bf6

8 files changed

Lines changed: 175 additions & 181 deletions

File tree

theories/charge.v

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Unset Printing Implicit Defensive.
9292

9393
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
9494
Import numFieldTopology.Exports.
95+
Import numFieldNormedType.Exports.
9596

9697
Local Open Scope ring_scope.
9798
Local Open Scope classical_set_scope.
@@ -700,7 +701,7 @@ have nuAoo : 0 <= nu Aoo.
700701
have A_cvg_0 : nu (A_ (v n)) @[n --> \oo] --> 0.
701702
rewrite [X in X @ _ --> _](_ : _ = (fun n => (fine (nu (A_ (v n))))%:E)); last first.
702703
by apply/funext => n/=; rewrite fineK// fin_num_measure.
703-
apply: continuous_cvg => //; apply: (@cvg_series_cvg_0 _ R^o).
704+
apply: continuous_cvg => //; apply: cvg_series_cvg_0.
704705
rewrite (_ : series _ = fine \o (fun n => \sum_(0 <= i < n) nu (A_ (v i)))); last first.
705706
apply/funext => n /=.
706707
by rewrite /series/= sum_fine//= => i _; rewrite fin_num_measure.
@@ -831,7 +832,7 @@ have znuD n : z_ (v n) <= nu D.
831832
have max_le0 n : maxe (z_ (v n) * 2^-1%:E) (- 1%E) <= 0.
832833
by rewrite ge_max leeN10 andbT pmule_lle0.
833834
have not_s_cvg_0 : ~ (z_ \o v) n @[n --> \oo] --> 0.
834-
move/fine_cvgP => -[zfin] /(@cvgrPdist_lt _ R^o).
835+
move/fine_cvgP => -[zfin] /cvgrPdist_lt.
835836
have /[swap] /[apply] -[M _ hM] : (0 < `|fine (nu D)|)%R.
836837
by rewrite normr_gt0// fine_eq0// ?lt_eqF// fin_num_measure.
837838
near \oo => n.
@@ -862,7 +863,7 @@ have : cvg (series (fun n => fine (maxe (z_ (v n) * 2^-1%:E) (- 1%E))) n @[n -->
862863
apply/funext => n/=; rewrite sum_fine// => m _.
863864
rewrite le0_fin_numE; first by rewrite lt_max ltNyr orbT.
864865
by rewrite /maxe; case: ifPn => // _; rewrite mule_le0_ge0.
865-
move/(@cvg_series_cvg_0 _ R^o) => maxe_cvg_0.
866+
move/cvg_series_cvg_0 => maxe_cvg_0.
866867
apply: not_s_cvg_0.
867868
rewrite (_ : _ \o _ = (fun n => z_ (v n) * 2^-1%:E) \* cst 2%:E); last first.
868869
by apply/funext => n/=; rewrite -muleA -EFinM mulVr ?mule1// unitfE.
@@ -874,7 +875,7 @@ apply/fine_cvgP; split.
874875
rewrite sub0r normrN ltNge => maxe_lt1; rewrite fin_numE; apply/andP; split.
875876
by apply: contra maxe_lt1 => /eqP ->; rewrite max_r ?leNye//= normrN1 lexx.
876877
by rewrite lt_eqF// (@le_lt_trans _ _ 0)// mule_le0_ge0.
877-
apply/(@cvgrPdist_lt _ R^o) => _ /posnumP[e].
878+
apply/cvgrPdist_lt => _ /posnumP[e].
878879
have : (0 < minr e%:num 1)%R by rewrite lt_min// ltr01 andbT.
879880
move/cvgrPdist_lt : maxe_cvg_0 => /[apply] -[M _ hM].
880881
near=> n; rewrite sub0r normrN.

theories/ftc.v

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Unset Strict Implicit.
2525
Unset Printing Implicit Defensive.
2626
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
2727
Import numFieldTopology.Exports.
28+
Import numFieldNormedType.Exports.
2829

2930
Local Open Scope classical_set_scope.
3031
Local Open Scope ring_scope.
@@ -36,7 +37,7 @@ Local Open Scope ereal_scope.
3637
Implicit Types (f : R -> R) (a : itv_bound R).
3738

3839
Let FTC0 f a : mu.-integrable setT (EFin \o f) ->
39-
let F x : R^o := (\int[mu]_(t in [set` Interval a (BRight x)]) f t)%R in
40+
let F x := (\int[mu]_(t in [set` Interval a (BRight x)]) f t)%R in
4041
forall x, a < BRight x -> lebesgue_pt f x ->
4142
h^-1 *: (F (h + x) - F x) @[h --> (0:R)%R^'] --> f x.
4243
Proof.
@@ -79,7 +80,7 @@ apply: cvg_at_right_left_dnbhs.
7980
by apply/negP; rewrite negb_and -!leNgt xz orbT.
8081
- by apply/negP; rewrite -leNgt.
8182
rewrite [f in f n @[n --> _] --> _](_ : _ =
82-
fun n => (d n)^-1 *: (fine (\int[mu]_(t in E x n) (f t)%:E) : R^o)); last first.
83+
fun n => (d n)^-1 *: fine (\int[mu]_(t in E x n) (f t)%:E)); last first.
8384
apply/funext => n; congr (_ *: _); rewrite -fineB/=.
8485
by rewrite /= (addrC (d n) x) ixdf.
8586
by apply: integral_fune_fin_num => //; exact: integrableS intf.
@@ -106,7 +107,7 @@ apply: cvg_at_right_left_dnbhs.
106107
have nice_E y : nicely_shrinking y (E y).
107108
split=> [n|]; first exact: measurable_itv.
108109
exists (2, (fun n => PosNum (Nd_gt0 n))); split => //=.
109-
by rewrite -oppr0; exact: (@cvgN _ R^o).
110+
by rewrite -oppr0; exact: cvgN.
110111
move=> n z.
111112
rewrite /E/= in_itv/= /ball/= => /andP[yz zy].
112113
by rewrite ltr_distlC opprK yz /= (le_lt_trans zy)// ltrDl.
@@ -141,7 +142,7 @@ apply: cvg_at_right_left_dnbhs.
141142
rewrite /E /= !in_itv/= leNgt => xdnz.
142143
by apply/negP; rewrite negb_and xdnz.
143144
move=> b a ax.
144-
move/(@cvgrPdist_le _ R^o) : d0.
145+
move/cvgrPdist_le : d0.
145146
move/(_ (x - a)%R); rewrite subr_gt0 => /(_ ax)[m _ /=] h.
146147
near=> n.
147148
have mn : (m <= n)%N by near: n; exists m.
@@ -170,7 +171,7 @@ apply: cvg_at_right_left_dnbhs.
170171
by apply/negP; rewrite negb_and -leNgt zxdn.
171172
suff: ((d n)^-1 * - fine (\int[mu]_(y in E x n) (f y)%:E))%R
172173
@[n --> \oo] --> f x.
173-
apply: cvg_trans; apply: near_eq_cvg; near=> n; congr (_ *: (_ : R^o)).
174+
apply: cvg_trans; apply: near_eq_cvg; near=> n; congr (_ *: _).
174175
rewrite /F -fineN -fineB; last 2 first.
175176
by apply: integral_fune_fin_num => //; exact: integrableS intf.
176177
by apply: integral_fune_fin_num => //; exact: integrableS intf.
@@ -188,9 +189,9 @@ Unshelve. all: by end_near. Qed.
188189

189190
Let FTC0_restrict f a x (u : R) : (x < u)%R ->
190191
mu.-integrable [set` Interval a (BRight u)] (EFin \o f) ->
191-
let F y : R^o := (\int[mu]_(t in [set` Interval a (BRight y)]) f t)%R in
192+
let F y := (\int[mu]_(t in [set` Interval a (BRight y)]) f t)%R in
192193
a < BRight x -> lebesgue_pt f x ->
193-
h^-1 *: (F (h + x) - F x) @[h --> ((0:R^o)%R^')] --> f x.
194+
h^-1 *: (F (h + x) - F x) @[h --> ((0:R)%R^')] --> f x.
194195
Proof.
195196
move=> xu + F ax fx.
196197
rewrite integrable_mkcond//= (restrict_EFin f) => intf.
@@ -204,8 +205,7 @@ apply: cvg_trans; apply: near_eq_cvg; near=> r; congr (_ *: (_ - _)).
204205
move: yaxr; rewrite /= !in_itv/= inE/= in_itv/= => /andP[->/=].
205206
move=> /le_trans; apply; rewrite -lerBrDr.
206207
have [r0|r0] := leP r 0%R; first by rewrite (le_trans r0)// subr_ge0 ltW.
207-
rewrite -(gtr0_norm r0); near: r.
208-
by apply: (@dnbhs0_le _ R^o); rewrite subr_gt0.
208+
by rewrite -(gtr0_norm r0); near: r; apply: dnbhs0_le; rewrite subr_gt0.
209209
- apply: eq_Rintegral => y yaxr; rewrite patchE mem_set//=.
210210
move: yaxr => /=; rewrite !in_itv/= inE/= in_itv/= => /andP[->/=].
211211
by move=> /le_trans; apply; exact/ltW.
@@ -214,9 +214,9 @@ Unshelve. all: by end_near. Qed.
214214
(* NB: right-closed interval *)
215215
Lemma FTC1_lebesgue_pt f a x (u : R) : (x < u)%R ->
216216
mu.-integrable [set` Interval a (BRight u)] (EFin \o f) ->
217-
let F (y : R^o) := (\int[mu]_(t in [set` Interval a (BRight y)]) (f t))%R in
217+
let F y := (\int[mu]_(t in [set` Interval a (BRight y)]) (f t))%R in
218218
a < BRight x -> lebesgue_pt f x ->
219-
derivable (F : R^o -> R^o) x 1 /\ ((F : R^o -> R^o)^`() x = f x).
219+
derivable F x 1 /\ F^`() x = f x.
220220
Proof.
221221
move=> xu intf F ax fx; split; last first.
222222
by apply/cvg_lim; [exact: Rhausdorff|exact: (@FTC0_restrict _ _ _ u)].
@@ -231,8 +231,8 @@ Qed.
231231
Corollary FTC1 f a :
232232
(forall y, mu.-integrable [set` Interval a (BRight y)] (EFin \o f)) ->
233233
locally_integrable [set: R] f ->
234-
let F x : R^o := (\int[mu]_(t in [set` Interval a (BRight x)]) (f t))%R in
235-
{ae mu, forall x, a < BRight x -> derivable (F : R^o -> R^o) x 1 /\ F^`() x = f x}.
234+
let F x := (\int[mu]_(t in [set` Interval a (BRight x)]) (f t))%R in
235+
{ae mu, forall x, a < BRight x -> derivable F x 1 /\ F^`() x = f x}.
236236
Proof.
237237
move=> intf locf F; move: (locf) => /lebesgue_differentiation.
238238
apply: filterS; first exact: (ae_filter_ringOfSetsType mu).
@@ -243,23 +243,23 @@ Qed.
243243
Corollary FTC1Ny f :
244244
(forall y, mu.-integrable `]-oo, y] (EFin \o f)) ->
245245
locally_integrable [set: R] f ->
246-
let F x : R^o := (\int[mu]_(t in [set` `]-oo, x]]) (f t))%R in
247-
{ae mu, forall x, derivable (F : R^o -> R^o) x 1 /\ F^`() x = f x}.
246+
let F x := (\int[mu]_(t in [set` `]-oo, x]]) (f t))%R in
247+
{ae mu, forall x, derivable F x 1 /\ F^`() x = f x}.
248248
Proof.
249249
move=> intf locf F; have := FTC1 intf locf.
250250
apply: filterS; first exact: (ae_filter_ringOfSetsType mu).
251251
by move=> r /=; apply; rewrite ltNyr.
252252
Qed.
253253

254-
Let itv_continuous_lebesgue_pt f a (x : R^o) (u : R) : (x < u)%R ->
254+
Let itv_continuous_lebesgue_pt f a x (u : R) : (x < u)%R ->
255255
measurable_fun [set` Interval a (BRight u)] f ->
256256
a < BRight x ->
257257
{for x, continuous f} -> lebesgue_pt f x.
258258
Proof.
259259
move=> xu fi + fx.
260260
move: a fi => [b a fi /[1!(@lte_fin R)] ax|[|//] fi _].
261261
- near (0%R:R)^'+ => e; apply: (@continuous_lebesgue_pt _ _ _ (ball x e)) => //.
262-
+ exact: (ball_open_nbhs x).
262+
+ exact: ball_open_nbhs.
263263
+ exact: measurable_ball.
264264
+ apply: measurable_funS fi => //; rewrite ball_itv.
265265
apply: (@subset_trans _ `](x - e)%R, u]) => //.
@@ -279,9 +279,9 @@ Unshelve. all: by end_near. Qed.
279279

280280
Corollary continuous_FTC1 f a x (u : R) : (x < u)%R ->
281281
mu.-integrable [set` Interval a (BRight u)] (EFin \o f) ->
282-
let F x : R^o := (\int[mu]_(t in [set` Interval a (BRight x)]) (f t))%R in
282+
let F x := (\int[mu]_(t in [set` Interval a (BRight x)]) (f t))%R in
283283
a < BRight x -> {for x, continuous f} ->
284-
derivable (F : R^o -> R^o) x 1 /\ F^`() x = f x.
284+
derivable F x 1 /\ F^`() x = f x.
285285
Proof.
286286
move=> xu fi F ax fx; suff lfx : lebesgue_pt f x.
287287
have /(_ ax lfx)[dfx f'xE] := @FTC1_lebesgue_pt _ a _ _ xu fi.
@@ -292,9 +292,9 @@ Qed.
292292

293293
Corollary continuous_FTC1_closed f (a x : R) (u : R) : (x < u)%R ->
294294
mu.-integrable `[a, u] (EFin \o f) ->
295-
let F x : R^o := (\int[mu]_(t in [set` `[a, x]]) (f t))%R in
295+
let F x := (\int[mu]_(t in [set` `[a, x]]) (f t))%R in
296296
(a < x)%R -> {for x, continuous f} ->
297-
derivable (F : R^o -> R^o) x 1 /\ F^`() x = f x.
297+
derivable F x 1 /\ F^`() x = f x.
298298
Proof. by move=> xu locf F ax fx; exact: (@continuous_FTC1 _ _ _ u). Qed.
299299

300300
End FTC.
@@ -359,7 +359,7 @@ Proof.
359359
move=> ab intf; pose fab := f \_ `[a, b].
360360
have intfab : mu.-integrable `[a, b] (EFin \o fab).
361361
by rewrite -restrict_EFin; apply/integrable_restrict => //=; rewrite setIidr.
362-
apply/(@cvgrPdist_le _ R^o) => /= e e0; near=> x.
362+
apply/cvgrPdist_le => /= e e0; near=> x.
363363
rewrite {1}/int /parameterized_integral sub0r normrN.
364364
have [|xa] := leP a x.
365365
move=> ax; apply/ltW; move: ax.
@@ -379,7 +379,7 @@ have /= int_normr_cont : forall e : R, 0 < e ->
379379
by rewrite -restrict_EFin; apply/integrable_restrict => //=; rewrite setTI.
380380
have intfab : mu.-integrable `[a, b] (EFin \o fab).
381381
by rewrite -restrict_EFin; apply/integrable_restrict => //=; rewrite setIidr.
382-
rewrite /int /parameterized_integral; apply/(@cvgrPdist_le _ R^o) => /= e e0.
382+
rewrite /int /parameterized_integral; apply/cvgrPdist_le => /= e e0.
383383
have [d [d0 /= {}int_normr_cont]] := int_normr_cont _ e0.
384384
near=> x.
385385
rewrite [in X in X - _](@itv_bndbnd_setU _ _ _ (BRight x))//;
@@ -423,7 +423,7 @@ have /= int_normr_cont : forall e : R, 0 < e ->
423423
have intfab : mu.-integrable `[a, b] (EFin \o fab).
424424
by rewrite -restrict_EFin; apply/integrable_restrict => //=; rewrite setIidr.
425425
rewrite /int /parameterized_integral => z; rewrite in_itv/= => /andP[az zb].
426-
apply/(@cvgrPdist_le _ R^o) => /= e e0.
426+
apply/cvgrPdist_le => /= e e0.
427427
have [d [d0 /= {}int_normr_cont]] := int_normr_cont _ e0.
428428
near=> x.
429429
have [xz|xz|->] := ltgtP x z; last by rewrite subrr normr0 ltW.
@@ -493,15 +493,15 @@ rewrite mem_set ?mulr1 /=; last exact: subset_itv_oo_cc.
493493
exact: cvg_patch.
494494
Qed.
495495

496-
Corollary continuous_FTC2 (f F : R^o -> R^o) a b : (a < b)%R ->
496+
Corollary continuous_FTC2 f F a b : (a < b)%R ->
497497
{within `[a, b], continuous f} ->
498498
derivable_oo_continuous_bnd F a b ->
499499
{in `]a, b[, F^`() =1 f} ->
500500
(\int[mu]_(x in `[a, b]) (f x)%:E = (F b)%:E - (F a)%:E)%E.
501501
Proof.
502502
move=> ab cf dF F'f.
503503
pose fab := f \_ `[a, b].
504-
pose G (x : R^o) : R^o := (\int[mu]_(t in `[a, x]) fab t)%R.
504+
pose G x := (\int[mu]_(t in `[a, x]) fab t)%R.
505505
have iabf : mu.-integrable `[a, b] (EFin \o f).
506506
by apply: continuous_compact_integrable => //; exact: segment_compact.
507507
have G'f : {in `]a, b[, forall x, G^`() x = fab x /\ derivable G x 1}.
@@ -528,11 +528,11 @@ have [k FGk] : exists k : R, {in `]a, b[, (F - G =1 cst k)%R}.
528528
+ by move: yab; rewrite in_itv/= => /andP[_ /ltW].
529529
have Fz1 : derivable F z 1.
530530
by case: dF => /= + _ _; apply; rewrite inE in zab.
531-
have Gz1 : derivable (G : R^o -> R^o) z 1 by have [|] := G'f z.
531+
have Gz1 : derivable G z 1 by have [|] := G'f z.
532532
apply: DeriveDef.
533533
+ by apply: derivableB; [exact: Fz1|exact: Gz1].
534534
+ by rewrite deriveB -?derive1E; [by []|exact: Fz1|exact: Gz1].
535-
- apply: (@derivable_within_continuous _ R^o) => z zxy.
535+
- apply: derivable_within_continuous => z zxy.
536536
apply: derivableB.
537537
+ case: dF => /= + _ _; apply.
538538
apply: subset_itvSoo zxy => //.
@@ -572,7 +572,7 @@ have GbcFb : G x @[x --> b^'-] --> (- c + F b)%R.
572572
by apply/funext => x/=; rewrite subrK.
573573
have contF : {within `[a, b], continuous F}.
574574
apply/(continuous_within_itvP _ ab); split => //.
575-
move=> z zab; apply/(@differentiable_continuous _ R^o R^o)/derivable1_diffP.
575+
move=> z zab; apply/differentiable_continuous/derivable1_diffP.
576576
by case: dF => /= + _ _; exact.
577577
have iabfab : mu.-integrable `[a, b] (EFin \o fab).
578578
by rewrite -restrict_EFin; apply/integrable_restrict => //; rewrite setIidr.
@@ -603,7 +603,7 @@ Notation mu := lebesgue_measure.
603603
Local Open Scope ereal_scope.
604604
Implicit Types (F G f g : R -> R) (a b : R).
605605

606-
Lemma integration_by_parts (F : R^o -> R^o) (G : R^o -> R^o) (f g : R^o -> R^o) a b : (a < b)%R ->
606+
Lemma integration_by_parts F G f g a b : (a < b)%R ->
607607
{within `[a, b], continuous f} ->
608608
derivable_oo_continuous_bnd F a b ->
609609
{in `]a, b[, F^`() =1 f} ->
@@ -615,7 +615,7 @@ Lemma integration_by_parts (F : R^o -> R^o) (G : R^o -> R^o) (f g : R^o -> R^o)
615615
Proof.
616616
move=> ab cf Fab Ff cg Gab Gg.
617617
have cfg : {within `[a, b], continuous (f * G + F * g)%R}.
618-
apply/subspace_continuousP => x abx; apply:cvgD .
618+
apply/subspace_continuousP => x abx; apply: cvgD.
619619
- apply: cvgM.
620620
+ by move/subspace_continuousP : cf; exact.
621621
+ have := derivable_oo_continuous_bnd_within Gab.
@@ -655,7 +655,7 @@ Context {R : realType}.
655655
Notation mu := lebesgue_measure.
656656
Implicit Types (F G f g : R -> R) (a b : R).
657657

658-
Lemma Rintegration_by_parts (F G : R^o -> R^o) f g a b :
658+
Lemma Rintegration_by_parts F G f g a b :
659659
(a < b)%R ->
660660
{within `[a, b], continuous f} ->
661661
derivable_oo_continuous_bnd F a b ->
@@ -730,7 +730,7 @@ Lemma increasing_cvg_at_left_comp F G a b (l : R) : (a < b)%R ->
730730
Proof.
731731
move=> ab incrF cFb GFb.
732732
apply/cvgrPdist_le => /= e e0.
733-
have/cvgrPdist_le /(_ e e0) [d /= d0 {}GFb] := GFb.
733+
have /cvgrPdist_le /(_ e e0) [d /= d0 {}GFb] := GFb.
734734
have := cvg_at_left_within cFb.
735735
move/cvgrPdist_lt/(_ _ d0) => [d' /= d'0 {}cFb].
736736
near=> t.
@@ -748,7 +748,7 @@ Lemma decreasing_cvg_at_right_comp F G a b (l : R) : (a < b)%R ->
748748
Proof.
749749
move=> ab decrF cFa GFa.
750750
apply/cvgrPdist_le => /= e e0.
751-
have/cvgrPdist_le /(_ e e0) [d' /= d'0 {}GFa] := GFa.
751+
have /cvgrPdist_le /(_ e e0) [d' /= d'0 {}GFa] := GFa.
752752
have := cvg_at_right_within cFa.
753753
move/cvgrPdist_lt/(_ _ d'0) => [d'' /= d''0 {}cFa].
754754
near=> t.
@@ -766,7 +766,7 @@ Lemma decreasing_cvg_at_left_comp F G a b (l : R) : (a < b)%R ->
766766
Proof.
767767
move=> ab decrF cFb GFb.
768768
apply/cvgrPdist_le => /= e e0.
769-
have/cvgrPdist_le /(_ e e0) [d' /= d'0 {}GFb] := GFb.
769+
have /cvgrPdist_le /(_ e e0) [d' /= d'0 {}GFb] := GFb.
770770
have := cvg_at_left_within cFb. (* different point from gt0 version *)
771771
move/cvgrPdist_lt/(_ _ d'0) => [d'' /= d''0 {}cFb].
772772
near=> t.
@@ -863,7 +863,7 @@ rewrite oppeD//= -(continuous_FTC2 ab _ _ DPGFE); last 2 first.
863863
exact: decreasing_image_oo.
864864
* have : -%R F^`() @ x --> (- f x)%R.
865865
by rewrite -fE//; apply: cvgN; exact: cF'.
866-
apply: cvg_trans; apply: near_eq_cvg; rewrite near_simpl.
866+
apply: cvg_trans; apply: near_eq_cvg.
867867
apply: (@open_in_nearW _ _ `]a, b[) ; last by rewrite inE.
868868
exact: interval_open.
869869
by move=> z; rewrite inE/= => zab; rewrite fctE fE.
@@ -978,7 +978,7 @@ rewrite (@integration_by_substitution_decreasing (- F)%R); first last.
978978
by case: Fab => + _ _; exact.
979979
rewrite -derive1E.
980980
have /cvgN := cF' _ xab; apply: cvg_trans; apply: near_eq_cvg.
981-
rewrite near_simpl; near=> y; rewrite fctE !derive1E deriveN//.
981+
near=> y; rewrite fctE !derive1E deriveN//.
982982
by case: Fab => + _ _; apply; near: y; exact: near_in_itv.
983983
- by move=> x y xab yab yx; rewrite ltrN2 incrF.
984984
- by [].

0 commit comments

Comments
 (0)