Section integral_domain.
Context {R:Type}`{Rid:Integral_domain R}.
red;intro. apply integral_domain_one_zero.
assert (0 == - (0:R)). cring.
rewrite H0. rewrite <- H. cring.
Qed.
Definition pow (r : R) (n : nat) := Ring_theory.pow_N 1 mul r (N.of_nat n).
induction n. unfold pow; simpl. intros. absurd (1 == 0).
simpl. apply integral_domain_one_zero.
trivial. setoid_replace (pow p (S n)) with (p * (pow p n)).
intros.
case (integral_domain_product p (pow p n) H). trivial. trivial.
unfold pow; simpl.
clear IHn. induction n; simpl; try cring.
rewrite Ring_theory.pow_pos_succ. cring. apply ring_setoid.
apply ring_mult_comp.
apply ring_mul_assoc.
Qed.

Lemma Rintegral_domain_pow:
forall c p r, ~c == 0 -> c * (pow p r) == ring0 -> p == ring0.