mathlib icon indicating copy to clipboard operation
mathlib copied to clipboard

remove the coercion from zmod n to other rings

Open jcommelin opened this issue 5 years ago • 1 comments

We should remove the coercion, and just use zmod.cast(_hom) everywhere. The coercion causes more trouble than it is worth. This coercion is currently used in evil ways, by coercing from zmod n to int. Here zmod.val should be used instead.

jcommelin avatar Aug 29 '20 13:08 jcommelin

zmod.val doesn't do the right thing to get

This coercion is currently used in evil ways, by coercing from zmod n to int. Here zmod.val should be used instead.

(zmod.val x : ℤ) sends x = (-37 : zmod 0) to 37, which sounds undesirable.

eric-wieser avatar Mar 21 '22 23:03 eric-wieser