Proof
From ax = ay we deduce a(x - y) = 0. Since R is a domain and a is nonzero, we conclude that x - y = 0, i.e., x = y.