(*==========================================================
                 CONNECTIVITY IN HMAPS : 
==========================================================*)

(* Connectivity: Definition in Prop "A� la" Warshall *)

Fixpoint eqc(m:fmap)(x y:dart){struct m}:Prop:=
 match m with
     V => False
  |  I m0 x0 _ _ => x=x0 /\ y=x0 \/ eqc m0 x y
  |  L m0 _ x0 y0 =>
      eqc m0 x y
     \/ eqc m0 x x0 /\ eqc m0 y0 y
     \/ eqc m0 x y0 /\ eqc m0 x0 y
 end.

(* Specifications: *)
Lemma eqc_exd_exd : forall (m:fmap)(x y:dart), eqc m x y -> (exd m x /\ exd m y).
Lemma eqc_dec: forall (m:fmap)(x y:dart), {eqc m x y} + {~eqc m x y}.
Lemma eqc_refl: forall(m:fmap)(x:dart), exd m x -> eqc m x x.
Lemma eqc_symm: forall(m:fmap)(x y:dart), eqc m x y -> eqc m y x.
Lemma eqc_trans: forall(m:fmap)(x y z:dart), eqc m x y -> eqc m y z -> eqc m x z.
Lemma eqc_cA_r : forall (m:fmap)(k:dim)(x:dart), inv_hmap m -> exd m x -> eqc m x (cA m k x).
Lemma eqc_cA_1_r : forall (m:fmap)(k:dim)(x:dart), inv_hmap m -> exd m x -> eqc m x (cA_1 m k x).
Lemma eqc_eqc_cA : forall (m:fmap)(k:dim)(x y:dart), inv_hmap m -> eqc m x y -> eqc m x (cA m k y).
Lemma eqc_eqc_cA_1 : forall (m:fmap)(k:dim)(x y:dart), inv_hmap m -> eqc m x y -> eqc m x (cA_1 m k y).
Lemma eqc_cA_1_eqc : forall (m:fmap)(k:dim)(x y:dart), inv_hmap m -> eqc m (cA_1 m k x) y -> eqc m x y.
Lemma eqc_cA_eqc : forall (m:fmap)(k:dim)(x y:dart), inv_hmap m -> eqc m x (cA m k y) -> eqc m x y.
Lemma eqc_eqc_cF : forall (m:fmap)(x y:dart), inv_hmap m -> eqc m x y -> eqc m x (cF m y).
Lemma exd_Iter_cF : forall (m:fmap)(n:nat)(z:dart), inv_hmap m -> exd m z -> exd m (Iter (cF m) n z).
Lemma eqc_Iter_cF : forall (m:fmap)(n:nat)(z:dart), inv_hmap m -> exd m z -> eqc m z (Iter (cF m) n z).
Lemma expf_eqc : forall(m:fmap)(x y:dart), inv_hmap m -> MF.expo m x y -> eqc m x y.
Lemma inv_hmap_dec:forall(m:fmap), {inv_hmap m} + {~inv_hmap m}.