> On Dec 27, 2015, at 11:47, Daniel Lännström <[email protected]> > wrote: > > There seems to be something wrong with equality in > sage.schemes.hyperelliptic_curves.jacobian_morphism.JacobianMorphism_divisor_class_field > > This code demonstrates the weird behavior: > > x = GF(7)['x'].gen() > H1 = HyperellipticCurve(x^5+1) > H2 = HyperellipticCurve(x^5+1) > J1 = H1.jacobian() > J2 = H2.jacobian() > # This holds > assert J1 == J2 > # BUT THIS FAILS > assert J2(0) == J1(0) > > I think the correct behavior would be J2(0) == J1(0).
There are “levels of equality” in Python. If you search for “equality in python” (on the web), you may find some related discussions that could clarify this for you. Here, I believe what is going on is that, while “J1 == J2” gives true, i.e., the two objects are equal, they are not the same, so elements taken from them can not be equal. Given your code, J1 is J2 will return False. HTH Justin -- Justin C. Walker, Curmudgeon-at-Large () The ASCII Ribbon Campaign /\ Help Cure HTML Email -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
