(* EXISTENCY Of THE z^i IN AN INTERVAL *)

Definition exds_int(m:fmap)(z:dart)(a b:nat)(s:set):Prop:=
  forall i:nat, (a <= i <= b)%nat ->  
    exds s (Iter (f m) i z).

(* Specifications: *)
Lemma exds_int_gt:forall(m:fmap)(z:dart)(a b:nat)(s:set), (b < a)%nat -> exds_int m z a b s.
Lemma exds_int_dec : forall(m:fmap)(z:dart)(a b:nat)(s:set), {exds_int m z a b s} + {~exds_int m z a b s}.
Lemma rem_1_step :forall(m:fmap)(z:dart)(s:set), inv_hmap m -> let sr:= Iter_rem_aux m z s in let nr:= Iter_upb_aux m z s in (card sr + 1 <= card s <-> exds s (Iter (f m) (ndN m - card s) z))%nat.
Lemma rem_2_steps :forall(m:fmap)(z:dart)(s:set), inv_hmap m -> let sr:= Iter_rem_aux m z s in let nr:= Iter_upb_aux m z s in (card sr + 2 <= card s -> exds (Ds s (Iter (f m) (ndN m - card s) z)) (Iter (f m) (ndN m + 1 - card s) z))%nat.