Download tasks/modular-arithmetic/modular-arithmetic-divisibility-d2-t0017/solution/Solution.lean from RenaissanceLabsEU/math: direct link, hf CLI and curl.
- Browser
- Download file 328 Bytes
-
https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/modular-arithmetic/modular-arithmetic-divisibility-d2-t0017/solution/Solution.lean
- Command line
-
hf download hf://datasets/RenaissanceLabsEU/math/tasks/modular-arithmetic/modular-arithmetic-divisibility-d2-t0017/solution/Solution.lean
-
curl -L -o Solution.lean https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/modular-arithmetic/modular-arithmetic-divisibility-d2-t0017/solution/Solution.lean
328 Bytes
| import Mathlib | |
| /-- The integer divides the polynomial value. -/ | |
| theorem dvd_poly (n : ℤ) : | |
| (6 : ℤ) ∣ 13 * n ^ 3 - 25 * n := by | |
| have h : ((13 * n ^ 3 - 25 * n : ℤ) : ZMod 6) = 0 := by | |
| push_cast | |
| generalize (n : ZMod 6) = x | |
| revert x | |
| decide +kernel | |
| exact (ZMod.intCast_zmod_eq_zero_iff_dvd _ _).1 h | |