pgcd(), chinrem_gcd(): use appropriate definition of the degree.