Definition to_dirr  (B : {set gT}) (phi : 'CF(B)) (i : Iirr B) : dIirr B :=
('[phi, 'chi_i] < 0, i).
Definition of_irr (B : {set gT}) (i : dIirr B) : Iirr B := i.2.

(* Specifications: *)
Lemma irr_constt_to_dirr (phi: 'CF(G)) i : phi \in 'Z[irr G] ->
(i \in irr_constt phi) = (to_dirr phi i \in dirr_constt phi).
Lemma to_dirrK (phi: 'CF(G)) : cancel (to_dirr phi) (@of_irr G).
Lemma cfdot_todirrE (phi: 'CF(G)) i (phi_i := dchi (to_dirr phi i)) :
'[phi, phi_i] *: phi_i = '[phi, 'chi_i] *: 'chi_i.
Lemma cnorm_dconstt (phi : 'CF(G)) :
phi \in 'Z[irr G] ->
'[phi] = \sum_(i in dirr_constt phi) '[phi, dchi i] ^+ 2.
Lemma dirr_small_norm (phi : 'CF(G)) n :
phi \in 'Z[irr G] -> '[phi] = n%:R -> (n < 4)%N ->
[/\ #|dirr_constt phi| = n, dirr_constt phi :&: dirr_constt (- phi) = set0 &
phi = \sum_(i in dirr_constt phi) dchi i].
Lemma cfdot_sum_dchi (phi1 phi2 : 'CF(G)) :
'[\sum_(i in dirr_constt phi1) dchi i,
\sum_(i in dirr_constt phi2) dchi i] =
#|dirr_constt phi1 :&: dirr_constt phi2|%:R -
#|dirr_constt phi1 :&: dirr_constt (- phi2)|%:R.
Lemma cfdot_dirr_eq1 :
{in dirr G &, forall phi psi, ('[phi, psi] == 1) = (phi == psi)}.
Lemma cfdot_add_dirr_eq1 :
{in dirr G & &, forall phi1 phi2 psi,
'[phi1 + phi2, psi] = 1 -> psi = phi1 \/ psi = phi2}.