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