English
For any integer x, there exists n ∈ ℤ with n^2 = x if and only if (sqrt x)^2 = x; in that case one can take n = sqrt x.
Русский
Для любого x ∈ ℤ существует n ∈ ℤ such that n^2 = x тогда и только тогда, когда (sqrt x)^2 = x; тогда можно взять n = sqrt x.
LaTeX
$$$\exists n \in \mathbb{Z}, n^2 = x \;\iff\; (\sqrt{x})^2 = x$$$
Lean4
theorem exists_mul_self (x : ℤ) : (∃ n, n * n = x) ↔ sqrt x * sqrt x = x :=
⟨fun ⟨n, hn⟩ => by rw [← hn, sqrt_eq, ← Int.natCast_mul, natAbs_mul_self], fun h => ⟨sqrt x, h⟩⟩