From Barnes and Mack's "An Algebraic Introduction to Mathematical Logic"
S is a commutative ring with 1. Show that the class of commutative rings R with 1_R = 1_S and which contain S as a subring is a variety (in the sense of universal algebra).
I figure the sets will need to be {+, $\cdot$, -, 0, 1, S} algebras, where everything in S has arity-0. Then, add on all the laws for a commutative ring, plus a bunch of laws of the form $(s + s', (s +_S s'))$. However, I can't seem to see how to make S actually inject into any algebra in the variety. For example, how do I avoid the case where $s = 0$ for all $s \in S$?