diff options
author | Frédéric Besson <frederic.besson@inria.fr> | 2013-12-20 01:22:45 +0100 |
---|---|---|
committer | Frédéric Besson <frederic.besson@inria.fr> | 2013-12-20 01:22:45 +0100 |
commit | ca1305a0187653edcf63e46b84c65130ac78d117 (patch) | |
tree | 3a50c809ff3f33b722fb1377a5290162c4f09a8a /plugins/micromega/Lia.v | |
parent | 631298df172c1e034d6898ff13d5d5aabb9a5098 (diff) |
micromega: removal of spurious Export; addition of Lia.v encapsulating lia and nia.
Diffstat (limited to 'plugins/micromega/Lia.v')
-rw-r--r-- | plugins/micromega/Lia.v | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/plugins/micromega/Lia.v b/plugins/micromega/Lia.v new file mode 100644 index 000000000..4553f03e3 --- /dev/null +++ b/plugins/micromega/Lia.v @@ -0,0 +1,39 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) +(* *) +(* Micromega: A reflexive tactic using the Positivstellensatz *) +(* *) +(* Frédéric Besson (Irisa/Inria) 2013 *) +(* *) +(************************************************************************) + +Require Import ZMicromega. +Require Import ZArith. +Require Import RingMicromega. +Require Import VarMap. +Require Tauto. +Declare ML Module "micromega_plugin". + +Ltac lia := + zify ; unfold Z.succ in * ; + (*cbv delta - [Z.add Z.sub Z.opp Z.mul Z.pow Z.gt Z.ge Z.le Z.lt iff not] ;*) xlia ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; + apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity. + +Ltac nia := + zify ; unfold Z.succ in * ; + xnlia ; + intros __wit __varmap __ff ; + change (Tauto.eval_f (Zeval_formula (@find Z Z0 __varmap)) __ff) ; + apply (ZTautoChecker_sound __ff __wit); vm_compute ; reflexivity. + + +(* Local Variables: *) +(* coding: utf-8 *) +(* End: *) |