End FOLD.
Definition fold {A: Type} (f: Z -> A -> A) (a: A) (i: interv) : A :=
fold_rec A f (fst i) a (snd i).

(* Specifications: *)
Lemma fold_elements:
forall (A: Type) (f: Z -> A -> A) a i,
fold f a i = List.fold_right f a (elements i).