-
-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mod(14,20) == Mod(39,55)
evaluates to True
#39372
Comments
I tried playing around with this, and I have concluded that while comparing the 2 residual classes with totally separate groups, it takes the gcd, and if both the number are same modulo the gcd it returns true (except when gcd is 1), for example
|
This… "technically" is a consequence of our coercion framework.
It looks like this is needed to handle cases like We also have things like
I don't see a good way out of this. If you want you can explicitly check |
If so, This seems not too hard to fix, can I try fixing it |
Can you justify why this special case is special enough to require fixing despite it violates general behavior of the coercion framework as I pointed out above? |
No, I meant to say I can apply the last line solution you mentioned, sorry for being not clear |
I mean the user can explicitly check for same-parent when they check for equality if they want. But making SageMath's |
After checking with PARI/GP developers on how they treat
which is consistent with the current Sage's behavior. I'm still not sure it's best route to take though. |
Steps To Reproduce
Expected Behavior
Mod(14,20)
andMod(39,55)
are different residue classes, and furthermore neither one is a subset of another. PARI/GP also claims that they are not the same:Actual Behavior
The claimed equality does not make sense.
Additional Information
No response
Environment
Checklist
The text was updated successfully, but these errors were encountered: