Skip to content

Commit 185a571

Browse files
committed
tvs structure
Co-authored with Reynald Affeldt <reynald.affeldt@aist.go.jp> Co-authored with Cyril Cohen <cyril.cohen@inria.fr>
1 parent a413c3f commit 185a571

File tree

13 files changed

+590
-34
lines changed

13 files changed

+590
-34
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,27 @@
44

55
### Added
66

7+
- in `tvs.v`:
8+
+ HB.structure `Tvs`
9+
+ HB.factory `TopologicalLmod_isTvs`
10+
+ lemma `nbhs0N`
11+
+ lemma `nbhsN`
12+
+ lemma `nbhsT`
13+
+ lemma `nbhs_add`
14+
+ lemma nbhs0_scaler
15+
+ lemma nbhs0_scaler
16+
+ HB.Instance of a Tvs od R^o
17+
+ HB.Instance of a Tvs on a product of Tvs
18+
719
### Changed
820

21+
- in normedtype.v
22+
+ HB structure `normedModule` now depends on a Tvs
23+
instead of a Lmodule
24+
+ Factory `PseudoMetricNormedZmod_Lmodule_isNormedModule` becomes
25+
`PseudoMetricNormedZmod_Tvs_isNormedModule`
26+
+ Section `prod_NormedModule` now depends on a `numFieldType`
27+
928
### Renamed
1029

1130
### Generalized

_CoqProject

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ theories/separation_axioms.v
3131
theories/function_spaces.v
3232
theories/cantor.v
3333
theories/prodnormedzmodule.v
34+
theories/tvs.v
3435
theories/normedtype.v
3536
theories/realfun.v
3637
theories/sequences.v

theories/Make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ separation_axioms.v
1717
function_spaces.v
1818
cantor.v
1919
prodnormedzmodule.v
20+
tvs.v
2021
normedtype.v
2122
realfun.v
2223
sequences.v

theories/charge.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Unset Strict Implicit.
9191
Unset Printing Implicit Defensive.
9292

9393
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
94-
Import numFieldTopology.Exports.
94+
Import numFieldNormedType.Exports.
9595

9696
Local Open Scope ring_scope.
9797
Local Open Scope classical_set_scope.

theories/derive.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
From HB Require Import structures.
33
From mathcomp Require Import all_ssreflect ssralg ssrnum matrix interval.
44
From mathcomp Require Import mathcomp_extra boolp classical_sets functions.
5-
Require Import reals signed topology prodnormedzmodule normedtype landau forms.
5+
Require Import reals signed topology prodnormedzmodule tvs normedtype landau forms.
66

