File size: 330 Bytes
eec79f6 | 1 2 3 4 5 6 7 8 9 | 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]
|