End IDomainPseudoDivision.
Hint Resolve eqpxx divp0 divp1 mod0p modp0 modp1 dvdp_mull dvdp_mulr dvdpp : core.
Hint Resolve dvdp0 : core.
End CommonIdomain.
Module Idomain.
Include IdomainDefs.
Export IdomainDefs.
Include WeakIdomain.
Include CommonIdomain.
End Idomain.
Module IdomainMonic.
Section MonicDivisor.
Variable R : idomainType.
Variable q : {poly R}.
Hypothesis monq : q \is monic.
Implicit Type p d r : {poly R}.

(* Specifications: *)
Lemma divpE p : p %/ q = rdivp p q.
Lemma mulpK p : p * q %/ q = p.
Lemma divpP p q r : p = q * d + r -> size r < size d ->
q = (p %/ d).
Lemma dvdp_eq p : (d %| p) = (p == p %/ d * d).
Lemma ucl_eqp_eq p q : lead_coef q \is a GRing.unit ->
p %= q -> p = (lead_coef p / lead_coef q) *: q.
Lemma modp_scalel c p : (c *: p) %% d = c *: (p %% d).
Lemma divp_scalel c p : (c *: p) %/ d = c *: (p %/ d).
Lemma eqp_modpl p q : p %= q -> (p %% d) %= (q %% d).
Lemma eqp_divl p q : p %= q -> (p %/ d) %= (q %/ d).
Lemma modp_opp p : (- p) %% d = - (p %% d).
Lemma divp_opp p : (- p) %/ d = - (p %/ d).
Lemma modp_add p q : (p + q) %% d = p %% d + q %% d.
Lemma divp_add p q : (p + q) %/ d = p %/ d + q %/ d.
Lemma mulpK q : (q * d) %/ d = q.
Lemma mulKp q : (d * q) %/ d = q.
Lemma dvdpP p : reflect (exists q, p = q * d) (d %| p).
Lemma divpK p : d %| p -> p %/ d * d = p.
Lemma dvdp_eq_mul p q : d %| p -> (p == q * d) = (p %/ d == q).
Lemma divp_mulAC m n : d %| m -> m %/ d * n = m * n %/ d.
End UnitDivisor.