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: *)
(* IDEM: *)

Lemma predf_exd_F_1 : forall (m:fmap)(z:dart),
inv_hmap m -> predf m z -> exd m (F_1 m z).