proposition: Lemma eval_NextMod e p q k k' : (forall p, qf_eval e (k p) = k' (eval_poly e p)) -> qf_eval e (NextMod p q k) = k' (next_mod (eval_poly e p) (eval_poly e q)).
proof: Proof. move=> Pk; set p' := eval_poly e p; set q' := eval_poly e q. rewrite (eval_LeadCoef (fun lq => k' (- lq ^+ rscalp p' q' *: rmodp p' q'))) => // lq. rewrite (eval_Rediv (fun spq => k' (- eval e lq ^+ spq.1.1%PAIR *: rmodp p' q'))) => //= spq _ _. rewrite (eval_Rediv (fun mpq => k' (- eval e lq ^+ spq *: mpq.2%PAIR))) => //= _ _ mpq. by rewrite Pk !eval_OpPoly. Qed.
imports: mathcomp.ssreflect.ssreflect mathcomp(ssrfun ssrbool eqtype ssrnat seq choice fintype) mathcomp(finfun path matrix) mathcomp(bigop order ssralg poly polydiv ssrnum zmodp div ssrint) mathcomp(polyorder polyrcf interval polyXY) mathcomp(qe_rcf_th ordered_qelim mxtens)