fact: Definition div_rec_poly (q : polyR) := let sq := (size_op q : N) in let cq := (cast (lead_coef_op q : R) : polyR) in fix loop (k : N) (qq r : polyR) (n : nat) {struct n} := if (size_op r < sq)%C then (k, qq, r) else let m := shift_op (size_op r - sq)%C (cast (lead_coef_op r : R) : polyR) in let qq1 := (qq * cq + m)%C in let r1 := (r * cq - m * q)%C in if n is n1.+1 then loop (k + 1)%C qq1 r1 n1 else ((k + 1)%C, qq1, r1).
imports: mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat div seq zmodp) mathcomp(path choice fintype tuple finset ssralg bigop poly polydiv) CoqEAL(param refinements hrel poly_op)