Section KernelLemmas.
Variable K : fieldType.
(* convertible to kermx (horner_mx g p) when n = n.+1 *)
Definition kermxpoly n (g : 'M_n) (p : {poly K}) : 'M_n :=
kermx ((if n is n.+1 then horner_mx^~ p : 'M_n.+1 -> 'M_n.+1 else \0) g).

Lemma kermxpoly_prod n (g : 'M_n)
(I : finType) (P : {pred I}) (p_ : I -> {poly K}) :
{in P &, forall i j, j != i -> coprimep (p_ i) (p_ j)} ->
(kermxpoly g (\prod_(i | P i) p_ i) :=: \sum_(i | P i) kermxpoly g (p_ i))%MS.