<s>[INST] Is this proof that $2^{23} \equiv 1 \bmod{47}$ correct? By Fermat's little theorem, we have that
$$
2^{46} \equiv 1 \pmod{47}
$$
By writing $2^{23}$ as $\left( 2^{46}\right)^{\frac{1}{2}}$ and knowing that
$$
(a^b) \bmod c = ((a \bmod c)^b)\bmod c
$$
we can conclude that
$$
\left( 2^{46}\right)^{\frac{1}{2}} \bmod{47} =
(2^{46} \bmod{47})^{\frac{1}{2}} \bmod 47 \\
2^{23} \bmod{47}= 1^{\frac{1}{2}} \bmod{47} \\
\therefore 2^{23} \bmod{47} = 1 \bmod{47}
$$
Would this proof be acceptable?
 [/INST] No, that reasoning is not correct. You are saying: As $2^{46}\equiv 1\bmod 47$ then $2^{23}$ is a square root of $1\bmod 47$. That is true, but there are two possible roots:  $\pm1$. So you have either $2^{23}=1$ or $2^{23}=-1$.
Instead you might evaluate $2^{23}\bmod 47$ by square and multiply:
$$ 2^{23} = 2\cdot 2^{22} = 2\cdot 4^{11} = 8 \cdot 4^{10} = 8\cdot 16^5=128\cdot 256^2 \equiv 34\cdot 21^2 = 34\cdot 441 \equiv 34\cdot 18 =612\equiv 1 \bmod 47$$
</s>