(* "cardinal" of a (multi-)set: *)

Fixpoint card(s:set):nat:=
  match s with
     Vs => 0%nat
   | Is s0 x => 
       if exds_dec s0 x then card s0
       else (1 + card s0)%nat
  end.

(* Specifications: *)
Lemma card_Ds:forall (s:set)(z:dart), (card (Ds s z) <= card s)%nat.
Lemma not_exds_card_Ds:forall (s:set)(z:dart), ~exds s z -> card (Ds s z) = card s.
Lemma exds_card_pos:forall (s:set)(z:dart), exds s z -> (0 < card s)%nat.
Lemma exds_card_Ds:forall (s:set)(z:dart), exds s z -> card (Ds s z) = (card s - 1)%nat.
Lemma exds_card_Ds_inf:forall (s:set)(z:dart), exds s z -> (card (Ds s z) < card s)%nat.