math / tasks /modular-arithmetic /modular-arithmetic-congruence_chain-d1-e0012 /solution /Solution.lean
Download tasks/modular-arithmetic/modular-arithmetic-congruence_chain-d1-e0012/solution/Solution.lean from RenaissanceLabsEU/math: direct link, hf CLI and curl.
- Browser
- Download file 290 Bytes
-
https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/modular-arithmetic/modular-arithmetic-congruence_chain-d1-e0012/solution/Solution.lean
- Command line
-
hf download hf://datasets/RenaissanceLabsEU/math/tasks/modular-arithmetic/modular-arithmetic-congruence_chain-d1-e0012/solution/Solution.lean
-
curl -L -o Solution.lean https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/modular-arithmetic/modular-arithmetic-congruence_chain-d1-e0012/solution/Solution.lean
290 Bytes
| import Mathlib | |
| /-- The polynomial is congruent to the stated residue. -/ | |
| theorem congr_poly (x : ℤ) (h : x ≡ 1 [ZMOD 7]) : | |
| 6 * x ^ 2 + 7 * x + 4 ≡ 3 [ZMOD 7] := by | |
| have h1 := (((h.pow 2).mul_left 6).add ((h).mul_left 7)).add_right 4 | |
| refine h1.trans ?_ | |
| norm_num [Int.ModEq] | |