@@ -37,10 +37,11 @@ Lemma coord_continuous {K : numFieldType} m n i j :
3737 continuous (fun M : 'M[K]_(m, n) => M i j).
3838Proof .
3939move=> /= M s /= /(nbhs_ballP (M i j)) [e e0 es].
40- apply/nbhs_ballP; exists e => //= N MN ; exact/es/MN.
40+ by apply/nbhs_ballP; exists e => //= N [_ MN] ; exact/es/MN.
4141Qed .
4242
43- Lemma rV_compact (T : ptopologicalType) n (A : 'I_n.+1 -> set T) :
43+ #[local]Lemma rV_compact_nondegenerate (T : ptopologicalType) n
44+ (A : 'I_n.+1 -> set T) :
4445 (forall i, compact (A i)) ->
4546 compact [ set v : 'rV[T]_n.+1 | forall i, A i (v ord0 i)].
4647Proof .
@@ -97,6 +98,17 @@ have GC : G [set g | C (\row_j g j)] by exists C.
9798by have [g []] := clGf _ _ GC f_D; exists (\row_j (g j : T)).
9899Qed .
99100
101+ Lemma rV_compact (T : ptopologicalType) n (A : 'I_n -> set T) :
102+ (forall i, compact (A i)) ->
103+ compact [ set v : 'rV[T]_n | forall i, A i (v ord0 i)].
104+ Proof .
105+ case: n A => [A _ | ]; last exact: rV_compact_nondegenerate.
106+ have P0 : #|{: 'I_1 * 'I_0}| = 0 by rewrite card_prod/= !card_ord muln0.
107+ pose v0 := Matrix (ffun0 P0 : {ffun 'I_1 * 'I_0 -> T}).
108+ rewrite (_ : mkset _ = [set v0]); first exact: compact_set1.
109+ by rewrite predeqE => x /=; split => [ _ | _ []//]; apply/rowP => -[].
110+ Qed .
111+
100112Section mx_norm.
101113Variables (K : numDomainType) (m n : nat).
102114Implicit Types x y : 'M[K]_(m, n).
@@ -177,7 +189,7 @@ HB.instance Definition _ (K : numDomainType) (m n : nat) :=
177189Section example_of_sharing.
178190Variables (K : numDomainType).
179191
180- Example matrix_triangle m n (M N : 'M[K]_(m.+1 , n.+1 )) :
192+ Example matrix_triangle m n (M N : 'M[K]_(m, n)) :
181193 `|M + N| <= `|M| + `|N|.
182194Proof . exact: ler_normD. Qed .
183195
@@ -189,57 +201,57 @@ End example_of_sharing.
189201Section matrix_pseudoMetricNormedZmod.
190202Variables (K : numFieldType) (m n : nat).
191203
192- Local Lemma ball_gt0 (x y : 'M[K]_(m.+1 , n.+1 )) e : ball x e y -> 0 < e.
193- Proof . by move/(_ ord0 ord0); apply: le_lt_trans . Qed .
204+ Local Lemma ball_gt0 (x y : 'M[K]_(m, n)) e : ball x e y -> 0 < e.
205+ Proof . by case . Qed .
194206
195- Lemma mx_norm_ball : @ball _ 'M[K]_(m.+1 , n.+1 ) = ball_ (fun x => `| x |).
207+ Lemma mx_norm_ball : @ball _ 'M[K]_(m, n) = ball_ (fun x => `| x |).
196208Proof .
197- rewrite /normr /ball_ predeq3E => x e y /=; rewrite mx_normE; split => xey.
198- - have e_gt0 : 0 < e := ball_gt0 xey.
199- move: e_gt0 (e_gt0) xey => /ltW/nonnegP[{}e] e_gt0 xey.
209+ rewrite /normr /ball_ predeq3E => x e y/= /[!mx_normE]; split=> [[]|xey].
210+ - move=> /[dup] => /ltW/nonnegP[{}e] e_gt0 xey.
200211 rewrite num_lt; apply/bigmax_ltP => /=.
201212 by rewrite -num_lt /=; split => // -[? ?] _; rewrite !mxE; exact: xey.
202213- have e_gt0 : 0 < e by rewrite (le_lt_trans _ xey).
203214 move: e_gt0 (e_gt0) xey => /ltW/nonnegP[{}e] e_gt0.
204- move=> /(bigmax_ltP _ _ _ (fun _ => _%:itv)) /= [e0 xey] i j.
215+ move=> /(bigmax_ltP _ _ _ (fun=> _%:itv)) /= [e0 xey].
216+ split=> // i j.
205217 by move: (xey (i, j)); rewrite !mxE; exact.
206218Qed .
207219
208220HB.instance Definition _ :=
209- NormedZmod_PseudoMetric_eq.Build K 'M[K]_(m.+1 , n.+1 ) mx_norm_ball.
221+ NormedZmod_PseudoMetric_eq.Build K 'M[K]_(m, n) mx_norm_ball.
210222
211223End matrix_pseudoMetricNormedZmod.
212224
213- Lemma bounded_closed_compact (R : realType) n (A : set 'rV[R]_n.+1 ) :
225+ Lemma bounded_closed_compact (R : realType) n (A : set 'rV[R]_n) :
214226 bounded_set A -> closed A -> compact A.
215227Proof .
216228move=> [M [Mreal normAltM]] Acl.
217229have Mnco : compact
218- [set v : 'rV[R]_n.+1 | forall i, v ord0 i \in `[(- (M + 1)), (M + 1)]].
219- apply: (@rV_compact _ _ (fun _ => `[(- (M + 1)), (M + 1)]%classic)).
230+ [set v : 'rV[R]_n | forall i, v ord0 i \in `[(- (M + 1)), (M + 1)]].
231+ apply: (@rV_compact _ _ (fun=> `[(- (M + 1)), (M + 1)]%classic)).
220232 by move=> _; apply: segment_compact.
221233apply: subclosed_compact Acl Mnco _ => v /normAltM normvleM i.
222234suff : `|v ord0 i : R| <= M + 1 by rewrite ler_norml.
223235apply: le_trans (normvleM _ _); last by rewrite ltrDl.
224- have /mapP[j Hj ->] : `|v ord0 i| \in [seq `|v x.1 x.2| | x : 'I_1 * 'I_n.+1 ].
236+ have /mapP[j Hj ->] : `|v ord0 i| \in [seq `|v x.1 x.2| | x : 'I_1 * 'I_n].
225237 by apply/mapP; exists (ord0, i) => //=; rewrite mem_enum.
226238by rewrite [leRHS]/normr /= mx_normrE; apply/bigmax_geP; right => /=; exists j.
227239Qed .
228240
229241Section matrix_NormedModule.
230- Variables (K : numFieldType) (m n : nat).
231242
232- Lemma mx_normZ (l : K) (x : 'M[K]_(m.+1, n.+1)) : `| l *: x | = `| l | * `| x |.
243+ Lemma mx_normZ (K : numDomainType) m n (l : K) (x : 'M[K]_(m, n)) :
244+ `| l *: x | = `| l | * `| x |.
233245Proof .
234246rewrite {1 3}/normr /= !mx_normE
235- (eq_bigr (fun i => (`|l| * `|x i.1 i.2|)%:nng)); last first.
247+ (eq_bigr (fun i => (`|l| * `|x i.1 i.2|)%:nng)); last first.
236248 by move=> i _; rewrite mxE //=; apply/eqP; rewrite -num_eq /= normrM.
237249elim/big_ind2 : _ => // [|a b c d bE dE]; first by rewrite mulr0.
238250by rewrite !num_max bE dE maxr_pMr.
239251Qed .
240252
241- HB.instance Definition _ :=
242- PseudoMetricNormedZmod_Lmodule_isNormedModule.Build K 'M[K]_(m.+1 , n.+1 )
243- mx_normZ.
253+ HB.instance Definition _ (K : numFieldType) m n :=
254+ PseudoMetricNormedZmod_Lmodule_isNormedModule.Build K 'M[K]_(m, n)
255+ (@ mx_normZ K m n) .
244256
245257End matrix_NormedModule.
0 commit comments