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