(** * 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 arities_rec3 n s x g h (Hx : arities x = ok_arities n 0) (Hg : arities g = ok_arities n s) (Hh : arities h = ok_arities (S n) (S s)) : arities (rec3 n s x g h) = ok_arities n s.