Definition cardinal (s : t) : nat := let (f, _) := cardinal s in f.

(* Specifications: *)
Lemma cardinal_1 : forall s, cardinal s = length (elements s).
Definition fold (B : Type) (f : elt -> B -> B) (i : t)
(s : B) : B := let (fold, _) := fold f i s in fold.
Lemma fold_1 :
forall (s : t) (A : Type) (i : A) (f : elt -> A -> A),
fold f s i = fold_left (fun a e => f e a) (elements s) i.