I want to prove proposition 5.4 in Lawvere and Rosebrugh "Sets for Mathematics" but it seems I get a little stuck, when I try to mimic the approach for the covariant version in prop. 5.2.
My approach thus far goes as follows:
$\beta: B_2 \rightarrow B_1$ induces a $Y^\beta:Y^{B_1} \rightarrow Y^{B_2}$ since $Y^\beta = \ulcorner \text{eval}_1 \circ 1 \times \beta \urcorner$ is the wanted map, where $1= 1_{Y^{B_1}}$ and has $\text{eval}_2(Y^\beta \times 1_{B_2}) = \text{eval}_1 \circ 1 \times \beta$ by construction. To prove $Y^\beta \ulcorner g \urcorner = \ulcorner g\beta \urcorner$ for all $g:B_1 \rightarrow Y$ it is enough to prove that $\text{eval}_2 (Y^\beta \ulcorner g \urcorner \times 1_{B_2})= g\beta$ since by definition $\ulcorner g\beta \urcorner$ is unique with this property.
Now for calculations notice that:
$Y^\beta \ulcorner g \urcorner \times 1_{B_2}= (Y^\beta \times 1_{B_2})(\ulcorner g \urcorner \times 1_{B_2})$ by functoriality of products.
Calculating gives now:
$\text{eval}_2 (Y^\beta \ulcorner g \urcorner \times 1_{B_2}) = \text{eval}_2 ((Y^\beta \times 1_{B_2})(\ulcorner g \urcorner \times 1_{B_2})) = (\text{eval}_2(Y^\beta \times 1_{B_2}))(\ulcorner g \urcorner \times 1_{B_2}) = (\text{eval}_1 \circ 1 \times \beta)(\ulcorner g \urcorner \times 1_{B_2}) = \text{eval}_1 ((1 \times \beta)(\ulcorner g \urcorner \times 1_{B_2})) = \text{eval}_1 (\ulcorner g \urcorner \times \beta) $
And this is where I get stuck since $\text{eval}_1 (\ulcorner g \urcorner \times \beta)$ is not obviously equal to $ g \beta $, which would prove the equality in question. Okay continuing a bit further gives:
$\text{eval}_1 ((\ulcorner g \urcorner \times 1_{B_1})(1_1 \times \beta)) = (\text{eval}_1(\ulcorner g \urcorner \times 1_{B_1}))(1_1 \times \beta) = g (1_1 \times \beta)$
But then there is still the missing part of $1_1 \times \beta$ left, which I can't get rid of by simply using the definition of function spaces.
The operation $\ulcorner g \urcorner$ above denotes the unique $\ulcorner g \urcorner: 1 \rightarrow Y^{B_1}$ coming from any $g: 1 \times B_1 \rightarrow Y$, where $1$ is the terminal object in $\textit{Set}$.
EDIT: The definition of function space I use is the following.
Definition: $Y^B$ is a set together with an evaluation $\text{eval}:Y^B \times B \rightarrow Y$ such that for all $X$ and $f:X \times B \rightarrow Y$ there is a unique $\ulcorner f \urcorner: X \rightarrow Y^B$ such that $\text{eval}(\ulcorner f \urcorner \times 1_B)= f$.