Group useful functions for Diophantine equations.