(************************************************************************)
(*         *      The Rocq Prover / The Rocq 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)         *)
(************************************************************************)
(* Tactic nsatz: proofs of polynomials equalities in an integral domain (commutative ring without zero divisor).  Examples: see test-suite/success/Nsatz.v  Reification is done using type classes, defined in Ncring_tac.v  *)
Require Export Morphisms Setoid Bool.
Require Export Algebra_syntax.
Require Export Ncring.
Require Export Ncring_initial.
Require Export Ncring_tac.
Require Export Integral_domain.
Declare ML Module "rocq-runtime.plugins.nsatz_core".
Declare ML Module "rocq-runtime.plugins.nsatz".
Section nsatz1.
Context {R:Type}`{Rid:Integral_domain R}.

Lemma psos_r1b: forall x y:R, x - y == 0 -> x == y.
intros x y H; setoid_replace x with ((x - y) + y); simpl;
[setoid_rewrite H | idtac]; simpl.