(***************************************************************************)
(* Formalization of the Chou, Gao and Zhang's decision procedure.          *)
(* Julien Narboux (Julien@narboux.fr)                                      *)
(* LIX/INRIA FUTURS 2004-2006                                              *)
(* University of Strasbourg 2008                                           *)
(***************************************************************************)
Require Export field.
Require Export general_tactics.
(*************************************************)
(* Variable isolation tactic                     *)
(*************************************************)
(* This module defines a few tactics :  IsoleVar x H isolates one occurence of x in H Warning it does not factorize, but it is still usefull.  NormalizeRing H normalize the hypothesis H using ring. RewriteVar x H, isolates x in H and then substitutes x everywhere. *)
Ltac NormalizeRing H :=
match goal with
| i:(?X1 = ?X2) |- _ =>
match constr:(i) with
| H => generalize H; ring_simplify X1 X2; clear H; intro H
| _ => fail
end
end.
intros.
rewrite H.
ring.
Qed.
intros.
assert (a - b + b = 0 + b).
rewrite H.
auto.
NormalizeRing H0.
auto.
Qed.

Lemma Lcp1 : forall a b c : F, a + b = c -> a = c - b.