(***************************************************************************)
(* 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_variable_isolation_tactic.
(****************************************************)
(*  General properties about fields                    *)
(****************************************************)
Proof with try solve [ ring | congruence ].
intros...
assert (a + b - a = a - a)...
assert (a - a = 0)...
rewrite H1 in H0...
assert (a + b - a = b)...
Qed.
intros.
rewrite H.
ring.
Qed.
Proof with try solve [ ring | congruence ].
intros...
assert (a + - a = a + 0)...
assert (a + - a = 0)...
rewrite H1 in H0...
assert (a + 0 = a)...
Qed.
Proof with try solve [ ring | congruence ].
intros...
assert (- - a = - - b)...
assert (- - a = a)...
assert (- - b = b)...
Qed.
Proof with try solve [ auto with field_hints | congruence ].
intros...
assert (a * b / b = a)...
field...
intuition...
assert (a * b / b = 0 / b)...
rewrite H1 in H3...
assert (a = 0)...
assert (0 / b = 0)...
field...
Qed.
Proof with try solve [ auto with field_hints | congruence ].
intros...
unfold not in |- *; intro...
IsoleVarRing a H1...
Qed.
Proof with try solve [ auto with field_hints | congruence ].
intros...
unfold not in |- *; intro...
assert (a * / a = 1)...
field...
assert (a * / a = a * 0)...
rewrite H1 in H2...
assert (a * 0 = 0)...
ring...
rewrite H3 in H2...
Qed.
Proof with try solve [ congruence ].
intros...
assert (a + - a = 0)...
apply Fplus_Fopp_r...
intuition...
rewrite H1 in H0...
assert (a = 0)...
assert (a + 0 = 0 + a)...
apply Fplus_sym...
rewrite H2 in H0...
assert (0 + a = a)...
apply Fplus_Ol...
Qed.
intros a b H1 H2; case H1; unfold Fdiv; rewrite H2; ring.
Qed.

Theorem multnonzero: forall a b: F, a*b<>0 -> a<>0 /\ b<>0.