intros.
induction n as [| n Hrecn].
exact 0.
exact (max (x n) Hrecn).
Defined.

Theorem betaTheorem1 :
forall (n : nat) (y : nat -> nat),
{a : nat * nat |
forall z : nat,
z < n ->
y z =
snd (proj1_sig (modulo (coPrimeBeta z (snd a)) (gtBeta z (snd a)) (fst a)))}.