Canonical coefp0_rmorphism := AddRMorphism coefp0_multiplicative.
(* Algebra structure of polynomials. *)
Definition scale_poly_def a (p : {poly R}) := \poly_(i < size p) (a * p`_i).
Fact scale_poly_key : unit. Proof. by []. Qed.
Definition scale_poly := locked_with scale_poly_key scale_poly_def.
Canonical scale_poly_unlockable := [unlockable fun scale_poly].
Fact scale_polyE a p : scale_poly a p = a%:P * p.
Fact scale_polyA a b p : scale_poly a (scale_poly b p) = scale_poly (a * b) p.

(* Specifications: *)
Lemma size_scale_leq a p : size (a *: p) <= size p.
Lemma coefMX p i : (p * 'X)`_i = (if (i == 0)%N then 0 else p`_i.-1).
Lemma coefXM p i : ('X * p)`_i = (if (i == 0)%N then 0 else p`_i.-1).
Lemma poly_ind (K : {poly R} -> Type) :
K 0 -> (forall p c, K p -> K (p * 'X + c%:P)) -> (forall p, K p).
Lemma polyseqXsubC a : 'X - a%:P = [:: - a; 1] :> seq R.
Lemma size_XsubC a : size ('X - a%:P) = 2%N.
Lemma size_mulX p : p != 0 -> size (p * 'X) = (size p).+1.
Lemma size_XmulC a : a != 0 -> size ('X * a%:P) = 2.
Local Notation "''X^' n" := ('X ^+ n).
Lemma coefXn n i : 'X^n`_i = (i == n)%:R.
Lemma polyseqXn n : 'X^n = rcons (nseq n 0) 1 :> seq R.
Lemma size_polyXn n : size 'X^n = n.+1.
Lemma coefMXn n p i : (p * 'X^n)`_i = if i < n then 0 else p`_(i - n).
Lemma coefXnM n p i : ('X^n * p)`_i = if i < n then 0 else p`_(i - n).
Definition monic := [qualify p | lead_coef p == 1].