lean_workbook_plus_58004
ProvedLet's look at the squares of non-zero elements. If , then , and for all non-zero . This means that the only way we can have non-zero squares is if implies or .
Preamble
import Mathlib.Analysis.Complex.Basic
Formal statement
theorem lean_workbook_plus_58004 (n : ℕ) (h₀ : 0 < n) (h₁ : ∀ x : ZMod n, x ≠ 0 → ∃! y, y^2 = x^2) : ∀ x : ZMod n, x ≠ 0 → ∀ y : ZMod n, y ≠ 0 → x^2 = y^2 → x = y ∨ x = -y := by sorry
Source