1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* This file was automatically generated: do not edit *********************)
19 (*#***********************************************************************)
21 (* v * The Coq Proof Assistant / The Coq Development Team *)
23 (* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
25 (* \VV/ **************************************************************)
27 (* // * This file is distributed under the terms of the *)
29 (* * GNU Lesser General Public License Version 2.1 *)
31 (*#***********************************************************************)
33 (*i $Id: Map.v,v 1.7.2.1 2004/07/16 19:31:04 herbelin Exp $ i*)
35 (*#* Definition of finite sets as trees indexed by adresses *)
37 include "Bool/Bool.ma".
39 include "Bool/Sumbool.ma".
41 include "ZArith/ZArith.ma".
43 include "IntMap/Addr.ma".
45 include "IntMap/Adist.ma".
47 include "IntMap/Addec.ma".
53 (*#* We define maps from ad to A. *)
56 cic:/Coq/IntMap/Map/MapDefs/A.var
59 inline procedural "cic:/Coq/IntMap/Map/Map.ind".
61 inline procedural "cic:/Coq/IntMap/Map/option.ind".
63 inline procedural "cic:/Coq/IntMap/Map/option_sum.con" as lemma.
65 (*#* The semantics of maps is given by the function [MapGet].
66 The semantics of a map [m] is a partial, finite function from
69 inline procedural "cic:/Coq/IntMap/Map/MapGet.con" as definition.
71 inline procedural "cic:/Coq/IntMap/Map/newMap.con" as definition.
73 inline procedural "cic:/Coq/IntMap/Map/MapSingleton.con" as definition.
75 inline procedural "cic:/Coq/IntMap/Map/eqm.con" as definition.
77 inline procedural "cic:/Coq/IntMap/Map/newMap_semantics.con" as lemma.
79 inline procedural "cic:/Coq/IntMap/Map/MapSingleton_semantics.con" as lemma.
81 inline procedural "cic:/Coq/IntMap/Map/M1_semantics_1.con" as lemma.
83 inline procedural "cic:/Coq/IntMap/Map/M1_semantics_2.con" as lemma.
85 inline procedural "cic:/Coq/IntMap/Map/Map2_semantics_1.con" as lemma.
87 inline procedural "cic:/Coq/IntMap/Map/Map2_semantics_1_eq.con" as lemma.
89 inline procedural "cic:/Coq/IntMap/Map/Map2_semantics_2.con" as lemma.
91 inline procedural "cic:/Coq/IntMap/Map/Map2_semantics_2_eq.con" as lemma.
93 inline procedural "cic:/Coq/IntMap/Map/MapGet_M2_bit_0_0.con" as lemma.
95 inline procedural "cic:/Coq/IntMap/Map/MapGet_M2_bit_0_1.con" as lemma.
97 inline procedural "cic:/Coq/IntMap/Map/MapGet_M2_bit_0_if.con" as lemma.
99 inline procedural "cic:/Coq/IntMap/Map/MapGet_M2_bit_0.con" as lemma.
101 inline procedural "cic:/Coq/IntMap/Map/Map2_semantics_3.con" as lemma.
103 inline procedural "cic:/Coq/IntMap/Map/Map2_semantics_3_eq.con" as lemma.
105 inline procedural "cic:/Coq/IntMap/Map/MapPut1.con" as definition.
107 inline procedural "cic:/Coq/IntMap/Map/MapGet_if_commute.con" as lemma.
110 Lemma MapGet_M2_bit_0_1' : (m,m',m'',m''':Map)
111 (a:ad) (MapGet (if (ad_bit_0 a) then (M2 m m') else (M2 m'' m''')) a)=
112 (MapGet (if (ad_bit_0 a) then m' else m'') (ad_div_2 a)).
114 Intros. Rewrite (MapGet_if_commute (ad_bit_0 a)). Rewrite (MapGet_if_commute (ad_bit_0 a)).
115 Cut (ad_bit_0 a)=false\/(ad_bit_0 a)=true. Intros. Elim H. Intros. Rewrite H0.
116 Apply MapGet_M2_bit_0_0. Assumption.
117 Intros. Rewrite H0. Apply MapGet_M2_bit_0_1. Assumption.
118 Case (ad_bit_0 a); Auto.
122 inline procedural "cic:/Coq/IntMap/Map/MapGet_if_same.con" as lemma.
124 inline procedural "cic:/Coq/IntMap/Map/MapGet_M2_bit_0_2.con" as lemma.
126 inline procedural "cic:/Coq/IntMap/Map/MapPut1_semantics_1.con" as lemma.
128 inline procedural "cic:/Coq/IntMap/Map/MapPut1_semantics_2.con" as lemma.
130 inline procedural "cic:/Coq/IntMap/Map/MapGet_M2_both_NONE.con" as lemma.
132 inline procedural "cic:/Coq/IntMap/Map/MapPut1_semantics_3.con" as lemma.
134 inline procedural "cic:/Coq/IntMap/Map/MapPut1_semantics.con" as lemma.
136 inline procedural "cic:/Coq/IntMap/Map/MapPut1_semantics'.con" as lemma.
138 inline procedural "cic:/Coq/IntMap/Map/MapPut.con" as definition.
140 inline procedural "cic:/Coq/IntMap/Map/MapPut_semantics_1.con" as lemma.
142 inline procedural "cic:/Coq/IntMap/Map/MapPut_semantics_2_1.con" as lemma.
144 inline procedural "cic:/Coq/IntMap/Map/MapPut_semantics_2_2.con" as lemma.
146 inline procedural "cic:/Coq/IntMap/Map/MapPut_semantics_2.con" as lemma.
148 inline procedural "cic:/Coq/IntMap/Map/MapPut_semantics_3_1.con" as lemma.
150 inline procedural "cic:/Coq/IntMap/Map/MapPut_semantics.con" as lemma.
152 inline procedural "cic:/Coq/IntMap/Map/MapPut_behind.con" as definition.
154 inline procedural "cic:/Coq/IntMap/Map/MapPut_behind_semantics_3_1.con" as lemma.
156 inline procedural "cic:/Coq/IntMap/Map/MapPut_behind_as_before_1.con" as lemma.
158 inline procedural "cic:/Coq/IntMap/Map/MapPut_behind_as_before.con" as lemma.
160 inline procedural "cic:/Coq/IntMap/Map/MapPut_behind_new.con" as lemma.
162 inline procedural "cic:/Coq/IntMap/Map/MapPut_behind_semantics.con" as lemma.
164 inline procedural "cic:/Coq/IntMap/Map/makeM2.con" as definition.
166 inline procedural "cic:/Coq/IntMap/Map/makeM2_M2.con" as lemma.
168 inline procedural "cic:/Coq/IntMap/Map/MapRemove.con" as definition.
170 inline procedural "cic:/Coq/IntMap/Map/MapRemove_semantics.con" as lemma.
172 inline procedural "cic:/Coq/IntMap/Map/MapCard.con" as definition.
174 inline procedural "cic:/Coq/IntMap/Map/MapMerge.con" as definition.
176 inline procedural "cic:/Coq/IntMap/Map/MapMerge_semantics.con" as lemma.
178 (*#* [MapInter], [MapRngRestrTo], [MapRngRestrBy], [MapInverse]
179 not implemented: need a decidable equality on [A]. *)
181 inline procedural "cic:/Coq/IntMap/Map/MapDelta.con" as definition.
183 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics_comm.con" as lemma.
185 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics_1_1.con" as lemma.
187 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics_1.con" as lemma.
189 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics_2_1.con" as lemma.
191 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics_2_2.con" as lemma.
193 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics_2.con" as lemma.
195 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics_3_1.con" as lemma.
197 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics_3.con" as lemma.
199 inline procedural "cic:/Coq/IntMap/Map/MapDelta_semantics.con" as lemma.
201 inline procedural "cic:/Coq/IntMap/Map/MapEmptyp.con" as definition.
203 inline procedural "cic:/Coq/IntMap/Map/MapEmptyp_correct.con" as lemma.
205 inline procedural "cic:/Coq/IntMap/Map/MapEmptyp_complete.con" as lemma.
207 (*#* [MapSplit] not implemented: not the preferred way of recursing over Maps
208 (use [MapSweep], [MapCollect], or [MapFold] in Mapiter.v. *)