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
Powering with IntegerMod/GF exponents #15709
Comments
comment:1
Actually, I don't see what is the problem with the output. |
comment:2
Replying to @ppurka:
I think his issue is with the last entry, It would indeed be nicer if sage would refuse to let |
comment:3
So, I suppose this should be fixed for complex numbers and some cyclotomic fields. Where the |
comment:4
Replying to @ppurka:
Is the code that specific? For a general ring, we'd probably want that the exponent is coercible into ZZ. For rings where fractional exponents are meaningful it would be QQ (but multivaluedness of the result is always an issue of course). For some analytic objects we can support even more general exponents. So in SR the issue probably remains, because one can wrap an element of ZZ/2ZZ in a symbolic expression. What happens now is probably that the code asks whether the exponent can be turned into an integer (i.e., asks for a conversion). Of course there is a conversion from ZZ/2ZZ to ZZ. |
comment:5
Yes, the |
This comment has been minimized.
This comment has been minimized.
comment:12
In addition I suggest to print for each result its parent (or related type) like Macaulay2 does:
|
Stopgaps: wrongAnswerMarker |
comment:13
I added a pointer from #24247 to here. Disallowing powering by The hard part is allowing
The problem is that checking |
From the google notebook bug reports
This must surely have been discussed before. I would have tried to look up the discussion if I thought there was any hope that someone could convince me that this is not actually a bug.
Related, Nils Bruin reported on #11797:
It looks like it's simply quietly lifting the exponent to the integers, which it shouldn't do because there is no coercion in that direction (only a conversion):
There is one side-effect of this that does look elegant:
but in general I'd say an error should result from exponentiations like this.
CC: @mezzarobba @sagetrac-jakobkroeker
Component: coercion
Stopgaps: wrongAnswerMarker
Issue created by migration from https://trac.sagemath.org/ticket/15709
The text was updated successfully, but these errors were encountered: