Timings for Integral_domain.v
- /home/gitlab-runner/builds/gGKko-aj/0/coq/coq/_bench/opam.OLD/ocaml-OLD/.opam-switch/build/coq-stdlib.dev/_build/default/theories//./setoid_ring/Integral_domain.timing
- /home/gitlab-runner/builds/gGKko-aj/0/coq/coq/_bench/opam.NEW/ocaml-NEW/.opam-switch/build/coq-stdlib.dev/_build/default/theories//./setoid_ring/Integral_domain.timing
(************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
(* v * Copyright INRIA, CNRS and contributors *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(* * (see LICENSE file for the text of the license) *)
(************************************************************************)
(* Definition of integral domains: commutative ring without zero divisor *)
Class Integral_domain {R : Type}`{Rcr:Cring R} := {
integral_domain_product:
forall x y, x * y == 0 -> x == 0 \/ y == 0;
integral_domain_one_zero: not (1 == 0)}.
Context {R:Type}`{Rid:Integral_domain R}.
Lemma integral_domain_minus_one_zero: ~ - (1:R) == 0.
apply integral_domain_one_zero.
Definition pow (r : R) (n : nat) := Ring_theory.pow_N 1 mul r (N.of_nat n).
Lemma pow_not_zero: forall p n, pow p n == 0 -> p == 0.
apply integral_domain_one_zero.
setoid_replace (pow p (S n)) with (p * (pow p n)).
case (integral_domain_product p (pow p n) H).
induction n; simpl; try cring.
rewrite Ring_theory.pow_pos_succ.
Lemma Rintegral_domain_pow:
forall c p r, ~c == 0 -> c * (pow p r) == ring0 -> p == ring0.
case (integral_domain_product c (pow p r) H0).
intros; absurd (c == ring0); auto.
apply pow_not_zero with r.