Equivalence of Definitions of Unital Associative Commutative Algebra/Correspondence

Theorem
Let $A$ be a commutative ring with unity. Let $B$ be a algebra over $A$ that is unital, associative and commutative.

Let $(C, f)$ be a ring under $A$.


 * 1) $C$ is the underlying ring of $B$ and $f : A \to C$ is the canonical mapping to the unital algebra $B$.
 * 2) $B$ is the algebra defined by $f$.