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 PNSubst1_ok n P1 cM1 P2 l :
[fst cM1] * (snd cM1)@@l == P2@l ->
P1@l == (PNSubst1 P1 cM1 P2 n)@l.