@@ -109,7 +109,7 @@ by rewrite predeqE => x /=; split => [ _ | _ []//]; apply/rowP => -[].
109109Qed .
110110
111111Section mx_norm.
112- Variables ( K : numDomainType) ( m n : nat) .
112+ Context [ K : numDomainType] { m n : nat} .
113113Implicit Types x y : 'M[K]_(m, n).
114114
115115Definition mx_norm x : K := (\big[maxr/0%:nng]_i `|x i.1 i.2|%:nng)%:num.
@@ -172,6 +172,25 @@ Qed.
172172
173173End mx_norm.
174174
175+ HB.instance Definition _ {K : numDomainType} m n :=
176+ Num.Zmodule_isNormed.Build K 'M[K]_(m, n)
177+ (@ler_mx_norm_add _ _ _) (@mx_norm_eq0 _ _ _)
178+ (@mx_norm_natmul _ _ _) (@mx_normN _ _ _).
179+
180+ Section norm_trmx.
181+ Import MaxNngComLaw.
182+
183+ Lemma norm_trmx {R : realFieldType} m n (M : 'M[R]_(m, n)) :
184+ mx_norm M^T = mx_norm M.
185+ Proof .
186+ rewrite [LHS]mx_normE/=.
187+ under eq_bigr do rewrite mxE/=.
188+ rewrite -(pair_big xpredT xpredT (fun i j => `|M j i|%:nng))/=.
189+ by rewrite exchange_big//= pair_big.
190+ Qed .
191+
192+ End norm_trmx.
193+
175194Lemma mx_normrE (K : realDomainType) (m n : nat) (x : 'M[K]_(m, n)) :
176195 mx_norm x = \big[maxr/0]_ij `|x ij.1 ij.2|.
177196Proof .
@@ -180,13 +199,8 @@ elim/big_ind2 : _ => //= a a' b b' ->{a'} ->{b'}.
180199by have [ab|ab] := leP a b; [rewrite max_r | rewrite max_l // ltW].
181200Qed .
182201
183- HB.instance Definition _ (K : numDomainType) (m n : nat) :=
184- Num.Zmodule_isNormed.Build K 'M[K]_(m, n)
185- (@ler_mx_norm_add _ _ _) (@mx_norm_eq0 _ _ _)
186- (@mx_norm_natmul _ _ _) (@mx_normN _ _ _).
187-
188202Section example_of_sharing.
189- Variables ( K : numDomainType) .
203+ Context { K : numDomainType} .
190204
191205Example matrix_triangle m n (M N : 'M[K]_(m, n)) :
192206 `|M + N| <= `|M| + `|N|.
@@ -198,7 +212,7 @@ Proof. exact: ler_normD. Qed.
198212End example_of_sharing.
199213
200214Section matrix_pseudoMetricNormedZmod.
201- Variables ( K : numFieldType) ( m n : nat) .
215+ Context { K : numFieldType} { m n : nat} .
202216
203217Local Lemma ball_gt0 (x y : 'M[K]_(m, n)) e : ball x e y -> 0 < e.
204218Proof . by case. Qed .
0 commit comments