77
(**md**************************************************************************)
88
(* # Differentiation *)

theories/exp.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ From mathcomp Require Import interval rat.
44
From mathcomp Require Import boolp classical_sets functions.
55
From mathcomp Require Import mathcomp_extra.
66
Require Import reals ereal.
7-
Require Import signed topology normedtype landau sequences derive realfun.
7+
Require Import signed topology tvs normedtype landau sequences derive realfun.
88
Require Import itv convex.
99

1010
(**md**************************************************************************)
@@ -229,7 +229,7 @@ suff Cc : limn (h^-1 *: (series (shx h - sx))) @[h --> 0^'] --> limn (series s).
229229
apply: cvg_zero => /=.
230230
suff Cc : limn
231231
(series (fun n => c n * (((h + x) ^+ n - x ^+ n) / h - n%:R * x ^+ n.-1)))
232-
@[h --> 0^'] --> (0 : R).
232+
@[h --> 0^'] --> 0.
233233
apply: cvg_sub0 Cc.
234234
apply/cvgrPdist_lt => eps eps_gt0 /=.
235235
near=> h; rewrite sub0r normrN /=.

theories/ftc.v

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ From HB Require Import structures.
33
From mathcomp Require Import all_ssreflect ssralg ssrnum ssrint interval finmap.
44
From mathcomp Require Import mathcomp_extra boolp classical_sets functions.
55
From mathcomp Require Import cardinality fsbigop .
6-
Require Import signed reals ereal topology normedtype sequences real_interval.
6+
Require Import signed reals ereal topology tvs normedtype sequences real_interval.
77
Require Import esum measure lebesgue_measure numfun realfun lebesgue_integral.
88
Require Import derive charge.
99

@@ -24,7 +24,7 @@ Set Implicit Arguments.
2424
Unset Strict Implicit.
2525
Unset Printing Implicit Defensive.
2626
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
27-
Import numFieldTopology.Exports.
27+
Import numFieldNormedType.Exports.
2828

2929
Local Open Scope classical_set_scope.
3030
Local Open Scope ring_scope.
@@ -358,7 +358,7 @@ Proof.
358358
move=> ab intf; pose fab := f \_ `[a, b].
359359
have intfab : mu.-integrable `[a, b] (EFin \o fab).
360360
by rewrite -restrict_EFin; apply/integrable_restrict => //=; rewrite setIidr.
361-
apply/cvgrPdist_le => /= e e0; rewrite near_simpl; near=> x.
361+
apply/cvgrPdist_le => /= e e0; near=> x.
362362
rewrite {1}/int /parameterized_integral sub0r normrN.
363363
have [|xa] := leP a x.
364364
move=> ax; apply/ltW; move: ax.
@@ -423,7 +423,6 @@ have intfab : mu.-integrable `[a, b] (EFin \o fab).
423423
by rewrite -restrict_EFin; apply/integrable_restrict => //=; rewrite setIidr.
424424
rewrite /int /parameterized_integral => z; rewrite in_itv/= => /andP[az zb].
425425
apply/cvgrPdist_le => /= e e0.
426-
rewrite near_simpl.
427426
have [d [d0 /= {}int_normr_cont]] := int_normr_cont _ e0.
428427
near=> x.
429428
have [xz|xz|->] := ltgtP x z; last by rewrite subrr normr0 ltW.
@@ -501,7 +500,7 @@ Corollary continuous_FTC2 f F a b : (a < b)%R ->
501500
Proof.
502501
move=> ab cf dF F'f.
503502
pose fab := f \_ `[a, b].
504-
pose G x : R := (\int[mu]_(t in `[a, x]) fab t)%R.
503+
pose G x := (\int[mu]_(t in `[a, x]) fab t)%R.
505504
have iabf : mu.-integrable `[a, b] (EFin \o f).
506505
by apply: continuous_compact_integrable => //; exact: segment_compact.
507506
have G'f : {in `]a, b[, forall x, G^`() x = fab x /\ derivable G x 1}.
@@ -730,7 +729,7 @@ Lemma increasing_cvg_at_left_comp F G a b (l : R) : (a < b)%R ->
730729
Proof.
731730
move=> ab incrF cFb GFb.
732731
apply/cvgrPdist_le => /= e e0.
733-
have/cvgrPdist_le /(_ e e0) [d /= d0 {}GFb] := GFb.
732+
have /cvgrPdist_le /(_ e e0) [d /= d0 {}GFb] := GFb.
734733
have := cvg_at_left_within cFb.
735734
move/cvgrPdist_lt/(_ _ d0) => [d' /= d'0 {}cFb].
736735
near=> t.
@@ -748,7 +747,7 @@ Lemma decreasing_cvg_at_right_comp F G a b (l : R) : (a < b)%R ->
748747
Proof.
749748
move=> ab decrF cFa GFa.
750749
apply/cvgrPdist_le => /= e e0.
751-
have/cvgrPdist_le /(_ e e0) [d' /= d'0 {}GFa] := GFa.
750+
have /cvgrPdist_le /(_ e e0) [d' /= d'0 {}GFa] := GFa.
752751
have := cvg_at_right_within cFa.
753752
move/cvgrPdist_lt/(_ _ d'0) => [d'' /= d''0 {}cFa].
754753
near=> t.
@@ -766,7 +765,7 @@ Lemma decreasing_cvg_at_left_comp F G a b (l : R) : (a < b)%R ->
766765
Proof.
767766
move=> ab decrF cFb GFb.
768767
apply/cvgrPdist_le => /= e e0.
769-
have/cvgrPdist_le /(_ e e0) [d' /= d'0 {}GFb] := GFb.
768+
have /cvgrPdist_le /(_ e e0) [d' /= d'0 {}GFb] := GFb.
770769
have := cvg_at_left_within cFb. (* different point from gt0 version *)
771770
move/cvgrPdist_lt/(_ _ d'0) => [d'' /= d''0 {}cFb].
772771
near=> t.
@@ -863,7 +862,7 @@ rewrite oppeD//= -(continuous_FTC2 ab _ _ DPGFE); last 2 first.
863862
exact: decreasing_image_oo.
864863
* have : -%R F^`() @ x --> (- f x)%R.
865864
by rewrite -fE//; apply: cvgN; exact: cF'.
866-
apply: cvg_trans; apply: near_eq_cvg; rewrite near_simpl.
865+
apply: cvg_trans; apply: near_eq_cvg.
867866
apply: (@open_in_nearW _ _ `]a, b[) ; last by rewrite inE.
868867
exact: interval_open.
869868
by move=> z; rewrite inE/= => zab; rewrite fctE fE.
@@ -978,7 +977,7 @@ rewrite (@integration_by_substitution_decreasing (- F)%R); first last.
978977
by case: Fab => + _ _; exact.
979978
rewrite -derive1E.
980979
have /cvgN := cF' _ xab; apply: cvg_trans; apply: near_eq_cvg.
981-
rewrite near_simpl; near=> y; rewrite fctE !derive1E deriveN//.
980+
near=> y; rewrite fctE !derive1E deriveN//.
982981
by case: Fab => + _ _; apply; near: y; exact: near_in_itv.
983982
- by move=> x y xab yab yx; rewrite ltrN2 incrF.
984983
- by [].

theories/lebesgue_integral.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ From mathcomp Require Import all_ssreflect ssralg ssrnum ssrint interval finmap.
44
From mathcomp Require Import archimedean.
55
From mathcomp Require Import boolp classical_sets functions.
66
From mathcomp Require Import cardinality fsbigop.
7-
Require Import signed reals ereal topology normedtype sequences real_interval.
7+
Require Import signed reals ereal topology tvs normedtype sequences real_interval.
88
Require Import esum measure lebesgue_measure numfun realfun function_spaces.
99

1010
(**md**************************************************************************)
@@ -82,7 +82,7 @@ Set Implicit Arguments.
8282
Unset Strict Implicit.
8383
Unset Printing Implicit Defensive.
8484
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
85-
Import numFieldTopology.Exports.
85+
Import numFieldNormedType.Exports.
8686
From mathcomp Require Import mathcomp_extra.
8787

8888
Local Open Scope classical_set_scope.
@@ -1671,7 +1671,7 @@ Qed.
16711671
End approximation_sfun.
16721672

16731673
Section lusin.
1674-
Hint Extern 0 (hausdorff_space _) => (exact: Rhausdorff ) : core.
1674+
Hint Extern 0 (hausdorff_space _) => (exact: Rhausdorff) : core.
16751675
Local Open Scope ereal_scope.
16761676
Context (rT : realType) (A : set rT).
16771677
Let mu := [the measure _ _ of @lebesgue_measure rT].

theories/lebesgue_measure.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ From mathcomp Require Import all_ssreflect ssralg ssrnum ssrint interval.
33
From mathcomp Require Import finmap fingroup perm rat archimedean.
44
From mathcomp Require Import mathcomp_extra boolp classical_sets functions.
55
From mathcomp Require Import cardinality fsbigop.
6-
Require Import reals ereal signed topology numfun normedtype function_spaces.
6+
Require Import reals ereal signed topology numfun tvs normedtype function_spaces.
77
From HB Require Import structures.
88
Require Import sequences esum measure real_interval realfun exp.
99
Require Export lebesgue_stieltjes_measure.
@@ -61,7 +61,7 @@ Set Implicit Arguments.
6161
Unset Strict Implicit.
6262
Unset Printing Implicit Defensive.
6363
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
64-
Import numFieldTopology.Exports.
64+
Import numFieldNormedType.Exports.
6565

6666
Local Open Scope classical_set_scope.
6767
Local Open Scope ring_scope.
@@ -1708,7 +1708,7 @@ Lemma ae_pointwise_almost_uniform
17081708
Proof.
17091709
move=> mf mg mA Afin [C [mC C0 nC] epspos].
17101710
have [B [mB Beps Bunif]] : exists B, [/\ d.-measurable B, mu B < eps%:E &
1711-
{uniform (A `\` C) `\` B, f @ \oo --> g}].
1711+
{uniform (A `\` C) `\` B, f @\oo --> g}].
17121712
apply: pointwise_almost_uniform => //.
17131713
- by move=> n; apply : (measurable_funS mA _ (mf n)) => ? [].
17141714
- by apply: measurableI => //; exact: measurableC.

theories/normedtype.v

Lines changed: 108 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ From mathcomp Require Import archimedean.
77
From mathcomp Require Import cardinality set_interval Rstruct.
88
Require Import ereal reals signed topology prodnormedzmodule function_spaces.
99
Require Export separation_axioms.
10+
Require Import tvs.
1011

1112
(**md**************************************************************************)
1213
(* # Norm-related Notions *)
@@ -799,26 +800,122 @@ Lemma cvgenyP {R : realType} {T} {F : set_system T} {FF : Filter F} (f : T -> na
799800
(((f n)%:R : R)%:E @[n --> F] --> +oo%E) <-> (f @ F --> \oo).
800801
Proof. by rewrite cvgeryP cvgrnyP. Qed.
801802

802-
(** Modules with a norm *)
803+
(** Modules with a norm depending on a numDomain*)
803804

804-
HB.mixin Record PseudoMetricNormedZmod_Lmodule_isNormedModule K V
805-
of PseudoMetricNormedZmod K V & GRing.Lmodule K V := {
805+
HB.mixin Record PseudoMetricNormedZmod_Tvs_isNormedModule K V
806+
of PseudoMetricNormedZmod K V & Tvs K V := {
806807
normrZ : forall (l : K) (x : V), `| l *: x | = `| l | * `| x |;
807808
}.
808809

809810
#[short(type="normedModType")]
810811
HB.structure Definition NormedModule (K : numDomainType) :=
811-
{T of PseudoMetricNormedZmod K T & GRing.Lmodule K T
812-
& PseudoMetricNormedZmod_Lmodule_isNormedModule K T}.
812+
{T of PseudoMetricNormedZmod K T & Tvs K T
813+
& PseudoMetricNormedZmod_Tvs_isNormedModule K T}.
813814

814-
Section regular_topology.
815+
HB.factory Record PseudoMetricNormedZmod_Lmodule_isNormedModule (K : numFieldType) V
816+
of PseudoMetricNormedZmod K V & GRing.Lmodule K V := {
817+
normrZ : forall (l : K) (x : V), `| l *: x | = `| l | * `| x |;
818+
}.
815819

816-
Variable R : numFieldType.
820+
HB.builders Context K V of PseudoMetricNormedZmod_Lmodule_isNormedModule K V.
821+
822+
(* NB: These lemmas are done latter with more machinery. They should
823+
be be simplified once normedtype is split, and the present section can
824+
depend on near lemmas on pseudometricnormedzmodtype ?*)
825+
Lemma add_continuous : continuous (fun x : V * V => x.1 + x.2).
826+
Proof.
827+
move=> [/= x y]; apply/cvg_ballP => e e0 /=.
828+
rewrite nearE /= -nbhs_ballE /nbhs_ball /nbhs_ball_ //=.
829+
exists ((ball x (e/2)),(ball y (e/2))).
830+
rewrite !nbhs_simpl /=; split; by apply: nbhsx_ballx; rewrite ?divr_gt0.
831+
rewrite -ball_normE /= /ball_ /= => xy /= [nx ny].
832+
rewrite opprD addrACA (le_lt_trans (ler_normD _ _)) // (@splitr K (e)) ltrD //=.
833+
Qed.
834+
835+
Lemma scale_continuous : continuous (fun z : K^o * V => z.1 *: z.2).
836+
Proof.
837+
move=> [/= k x].
838+
apply/cvg_ballP => e e0 /=.
839+
rewrite nearE /= -nbhs_ballE /nbhs_ball /nbhs_ball_ !nbhs_simpl /=.
840+
near +oo_K=> M.
841+
pose r := (`|e|/2/M).
842+
exists ((ball k r),(ball x r)).
843+
split; apply: nbhsx_ballx; rewrite ?divr_gt0 ?normr_gt0 ?lt0r_neq0 //.
844+
rewrite -ball_normE /ball /= => lz /= [nk nx]; rewrite -?(scalerBr, scalerBl).
845+
have := @ball_split _ _ (k *: lz.2) (k*: x) (lz.1 *: lz.2) `|e|.
846+
rewrite -ball_normE /= real_lter_normr ?gtr0_real //.
847+
have -> : (normr (k *: x - lz.1 *: lz.2) < - e) = false
848+
by rewrite ltr_nnorml // oppr_le0 ltW.
849+
rewrite Bool.orb_false_r => T;apply: T; rewrite -?(scalerBr, scalerBl) normrZ.
850+
rewrite (@le_lt_trans _ _ (M * `|x - lz.2|)) ?ler_wpM2r -?ltr_pdivlMl //.
851+
rewrite mulrC //.
852+
rewrite (@le_lt_trans _ _ (`|k - lz.1| * M)) ?ler_wpM2l -?ltr_pdivlMr//.
853+
rewrite (@le_trans _ _ (normr (lz.2) + normr x)) // ?lerDl ?normr_ge0 //.
854+
move: nx; rewrite /r => nx.
855+
have H: normr lz.2 <= normr x + `|e|/2/M.
856+
have -> : lz.2 = x - (x -lz.2) by rewrite opprB addrCA subrr addr0.
857+
rewrite (@le_trans _ _ (normr (x) + normr (x - lz.2))) // ?ler_normB ?lerD // ltW //.
858+
rewrite (@le_trans _ _ ((normr x + `|e| / 2 / M) + (normr x))) ?lerD // addrC.
859+
(*rewrite addrAC.*)
860+
have H0: M = M^-1 * (M * M). rewrite mulrA mulVf ?mul1r // ?lt0r_neq0 //.
861+
rewrite [X in (_ <= X)]H0.
862+
have -> : (normr x + (normr x + `|e| / 2 / M)) =
863+
M^-1 * ( M * (normr x + normr x) + `|e| / 2).
864+
by rewrite mulrDr mulrA mulVf ?mul1r ?lt0r_neq0 // mulrC addrA.
865+
rewrite ler_wpM2l // ?invr_ge0 // ?ltW // -ltrBrDl -mulrBr.
866+
apply: ltr_pM; rewrite ?ltrBrDl //.
867+
Unshelve. all: by end_near.
868+
Qed.
869+
870+
Lemma locally_convex : exists2 B : set (set V), (forall b, b \in B -> convex b) & basis B.
871+
Proof.
872+
exists [set B | exists x, exists r, B = ball x r].
873+
move=> b; rewrite inE /= => [[x]] [r] -> z y l.
874+
rewrite !inE -!ball_normE /= => zx yx l0; rewrite -subr_gt0 => l1.
875+
have -> : x = l *: x + (1-l) *: x
876+
by rewrite scalerBl addrCA subrr addr0 scale1r.
877+
have -> : (l *: x + (1 - l) *: x) - (l *: z + (1 - l) *: y)
878+
= (l *: (x-z) + (1 - l) *: (x - y)).
879+
rewrite opprD addrCA addrA addrA -!scalerN -scalerDr [X in l*:X]addrC.
880+
by rewrite -addrA -scalerDr.
881+
rewrite (@le_lt_trans _ _ ( `|l| * `|x - z| + `|1 - l| * `|x - y|)) //.
882+
by rewrite -!normrZ ?ler_normD //.
883+
rewrite (@lt_le_trans _ _ ( `|l| * r + `|1 - l| * r )) //.
884+
rewrite ltr_leD //.
885+
rewrite -ltr_pdivlMl ?mulrA ?mulVf ?mul1r // ?normrE ?lt0r_neq0 //.
886+
rewrite -ler_pdivlMl ?mulrA ?mulVf ?mul1r ?ltW // ?normrE;
887+
by apply/eqP => H; move: l1; rewrite H // lt_def => /andP [] /eqP //=.
888+
have -> : normr (1 -l) = 1 - normr l.
889+
by move/ltW/normr_idP: l0 => ->; move/ltW/normr_idP: l1 => ->.
890+
by rewrite -mulrDl addrCA subrr addr0 mul1r.
891+
split => /=.
892+
move => B [x] [r] ->; rewrite openE -!ball_normE /interior=> y /= bxy.
893+
rewrite -nbhs_ballE /nbhs_ball /nbhs_ball_ /filter_from //=.
894+
exists (r - (normr (x - y) )); first by rewrite subr_gt0.
895+
move=> z; rewrite -ball_normE /= ltrBrDr addrC => H.
896+
rewrite /= (le_lt_trans (ler_distD y _ _)) //.
897+
rewrite /filter_from /= => x B.
898+
rewrite -nbhs_ballE /nbhs_ball /nbhs_ball_ /filter_from //=.
899+
move=> [r] r0 Bxr /=.
900+
rewrite nbhs_simpl /=; exists (ball x r) => //; split; last by apply: ballxx.
901+
by exists x; exists r.
902+
Qed.
903+
904+
HB.instance Definition _ :=
905+
Uniform_isTvs.Build K V add_continuous scale_continuous locally_convex.
906+
907+
HB.instance Definition _ :=
908+
PseudoMetricNormedZmod_Tvs_isNormedModule.Build K V normrZ.
909+
910+
HB.end.
817911

912+
Section regular_topology.
913+
Variable R : numFieldType.
818914
HB.instance Definition _ := Num.NormedZmodule.on R^o.
915+
819916
HB.instance Definition _ := NormedZmod_PseudoMetric_eq.Build R R^o erefl.
820917
HB.instance Definition _ :=
821-
PseudoMetricNormedZmod_Lmodule_isNormedModule.Build R R^o (@normrM _).
918+
PseudoMetricNormedZmod_Tvs_isNormedModule.Build R R^o (@normrM _).
822919

823920
End regular_topology.
824921

@@ -2364,14 +2461,14 @@ HB.instance Definition _ := NormedZmod_PseudoMetric_eq.Build K (U * V)%type
23642461
End prod_PseudoMetricNormedZmodule.
23652462

23662463
Section prod_NormedModule.
2367-
Context {K : numDomainType} {U V : normedModType K}.
2464+
Context {K : numFieldType} {U V : normedModType K}.
23682465

23692466
Lemma prod_norm_scale (l : K) (x : U * V) : `| l *: x | = `|l| * `| x |.
23702467
Proof. by rewrite prod_normE /= !normrZ maxr_pMr. Qed.
23712468

23722469
HB.instance Definition _ :=
2373-
PseudoMetricNormedZmod_Lmodule_isNormedModule.Build K (U * V)%type
2374-
prod_norm_scale.
2470+
PseudoMetricNormedZmod_Tvs_isNormedModule.Build K (U * V)%type
2471+
prod_norm_scale.
23752472

23762473
End prod_NormedModule.
23772474

0 commit comments

Comments
 (0)