Ltac destr_factor := match goal with
| H : context [CFactor ?P _] |- context [CFactor ?P ?c] =>
destruct (CFactor P c); destr_factor; rewrite H; clear H
| H : context [MFactor ?P _ _] |- context [MFactor ?P ?c ?M] =>
specialize (H M); destruct (MFactor P c M); destr_factor; rewrite H; clear H
| _ => idtac
end.

Lemma Mcphi_ok P c l :
let (Q,R) := CFactor P c in
P@l == Q@l + [c] * R@l.