(* ALL DARTS IN AN f-ORBIT ARE DISTINCT: *)  

Definition diff_orb(m:fmap)(z:dart):Prop:=
 let nr:= Iter_upb_aux m z (fmap_to_set m) in
  (diff_int m z 0 (nr - 1))%nat.

(* Specifications: *)
Theorem exd_diff_orb:forall(m:fmap)(z:dart), inv_hmap m -> exd m z -> diff_orb m z.
Theorem Iter_upb_period:forall(m:fmap)(z:dart), inv_hmap m -> exd m z -> let nr:= Iter_upb m z in Iter (f m) nr z = z.
Lemma Iter_period:forall(m:fmap)(z:dart)(i n:nat), inv_hmap m -> exd m z -> let p:= Iter_upb m z in Iter (f m) (i + n*p)%nat z = Iter (f m) i z.
Lemma mod_p:forall(m:fmap)(z:dart)(i:nat), inv_hmap m -> exd m z -> let p := Iter_upb m z in {j :nat | Iter (f m) i z = Iter (f m) j z /\ (j < p)%nat}.
Lemma period_uniform : forall(m:fmap)(z:dart)(i:nat), inv_hmap m -> exd m z -> Iter_upb m z = Iter_upb m (Iter (f m) i z).
Lemma unicity_mod_p:forall(m:fmap)(z:dart)(j k:nat), inv_hmap m -> exd m z -> let p := Iter_upb m z in (j < p)%nat -> (k < p)%nat -> Iter (f m) j z = Iter (f m) k z -> j = k.