Same kind of proof works.
which by definition, is what we're looking for.
Prove that if a=bmodn and c=dmodn then a+c=b+dmodn and ac=bdmodn
My solution for the first part is:
n|(a-b) so (a-b)=nq and n|(c-d) so (c-d)=np
so (a-b) +(c-d)=nq+np
I am not sure how to show the second part any help would be great