Module mathcomp.analysis.normedtype_theory.tvs
From HB Require Import structures.From mathcomp Require Import boot order ssralg ssrnum vector.
From mathcomp Require Import interval_inference.
#[warning="-warn-library-file-internal-analysis"]
From mathcomp Require Import unstable.
From mathcomp Require Import boolp classical_sets functions cardinality.
From mathcomp Require Import convex set_interval reals topology num_normedtype.
From mathcomp Require Import pseudometric_normed_Zmodule.
# Topological vector spaces
This file introduces locally convex topological vector spaces.
```
NbhsNmodule == HB class, join of Nbhs and Nmodule
NbhsZmodule == HB class, join of Nbhs and Zmodule
NbhsLmodule K == HB class, join of Nbhs and Lmodule over K
K is a numDomainType.
PreTopologicalNmodule == HB class, join of Topological and Nmodule
TopologicalNmodule == HB class, PreTopologicalNmodule with a
continuous addition
PreTopologicalZmodule == HB class, join of Topological and Zmodule
topologicalZmodType == topological abelian group
TopologicalZmodule == HB class, join of TopologicalNmodule and
Zmodule with a continuous opposite operator
preTopologicalLmodType K == topological space and Lmodule over K
K is a numDomainType
The HB class is PreTopologicalLmodule.
topologicalLmodType K == topologicalNmodule and Lmodule over K with a
continuous scaling operation
The HB class is TopologicalLmodule.
PreUniformNmodule == HB class, join of Uniform and Nmodule
UniformNmodule == HB class, join of Uniform and Nmodule with a
uniformly continuous addition
PreUniformZmodule == HB class, join of Uniform and Zmodule
UniformZmodule == HB class, join of UniformNmodule and Zmodule
with uniformly continuous opposite operator
PreUniformLmodule K == HB class, join of Uniform and Lmodule over K
K is a numDomainType.
UniformLmodule K == HB class, join of UniformNmodule and Lmodule
with a uniformly continuous scaling operation
K is a numFieldType.
convexTvsType R == interface type for a locally convex
tvs on a numDomain R
A convex tvs is constructed over a uniform
space.
The HB class is ConvexTvs.
subConvexTvsType R V S == join of subTopologicalType, convexTvsType,
and subLmoduleType
The HB class is SubConvexTvs.
Instance: in particular, it is shown that a
sub-Lmodule is a sub-convex TVS.
PreTopologicalLmod_isConvexTvs == factory allowing the construction of a
convex tvs from an Lmodule which is also a
topological space
{linear_continuous E -> F} == the type of all linear and continuous
functions between E and F, where E is a
NbhsLmodule.type and F a NbhsZmodule.type over
a numDomainType R
The HB class is called LinearContinuous.
The notation {linear_continuous E -> F | s}
also exists.
lcfun E F s == membership predicate for linear continuous
functions of type E -> F with scalar operator
s : K -> F -> F
E and F have type convexTvsType K.
This is used in particular to attach a type of
lmodType to {linear_continuous E -> F | s}.
lcfun_spec f == specification for membership of the linear
continuous function f
```
HB instances:
- The type R^o (R : numFieldType) is endowed with the structure of
ConvexTvs.
- The product of two Tvs is endowed with the structure of ConvexTvs.
- {linear_continuous E-> F} is endowed with a lmodType structure when E
and F are convexTvs.
Reserved Notation "'{' 'linear_continuous' U '->' V '|' s '}'"
(at level 0, U at level 98, V at level 99,
format "{ 'linear_continuous' U -> V | s }").
Reserved Notation "'{' 'linear_continuous' U '->' V '}'"
(at level 0, U at level 98, V at level 99,
format "{ 'linear_continuous' U -> V }").
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
Import numFieldTopology.Exports.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
.
structure
Source code
Source code
Definition
Source code
Source code
NbhsLmodule
Source code
(Source code
numDomainType
Source code
) :=Source code
{ of Nbhs M & GRing.Lmodule K M}.
.
mixin
Source code
Source code
Record
Source code
Source code
PreTopologicalNmodule_isTopologicalNmodule
Source code
Source code
PreTopologicalNmodule
Source code
M := {Source code
add_continuous : continuous (fun : M * M => x.1 + x.2) ;
}.
.
structure
Source code
Source code
Definition
Source code
Source code
TopologicalNmodule
Source code
Source code
{ of PreTopologicalNmodule M & PreTopologicalNmodule_isTopologicalNmodule M}.
Section TopologicalNmodule_theory.
Variable ( : topologicalType) ( : TopologicalNmodule.type) ( : set_system E).
TODO:
We have observed one thing:
`pseudometric_normedZmodType` is morally a `topologicalNmodule`
but `topologicalNmodule` is defined later in `tvs.v` (which imports `pseudometric_normed_zmodule.v`).
We think that it should be defined at the beginning of `pseudometric_normed_zmodule.v` and that
`pseudometric_normedZmodType` should be defined using `topologicalNmodule`.
We have realized this because of the lemmas such as `cvgD/fun_cvgD` that we needed to duplicate.
Lemma fun_cvgD
Source code
{ : Filter U} ( : E -> F) :Source code
f @ U --> a -> g @ U --> b -> (f \+ g) @ U --> a + b.
Proof.
Lemma
cvg_sum
Source code
( : Type) ( : seq I) ( : pred I)Source code
( : I -> E -> F) ( : I -> F) :
Filter U -> (forall , P i -> Ff i x @[ --> U] --> Fa i) ->
\sum_( <- r | P i) Ff i x @[ --> U] --> \sum_( <- r| P i) Fa i.
Proof.
Lemma
sum_continuous
Source code
( : Type) ( : seq I) ( : pred I) ( : I -> E -> F) :Source code
(forall : I, P i -> continuous (f i)) ->
continuous (fun : E => \sum_( <- r | P i) f i x1).
Proof.
End TopologicalNmodule_theory.
.
mixin
Source code
Source code
Record
Source code
Source code
TopologicalNmodule_isTopologicalZmodule
Source code
Source code
Topological
Source code
M & GRing.Zmodule M := {Source code
opp_continuous : continuous (-%R : M -> M) ;
}.
#[short
Source code
(Source code
type=
Source code
Source code
"topologicalZmodType"
Source code
)Source code
.
structure
Source code
Source code
Definition
Source code
Source code
TopologicalZmodule
Source code
Source code
{ of TopologicalNmodule M & GRing.Zmodule M
& TopologicalNmodule_isTopologicalZmodule M}.
Section TopologicalZmoduleTheory.
Variables ( : topologicalZmodType).
Lemma
sub_continuous
Source code
: continuous (fun : M * M => x.1 - x.2).Source code
Proof.
Lemma
fun_cvgN
Source code
( : topologicalZmodType) ( : set_system M) { : Filter U}Source code
( : M -> F) :
f @ U --> a -> \- f @ U --> - a.
Proof.
End TopologicalZmoduleTheory.
.
factory
Source code
Source code
Record
Source code
Source code
PreTopologicalNmodule_isTopologicalZmodule
Source code
Source code
Topological
Source code
M & GRing.Zmodule M := {Source code
sub_continuous : continuous (fun : M * M => x.1 - x.2) ;
}.
.
builders
Source code
Source code
Context
Source code
Source code
PreTopologicalNmodule_isTopologicalZmodule
Source code
M.Source code
Let
opp_continuous
Source code
: continuous (-%R : M -> M).Source code
Proof.
Let
add_continuous
Source code
: continuous (fun : M * M => x.1 + x.2).Source code
Proof.
move=> x; rewrite /continuous_at.
rewrite -(@eq_cvg _ _ _ (fun => x.1 - (- x.2))).
by move=> y; rewrite opprK.
rewrite -[in x.1 + _](opprK x.2).
apply: (@continuous_comp _ _ _ (fun => (x.1, - x.2)) (fun => x.1 - x.2)).
apply: cvg_pair; first exact: cvg_fst.
by apply: continuous_comp; [exact: cvg_snd|exact: opp_continuous].
exact: sub_continuous.
Qed.
rewrite -(@eq_cvg _ _ _ (fun => x.1 - (- x.2))).
by move=> y; rewrite opprK.
rewrite -[in x.1 + _](opprK x.2).
apply: (@continuous_comp _ _ _ (fun => (x.1, - x.2)) (fun => x.1 - x.2)).
apply: cvg_pair; first exact: cvg_fst.
by apply: continuous_comp; [exact: cvg_snd|exact: opp_continuous].
exact: sub_continuous.
Qed.
.
instance
Source code
Source code
Definition
Source code
Source code
PreTopologicalNmodule_isTopologicalNmodule.Build M add_continuous.
.
instance
Source code
Source code
Definition
Source code
Source code
TopologicalNmodule_isTopologicalZmodule.Build M opp_continuous.
.
end
Source code
.Source code
#[short
Source code
(Source code
type=
Source code
Source code
"preTopologicalLmodType"
Source code
)Source code
.
structure
Source code
Source code
Definition
Source code
Source code
PreTopologicalLmodule
Source code
(Source code
numDomainType
Source code
) :=Source code
{ of Topological M & GRing.Lmodule K M}.
.
mixin
Source code
Source code
Record
Source code
Source code
TopologicalZmodule_isTopologicalLmodule
Source code
(Source code
numDomainType
Source code
) MSource code
& Topological M & GRing.Lmodule R M := {
scale_continuous : continuous (fun : R^o * M => z.1 *: z.2) ;
}.
#[short
Source code
(Source code
type=
Source code
Source code
"topologicalLmodType"
Source code
)Source code
.
structure
Source code
Source code
Definition
Source code
Source code
TopologicalLmodule
Source code
(Source code
numDomainType
Source code
) :=Source code
{ of TopologicalZmodule M & GRing.Lmodule K M
& TopologicalZmodule_isTopologicalLmodule K M}.
Section TopologicalLmodule_theory.
Variables ( : numFieldType) ( : topologicalType) ( : topologicalLmodType R).
Lemma
fun_cvgZ
Source code
( : set_system E) { : Filter U} ( : E -> R) ( : E -> F)Source code
( : R) :
l @ U --> r -> f @ U --> a ->
l x *: f x @[ --> U] --> r *: a.
Proof.
Lemma
fun_cvgZr
Source code
( : set_system E) { : Filter U} ( : E -> F) :Source code
f @ U --> a -> k \*: f @ U --> k *: a.
End TopologicalLmodule_theory.
.
factory
Source code
Source code
Record
Source code
Source code
TopologicalNmodule_isTopologicalLmodule
Source code
(Source code
numDomainType
Source code
) MSource code
& Topological M & GRing.Lmodule R M := {
scale_continuous : continuous (fun : R^o * M => z.1 *: z.2) ;
}.
.
builders
Source code
Source code
Context
Source code
Source code
TopologicalNmodule_isTopologicalLmodule
Source code
R M.Source code
Let
opp_continuous
Source code
: continuous (-%R : M -> M).Source code
Proof.
move=> x; rewrite /continuous_at.
rewrite -(@eq_cvg _ _ _ (fun => -1 *: x)); first by move=> y; rewrite scaleN1r.
rewrite -[- x]scaleN1r.
apply: (@continuous_comp M (R^o * M)%type M (fun => (-1, x))
(fun => x.1 *: x.2)); last exact: scale_continuous.
by apply: (@cvg_pair _ _ _ _ (nbhs (-1 : R^o))); [exact: cvg_cst|exact: cvg_id].
Qed.
rewrite -(@eq_cvg _ _ _ (fun => -1 *: x)); first by move=> y; rewrite scaleN1r.
rewrite -[- x]scaleN1r.
apply: (@continuous_comp M (R^o * M)%type M (fun => (-1, x))
(fun => x.1 *: x.2)); last exact: scale_continuous.
by apply: (@cvg_pair _ _ _ _ (nbhs (-1 : R^o))); [exact: cvg_cst|exact: cvg_id].
Qed.
#[warning=
Source code
Source code
"-HB.no-new-instance"
Source code
Source code
.
instance
Source code
Source code
Definition
Source code
Source code
TopologicalNmodule_isTopologicalZmodule.Build M opp_continuous.
.
instance
Source code
Source code
Definition
Source code
Source code
TopologicalZmodule_isTopologicalLmodule.Build R M scale_continuous.
.
end
Source code
.Source code
.
mixin
Source code
Source code
Record
Source code
Source code
PreUniformNmodule_isUniformNmodule
Source code
Source code
PreUniformNmodule
Source code
M := {Source code
add_unif_continuous : unif_continuous (fun : M * M => x.1 + x.2)
}.
.
structure
Source code
Source code
Definition
Source code
Source code
UniformNmodule
Source code
Source code
{ of PreUniformNmodule M & PreUniformNmodule_isUniformNmodule M}.
.
mixin
Source code
Source code
Record
Source code
Source code
UniformNmodule_isUniformZmodule
Source code
Source code
Uniform
Source code
M & GRing.Zmodule M := {Source code
opp_unif_continuous : unif_continuous (-%R : M -> M)
}.
.
structure
Source code
Source code
Definition
Source code
Source code
UniformZmodule
Source code
Source code
{ of UniformNmodule M & GRing.Zmodule M & UniformNmodule_isUniformZmodule M}.
.
factory
Source code
Source code
Record
Source code
Source code
PreUniformNmodule_isUniformZmodule
Source code
Source code
Uniform
Source code
M & GRing.Zmodule M := {Source code
sub_unif_continuous : unif_continuous (fun : M * M => x.1 - x.2)
}.
.
builders
Source code
Source code
Context
Source code
Source code
PreUniformNmodule_isUniformZmodule
Source code
M.Source code
Lemma
opp_unif_continuous
Source code
: unif_continuous (-%R : M -> M).Source code
Proof.
have unif : unif_continuous (fun => (0, x) : M * M).
move=> /= U [[]] /= U1 U2 [] U1e U2e /subsetP U12.
apply: filterS U2e => x xU2/=.
have /U12 : ((0, 0), x) \in U1 `*` U2.
by rewrite in_setX/= (mem_set xU2) andbT inE; exact: entourage_refl.
by rewrite inE/= => -[[[a1 a2] [b1 b2]]]/= /[swap]-[] -> -> <-.
move=> /= U /sub_unif_continuous /unif /=.
rewrite -comp_preimage/= /comp/= /nbhs/=.
by congr entourage => /=; rewrite eqEsubset; split=> x /=; rewrite !sub0r.
Qed.
move=> /= U [[]] /= U1 U2 [] U1e U2e /subsetP U12.
apply: filterS U2e => x xU2/=.
have /U12 : ((0, 0), x) \in U1 `*` U2.
by rewrite in_setX/= (mem_set xU2) andbT inE; exact: entourage_refl.
by rewrite inE/= => -[[[a1 a2] [b1 b2]]]/= /[swap]-[] -> -> <-.
move=> /= U /sub_unif_continuous /unif /=.
rewrite -comp_preimage/= /comp/= /nbhs/=.
by congr entourage => /=; rewrite eqEsubset; split=> x /=; rewrite !sub0r.
Qed.
Lemma
add_unif_continuous
Source code
: unif_continuous (fun : M * M => x.1 + x.2).Source code
Proof.
have unif: unif_continuous (fun => (x.1, -x.2) : M * M).
move=> /= U [[]]/= U1 U2 [] U1e /opp_unif_continuous.
rewrite /nbhs/= => U2e /subsetP U12.
apply: (@filterS _ _ entourage_filter
((fun => (xy.1.1, xy.2.1, (-xy.1.2, -xy.2.2))) @^-1` (U1 `*` U2))).
move=> /= [] [] a1 a2 [] b1 b2/= [] ab1 ab2.
have /U12 : (a1, b1, (-a2, -b2)) \in U1 `*` U2 by rewrite !inE.
by rewrite inE/= => [] [] [] [] c1 c2 [] d1 d2/= cd [] <- <- <- <-.
exists (U1, ((fun : M * M => (- xy.1, - xy.2)) @^-1` U2)); first by split.
by move=> /= [] [] a1 a2 [] b1 b2/= [] aU bU; exists (a1, b1, (a2, b2)).
move=> /= U /sub_unif_continuous/unif; rewrite /nbhs/=.
rewrite -comp_preimage/=/comp/=.
by congr entourage; rewrite eqEsubset; split=> x /=; rewrite !opprK.
Qed.
move=> /= U [[]]/= U1 U2 [] U1e /opp_unif_continuous.
rewrite /nbhs/= => U2e /subsetP U12.
apply: (@filterS _ _ entourage_filter
((fun => (xy.1.1, xy.2.1, (-xy.1.2, -xy.2.2))) @^-1` (U1 `*` U2))).
move=> /= [] [] a1 a2 [] b1 b2/= [] ab1 ab2.
have /U12 : (a1, b1, (-a2, -b2)) \in U1 `*` U2 by rewrite !inE.
by rewrite inE/= => [] [] [] [] c1 c2 [] d1 d2/= cd [] <- <- <- <-.
exists (U1, ((fun : M * M => (- xy.1, - xy.2)) @^-1` U2)); first by split.
by move=> /= [] [] a1 a2 [] b1 b2/= [] aU bU; exists (a1, b1, (a2, b2)).
move=> /= U /sub_unif_continuous/unif; rewrite /nbhs/=.
rewrite -comp_preimage/=/comp/=.
by congr entourage; rewrite eqEsubset; split=> x /=; rewrite !opprK.
Qed.
.
instance
Source code
Source code
Definition
Source code
Source code
PreUniformNmodule_isUniformNmodule.Build M add_unif_continuous.
.
instance
Source code
Source code
Definition
Source code
Source code
UniformNmodule_isUniformZmodule.Build M opp_unif_continuous.
.
end
Source code
.Source code
Section UniformZmoduleTheory.
Variables ( : UniformZmodule.type).
Lemma
sub_unif_continuous
Source code
: unif_continuous (fun : M * M => x.1 - x.2).Source code
Proof.
suff unif: unif_continuous (fun => (x.1, - x.2) : M * M).
by move=> /= U /add_unif_continuous/unif; rewrite /nbhs/= -comp_preimage.
move=> /= U [[]]/= U1 U2 [] U1e /opp_unif_continuous.
rewrite /nbhs/= => U2e /subsetP U12.
apply: (@filterS _ _ entourage_filter
((fun => (xy.1.1, xy.2.1, (- xy.1.2, - xy.2.2))) @^-1` (U1 `*` U2))).
move=> /= [] [] a1 a2 [] b1 b2/= [] ab1 ab2.
have /U12 : (a1, b1, (-a2, -b2)) \in U1 `*` U2 by rewrite !inE.
by rewrite inE/= => [] [] [] [] c1 c2 [] d1 d2/= cd [] <- <- <- <-.
exists (U1, ((fun : M * M => (- xy.1, - xy.2)) @^-1` U2)); first by split.
by move=> /= [] [] a1 a2 [] b1 b2/= [] aU bU; exists (a1, b1, (a2, b2)).
Qed.
by move=> /= U /add_unif_continuous/unif; rewrite /nbhs/= -comp_preimage.
move=> /= U [[]]/= U1 U2 [] U1e /opp_unif_continuous.
rewrite /nbhs/= => U2e /subsetP U12.
apply: (@filterS _ _ entourage_filter
((fun => (xy.1.1, xy.2.1, (- xy.1.2, - xy.2.2))) @^-1` (U1 `*` U2))).
move=> /= [] [] a1 a2 [] b1 b2/= [] ab1 ab2.
have /U12 : (a1, b1, (-a2, -b2)) \in U1 `*` U2 by rewrite !inE.
by rewrite inE/= => [] [] [] [] c1 c2 [] d1 d2/= cd [] <- <- <- <-.
exists (U1, ((fun : M * M => (- xy.1, - xy.2)) @^-1` U2)); first by split.
by move=> /= [] [] a1 a2 [] b1 b2/= [] aU bU; exists (a1, b1, (a2, b2)).
Qed.
End UniformZmoduleTheory.
.
structure
Source code
Source code
Definition
Source code
Source code
PreUniformLmodule
Source code
(Source code
numDomainType
Source code
) :=Source code
{ of Uniform M & GRing.Lmodule K M}.
.
mixin
Source code
Source code
Record
Source code
Source code
PreUniformLmodule_isUniformLmodule
Source code
(Source code
numFieldType
Source code
) MSource code
& PreUniformLmodule R M := {
scale_unif_continuous : unif_continuous (fun : R^o * M => z.1 *: z.2) ;
}.
.
structure
Source code
Source code
Definition
Source code
Source code
UniformLmodule
Source code
(Source code
numFieldType
Source code
) :=Source code
{ of UniformZmodule M & GRing.Lmodule R M
& PreUniformLmodule_isUniformLmodule R M}.
.
factory
Source code
Source code
Record
Source code
Source code
UniformNmodule_isUniformLmodule
Source code
(Source code
numFieldType
Source code
) MSource code
& PreUniformLmodule R M := {
scale_unif_continuous : unif_continuous (fun : R^o * M => z.1 *: z.2) ;
}.
.
builders
Source code
Source code
Context
Source code
Source code
UniformNmodule_isUniformLmodule
Source code
R M.Source code
Lemma
opp_unif_continuous
Source code
: unif_continuous (-%R : M -> M).Source code
Proof.
have unif: unif_continuous (fun => (-1, x) : R^o * M).
move=> /= U [[]] /= U1 U2 [] U1e U2e /subsetP U12.
rewrite /nbhs/=.
apply: filterS U2e => x xU2/=.
have /U12 : ((-1, -1), x) \in U1 `*` U2.
rewrite in_setX/= (mem_set xU2) andbT.
by apply/mem_set; exact: entourage_refl.
by rewrite inE/= => [[[]]] [] a1 a2 [] b1 b2/= abU [] {2}<- <- <-/=.
move=> /= U /scale_unif_continuous/unif/=.
rewrite /nbhs/=.
rewrite -comp_preimage/=/comp/=.
by congr entourage; rewrite eqEsubset; split=> x /=; rewrite !scaleN1r.
Qed.
move=> /= U [[]] /= U1 U2 [] U1e U2e /subsetP U12.
rewrite /nbhs/=.
apply: filterS U2e => x xU2/=.
have /U12 : ((-1, -1), x) \in U1 `*` U2.
rewrite in_setX/= (mem_set xU2) andbT.
by apply/mem_set; exact: entourage_refl.
by rewrite inE/= => [[[]]] [] a1 a2 [] b1 b2/= abU [] {2}<- <- <-/=.
move=> /= U /scale_unif_continuous/unif/=.
rewrite /nbhs/=.
rewrite -comp_preimage/=/comp/=.
by congr entourage; rewrite eqEsubset; split=> x /=; rewrite !scaleN1r.
Qed.
#[warning=
Source code
Source code
"-HB.no-new-instance"
Source code
Source code
.
instance
Source code
Source code
Definition
Source code
Source code
UniformNmodule_isUniformZmodule.Build M opp_unif_continuous.
.
instance
Source code
Source code
Definition
Source code
Source code
PreUniformLmodule_isUniformLmodule.Build R M scale_unif_continuous.
.
end
Source code
.Source code
.
mixin
Source code
Source code
Record
Source code
Source code
Uniform_isConvexTvs
Source code
(Source code
numDomainType
Source code
) ESource code
& Uniform E & GRing.Lmodule R E := {
locally_convex : exists2 : set_system E,
(forall , b \in B -> convex_set b) & basis B
}.
#[short
Source code
(Source code
type=
Source code
Source code
"convexTvsType"
Source code
)Source code
.
structure
Source code
Source code
Definition
Source code
Source code
ConvexTvs
Source code
(Source code
numDomainType
Source code
) :=Source code
{ of Uniform_isConvexTvs R E & Uniform E & TopologicalLmodule R E}.