(** * Recursion on the result of the function [x],
      with one function [h] taking [i] instead of two function [h]_[i] *)

Definition rec3 n s x g h : BC :=
  comp n s
    (rec1 n s g h)
    (x ::
     map (proj n 0) (seq 0 n))
    (map (proj n s) (seq n s)).

Lemma rec3_correct n s x g h vnl vsl : length vnl = n -> length vsl = s -> sem (rec3 n s x g h) vnl vsl = sem_rec1 g h (sem x vnl nil) vnl vsl.