Setup for math iteration with AMS.