-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Implement the universal cyclotomic field, using Zumbroich basis #8327
Comments
comment:2
So this seems interesting (I'd never heard of the Zumbrioch basis before). I don't have anything useful to say about the utility of this, or implementing it. However, I'd like to suggest we might want to use a different convention for the constructor -- I don't like the idea of |
comment:3
Replying to @craigcitro:
I indeed take any better suggestion! In Gap that would be Cyclotomics, but it does sound good in Field in the name. n=infinity might be misleading, since it's not about infinite roots of unity. |
comment:4
Replying to @nthiery:
True. Maybe it's a bit too "cutesy," but using |
comment:5
Replying to @craigcitro:
Mmm, any complex number is a 0-th root of unity, isn't it? |
comment:6
Does anyone have a pdf copy of Zumbroich's thesis where the algorithms are described? There is a nice version of a modified Zumbroich basis in the article I used (both are implemented in the attached file) but I don't see how the author expresses any root of unity in terms of the basis (probably just due to my lack of knowledge). But Zumbroich should describe it in more detail in his thesis. |
comment:7
The attached class NewCyclotomicField uses the modified Zumbroich basis and behaves already somehow as it should (beside pretty printing). If people think the Zumbroich basis itself is nicer, it's easy to change. I personally think the modified version as defined in Breuer - "Integral bases for subfields of cyclotomic fields" AAECC8, 279--289 (1997) has nicer properties (see the definition of the set S_n and Remark 1). Here are some implementation problems I have:
|
Author: Christian Stump |
This comment has been minimized.
This comment has been minimized.
comment:12
Apply trac_8327_universal_cyclotomic_field-cs.2.patch (for patchbot -- I hope that's right!). This doesn't quite look ready to me. I haven't tried applying the patch, but just on a visual check, I can see that lots of methods aren't documented or have no tests (every function added to Sage must be doctested, even those whose entire body is I very much hope you can get this code into shape -- it'd be a great thing to have in Sage -- but for now I'm afraid it's a thumbs down. |
Work Issues: Won't build, needs more doctests and Sphinxified docstrings |
comment:13
I've looked at the patchbot logs, and it gets worse -- the Cython code isn't valid apparently. |
comment:14
Replying to @loefflerd:
This was only as cython booleans changed in the meantime. Beside that, the code was always working properly. I changed this minor problem, and it should be working now again. I improved the documentation but there are still some things to be done... |
comment:15
For the buildbot: Apply trac_8327_universal_cyclotomic_field-cs.patch All other files are obsolete, but I cannot delete them. Some documentation is still missing, but only for methods which are helper functions for others. Would be nice to get some feedback! |
comment:16
Can some delete all but the youngest attached patch, the buildbot gets confused. Thanks, Christian |
This comment has been minimized.
This comment has been minimized.
comment:18
Apply trac_8327_universal_cyclotomic_field-cs.patch |
comment:19
Apply only trac_8327_universal_cyclotomic_field-cs.patch |
comment:20
Apply only trac_8327_universal_cyclotomic_field-cs.patch |
comment:194
Replying to @stumpc5:
Why should it be rebased? The fact that the patchbot is struggling is a bug with the patchbot, I don't think this ticket is to blame. Anyway, I don't want to review this ticket (simply because I cannot review every ticket that I put to needs_work), but it should be easy for the original reviewer. Frédéric, can you do it? |
comment:195
Replying to @jdemeyer:
Sorry, I didn't want to say you should actually review the patch again (though my message sounded like that), but only to possibly rebase it in case this would be the only modification needed to finally get this patch merged... |
comment:196
There remains 2 raise with the old syntax
Please convert them to the Python 3 syntax. |
comment:197
On the topic of raising exceptions: start lower-case (and don't form complete sentences). Moreover, the coercion system will often feed you with invalid data to figure out what you can and cannot do. Hence it is best to avoid unnecessary work like creating string representations and concatenating them to form an exception message. Just raise |
comment:198
Another possible complaint about this patch is that it uses quite some Cython code but always without sig_on()/sig_off(). As a consequence, this code might not be interruptible on CTRL-C. I don't know to what extent this is a problem, I'm just pointing it out. Anyway, it can't hurt to put some |
comment:199
A general comment concerning several complaints on this ticket from various directions: If you ask mathematicians to contribute to Sage, you get mathematicians writing code and code that is not necessarily perfect. This does have disadvantages! But please don't blame them (i.e. me here) for not being perfect programmers! Beside that, I fixed the complaint concerning error messages and their Python 3 syntax, but I am not going to go into interruption handling in cython. This can be handled in another ticket by someone more advanced. Finally: I already spent much too much time on this ticket (i.e., I implemented the stuff I actually needed for my research 2 years ago, all further hours and days were not spent anymore for my primary research). I would very much appreciate if we could get this ticket into Sage, and then solve further issues in other patches. |
comment:200
Replying to @stumpc5:
No problem, note that I purposely did not set the status to needs_work for this. Your code is certainly not the only part of Sage with this problem.
It's simply a fact that going from proof-of-concept-research-code to actual good code to be included in Sage is a non-trivial step. You could say it's unfortunate, but that's the way it is. |
comment:201
I actually do think the code here is pretty good, so please don't take everything as a criticism. I think this ticket is good to go, I just wanted to wait and see if the recently updated patchbot fares better at running it... |
comment:202
Now that you have changed the exceptions, also the doctests for the exceptions need to changed. I see various failures along the lines of
|
Attachment: trac_8327-universal_cyclotomic_field-cs.patch.gz |
comment:203
Replying to @jdemeyer:
Sorry, I exported the patch before qrefreshing... |
comment:205
ok, bot is happy again. Positive review once more. |
Merged: sage-5.7.beta3 |
comment:207
Yippee! Congratulations Christian! And thanks so much for going the extra mile! I agree that all the extra work you did for getting this ticket into Sage involved not only necessary cleanup but also extra features that could have been left aside in a first round! Thanks! |
comment:208
Replying to @nthiery:
+1!!! |
comment:209
Just fyi, #14118 had to be opened regarding this, not that Cygwin is currently supported (yet!). Hopefully this will make it more portable in the long run anyway. |
This patch provides the universal cyclotomic field
in sage. This field is the smallest field extension of QQ which contains all roots of unity.
It comes equipped with a distinguished basis, called the Zumbroich
basis, which gives, for any n, A basis of QQ( E(n) ) over QQ, where (n,k) stands for E(n)^k.
As seen for E(6), every element in UCF is expressed in terms of the smallest cyclotomic field in which it is contained.
It provides arithmetics on UCF as addition, multiplication, and inverses:
And also things like Galois conjugates.
The ticket does not use the gap interface.
Depends on #13765
CC: @sagetrac-sage-combinat @sagetrac-cwitty
Component: number fields
Keywords: Cyclotomic field, Zumbroich basis
Author: Christian Stump, Simon King
Reviewer: Frédéric Chapoton
Merged: sage-5.7.beta3
Issue created by migration from https://trac.sagemath.org/ticket/8327
The text was updated successfully, but these errors were encountered: