Foundations of Algebra B