ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 27 May 2020 18:24:20 -0500How to make objects execute their operations in a specific field/ring?https://ask.sagemath.org/question/51593/how-to-make-objects-execute-their-operations-in-a-specific-fieldring/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?Wed, 27 May 2020 16:21:45 -0500https://ask.sagemath.org/question/51593/how-to-make-objects-execute-their-operations-in-a-specific-fieldring/Comment by tmonteil for <p>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.</p>
<p>To compute the edges i need to do some calculations on GF(p) and some others on the ring PolynomialRing(GF(p), ['X', 'Y']). </p>
<p>How do i make sure the operations happen on their specific rings and don't change the field outside of the class?</p>
https://ask.sagemath.org/question/51593/how-to-make-objects-execute-their-operations-in-a-specific-fieldring/?comment=51597#post-id-51597You should provide a concrete example of wrong behaviour, so that we can explain what happens, and how to work around.Wed, 27 May 2020 18:24:20 -0500https://ask.sagemath.org/question/51593/how-to-make-objects-execute-their-operations-in-a-specific-fieldring/?comment=51597#post-id-51597