# Revision history [back]

### Coercion between commutative rings

Hello,

It is said here (karma insufficient: doc.sagemath.org/html/en/tutorial/tour_coercion.html#conversion-versus-coercion) that "in general there is no coercion between two different finite fields". When testing equality between elements of $\mathbb{Z}/(n)$ and $\mathbb{Z}/(m)$, why is there coercion to $\mathbb{Z}/(\gcd(m,n))$ only if $\gcd(m,n) \neq 1$ ?

zz3, zz5, zz6, zz10 = (ZZ.quotient(n) for n in [3,5,6,10])
zz6(0) == zz10(0) # True
zz3(0) == zz5(0) # False


I understand that testing equality in the null ring is not "useful", but why is it so inhomogeneous ? If some automated procedure depends on that feature, it would surely need to consider zz3(0) == zz5(0) to be true. 2 None

### Coercion between commutative ringsquotients of $\mathbb{Z}$

Hello,

It is said here (karma insufficient: doc.sagemath.org/html/en/tutorial/tour_coercion.html#conversion-versus-coercion) here that "in general there is no coercion between two different finite fields". When testing equality between elements of $\mathbb{Z}/(n)$ and $\mathbb{Z}/(m)$, why is there coercion to $\mathbb{Z}/(\gcd(m,n))$ only if $\gcd(m,n) \neq 1$ ?

zz3, zz5, zz6, zz10 = (ZZ.quotient(n) for n in [3,5,6,10])
zz6(0) == zz10(0) # True
zz3(0) == zz5(0) # False


I understand that testing equality in the null ring is not "useful", but why is it so inhomogeneous ? If some automated procedure depends on that feature, it would surely need to consider zz3(0) == zz5(0) to be true.