Definition cfReg (B : {set gT}) : 'CF(B) := #|B|%:R *: '1_[1].

(* Specifications: *)
Lemma cfRegE x : @cfReg G x = #|G|%:R *+ (x == 1%g).
Definition xcfun (chi : 'CF(G)) A :=
(gring_row A *m (\col_(i < #|G|) chi (enum_val i))) 0 0.
Lemma xcfun_is_additive phi : additive (xcfun phi).
Canonical xcfun_r_additive A := Additive (xcfun_r_is_additive A).
Lemma xcfunZl a phi A : xcfun (a *: phi) A = a * xcfun phi A.
Lemma xcfun_repr n rG A : xcfun (@cfRepr n rG) A = \tr (gring_op rG A).
End Char.