fact: Definition odivp_rec q := let sq := size q in let lq := lead_coef q in fix loop (n : nat) (r p : {poly R}) {struct n} := if p == 0 then Some r else if size p < sq then None else if odivr (lead_coef p) lq is Some x then let m := x%:P * 'X^(size p - sq) in let r1 := r + m in let p1 := p - m * q in if n is n1.+1 then loop n1 r1 p1 else None else None.
imports: HB(structures) mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat div seq) mathcomp(path choice fintype tuple finset ssralg) mathcomp(matrix poly) mathcomp(bigop polydiv) CoqEAL(stronglydiscrete dvdring)