While I am learning the very basics of Near-rings ,I have come across the following statement: " a subgroup I of N is an ideal iff $$n \equiv m \pmod I$$ and $$x \equiv y \pmod I$$ implies $$n+x \equiv m+y \pmod I$$ and $$n.x \equiv m.y \pmod I$$
Here, ($N$,+,.) a near-ring, $n,m,x,y$ are elements in $N$.
Can anyone explain me the whole idea of these congruences?
One more thing I need to know is "Do these elements belong to the ideal just like in case of the rings?"