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:*)
(* OK: *)
(* Predecessor in a face - direct version: *)
Definition F_1 (m:fmap)(z:dart):=
A m zero (A m one z).
(* To have a predecessor in a (direct) face for z: *)
Definition predf(m:fmap)(z:dart):Prop:=
succ m one z /\ succ m zero (A m one z).
(* Decidability of succf: *)
(* OK: *)
(* IDEM: *)
(* OK: *)

Lemma succf_exd_F : forall (m:fmap)(z:dart),
inv_hmap m -> succf m z -> exd m (F m z).