1- (* mathcomp analysis (c) 2017 Inria and AIST. License: CeCILL-C. *)
1+ (* mathcomp analysis (c) 2017 Inria and AIST. License: CeCILL-C. *)
22From HB Require Import structures.
33From mathcomp Require Import all_ssreflect_compat ssralg ssrnum vector.
44From mathcomp Require Import interval_inference.
@@ -640,7 +640,7 @@ Notation "{ 'linear_continuous' U -> V | s }" := (@LinearContinuous.type _ U%typ
640640 : type_scope.
641641Notation "{ 'linear_continuous' U -> V }" := {linear_continuous U%type -> V%type | *:%R}
642642 : type_scope.
643-
643+
644644Section lcfun.
645645Context {R : numDomainType} {E : NbhsLmodule.type R}
646646 {F : NbhsZmodule.type} {s : GRing.Scale.law R F}.
@@ -649,7 +649,7 @@ Notation lcfun := (@lcfun _ E F s).
649649
650650Section Sub.
651651Context (f : E -> F) (fP : f \in lcfun).
652-
652+
653653Definition lcfun_Sub_subproof :=
654654 @isLinearContinuous.Build _ E F s f (proj1 (set_mem fP)) (proj2 (set_mem fP)).
655655#[local] HB.instance Definition _ := lcfun_Sub_subproof.
@@ -665,11 +665,10 @@ have Pf : f \in lcfun.
665665 by rewrite inE /=; split => // x u v; rewrite Pf1 Pf2.
666666suff -> : G = lcfun_Sub Pf by apply: Ksub.
667667rewrite {}/G.
668- congr LinearContinuous.Pack.
669- congr LinearContinuous.Class.
670- - by congr GRing.isNmodMorphism.Axioms_; apply: Prop_irrelevance.
671- - by congr GRing.isScalable.Axioms_; apply: Prop_irrelevance.
672- - by congr isContinuous.Axioms_; apply: Prop_irrelevance.
668+ congr (LinearContinuous.Pack (LinearContinuous.Class _ _ _)).
669+ - by congr GRing.isNmodMorphism.Axioms_; exact: Prop_irrelevance.
670+ - by congr GRing.isScalable.Axioms_; exact: Prop_irrelevance.
671+ - by congr isContinuous.Axioms_; exact: Prop_irrelevance.
673672Qed .
674673
675674Lemma lcfun_valP f (Pf : f \in lcfun) : lcfun_Sub Pf = f :> (_ -> _).
@@ -685,12 +684,11 @@ HB.instance Definition _ := [Choice of {linear_continuous E -> F | s} by <:].
685684Variant lcfun_spec (f : E -> F) : (E -> F) -> bool -> Type :=
686685 | Islcfun (l : {linear_continuous E -> F | s}) : lcfun_spec f l true.
687686
688- (*to be renamed ? *)
689- Lemma lcfunE (f : E -> F) : (f \in lcfun) -> lcfun_spec f f (f \in lcfun).
687+ Lemma lcfunP (f : E -> F) : f \in lcfun -> lcfun_spec f f (f \in lcfun).
690688Proof .
691689move=> /[dup] f_lc ->.
692- have {2}-> :( f = ( lcfun_Sub f_lc)) by rewrite lcfun_valP.
693- constructor.
690+ have {2}-> : f = lcfun_Sub f_lc by rewrite lcfun_valP.
691+ by constructor.
694692Qed .
695693
696694End lcfun.
@@ -701,22 +699,20 @@ Context {R : numDomainType} {E F : NbhsLmodule.type R}
701699 {S : NbhsZmodule.type} {s : GRing.Scale.law R S}
702700 (f : {linear_continuous E -> F}) (g : {linear_continuous F -> S | s}).
703701
704- Lemma lcfun_comp_subproof1 : linear_for s (g \o f).
705- Proof . by move=> *; move=> */= ; rewrite !linearP. Qed .
702+ Let lcfun_comp_subproof1 : linear_for s (g \o f).
703+ Proof . by move=> *; move=> *; rewrite !linearP. Qed .
706704
707- (* TODO weaken proof continuous_comp to arbitrary nbhsType *)
708- Lemma lcfun_comp_subproof2 : continuous (g \o f).
709- Proof . by move=> x; move=> A /cts_fun /cts_fun. Qed .
705+ Let lcfun_comp_subproof2 : continuous (g \o f).
706+ Proof . by move=> x; apply: continuous_comp; exact/cts_fun. Qed .
710707
711708HB.instance Definition _ := @isLinearContinuous.Build R E S s (g \o f)
712709 lcfun_comp_subproof1 lcfun_comp_subproof2.
713710
714711End lcfun_comp.
715712
716713Section lcfun_lmodtype.
717- Context {R : numFieldType} {E F G: convexTvsType R}.
718-
719- Implicit Types (r : R) (f g : {linear_continuous E -> F}) (h : {linear_continuous F -> G}).
714+ Context {R : numFieldType} {E F : convexTvsType R}.
715+ Implicit Types (r : R) (f g : {linear_continuous E -> F}).
720716
721717Import GRing.Theory.
722718
@@ -727,57 +723,56 @@ Qed.
727723
728724HB.instance Definition _ := isContinuous.Build E F \0 null_fun_continuous.
729725
730- Lemma lcfun0 : (\0 : {linear_continuous E -> F}) =1 cst 0 :> (_ -> _).
731- Proof . by []. Qed .
732-
733- (* NB : cvgD in pseudometric_normedZmodule should be lowered to some common
734- structure to tvstype and pseudometric, then lcfun doesn't need to exist
735- anymore *)
726+ (** NB : cvgD in pseudometric_normedZmodule could be lowered to some common
727+ structure to convexTvsType and pseudometric, then `lcfun_cvgD` doesn't need to
728+ exist anymore (we are however not sure that this deserves the introduction of
729+ a new structure that combines nbhs and normedZmodule) *)
736730Lemma lcfun_cvgD (U : set_system E) {FF : Filter U} f g a b :
737731 f @ U --> a -> g @ U --> b -> (f \+ g) @ U --> a + b.
738732Proof .
739733move=> fa ga.
740- apply: continuous2_cvg; [|by []..].
741- apply @add_continuous. (* TODO: why the @ ? *)
734+ by apply: continuous2_cvg; [exact: (add_continuous (a, b))|by []..].
742735Qed .
743736
744737Lemma lcfun_continuousD f g : continuous (f \+ g).
745- Proof . move=> /= x; apply: lcfun_cvgD; apply: cts_fun. Qed .
746-
738+ Proof . by move=> /= x; apply: lcfun_cvgD; exact: cts_fun. Qed .
747739
748- Lemma lcfun_cvgN (U : set_system E) {FF : Filter U} f a : f @ U --> a -> \- f @ U --> - a.
740+ Lemma lcfun_cvgN (U : set_system E) {FF : Filter U} f a :
741+ f @ U --> a -> \- f @ U --> - a.
749742Proof . by move=> ?; apply: continuous_cvg => //; exact: opp_continuous. Qed .
750743
751-
752744Lemma lcfun_continuousN f : continuous (\- f).
753- Proof .
754- by move=> /= x; apply: lcfun_cvgN; apply: cts_fun.
755- Qed .
745+ Proof . by move=> /= x; apply: lcfun_cvgN; exact: cts_fun. Qed .
756746
757- HB.instance Definition _ f g := isContinuous.Build E F (f \+ g) (@lcfun_continuousD f g).
747+ HB.instance Definition _ f g :=
748+ isContinuous.Build E F (f \+ g) (@lcfun_continuousD f g).
758749
759- Lemma lcfun_cvgZ (U : set_system E) {FF : Filter U} l f r a : l @ U --> r -> f @ U --> a ->
760- l x *: f x @[x --> U] --> r *: a.
750+ Lemma lcfun_cvgZ (U : set_system E) {FF : Filter U} l f r a :
751+ l @ U --> r -> f @ U --> a ->
752+ l x *: f x @[x --> U] --> r *: a.
761753Proof .
762- move=> ? ? ; apply: continuous2_cvg => //; exact: (scale_continuous (_, _)).
754+ by move=> * ; apply: continuous2_cvg => //; exact: (scale_continuous (_, _)).
763755Qed .
764756
765- Lemma lcfun_cvgZr (U : set_system E) {FF : Filter U} k f a : f @ U --> a -> k \*: f @ U --> k *: a.
766- Proof . apply: lcfun_cvgZ => //; exact: cvg_cst. Qed .
757+ Lemma lcfun_cvgZr (U : set_system E) {FF : Filter U} k f a :
758+ f @ U --> a -> k \*: f @ U --> k *: a.
759+ Proof . by apply: lcfun_cvgZ => //; exact: cvg_cst. Qed .
767760
768761Lemma lcfun_continuousM r g : continuous (r \*: g).
769- Proof . by move=> /= x; apply: lcfun_cvgZr; apply : cts_fun. Qed .
762+ Proof . by move=> /= x; apply: lcfun_cvgZr; exact : cts_fun. Qed .
770763
771- HB.instance Definition _ r g := isContinuous.Build E F (r \*: g) (@lcfun_continuousM r g).
764+ HB.instance Definition _ r g :=
765+ isContinuous.Build E F (r \*: g) (@lcfun_continuousM r g).
772766
773- Lemma lcfun_submod_closed : submod_closed (@lcfun R E F *:%R).
767+ Lemma lcfun_submod_closed : submod_closed (@lcfun R E F *:%R).
774768Proof .
775- split; first by rewrite inE; split; first apply/linearP; apply : cst_continuous.
776- move=> r /= _ _ /lcfunE [f] /lcfunE [g].
769+ split; first by rewrite inE; split; first apply/linearP; exact : cst_continuous.
770+ move=> r /= _ _ /lcfunP [f] /lcfunP [g].
777771by rewrite inE /=; split; [exact: linearP | exact: lcfun_continuousD].
778772Qed .
779773
780- HB.instance Definition _ f := isContinuous.Build E F (\- f) (@lcfun_continuousN f).
774+ HB.instance Definition _ f :=
775+ isContinuous.Build E F (\- f) (@lcfun_continuousN f).
781776
782777HB.instance Definition _ :=
783778 @GRing.isSubmodClosed.Build _ _ lcfun lcfun_submod_closed.
@@ -786,14 +781,3 @@ HB.instance Definition _ :=
786781 [SubChoice_isSubLmodule of {linear_continuous E -> F } by <:].
787782
788783End lcfun_lmodtype.
789-
790-
791- Section Substructures.
792- Context (R: numFieldType) (V : convexTvsType R).
793- Variable (A : pred V).
794-
795- HB.instance Definition _ := ConvexTvs.on (subspace A).
796-
797- Check {linear_continuous (subspace A) -> R^o}.
798-
799- End Substructures.
0 commit comments