File size: 323 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 : ℤ) :
(42 : ℤ) ∣ n ^ 7 - 127 * n := by
have h : ((n ^ 7 - 127 * n : ℤ) : ZMod 42) = 0 := by
push_cast
generalize (n : ZMod 42) = x
revert x
decide +kernel
exact (ZMod.intCast_zmod_eq_zero_iff_dvd _ _).1 h
|