math / tasks /modular-arithmetic /modular-arithmetic-congruence_chain-d2-e0016 /solution /Solution.lean
Download tasks/modular-arithmetic/modular-arithmetic-congruence_chain-d2-e0016/solution/Solution.lean from RenaissanceLabsEU/math: direct link, hf CLI and curl.
- Browser
- Download file 330 Bytes
-
https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/modular-arithmetic/modular-arithmetic-congruence_chain-d2-e0016/solution/Solution.lean
- Command line
-
hf download hf://datasets/RenaissanceLabsEU/math/tasks/modular-arithmetic/modular-arithmetic-congruence_chain-d2-e0016/solution/Solution.lean
-
curl -L -o Solution.lean https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/modular-arithmetic/modular-arithmetic-congruence_chain-d2-e0016/solution/Solution.lean
330 Bytes
| import Mathlib | |
| /-- The expression is congruent to the stated residue. -/ | |
| theorem congr_poly2 (x y : ℤ) (hx : x ≡ 2 [ZMOD 9]) (hy : y ≡ 8 [ZMOD 9]) : | |
| 3 * (x * y) + y ^ 2 + 3 * x ≡ 1 [ZMOD 9] := by | |
| have h1 := (((hx.mul hy).mul_left 3).add (hy.pow 2)).add ((hx).mul_left 3) | |
| refine h1.trans ?_ | |
| norm_num [Int.ModEq] | |