Definition rgcdpT (p : polyF) (q : polyF) : cps polyF :=
let aux p1 q1 : cps polyF :=
'let b <- isnull p1; if b then ret q1
else 'let n <- sizeT p1; rgcdp_loopT n p1 q1 in
'let b <- lt_sizeT p q; if b then aux q p else aux p q.

Lemma rgcdpTP (k : polyF -> fF) :
(forall p e, qf_eval e (k p) = qf_eval e (k (lift (eval_poly e p)))) ->
forall p q e, qf_eval e (rgcdpT p q k) =
qf_eval e (k (lift (rgcdp (eval_poly e p) (eval_poly e q)))).