Section uiter.
Variable X Y : Type.
Context `{registered X}.
Context `{registered Y}.
Variable f : X -> X + Y.
Variable fT : timeComplexity (X -> X + Y).
Context `{computableTime' f fT}.
Definition uiter := Eval cbn -[enc] in rho (λ uiter x, !!(extT f) x (λ x' _ , uiter x') (λ y _ , y) !!I).

Lemma uiterTime_bound_onlyByN (P: nat -> _ -> Prop) boundL boundR n0 x0:
(forall n x, n < n0
-> P n x
-> match f x with
| inl x' => P (S n) x' /\ fst (fT x tt) <= boundL
| inr y => forall n', n <= n' -> fst (fT x tt) <= boundL + boundR n'
end) ->
P 0 x0 ->
uiterTime n0 x0 <= n0 * (boundL + 9) + boundR n0.