@@ -20,6 +20,9 @@ From mathcomp Require Import ereal_normedtype pseudometric_normed_Zmodule.
2020(* normedModType K == interface type for a normed module *)
2121(* structure over the numDomainType K *)
2222(* The HB class is NormedModule. *)
23+ (* normedVectType K == interface type for a normed vectType *)
24+ (* structure over the numDomainType K *)
25+ (* The HB class is NormedVector. *)
2326(* `|x| == the norm of x (notation from ssrnum.v) *)
2427(* ``` *)
2528(* *)
@@ -147,6 +150,10 @@ HB.instance Definition _ :=
147150
148151HB.end .
149152
153+ #[short(type="normedVectType")]
154+ HB.structure Definition NormedVector (K : numDomainType) :=
155+ {T of NormedModule K T & Vector K T}.
156+
150157(**md see also `Section standard_topology_pseudoMetricNormedZmod` in
151158 `pseudometric_normed_Zmodule.v` *)
152159Section standard_topology_normedMod.
@@ -2079,3 +2086,241 @@ by rewrite interior_closed_ballE //; exact: ballxx.
20792086Qed .
20802087
20812088End Closed_Ball_normedModType.
2089+
2090+ Section InfiniteNorm.
2091+ Variables (R : numFieldType) (V : vectType R) (B : (\dim (@fullv _ V)).-tuple V).
2092+ Let V' := @fullv _ V.
2093+ Hypothesis (Bbasis : basis_of V' B).
2094+
2095+ Definition oo_norm x := \big[Order.max/0]_(i < \dim V') `|coord B i x|.
2096+
2097+ Definition oo_space : Type := (fun=> V) Bbasis.
2098+
2099+ HB.instance Definition _ := Vector.on oo_space.
2100+
2101+ HB.instance Definition _ := Pointed.copy oo_space V^o.
2102+
2103+ Lemma oo_norm_ge0 x : 0 <= oo_norm x.
2104+ Proof .
2105+ rewrite /oo_norm.
2106+ elim: (index_enum _) => /=; first by rewrite big_nil.
2107+ by move=> i l IHl; rewrite big_cons /Order.max/=; case: ifP.
2108+ Qed .
2109+
2110+ Lemma le_coord_oo_norm x i : `|coord B i x| <= oo_norm x.
2111+ Proof .
2112+ rewrite /oo_norm; elim: (index_enum _) (mem_index_enum i) => //= j l IHl.
2113+ rewrite inE big_cons /Order.max/= => /orP[/eqP <-|/IHl {}IHl];
2114+ case: ifP => [/ltW|]//.
2115+ move=> /negP/negP.
2116+ have bR: \big[Order.max/0]_(i <- l) `|coord B i x| \is Num.real.
2117+ exact: bigmax_real.
2118+ move: (real_comparable bR (normr_real (coord B j x))).
2119+ by move=> /comparable_leNgt <- /(le_trans IHl).
2120+ Qed .
2121+
2122+ Lemma ler_oo_normD x y : oo_norm (x + y) <= oo_norm x + oo_norm y.
2123+ Proof .
2124+ apply: bigmax_le => [|/= i _].
2125+ by apply: addr_ge0; apply: oo_norm_ge0.
2126+ rewrite raddfD/=.
2127+ by apply/(le_trans (ler_normD _ _))/lerD; apply: le_coord_oo_norm.
2128+ Qed .
2129+
2130+ Lemma oo_norm0_eq0 x : oo_norm x = 0 -> x = 0.
2131+ Proof .
2132+ move=> x0.
2133+ rewrite (coord_basis Bbasis (memvf x)).
2134+ suff: forall i, coord B i x = 0.
2135+ move=> {}x0.
2136+ under eq_bigr do rewrite x0.
2137+ by rewrite -scaler_sumr scale0r.
2138+ move=> i; apply/normr0_eq0/le_anti/andP; split; last exact: normr_ge0.
2139+ by rewrite -x0; apply: le_coord_oo_norm.
2140+ Qed .
2141+
2142+ Lemma oo_normZ r x : oo_norm (r *: x) = `|r| * oo_norm x.
2143+ Proof .
2144+ rewrite /oo_norm.
2145+ under eq_bigr do rewrite linearZ normrZ/=.
2146+ elim: (index_enum _) => [|i l IHl]; first by rewrite !big_nil mulr0.
2147+ by rewrite !big_cons IHl maxr_pMr.
2148+ Qed .
2149+
2150+ Lemma oo_normMn x n : oo_norm (x *+ n) = oo_norm x *+ n.
2151+ Proof . by rewrite -scaler_nat oo_normZ normr_nat mulr_natl. Qed .
2152+
2153+ Lemma oo_normN x : oo_norm (- x) = oo_norm x.
2154+ Proof . by rewrite -scaleN1r oo_normZ normrN1 mul1r. Qed .
2155+
2156+ HB.instance Definition _ := Num.Zmodule_isNormed.Build R
2157+ oo_space ler_oo_normD oo_norm0_eq0 oo_normMn oo_normN.
2158+
2159+ HB.instance Definition _ :=
2160+ PseudoMetric.copy oo_space (pseudoMetric_normed oo_space).
2161+
2162+ HB.instance Definition _ := NormedZmod_PseudoMetric_eq.Build R oo_space erefl.
2163+
2164+ HB.instance Definition _ :=
2165+ PseudoMetricNormedZmod_Lmodule_isNormedModule.Build R oo_space oo_normZ.
2166+
2167+ End InfiniteNorm.
2168+
2169+ Section EquivalenceNorms.
2170+ Variables (R : realType) (V : vectType R).
2171+ Let V' := @fullv _ V.
2172+ Let Voo := oo_space (vbasisP (@fullv _ V)).
2173+
2174+ (* N.B. Get Trocq to prove the continuity part automatically. *)
2175+ Lemma oo_closed_ball_compact : compact (closed_ball (0 : Voo) 1).
2176+ Proof .
2177+ rewrite closed_ballE/closed_ball_//=.
2178+ under eq_set do rewrite sub0r normrN.
2179+ rewrite -[forall x, _]/(compact _).
2180+ pose f (X : {ptws 'I_(\dim V') -> R^o}) : Voo :=
2181+ \sum_(i < \dim V') (X i) *: (vbasis V')`_i.
2182+ have -> :
2183+ [set x : Voo | `|x| <= 1] = f @` [set X | forall i, `[-1, 1]%classic (X i)].
2184+ apply/seteqP; split=> x/=.
2185+ move=> x1; exists (fun i => coord (vbasis V') i x); last first.
2186+ exact/esym/(@coord_vbasis _ _ (x : V))/memvf.
2187+ move=> i; rewrite in_itv/= -ler_norml.
2188+ apply: (le_trans _ x1).
2189+ exact: le_coord_oo_norm.
2190+ move=> [X] X1 <-.
2191+ rewrite /normr/=/oo_norm.
2192+ apply: bigmax_le => //= i _.
2193+ rewrite coord_sum_free; last exact/basis_free/vbasisP.
2194+ rewrite ler_norml.
2195+ exact: X1.
2196+ apply: (@continuous_compact _ _ f); last first.
2197+ apply: (@tychonoff 'I_(\dim V') (fun=> R^o) (fun=> `[-1, 1 : R^o]%classic)).
2198+ move=> _.
2199+ exact: segment_compact.
2200+ apply/continuous_subspaceT/sum_continuous => i _/= x.
2201+ exact/continuousZl/proj_continuous.
2202+ Qed .
2203+
2204+ Lemma equivalence_norms (N : V -> R) :
2205+ N 0 = 0 -> (forall x, 0 <= N x) -> (forall x, N x = 0 -> x = 0) ->
2206+ (forall x y, N (x + y) <= N x + N y) ->
2207+ (forall r x, N (r *: x) = `|r| * N x) ->
2208+ exists M, 0 < M /\ forall x : Voo, `|x| <= M * N x /\ N x <= M * `|x|.
2209+ Proof .
2210+ move=> N0 N_ge0 N0_eq0 ND NZ.
2211+ set M0 := 1 + \sum_(i < \dim V') N (vbasis V')`_i.
2212+ have N_sum (I : Type) (r : seq I) (F : I -> V):
2213+ N (\sum_(i <- r) F i) <= \sum_(i <- r) N (F i).
2214+ elim: r => [|x r IHr]; first by rewrite !big_nil N0.
2215+ by rewrite !big_cons; apply/(le_trans (ND _ _))/lerD.
2216+ have leNoo: forall x : Voo, N x <= M0 * `|x|.
2217+ move=> x.
2218+ rewrite [in leLHS](coord_vbasis (memvf (x : V))).
2219+ apply: (le_trans (N_sum _ _ _)).
2220+ rewrite mulrDl mul1r mulr_suml -[leLHS]add0r.
2221+ apply: lerD => //.
2222+ apply: ler_sum => /= i _.
2223+ rewrite NZ mulrC; apply: ler_pM => //.
2224+ exact: le_coord_oo_norm.
2225+ have M00 : 0 < M0.
2226+ rewrite -[ltLHS]addr0.
2227+ by apply: ltr_leD => //; apply: sumr_ge0.
2228+ have NC0 : continuous (N : Voo -> R).
2229+ move=> /= x.
2230+ rewrite /continuous_at.
2231+ apply: cvg_zero; first exact: nbhs_filter.
2232+ apply/cvgr0Pnorm_le; first exact: nbhs_filter.
2233+ move=> /= e e0.
2234+ near=> y.
2235+ rewrite -[_ y]/(N y - N x).
2236+ apply: (@le_trans _ _ (N (y - x))).
2237+ apply/real_ler_normlP.
2238+ by apply: realB; apply: ger0_real.
2239+ have NB a b : N a <= N b + N (a - b).
2240+ by rewrite -[a in N a]addr0 -(subrr b) addrCA ND.
2241+ rewrite opprB !lerBlDl; split; last exact: NB.
2242+ by rewrite -opprB -scaleN1r NZ normrN1 mul1r NB.
2243+ apply: (le_trans (leNoo _)).
2244+ rewrite mulrC -ler_pdivlMr// -opprB normrN.
2245+ near: y; apply: cvgr_dist_le; first exact: cvg_id.
2246+ exact: divr_gt0.
2247+ have: compact [set x : Voo | `|x| = 1].
2248+ apply: (subclosed_compact _ oo_closed_ball_compact); last first.
2249+ apply/subsetP => x.
2250+ rewrite closed_ballE// !inE/=.
2251+ by rewrite /closed_ball_/= sub0r normrN => ->.
2252+ apply: (@closed_comp _ _ _ [set 1 : R]); last exact: closed_eq.
2253+ by rewrite /prop_in1 => + _; apply: norm_continuous.
2254+ move=> /(@continuous_compact _ _ (N : Voo -> R)) -/(_ _)/wrap[].
2255+ exact: continuous_subspaceT.
2256+ move=> /(@continuous_compact _ _ (@GRing.inv R)) -/(_ _)/wrap[].
2257+ move=> /= x.
2258+ rewrite /continuous_at.
2259+ apply: (@continuous_in_subspaceT _ _
2260+ [set N x | x in [set x : Voo | `|x| = 1]] (@GRing.inv R)).
2261+ move=> r /set_mem/=[] y y1 <-.
2262+ apply: inv_continuous.
2263+ apply/negP => /eqP/N0_eq0 y0.
2264+ move: y1; rewrite y0 normr0 => /esym.
2265+ by move: (@oner_neq0 R) => /eqP.
2266+ move=> /compact_bounded[] M1 [] M1R /(_ (1 + M1)).
2267+ rewrite -subr_gt0 -addrA subrr addr0 => /(_ ltr01).
2268+ rewrite /globally/= => M1N.
2269+ exists (maxr M0 (1 + M1)).
2270+ split=> [|x]; first by apply: (lt_le_trans M00); rewrite le_max lexx.
2271+ split; last first.
2272+ apply/(le_trans (leNoo x))/ler_pM => //; first exact/ltW.
2273+ by rewrite /maxr; case: ifP => // /ltW.
2274+ have [->|x0] := eqVneq x 0; first by rewrite normr0 N0 mulr0.
2275+ have Nx0: 0 < N x.
2276+ rewrite lt0r N_ge0 andbT.
2277+ by move: x0; apply: contra => /eqP/N0_eq0/eqP.
2278+ have normx0 : 0 < `|x|.
2279+ move: (lt_le_trans Nx0 (leNoo x)).
2280+ by rewrite pmulr_rgt0.
2281+ move: M1N => /(_ (`|x| / N x)) -/(_ _)/wrap[].
2282+ exists (N x / `|x|); last by rewrite invf_div.
2283+ exists (`|x|^-1 *: x); last first.
2284+ by rewrite NZ mulrC ger0_norm.
2285+ rewrite normrZ mulrC ger0_norm.
2286+ by rewrite divrr//; apply: unitf_gt0.
2287+ by rewrite invr_ge0; apply: ltW.
2288+ rewrite ger0_norm; last exact: divr_ge0.
2289+ rewrite ler_pdivrMr// => xle.
2290+ apply: (le_trans xle).
2291+ rewrite -subr_ge0 -mulrBl pmulr_lge0// subr_ge0.
2292+ by rewrite le_max lexx orbT.
2293+ Unshelve. all: by end_near.
2294+ Qed .
2295+
2296+ End EquivalenceNorms.
2297+
2298+ Section LinearContinuous.
2299+ Variables (R : realType) (V : normedVectType R) (W : normedModType R).
2300+
2301+ Lemma linear_findim_continuous (f : {linear V -> W}) : continuous f.
2302+ Proof .
2303+ set V' := @fullv _ V.
2304+ set B := vbasis V' => /= x.
2305+ rewrite /continuous_at.
2306+ rewrite [x in f x](coord_vbasis (memvf x)) raddf_sum.
2307+ rewrite (@eq_cvg _ _ _ _ (fun y => \sum_(i < \dim V') coord B i y *: f B`_i));
2308+ last first.
2309+ move=> y; rewrite [y in LHS](coord_vbasis (memvf y)) raddf_sum.
2310+ by apply: eq_big => // i _; apply: linearZ.
2311+ apply: cvg_sum => i _.
2312+ rewrite [X in _ --> X]linearZ/= -/B.
2313+ apply: cvgZl.
2314+ move: x; apply/linear_bounded_continuous/bounded_funP => r/=.
2315+ have := @equivalence_norms R V (@normr R V) (@normr0 _ _) (@normr_ge0 _ _)
2316+ (@normr0_eq0 _ _) (@ler_normD _ _) (@normrZ _ _).
2317+ move=> [] M [] M0 MP.
2318+ exists (M * r) => x.
2319+ move: MP => /(_ x)[] Mx Mx' xr.
2320+ apply/(le_trans (le_coord_oo_norm _ _ _))/(le_trans Mx).
2321+ rewrite -subr_ge0 -mulrBr; apply: mulr_ge0; first exact: ltW.
2322+ by rewrite subr_ge0.
2323+ Qed .
2324+
2325+ End LinearContinuous.
2326+
0 commit comments