File size: 331 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 : ℤ) ∣ 29 * n ^ 7 - 71 * n := by
have h : ((29 * n ^ 7 - 71 * 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
|