aboutsummaryrefslogtreecommitdiff
path: root/contrib/micromega/VarMap.v
diff options
context:
space:
mode:
authorherbelin2008-05-19 19:10:40 +0000
committerherbelin2008-05-19 19:10:40 +0000
commit7c51ef20064ed4f44a4e1dcb2040ec4b74919b5f (patch)
tree4cc4f55d026344c86de4381aa16cd2aa20f69150 /contrib/micromega/VarMap.v
parent133516a1acebebfce527204fe5109a5eecb9bb45 (diff)
Intégration de micromega ("omicron" pour fourier et sa variante sur Z,
"micromega" et "sos" pour les problèmes non linéaires sous-traités à csdp); mise en place d'un cache pour pouvoir rejouer les preuves sans avoir besoin de csdp (pour l'instant c'est du bricolage, faudra affiner cela). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10947 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/micromega/VarMap.v')
-rw-r--r--contrib/micromega/VarMap.v36
1 files changed, 22 insertions, 14 deletions
diff --git a/contrib/micromega/VarMap.v b/contrib/micromega/VarMap.v
index 327f6d2d42..240c0fb7ca 100644
--- a/contrib/micromega/VarMap.v
+++ b/contrib/micromega/VarMap.v
@@ -1,14 +1,20 @@
-(********************************************************************)
-(* *)
-(* Micromega:A reflexive tactics using the Positivstellensatz *)
-(* *)
-(* Frédéric Besson (Irisa/Inria) 2006 *)
-(* *)
-(********************************************************************)
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
+(* \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) 2006-2008 *)
+(* *)
+(************************************************************************)
+
Require Import ZArith.
Require Import Coq.Arith.Max.
Require Import List.
-(*Require Import BinList.*)
Set Implicit Arguments.
(* I have addded a Leaf constructor to the varmap data structure (/contrib/ring/Quote.v)
@@ -26,19 +32,19 @@ Section MakeVarMap.
| Leaf : A -> t
| Node : t -> A -> t -> t .
- Fixpoint find (p:positive) (vm : t ) {struct vm} : A :=
+ Fixpoint find (vm : t ) (p:positive) {struct vm} : A :=
match vm with
| Empty => default
| Leaf i => i
| Node l e r => match p with
| xH => e
- | xO p => find p l
- | xI p => find p r
+ | xO p => find l p
+ | xI p => find r p
end
end.
- (* an off_map (a map with offset) offers the same functionalites as /contrib/setoid_ring/BinList.v - it is used in NRing.v *)
-
+ (* an off_map (a map with offset) offers the same functionalites as /contrib/setoid_ring/BinList.v - it is used in EnvRing.v *)
+(*
Definition off_map := (option positive *t )%type.
@@ -58,8 +64,10 @@ Section MakeVarMap.
end%positive in
find idx m.
+
Definition hd (l:off_map) := nth xH l.
+
Definition tail (l:off_map ) := jump xH l.
@@ -244,7 +252,7 @@ Section MakeVarMap.
reflexivity.
Qed.
-
+*)
End MakeVarMap.