22From HB Require Import structures.
33From mathcomp Require Import all_ssreflect_compat ssralg ssrnum vector.
44From mathcomp Require Import interval_inference.
5+ #[warning="-warn-library-file-internal-analysis"]
6+ From mathcomp Require Import unstable.
57From mathcomp Require Import boolp classical_sets functions cardinality.
6- From mathcomp Require Import set_interval reals topology num_normedtype.
8+ From mathcomp Require Import convex set_interval reals topology num_normedtype.
79From mathcomp Require Import pseudometric_normed_Zmodule.
810
911(**md************************************************************************* *)
@@ -306,14 +308,10 @@ HB.instance Definition _ :=
306308
307309HB.end .
308310
309- Definition convex (R : numDomainType) (M : lmodType R) (A : set M) :=
310- forall x y (lambda : R), x \in A -> y \in A ->
311- 0 < lambda -> lambda < 1 -> lambda *: x + (1 - lambda) *: y \in A.
312-
313311HB.mixin Record Uniform_isTvs (R : numDomainType) E
314312 & Uniform E & GRing.Lmodule R E := {
315- locally_convex : exists2 B : set (set E) ,
316- (forall b, b \in B -> convex b) & basis B
313+ locally_convex : exists2 B : set_system E ,
314+ (forall b, b \in B -> convex_set b) & basis B
317315}.
318316
319317#[short(type="tvsType")]
@@ -360,8 +358,8 @@ HB.factory Record PreTopologicalLmod_isTvs (R : numDomainType) E
360358 & Topological E & GRing.Lmodule R E := {
361359 add_continuous : continuous (fun x : E * E => x.1 + x.2) ;
362360 scale_continuous : continuous (fun z : R^o * E => z.1 *: z.2) ;
363- locally_convex : exists2 B : set (set E) ,
364- (forall b, b \in B -> convex b) & basis B
361+ locally_convex : exists2 B : set_system E ,
362+ (forall b, b \in B -> convex_set b) & basis B
365363 }.
366364
367365HB.builders Context R E & PreTopologicalLmod_isTvs R E.
@@ -511,37 +509,45 @@ rewrite (@le_lt_trans _ _ (`|k - l| * M)) ?ler_wpM2l -?ltr_pdivlMr//.
511509by near: l; apply: cvgr_dist_lt; rewrite // divr_gt0.
512510Unshelve. all: by end_near. Qed .
513511
514- Let standard_locally_convex :
515- exists2 B : set (set R^o), (forall b, b \in B -> convex b) & basis B.
512+ Local Open Scope convex_scope.
513+
514+ Let standard_ball_convex_set (x : R^o) (r : R) : convex_set (ball x r).
515+ Proof .
516+ apply/convex_setW => z y; rewrite !inE -!ball_normE /= => zx yx l l0 l1.
517+ rewrite inE/=.
518+ rewrite [X in `|X|](_ : _ = (x - z : convex_lmodType _) <| l |>
519+ (x - y : convex_lmodType _)); last first.
520+ by rewrite opprD -[in LHS](convmm l x) addrACA -scalerBr -scalerBr.
521+ rewrite (le_lt_trans (ler_normD _ _))// !normrM.
522+ rewrite (@ger0_norm _ l%:num)// (@ger0_norm _ l%:num.~) ?onem_ge0//.
523+ rewrite -[ltRHS]mul1r -(add_onemK l%:num) [ltRHS]mulrDl.
524+ by rewrite ltrD// ltr_pM2l// onem_gt0.
525+ Qed .
526+
527+ Let standard_locally_convex_set :
528+ exists2 B : set_system R^o, (forall b, b \in B -> convex_set b) & basis B.
516529Proof .
517530exists [set B | exists x r, B = ball x r].
518- move=> b; rewrite inE /= => [[x]] [r] -> z y l.
519- rewrite !inE -!ball_normE /= => zx yx l0; rewrite -subr_gt0 => l1.
520- have -> : x = l *: x + (1 - l) *: x by rewrite addrC scalerBl subrK scale1r.
521- rewrite [X in `|X|](_ : _ = l *: (x - z) + (1 - l) *: (x - y)); last first.
522- by rewrite opprD addrACA -scalerBr -scalerBr.
523- rewrite (@le_lt_trans _ _ (`|l| * `|x - z| + `|1 - l| * `|x - y|))//.
524- by rewrite -!normrM ler_normD.
525- rewrite (@lt_le_trans _ _ (`|l| * r + `|1 - l| * r ))//.
526- by rewrite ltr_leD// lter_pM2l// ?normrE ?gt_eqF// ltW.
527- by rewrite !gtr0_norm// -mulrDl addrC subrK mul1r.
531+ by move=> B/= /[!inE]/= [[x]] [r] ->; exact: standard_ball_convex_set.
528532split; first by move=> B [x] [r] ->; exact: ball_open.
529533move=> x B; rewrite -nbhs_ballE/= => -[r] r0 Bxr /=.
530- by exists (ball x r) => //; split; [exists x, r|exact: ballxx].
534+ by exists (ball x r) => //= ; split; [exists x, r|exact: ballxx].
531535Qed .
532536
533537HB.instance Definition _ :=
534538 PreTopologicalNmodule_isTopologicalNmodule.Build R^o standard_add_continuous.
535539HB.instance Definition _ :=
536540 TopologicalNmodule_isTopologicalLmodule.Build R R^o standard_scale_continuous.
537- HB.instance Definition _ := Uniform_isTvs.Build R R^o standard_locally_convex.
541+ HB.instance Definition _ :=
542+ Uniform_isTvs.Build R R^o standard_locally_convex_set.
538543
539544End standard_topology.
540545
541546Section prod_Tvs.
542547Context (K : numFieldType) (E F : tvsType K).
543548
544- Local Lemma prod_add_continuous : continuous (fun x : (E * F) * (E * F) => x.1 + x.2).
549+ Local Lemma prod_add_continuous :
550+ continuous (fun x : (E * F) * (E * F) => x.1 + x.2).
545551Proof .
546552move => [/= xy1 xy2] /= U /= [] [A B] /= [nA nB] nU.
547553have [/= A0 [A01 A02] nA1] := @add_continuous E (xy1.1, xy2.1) _ nA.
@@ -552,7 +558,8 @@ move => [[x1 y1][x2 y2]] /= [] [] a1 b1 [] a2 b2.
552558by apply: nU; split; [exact: (nA1 (x1, x2))|exact: (nB1 (y1, y2))].
553559Qed .
554560
555- Local Lemma prod_scale_continuous : continuous (fun z : K^o * (E * F) => z.1 *: z.2).
561+ Local Lemma prod_scale_continuous :
562+ continuous (fun z : K^o * (E * F) => z.1 *: z.2).
556563Proof .
557564move => [/= r [x y]] /= U /= []/= [A B] /= [nA nB] nU.
558565have [/= A0 [A01 A02] nA1] := @scale_continuous K E (r, x) _ nA.
@@ -564,7 +571,7 @@ by move=> [l [e f]] /= [] [Al Bl] [] Ae Be; apply: nU; split;
564571Qed .
565572
566573Local Lemma prod_locally_convex :
567- exists2 B : set (set ( E * F)) , (forall b, b \in B -> convex b) & basis B.
574+ exists2 B : set_system ( E * F), (forall b, b \in B -> convex_set b) & basis B.
568575Proof .
569576have [Be Bcb Beb] := @locally_convex K E.
570577have [Bf Bcf Bfb] := @locally_convex K F.
@@ -582,8 +589,10 @@ have : basis B.
582589 rewrite !nbhsE /=; split; first by exists a => //; split => //; exact: Beo.
583590 by exists b => //; split => // []; exact: Bfo.
584591exists B => // => b; rewrite inE /= => [[]] bo [] be [] bf Bee [] Bff <-.
585- move => [x1 y1] [x2 y2] l /[!inE] /= -[xe1 yf1] [xe2 yf2] l0 l1.
586- by split; rewrite -inE; [apply: Bcb; rewrite ?inE|apply: Bcf; rewrite ?inE].
592+ move => [x1 y1] [x2 y2] l /[!inE] /= -[xe1 yf1] [xe2 yf2].
593+ split.
594+ by apply/set_mem/Bcb; [exact/mem_set|exact/mem_set|exact/mem_set].
595+ by apply/set_mem/Bcf; [exact/mem_set|exact/mem_set|exact/mem_set].
587596Qed .
588597
589598HB.instance Definition _ := PreTopologicalNmodule_isTopologicalNmodule.Build
0 commit comments