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]