@@ -939,18 +939,14 @@ Import numFieldNormedType.Exports.
939939Local Open Scope classical_set_scope.
940940
941941Section HBGeom.
942+ Variable (R : realType) (V : normedModType R) (F : pred V) (f : V -> R) (F0 : F 0).
942943
943- Variable (R : realType) (V : normedModType R) (F : pred V) (f : V -> R) (F0 : F 0).
944- Hypothesis (linF : (forall (v1 v2 : V) (l : R),
945- F v1 -> F v2 -> F (v1 + l *: v2))).
946- Hypothesis linfF : forall v1 v2 l, F v1 -> F v2 ->
947- f (v1 + l *: v2) = f v1 + l * (f v2).
948-
944+ Hypothesis linF : forall (v1 v2 : V) (l : R), F v1 -> F v2 -> F (v1 + l *: v2).
945+ Hypothesis linfF : forall v1 v2 l, F v1 -> F v2 -> f (v1 + l *: v2) = f v1 + l * (f v2).
949946
950947Hypothesis (Choice_prop : ((forall T U (Q : T -> U -> Prop),
951948 (forall t : T, exists u : U, Q t u) -> (exists e, forall t, Q t (e t))))).
952949
953-
954950(*Looked a long time for within *)
955951Definition continuousR_on ( G : set V ) (g : V -> R) :=
956952 {within G, continuous g}.
@@ -966,41 +962,43 @@ Lemma continuousR_scalar_on_bounded :
966962Proof .
967963 rewrite /continuousR_on_at.
968964 move => /cvg_ballP H.
969- have H': (0 < 1) by [].
970- move: (H 1) {H'}.
965+ have H': (0 < 1) by [].
966+ have : \forall x \near within (fun x : V => F x) (nbhs 0), ball (f 0) 1 (f x).
967+ apply: H. by [].
971968 have f0 : f 0 = 0.
972969 suff -> : f 0 = f (0 + (-1)*: 0) by rewrite linfF // mulNr mul1r addrN.
973970 by rewrite scaleNr scaler0 addrN.
974- (* rewrite near_simpl /( _ @ _ ) //= nearE /(within _ ) near_simpl f0 .
971+ rewrite /( _ @ _ ) //= nearE /(within _ ) f0 //=. rewrite near_simpl .
975972 rewrite -nbhs_nearE => H0 {H} ; move : (nbhs_ex H0) => [tp H] {H0}.
976- pose t := tp%:num .
977- exists (2*t ^-1). split=> //.
973+ (* pose t := tp%:num . *)
974+ exists (2*(tp%:num) ^-1). split=> //.
978975 move=> x. case: (boolp.EM (x=0)).
979976 - by move=> ->; rewrite f0 normr0 normr0 //= mul0r.
980977 - move/eqP=> xneq0 Fx.
981- pose a : V := (`|x|^-1 * t/2 ) *: x.
982- have Btp : ball 0 t a.
983- apply : ball_sym ; rewrite -ball_normE /ball_ subr0.
984- rewrite normmZ mulrC normrM.
985- rewrite !gtr0_norm //= ; last by rewrite pmulr_lgt0 // invr_gt0 normr_gt0.
986- rewrite mulrC -mulrA -mulrA ltr_pdivr_mull; last by rewrite normr_gt0.
987- rewrite mulrC -mulrA gtr_pmull.
978+ pose a : V := (`|x|^-1 * (tp%:num)/2 ) *: x.
979+ have Btp : ball 0 (tp%:num) a.
980+ apply : ball_sym ; rewrite -ball_normE /ball_ /= subr0.
981+ rewrite normrZ mulrC normrM.
982+ rewrite !gtr0_norm //= ; last first.
983+ rewrite pmulr_lgt0 // ?invr_gt0 ?normr_gt0 //.
984+ rewrite mulrC -mulrA -mulrA ltr_pdivrMl; last by rewrite normr_gt0.
985+ rewrite mulrC -mulrA gtr_pMl.
988986 rewrite invf_lt1 //=.
989- by have lt01 : 0 < 1 by []; have le11 : 1 <= 1 by [] ; apply : ltr_spaddr .
987+ by rewrite ltr1n .
990988 by rewrite pmulr_lgt0 // !normr_gt0.
991989 have Fa : F a by rewrite -[a]add0r; apply: linF.
992990 have : `|f a| < 1.
993991 by move: (H _ Btp Fa); rewrite /ball /ball_ //= sub0r normrN.
994- suff -> : ( f a = ( (`|x|^-1) * t /2 ) * ( f x)) .
992+ suff -> : ( f a = ( (`|x|^-1) * (tp%:num) /2 ) * ( f x)) .
995993 rewrite normrM (gtr0_norm) //.
996- rewrite mulrC mulrC -mulrA -mulrA ltr_pdivr_mull //= ;
994+ rewrite mulrC mulrC -mulrA -mulrA ltr_pdivrMl //= ;
997995 last by rewrite normr_gt0.
998- rewrite mulrC [(_*1)]mulrC mul1r -ltr_pdivl_mulr // .
999- by rewrite invf_div => Ht ; apply : ltW.
1000- by rewrite !mulr_gt0 // invr_gt0 normr_gt0.
1001- suff -> : a = 0+ (`|x|^-1 * t /2) *: x by rewrite linfF // f0 add0r.
996+ rewrite mulrC [(_*1)]mulrC mul1r.
997+ rewrite -[X in _ * X < _ ] invf_div ltr_pdivrMr //= ; apply: ltW.
998+ by rewrite !mulr_gt0 ?normr_gt0 // ? invr_gt0 normr_gt0.
999+ suff -> : a = 0+ (`|x|^-1 * tp%:num /2) *: x by rewrite linfF // f0 add0r.
10021000 by rewrite add0r.
1003- Qed .*) Admitted .
1001+ Qed .
10041002
10051003Lemma mymysup : forall (A : set R) (a m : R),
10061004 A a -> ubound A m ->
@@ -1028,17 +1026,15 @@ Lemma mymyinf : forall (A : set R) (a m : R),
10281026 by move => x; apply: lb_le_inf.
10291027Qed .
10301028
1031-
10321029Notation myHB :=
10331030 (HahnBanach (boolp.EM) Choice_prop mymysup mymyinf F0 linF linfF).
10341031
1035-
10361032Theorem HB_geom_normed :
1037- continuousR_on_at F 0 f ->
1033+ continuousR_on_at F 0 f ->
10381034 exists g: {scalar V}, (continuous (g : V -> R)) /\ (forall x, F x -> (g x = f x)).
10391035Proof .
1040- move=> H; move: (continuousR_scalar_on_bounded H) => [r [ltr0 fxrx]] {H}.
1041- pose p:= fun x : V => `|x|*r.
1036+ move=> H; move: (continuousR_scalar_on_bounded H) => [r [ltr0 fxrx]] {H}.
1037+ pose p:= fun x : V => `|x|*r.
10421038 have convp: hahn_banach_theorem.convex p.
10431039 move=> v1 v2 l m [lt0l lt0m] addlm1 //= ; rewrite !/( p _) !mulrA -mulrDl.
10441040 suff: `|l *: v1 + m *: v2| <= (l * `|v1| + m * `|v2|).
@@ -1062,15 +1058,115 @@ Proof.
10621058 apply: bounded_linear_continuous.
10631059 exists r.
10641060 split; first by rewrite realE; apply/orP; left; apply: ltW. (* r is Numreal ... *)
1065- (*
1066- move => M m1; rewrite nbhs_ballP; exists 1; first by [].
1061+ move => M m1; rewrite nbhs_ballP; exists 1 => /=; first by [].
10671062 move => y; rewrite -ball_normE //= sub0r => y1.
1068- rewrite ler_norml; apply/andP; split.
1069- - rewrite ler_oppl -linearN; apply: (le_trans (majgp (-y))).
1070- by rewrite /p -[X in _ <= X]mul1r; apply: ler_pmul ; rewrite ?normr_ge0 ?ltW //=.
1063+ rewrite ler_norml; apply/andP. split.
1064+ - rewrite lerNl -linearN; apply: (le_trans (majgp (-y))).
1065+ by rewrite /p -[X in _ <= X]mul1r; apply: ler_pM ; rewrite ?normr_ge0 ?ltW //=.
10711066 - apply: (le_trans (majgp (y))); rewrite /p -[X in _ <= X]mul1r -normrN.
1072- apply: ler_pmul ; rewrite ?normr_ge0 ?ltW //=.
1073- Qed .*)
1074- Admitted .
1067+ apply: ler_pM ; rewrite ?normr_ge0 ?ltW //=.
1068+ Qed .
1069+
10751070
10761071End HBGeom.
1072+
1073+
1074+ Section newHBGeom.
1075+
1076+ (* TODO: port to ctvsType, by porting lemmas on continuous bounded linear functions there *)
1077+
1078+ Variable (R : realType) (V: normedModType R) (F : subLmodType V) (f : {linear F -> R}).
1079+
1080+ (* One needs to define the topological structure on F as the one induced by V, and make it a normedModtype, as was done for subLmodType *)
1081+
1082+ Hypothesis (Choice_prop : ((forall T U (Q : T -> U -> Prop),
1083+ (forall t : T, exists u : U, Q t u) -> (exists e, forall t, Q t (e t))))).
1084+
1085+ (*
1086+ Lemma mymysup : forall (A : set R) (a m : R),
1087+ A a -> ubound A m ->
1088+ {s : R | ubound A s /\ forall u, ubound A u -> s <= u}.
1089+ Proof.
1090+ move => A a m Aa majAm.
1091+ have [A0 Aub]: has_sup A. split; first by exists a.
1092+ by exists m => x; apply majAm.
1093+ exists (reals.sup A).
1094+ split.
1095+ by apply: sup_upper_bound.
1096+ by move => x; apply: sup_le_ub.
1097+ Qed.
1098+
1099+ (*TODO: should be lb_le_inf: *)
1100+ Lemma mymyinf : forall (A : set R) (a m : R),
1101+ A a -> lbound A m ->
1102+ {s : R | lbound A s /\ forall u, lbound A u -> u <= s}.
1103+ move => A a m Aa minAm.
1104+ have [A0 Alb]: has_inf A. split; first by exists a.
1105+ by exists m => x; apply minAm.
1106+ exists (reals.inf A).
1107+ split.
1108+ exact: ge_inf.
1109+ by move => x; apply: lb_le_inf.
1110+ Qed.
1111+
1112+
1113+ Notation myHB :=
1114+ (HahnBanach (boolp.EM) Choice_prop mymysup mymyinf F0 linF linfF).
1115+ *)
1116+
1117+ Search "continuous" "subspace".
1118+ (* bounded_linear_continuous: forall [R : numFieldType] [V W : normedModType R] [f : {linear V -> W}], bounded_near f (nbhs (0 : V)) -> continuous f
1119+ linear_bounded_continuous: forall [R : numFieldType] [V W : normedModType R] (f : {linear V -> W}), bounded_near f (nbhs 0) <-> continuous f
1120+ continuous_linear_bounded: forall [R : numFieldType] [V W : normedModType R] (x : V) [f : {linear V -> W}], {for 0, continuous f} -> bounded_near f (nbhs x) *)
1121+
1122+ (*TODO : clean the topological structure on F. Define subctvs ? *)
1123+ Theorem new_HB_geom_normed :
1124+ continuous (f : (@initial_topology (sub_type F) V val) -> R) ->
1125+ exists g: {scalar V}, (continuous (g : V -> R)) /\ (forall (x : F), (g (val x) = f x)).
1126+ Proof .
1127+ move /(_ 0) => /= H; rewrite /from_subspace /=.
1128+ have f0 : {for 0, continuous ( (f : (@initial_topology (sub_type F) V val) -> R))}.
1129+ admit.
1130+ Check (continuous_linear_bounded).
1131+ (* TODO ; to apply this lemma, F needs to be given a normedmodtype structure *)
1132+ (* move=> H; move: (continuousR_scalar_on_bounded H) => [r [ltr0 fxrx]] {H}.
1133+ (* want : r :
1134+ ltr0 : 0 < r
1135+ fxrx : forall x : V, F x -> `|f x| <= `|x| * r*)
1136+ pose p:= fun x : V => `|x|*r.
1137+ have convp: hahn_banach_theorem.convex p.
1138+ move=> v1 v2 l m [lt0l lt0m] addlm1 //= ; rewrite !/( p _) !mulrA -mulrDl.
1139+ suff: `|l *: v1 + m *: v2| <= (l * `|v1| + m * `|v2|).
1140+ move => h; apply : ler_pM; last by [].
1141+ by apply : normr_ge0.
1142+ by apply : ltW.
1143+ by [].
1144+ have labs : `|l| = l by apply/normr_idP.
1145+ have mabs: `|m| = m by apply/normr_idP.
1146+ rewrite -[in(_*_)]labs -[in(m*_)]mabs.
1147+ rewrite -!normrZ.
1148+ by apply : ler_normD.
1149+ have majfp : forall x, F x -> f x <= p x.
1150+ move => x Fx; rewrite /(p _) ; apply : le_trans ; last by [].
1151+ apply : le_trans.
1152+ apply : ler_norm.
1153+ by apply : (fxrx x Fx).
1154+ move: (myHB convp majfp) => [ g [majgp F_eqgf] ] {majfp}.
1155+ exists g; split; last by [].
1156+ move=> x; rewrite /cvgP; apply: (continuousfor0_continuous).
1157+ apply: bounded_linear_continuous.
1158+ exists r.
1159+ split; first by rewrite realE; apply/orP; left; apply: ltW. (* r is Numreal ... *)
1160+ move => M m1; rewrite nbhs_ballP; exists 1 => /=; first by [].
1161+ move => y; rewrite -ball_normE //= sub0r => y1.
1162+ rewrite ler_norml; apply/andP. split.
1163+ - rewrite lerNl -linearN; apply: (le_trans (majgp (-y))).
1164+ by rewrite /p -[X in _ <= X]mul1r; apply: ler_pM; rewrite ?normr_ge0 ?ltW //=.
1165+ - apply: (le_trans (majgp (y))); rewrite /p -[X in _ <= X]mul1r -normrN.
1166+ apply: ler_pM; rewrite ?normr_ge0 ?ltW //=.
1167+ Qed .
1168+ *)
1169+ Admitted .
1170+
1171+
1172+ End newHBGeom.
0 commit comments