Define $$SimplifyAlgebraic for two loops