Some equation infrastructure
Shelved equation-solving work for now, will put in separate project.