proposition: Lemma lead_coef_MXnaddC (R : ringType) (p : {poly R}) (c : R) n : lead_coef (p * 'X^n.+1 + c%:P) = if (lead_coef p == 0) then c else lead_coef p.
proof: Proof. have [|/eqP hp0] := eqP. move/eqP; rewrite lead_coef_eq0; move/eqP=> ->. by rewrite mul0r add0r lead_coefC. rewrite lead_coefDl; first by rewrite lead_coef_Mmonic ?monicXn. rewrite size_polyC size_Mmonic ?monicXn -?lead_coef_eq0 //. rewrite size_polyXn !addnS -pred_Sn. case: (c == 0)=> //=. by rewrite ltnS ltn_addr // size_poly_gt0 -lead_coef_eq0. Qed.
imports: mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat div seq zmodp) mathcomp(path choice fintype tuple finset ssralg bigop poly polydiv) CoqEAL(param refinements pos hrel poly_op)