Fixpoint iteres_0 (A : Set) (f : Map A -> Map A) (x : Map A)
(n : nat) {struct n} : prechain A :=
match n with
| O => single A x
| S p =>
match iteres_0 A f x p with
| single y => concat A (single A y) (power (Map A) f x (S p))
| concat z y => concat A (concat A z y) (power (Map A) f x (S p))
end
end.

(* Specifications: *)
Lemma iteres_eq_0 :
forall (A : Set) (f : Map A -> Map A) (x : Map A) (n : nat),
prechain_last A (iteres A f x n) = power (Map A) f x n.
Lemma iteres_eq :
forall (A : Set) (f : Map A -> Map A) (x : Map A) (n : nat),
iteres A f x n = iteres_0 A f x n.
Lemma iteres_def_ok :
forall (A : Set) (T : mEnsemble A) (f : Map A -> Map A)
(x : Map A) (n k : nat),
def_ok_app A T f -> T (power (Map A) f x n) -> T (power (Map A) f x (n + k)).
Lemma power_def_ok :
forall (A : Set) (T : mEnsemble A) (f : Map A -> Map A)
(x : Map A) (n : nat), def_ok_app A T f -> T x -> T (power (Map A) f x n).