End Mf.
(*=======================================================  INSTANCIATION OF Mf TO A_k_orbits  ========================================================*)
(* SIGNATURE FOR A DIMENSION: *)
Module Type Sigd.
Parameter k:dim.
End Sigd.
(* FUNCTOR: *)
Module McA(Md:Sigd)<:Sigf.
Definition f := fun(m:fmap)(z:dart) => cA m Md.k z.
Definition f_1 := fun(m:fmap)(z:dart) => cA_1 m Md.k z.
Definition exd_f :=
fun(m:fmap)(z:dart) => exd_cA m Md.k z.
Definition exd_f_1 :=
fun(m:fmap)(z:dart) => exd_cA_1 m Md.k z.
Definition bij_f :=
fun(m:fmap)(h:inv_hmap m) => bij_cA m Md.k h.
Definition bij_f_1 :=
fun(m:fmap)(h:inv_hmap m) => bij_cA_1 m Md.k h.
Definition f_1_f := fun(m:fmap)(z:dart) => cA_1_cA m Md.k z.
Definition f_f_1 := fun(m:fmap)(z:dart) => cA_cA_1 m Md.k z.
End McA.
(* INSTANCIATIONS OF Sigd: *)
Module Md0<:Sigd.
Definition k:=zero.
End Md0.
Module Md1<:Sigd.
Definition k:=one.
End Md1.
(* OK, BUT THE DIRECT COMPOSITION IS IMPOSSIBLE... : *)
Module McA0:=McA Md0.
Module MA0:= Mf McA0.
Module McA1:=McA Md1.
Module MA1:= Mf McA1.
(*======================================================== FACE OPERATIONS IN HMAPS: F, F_1, cF, cF_1 ========================================================*)
(* Following operations are designed for hmaps, but are defined on fmap for convenience *)
(* Successor F in a face - direct version, designed for hmaps: *)
Definition F(m:fmap)(z:dart):=
A_1 m one (A_1 m zero z).
(* To have a successor in a (direct) face for x: *)
Definition succf(m:fmap)(z:dart):Prop:=
pred m zero z /\ pred m one (A_1 m zero z).
(* Decidability of succf:*)

Lemma succf_dec :
forall (m:fmap)(z:dart),
{succf m z}+{~succf m z}.