Section prod_NormedModule.
Context {K : AbsRing} {U V : NormedModule K}.
Definition prod_norm (x : U * V) :=
sqrt (norm (fst x) ^ 2 + norm (snd x) ^ 2).
Definition prod_norm_factor :=
sqrt 2 * Rmax (@norm_factor K U) (@norm_factor K V).
End prod_NormedModule.
Definition prod_NormedModule_mixin (K : AbsRing) (U V : NormedModule K) :=
NormedModule.Mixin K _ (@prod_norm K U V) prod_norm_factor prod_norm_triangle
prod_norm_scal prod_norm_compat1 prod_norm_compat2 prod_norm_eq_zero.
Canonical prod_NormedModule (K : AbsRing) (U V : NormedModule K) :=
NormedModule.Pack K (U * V) (NormedModule.Class K (U * V) _ (prod_NormedModule_mixin K U V)) (U * V).
(** ** Iterated Products *)
Fixpoint Tn (n : nat) (T : Type) : Type :=
match n with
| O => unit
| S n => prod T (Tn n T)
end.
Notation "[ x1 , .. , xn ]" := (pair x1 .. (pair xn tt) .. ).
Fixpoint mk_Tn {T} (n : nat) (u : nat -> T) : Tn n T :=
match n with
| O => (tt : Tn O T)
| S n => (u O, mk_Tn n (fun n => u (S n)))
end.
Fixpoint coeff_Tn {T} {n : nat} (x0 : T) : (Tn n T) -> nat -> T :=
match n with
| O => fun (_ : Tn O T) (_ : nat) => x0
| S n' => fun (v : Tn (S n') T) (i : nat) => match i with
| O => fst v
| S i => coeff_Tn x0 (snd v) i
end
end.

Lemma coeff_Tn_bij {T} {n : nat} (x0 : T) (u : nat -> T) :
forall i, (i < n)%nat -> coeff_Tn x0 (mk_Tn n u) i = u i.