Section CfdotPairwiseOrthogonal.
Variables (M : {group gT}) (S : seq 'CF(G)) (nu : 'CF(G) -> 'CF(M)).
Hypotheses (Inu : {in 'Z[S] &, isometry nu}) (oSS : pairwise_orthogonal S).
Let freeS := orthogonal_free oSS.
Let uniqS : uniq S := free_uniq freeS.
Let Z_S : {subset S <= 'Z[S]}. Proof. by move=> phi; apply: mem_zchar. Qed.
Let notS0 : 0 \notin S. Proof. by case/andP: oSS. Qed.
Let dotSS := proj2 (pairwise_orthogonalP oSS).

(* Specifications: *)
Lemma map_pairwise_orthogonal : pairwise_orthogonal (map nu S).
Lemma cfproj_sum_orthogonal P z phi :
phi \in S ->
'[\sum_(xi <- S | P xi) z xi *: nu xi, nu phi]
= if P phi then z phi * '[phi] else 0.
Lemma cfdot_sum_orthogonal z1 z2 :
'[\sum_(xi <- S) z1 xi *: nu xi, \sum_(xi <- S) z2 xi *: nu xi]
= \sum_(xi <- S) z1 xi * (z2 xi)^* * '[xi].
Lemma cfnorm_sum_orthogonal z :
'[\sum_(xi <- S) z xi *: nu xi] = \sum_(xi <- S) `|z xi| ^+ 2 * '[xi].
Lemma cfnorm_orthogonal : '[\sum_(xi <- S) nu xi] = \sum_(xi <- S) '[xi].
End CfdotPairwiseOrthogonal.
Lemma orthogonal_span S phi :
pairwise_orthogonal S -> phi \in <<S>>%VS ->
{z | z = fun xi => '[phi, xi] / '[xi] & phi = \sum_(xi <- S) z xi *: xi}.