(** Finally, a version with both dependency and iterator *)
Hypothesis Hg_correct: forall n, f (S n) = g n (f n).
Let mg v :=  match v with
memo_mval n1 v1 => memo_mval (S n1) (g n1 v1) end.
Definition dimemo_list := imemo_list _ mf mg.

(* Specifications: *)
Theorem dimemo_get_correct: forall n, dmemo_get n dimemo_list = f n.
End DependentMemoFunction.