How to make objects execute their operations in a specific field/ring?

asked 2020-05-27 16:21:45 -0600

JGC gravatar image

Providing some context: i want to create a class to operate on isogeny graphs of elliptic curves. So it should have the $j$-invariants (integers modulo $p$) as nodes and the existence of $l$-isogenies as edges.

To compute the edges i need to do some calculations on GF(p) and some others on the ring PolynomialRing(GF(p), ['X', 'Y']).

How do i make sure the operations happen on their specific rings and don't change the field outside of the class?

edit retag flag offensive close merge delete



You should provide a concrete example of wrong behaviour, so that we can explain what happens, and how to work around.

tmonteil gravatar imagetmonteil ( 2020-05-27 18:24:20 -0600 )edit