4. Proof. Reflexivity (a,b) ~ (a,b) follows from b - b = 0 = 4(a - a).

Symmetry. If (a,b)~(c,d), then d - b = 4(c - a) or b - d = 4(a - c), and (c,d) ~ (a,b).

Transitivity. If (a,b)~(c,d) and (c,d)~(e,f), then d - b = 4(c - a) and f - d = 4(e - c). By adding the two equations we get f - b = 4(e - a) or (a,b)~(e,f). Q.E.D.

5. Reflexivity. If c = a and d = b, then a*d = a*b = b*c. Thus, (a,b)~(a,b).

Symmetry. If (a,b)~(c,d), then a*d = b*c or c*b = d*a, and (c,d)~(a,b).

Transitivity. If (a,b)~(c,d) and (c,d)~(e,f), then a*d= b*c and c*f = d*e. Multiply the first equality by f:

a*d*f = b*c*f = b*d*e. Since d in Z\{0}, d is not zero and we can divide both sides of the equality a*d*f=b*d*e by d. Finally, a*f = b*e and (a,b)~(e,f).