fact: Fixpoint spec_seqpoly_aux n (s : seqpoly C) : {poly R} := match s with | [::] => 0 | (hd :: tl) => if (hd == 0)%C then spec_seqpoly_aux n.+1 tl else let c := if (n == 0%N) then if (hd == 1)%C then 1 else (spec hd)%:P else let mon := if (n == 1%N) then 'X else 'X^n in if (hd == 1)%C then mon else (spec hd) *: mon in if (tl == 0)%C then c else (spec_seqpoly_aux n.+1 tl) + c end.
imports: mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat div seq ssralg) mathcomp(path choice fintype tuple finset bigop poly polydiv) CoqEAL(hrel param refinements poly_op)