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
coercion and conversion for absolute_field #12269
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:2
Sorry, I'm messing up the patch numbers. I mean #11869 everywhere. |
shows where long calculations are done in #11869 |
comment:3
Attachment: 11800-indicator.patch.gz |
This comment has been minimized.
This comment has been minimized.
comment:4
See also #12271 (which is the same, but for relativize) |
comment:5
I believe a solution similar to #11876 is in order: make |
comment:6
Replying to @jdemeyer:
That would fix it, but I don't think it would be very fast, as it would still use Wouldn't it be better to use the category/coercion framework here? I suppose all that is needed it to store the Still, inheriting embeddings as in #11876 is certainly useful, so I think it is best to do both. |
comment:7
The map
Fast conversions in both directions would be very useful though. And maybe coercion from absolute to relative? |
comment:8
Sorry, I did not answer Marco's question yet. Is it the case that the map is already known at initialisation time? Then, you could use (depending on whether you want a conversion or a coercion or an action) If the maps are not available at initialisation time (or if otherwise initialisation takes too much time), you could implement either Concerning "coercion or conversion between relative and absolute number fields", I think there has been at least one thread on sage-nt and also a trac ticket devoted to that subject. |
comment:9
Replying to @simon-king-jena:
No problem, it wasn't a very direct question.
Don't know, I'll have to dig through the code some more.
Thanks, I don't know that ticket/thread. I have found
The first two are about coercions between number fields, but don't say anything about relative versus absolute. The third is about conversions, again no relative versus absolute. I also did another search on trac, and could only find the tickets I created last week: #12269 (this ticket) and #12271 (same, but for relativize). |
comment:10
Replying to @mstreng:
Actually, maybe it is the coercion between O to P that shouldn't be there! All of the following maps are natural Some more about O and P:
O and P are really different, I don't understand True for "==" here. Is that a bug?
|
This comment has been minimized.
This comment has been minimized.
comment:11
Hi, I agree that the error here is that O and P should not be given a coercion. Note that the code above does not work if P is given another generator name. On this example I would not expect a canonical isomorphism from O to P. |
comment:12
Forcing coercions exposes other errors in the coercion model:
|
comment:13
Replying to @lftabera:
Right. And here it is (in sage.structure.parent, lines 2300-2303):
So, apparently someone intended to write "connecting = None", but wrote "connection = None". Can you try whether writing "connecting = None" fixes the problem?
|
comment:14
Replying to @lftabera:
This can be fixed by making |
comment:15
Replying to @simon-king-jena:
Yes, this solves the problem. I guess that this fix should go to a new ticket. |
comment:16
Replying to @lftabera:
OK, but I couldn't do it right now. I am in quite a mess with my good old group cohomology spkg, which wouldn't work in the latest Sage version for at least three independent reasons. |
comment:18
For the typo in parent.pyx I have added a patch in #12990 |
So this ticket is meant to:
Speeding up #11869 is not really related and is #12270.
CC: @jdemeyer @simon-king-jena @dansme
Component: number fields
Keywords: coercion conversion absolute_field number field structure relative absolute
Issue created by migration from https://trac.sagemath.org/ticket/12269
The text was updated successfully, but these errors were encountered: