Hypothesis g'_inf : arity g' = ok_arity (sl - 1).
Hypothesis h0'_inf : arity h0' = ok_arity (S sl).
Hypothesis h1'_inf : arity h1' = ok_arity (S sl).
Hypothesis cj'_inf : arity cj = ok_arity sl.
Hypothesis g_correct  : forall w xl,
length xl = (sl - 1) ->
peval (rec_simulation (sl - 1) g') (map (@length _) xl) <= length w ->
Sem g' xl  = sem g [w] xl.
Hypothesis h0_correct : forall w xl,
length xl = (S sl) ->
peval (rec_simulation (S sl) h0') (map (@length _) xl) <= length w ->
Sem h0' xl = sem h0 [w] xl.
Hypothesis h1_correct : forall w xl,
length xl = (S sl) ->
peval (rec_simulation (S sl) h1') (map (@length _) xl) <= length w ->
Sem h1' xl = sem h1 [w] xl.
Transparent f'_then f'_else f'_cond f' .

(* Specifications: *)
Lemma f_correct : forall (w y u : bs) xl,
peval
(pcomp (pplus (rec_simulation (S sl) h0') (rec_simulation (S sl) h1'))
(pproj (length (y :: xl)) 0
:: poly_Cobham (Rec g' h0' h1' cj)
:: map (pproj (length (y :: xl)))
(seq 1 (length (y :: xl) - 1))))
(map (@length _) (y :: xl)) +
(peval (pshift (rec_simulation (sl - 1) g')) (map (@length _) (y :: xl)) +
(nth 0 (map (@length _) (y :: xl)) 0 + 2)) <= length w ->
rec_bounded (Rec g' h0' h1' cj) ->
S (length xl) = sl ->
length u <= length w ->
length w - length u <= length y ->
Sem (Rec g' h0' h1' cj) (Y u w y :: xl) =
sem f' [u; w] (y :: xl).