(*===========================================================
                between in f-ORBITS:
==========================================================*)

(* v IS between z AND t IN AN f-ORBIT: *)

Definition between(m:fmap)(z v t:dart):Prop:=
 inv_hmap m -> exd m z ->  
  exists i:nat, exists j:nat, 
   Iter (f m) i z = v /\
     Iter (f m) j z = t /\
       (i <= j < Iter_upb m z)%nat.

(* Specifications: *)
Lemma between_expo1:forall(m:fmap)(z v t:dart), inv_hmap m -> exd m z -> between m z v t -> expo1 m z v /\ expo1 m z t.
Lemma between_expo:forall(m:fmap)(z v t:dart), inv_hmap m -> exd m z -> between m z v t -> expo m z v /\ expo m z t.
Lemma between_expo_refl_1:forall(m:fmap)(z t:dart), inv_hmap m -> exd m z -> (between m z z t <-> expo1 m z t).
Lemma between_expo_refl_2:forall(m:fmap)(z t:dart), inv_hmap m -> exd m z -> (between m z t t <-> expo1 m z t).
Lemma expo_between_1:forall(m:fmap)(z t:dart), inv_hmap m -> exd m z -> (expo1 m z t <-> between m z t (f_1 m z)).
Lemma expo_between_3:forall(m:fmap)(x y z:dart), inv_hmap m -> expo1 m x y -> expo1 m x z -> between m x z y \/ between m (f m y) z (f_1 m x).