Skip to content
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

UnsignedInfinityRing → SR does not respect the axioms of coercions #35002

Open
mezzarobba opened this issue Feb 7, 2023 · 4 comments
Open

Comments

@mezzarobba
Copy link
Member

Coercions are supposed to be total and transitive, but

sage: SR.coerce(UnsignedInfinityRing(oo))
Infinity
sage: SR.coerce(UnsignedInfinityRing(1))
[...]
NotImplementedError:

See also #17777.

@tscrim
Copy link
Collaborator

tscrim commented Feb 10, 2023

I think this is an abuse that we have to live with as it is very useful to have this (e.g., to do x + oo).

@mezzarobba
Copy link
Member Author

I more or less agree, but this could bite us in the future, so I thought it may be worth having a place to track the issue and see if we can improve this design.

@mezzarobba
Copy link
Member Author

So, to clarify: I would keep this issue open as minor/wishlist, but feel free to close it if you prefer.

@tscrim
Copy link
Collaborator

tscrim commented Feb 11, 2023

I think it is good to have this documented as an open issue, and it would be nice to avoid this abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants