Chapter 6 A Mathematical Framework for Learning