(*========================================================== ============================================================ AUGUST 2008 TOPOLOGICAL FMAPS, HMAPS - WITH EMBEDDINGS AND TAGS  (2008 RING FORMALIZATION)  PART 1: BASES, FMAPS, HMAPS, CLOSURES OF A, A_1  COMPLETE: OK! ============================================================ ==========================================================*)
(* cd Desktop/JFD/JFD08/GALAPAGOS/HMAPSTE_08 coqtop -opt *)
Global Set Asymmetric Patterns.
Require Export Reals.
Require Export Omega.
Open Scope R_scope.
(*======================================================== DIMENSIONS ========================================================*)
(* Dimensions: *)
Inductive dim:Set := zero : dim | one : dim.
(* Decidability of point equality: OK, but DANGEREOUS ! *)
(*======================================================== DARTS AS NATURALS ========================================================*)
(* For simplicity, dart is nat, but it could be a deferred type: *)
Definition dart := nat.
(* Decidability of dart equality: *)
Definition eq_dart_dec := eq_nat_dec.
(* Nil dart: *)
Definition nil := 0%nat.
(*======================================================== FREE MAPS, CONSTRUCTORS, OBSERVERS AND DESTRUCTORS ========================================================*)
Open Scope Z_scope.
(* Free maps: *)
Inductive fmap:Set :=
V : fmap
| I : fmap->dart->tag->point->fmap
| L : fmap->dim->dart->dart->fmap.
(* Map emptiness: *)
Definition empty(m:fmap): Prop:=
match m with
V => True
|  _ => False
end.
(* Map emptiness is decidable: *)
(* and the variant: *)
(* Relationship between succ and exd: *)
(* Idem: *)
(* Idem with: *)
(* Note that, in a hmap m, we have neither exd m z -> A m k z <> nil nor exd m z -> A_1 m k z <> nil *)
(* Note also: *)
(* Idem: *)

Lemma pred_exd_A_1 :
forall (m:fmap)(k:dim)(z:dart),
inv_hmap m -> pred m k z -> exd m (A_1 m k z).