lean_workbook_plus_39999
ProvedNow we need to prove divisibility by 5. Looking at quadratic residues mod 5, we see that the square of each prime is congruent to either 1 or 4 mod 5. If they are different, then their sum is divisible by 5 and we are done. If they are both the same, then their difference is divisible by 5. Either way we now have: .
Preamble
import Mathlib.Analysis.Complex.Basic
Formal statement
theorem lean_workbook_plus_39999 (p q : ℕ) (h₀ : 0 < p ∧ 0 < q) (h₁ : p ≠ q) (h₂ : 5 ∣ (p^2 + q^2) * (p^2 - q^2)) : 5 ∣ p^4 - q^4 := by sorry
Source