intros.
unfold diff_orb in |- *.
generalize (nd_card m).
intro.
assert (ndN m - card (fmap_to_set m) = 0)%nat.
rewrite H1.
omega.
cut
(diff_int m z (ndN m - card (fmap_to_set m))
(Iter_upb_aux m z (fmap_to_set m) - 1))%nat.
rewrite H2.
tauto.
apply LP8.
tauto.
rewrite H1.
apply le_refl.
rewrite H2.
simpl in |- *.
generalize (exd_exds m z).
tauto.
Qed.
(* OK: nr IS A PERIOD OF THE f-ORBIT (IN FACT, IT IS THE LOWEST ONE, SINCE n0 = 0 AND ALL z^i DIFFER FROM z = z^n0 = z^0, FOR n0 < i <= nr-1) *)

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.