Download tasks/modular-arithmetic/modular-arithmetic-divisibility-d2-t0065/solution/Solution.lean from RenaissanceLabsEU/math: direct link, hf CLI and curl.
- Browser
- Download file 331 Bytes
-
https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/modular-arithmetic/modular-arithmetic-divisibility-d2-t0065/solution/Solution.lean
- Command line
-
hf download hf://datasets/RenaissanceLabsEU/math/tasks/modular-arithmetic/modular-arithmetic-divisibility-d2-t0065/solution/Solution.lean
-
curl -L -o Solution.lean https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/modular-arithmetic/modular-arithmetic-divisibility-d2-t0065/solution/Solution.lean
331 Bytes
| 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 | |