(************************************************************************)
(*                                                                      *)
(* Micromega: A reflexive tactic using the Positivstellensatz           *)
(*                                                                      *)
(*  Frédéric Besson (Irisa/Inria) 2006-2008                             *)
(*                                                                      *)
(************************************************************************)
Open Scope Z_scope.
(* From Laurent Théry *)
Goal forall (x y : Z), x = 0 -> x * y = 0.
Goal forall (x y : Z), x = 0 -> x * y = 0.
Goal forall (x y : Z), 2*x = 0 -> x * y = 0.
Goal forall (x y: Z), - x*x >= 0 -> x * y = 0.
(* Motivating example from: Expressiveness + Automation + Soundness: Towards COmbining SMT Solvers and Interactive Proof Assistants *)
Parameter rho : Z.
Parameter rho_ge : rho >= 0.
Parameter correct : Z -> Z -> Prop.
Definition rbound1 (C:Z -> Z -> Z) : Prop :=
forall p s t, correct p t /\ s <= t -> C p t - C p s <= (1-rho)*(t-s).
Definition rbound2 (C:Z -> Z -> Z) : Prop :=
forall p s t, correct p t /\ s <= t ->  (1-rho)*(t-s) <= C p t - C p s.
(* Rule of signs *)
(* Other (simple) examples *)
(* from hol_light/Examples/sos.ml *)
(* ------------------------------------------------------------------------- *)
(* Inequality from sci.math (see "Leon-Sotelo, por favor").                  *)
(* ------------------------------------------------------------------------- *)
(* ------------------------------------------------------------------------- *)
(* Some examples over integers and natural numbers.                          *)
(* ------------------------------------------------------------------------- *)

Lemma motzkin' : forall x y, (x^2+y^2+1)*(x^2*y^4 + x^4*y^2 + 1 - 3*x^2*y^2) >= 0.