Prove

Let D be a commutative ring with
identity. Then D is an integral domain if and only if for all nonzero elements
a ∈ D with ab = ac, we have b = c.

To prove this, we need to show two implications:

1) If D is an integral domain, then for all nonzero elements a ∈ D with ab = ac, we have b = c.

2) If for all nonzero elements a ∈ D with ab = ac, we have b = c, then D is an integral domain.

Proof of 1):
Suppose D is an integral domain. Let a be a nonzero element in D such that ab = ac for some b,c ∈ D.
If we assume b ≠ c, then we can subtract c from both sides of the equation to get ab - ac = ac - ac.
Simplifying this further, we get a(b - c) = 0.
Since D is an integral domain, a ≠ 0 and therefore (b - c) must equal 0.
Thus, we can conclude that b = c.

Proof of 2):
Suppose that for all nonzero elements a ∈ D with ab = ac, we have b = c.
We need to prove that D is an integral domain, i.e., it has no nonzero zero divisors.
Let a, b be nonzero elements in D such that ab = 0.
In order to reach a contradiction, assume b ≠ 0.
Since D is a commutative ring with identity, we have the cancellation property, which states that if ab = ac and a ≠ 0, then b = c.
Applying this property, we can conclude that b = 0, which contradicts our assumption.
Therefore, we must have b = 0, which means a ≠ 0 is not a zero divisor.
Since this holds for all nonzero elements a and b, we can conclude that D is an integral domain.

Thus, we have proven both implications and therefore proved the statement.