Consider V : normedModType K with K : numFieldType. As of now, its norm is of type `| _ | : V -> K. However, it should be more specifically of type `| _ | : V -> R for R: realTypeand a subType of K. In particular, this will become handy in complex analysis, or allow more generality in the Hahn-Banach theorem, which, as of now, can be instantiated only on normed modules over R.
An easy way to do that is to change the definition of normedModule as such:
HB.mixin Record PseudoMetricNormedZmod_ConvexTvs_isNormedModule (C: numDomainType)
(R : realType) V
& PseudoMetricNormedZmod R V & ConvexTvs C V := {
val : R -> C ;
ival : injective val;
normrZ : forall (l : C) (x : V), val (`| l *: x |) = `| l | * (val `| x |) :> C
}.
However, this is a bit pedestrian as it overlooks the availability of subtypes to handle R. Sadly, the definition of subNumDomain seems to be intricate, due to duplication issues between the domain and a codomain of a norm.
Looking at the definition of NumDomain,
#[short(type="numDomainType")]
HB.structure Definition NumDomain := { R of
GRing.IntegralDomain R &
NumZmodule R &
NormedZmodule (POrderZmodule.clone R _) R &
NumZmod_isNumRing R
}.
the definition of SubNumDomain should be
#[short(type="subNumDomainType")]
HB.structure Definition SubNumDomain (M : numDomainType) (S : pred M) :=
{ U of
SubChoice S U &
GRing.IntegralDomain U &
NumZmodule U &
SubNormedZmodule (POrderZmodule.clone U _) M S U &
NumZmod_isNumRing U
}.
However, this triggers an error, as M is supposed to be a numDomain over M, not U. Likewise
#[short(type="subNumDomainType")]
HB.structure Definition SubNumDomain (M : numDomainType) (S : pred M) :=
{ U of
SubChoice S U &
GRing.IntegralDomain U &
NumZmodule U &
SubNormedZmodule (POrderZmodule.clone M _) M S U &
NumZmod_isNumRing U
}.
triggers an error, as U is supposed to be a numDomain over U, not M.
How can we solve that ? It looks like this approach of using subtypes does not work. Could this be an issue of making hierarchy-builder understand the \val : U -> M coercion between norm : U -> U and norm : M -> M when declaring the subNumDomainType structure?
@CohenCyril, maybe you have some HB magic in mind that could help us ?
Consider
V : normedModType KwithK : numFieldType. As of now, its norm is of type`| _ | : V -> K. However, it should be more specifically of type`| _ | : V -> RforR: realTypeand a subType ofK. In particular, this will become handy in complex analysis, or allow more generality in the Hahn-Banach theorem, which, as of now, can be instantiated only on normed modules over R.An easy way to do that is to change the definition of normedModule as such:
HB.mixin Record PseudoMetricNormedZmod_ConvexTvs_isNormedModule (C: numDomainType) (R : realType) V & PseudoMetricNormedZmod R V & ConvexTvs C V := { val : R -> C ; ival : injective val; normrZ : forall (l : C) (x : V), val (`| l *: x |) = `| l | * (val `| x |) :> C }.However, this is a bit pedestrian as it overlooks the availability of subtypes to handle R. Sadly, the definition of
subNumDomainseems to be intricate, due to duplication issues between the domain and a codomain of a norm.Looking at the definition of NumDomain,
#[short(type="numDomainType")] HB.structure Definition NumDomain := { R of GRing.IntegralDomain R & NumZmodule R & NormedZmodule (POrderZmodule.clone R _) R & NumZmod_isNumRing R }.the definition of SubNumDomain should be
#[short(type="subNumDomainType")] HB.structure Definition SubNumDomain (M : numDomainType) (S : pred M) := { U of SubChoice S U & GRing.IntegralDomain U & NumZmodule U & SubNormedZmodule (POrderZmodule.clone U _) M S U & NumZmod_isNumRing U }.However, this triggers an error, as
Mis supposed to be a numDomain overM, notU. Likewise#[short(type="subNumDomainType")] HB.structure Definition SubNumDomain (M : numDomainType) (S : pred M) := { U of SubChoice S U & GRing.IntegralDomain U & NumZmodule U & SubNormedZmodule (POrderZmodule.clone M _) M S U & NumZmod_isNumRing U }.triggers an error, as
Uis supposed to be a numDomain overU, notM.How can we solve that ? It looks like this approach of using subtypes does not work. Could this be an issue of making hierarchy-builder understand the
\val : U -> Mcoercion betweennorm : U -> Uandnorm : M -> Mwhen declaring thesubNumDomainTypestructure?@CohenCyril, maybe you have some HB magic in mind that could help us ?