(* Peut-on factoriser ici *)
Infix "--" := NPEsub (at level 50, left associativity).

(* Specifications: *)
Theorem NPEsub_ok e1 e2: (e1 -- e2 === e1 - e2)%poly.
Definition NPEopp e1 :=
match e1 with PEc c1 => PEc (- c1) | _ => - e1 end%poly.
Theorem NPEopp_ok e : (NPEopp e === -e)%poly.
Definition NPEpow x n :=
match n with
| N0 => 1
| Npos p =>
if (p =? 1)%positive then x else
match x with
| PEc c =>
if (c =? 1)%coef then 1
else if (c =? 0)%coef then 0
else PEc (pow_pos cmul c p)
| _ => x ^ n
end
end%poly.