File size: 328 Bytes
eec79f6 | 1 2 3 4 5 6 7 8 9 10 11 12 | import Mathlib
/-- The integer divides the polynomial value. -/
theorem dvd_poly (n : ℤ) :
(3 : ℤ) ∣ 22 * n ^ 3 - 22 * n := by
have h : ((22 * n ^ 3 - 22 * n : ℤ) : ZMod 3) = 0 := by
push_cast
generalize (n : ZMod 3) = x
revert x
decide +kernel
exact (ZMod.intCast_zmod_eq_zero_iff_dvd _ _).1 h
|