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 Hilbert symbols over number fields #9334
Comments
comment:1
Here all the functions are better placed. I still need to fix the code so that generalized_hilbert_symbol(a,b,P) doesn't assume a.valuation(P) and b.valuation(P) are 0 or 1. |
comment:2
I changed the code as Tim (correctly) suggested so as it doesn't assume reduced input. |
comment:3
This has better uniformizer code. |
comment:4
This doesn't seem to apply to 4.4.4. Does it require some other patch as a prerequisite? Also, the docstrings don't seem to be correctly ReST formatted (you should always run |
Work Issues: patch does not apply |
Changed work issues from patch does not apply to ReST formatting issues |
comment:5
I see. So it's supposed to be applied on top of the patches at #9317. That's fine, but you should explain this in your trac upload messages. Don't repost random patches from other tickets on this ticket -- that's just unnecessary duplication, and it's confusing for the release maintainer when s/he has to merge stuff later. Anyway: with the #9317 patches in place these four patches apply fine, and all doctests pass. But they're quite hard to review, since you seem to have added code in one place in the first patch and then removed it and added it again somewhere else in the second. Could I suggest that you use the Mercurial "qfold" command to combine the four patches into one single patch? That would make the reviewer's job vastly easier. And don't forget those docstring formatting problems; the two that stand out most at a quick glance are that the LaTeX formulae should be in backticks not dollar signs ( |
comment:6
Here is one single patch. It does not depend on ticket #9317. This should have all the documentation fixed. Thank you for your patience, I've learned a lot about Mercurial and ReST formatting recently. I also applied this on a clean clone of 4.4.2 to check that it would build, all the doctest pass, and the -docbuild looks correct. |
comment:7
Most of this looks fine, and the docstring formatting is much better; but there are some technical issues.
|
Reviewer: David Loeffler, John Cremona |
Changed work issues from ReST formatting issues to ReST formatting issues, and more |
comment:8
I generally agree with David's points. This code will be very useful for a topic begin done at SD23 (solving conics over various fields) so I am keen to get this in (suitably modified). In generalized_legendre_symbol: (1) test P for primality first, before trying to construct its residue field. (2) instead of K(2).valuation(P) just test that n is odd. (3) don't raise run-time errors, make them ValueErrors?. (4) make the return types consistent: you return either +1 in k or -1 as a python int. I would return a Sage integer in either case. (5) you do not test if P divides self. If so, return 0 (as a Sage integer)> Why are generalized_hilbert_symbol and _legendre_symbol in sage/rings/arith.py? I would put them both in number_fields -- where you put the even one in fact. In generalized_even_hilbert_symbol you define but do not use iprime, so delete it. And do the simple calculation to get the coefficients of jprime**2 so you don't need to construct the quaternion algebra. (You can leave in a comment about that). _voight_alg_6_2 has some ^ symbols which should be **. Check for others. Do what David said about uniformizer -- just call the existing function. Sort out the solve function. |
comment:9
Great, I could use this. While you are still at it, I have a small wish list as well. Could you
|
comment:10
In addition to the first part of my precious comment: generalized_even_hilbert_symbol should accept a and b to both be divisible by p.
|
comment:11
Oops, the last two lines of my previous comment should of course read
|
This comment has been minimized.
This comment has been minimized.
comment:52
Replying to @mstreng:
Please do it!
It will be Python
I only moved |
comment:53
Replying to @mstreng:
I think this is a horrible bug. There is no embedding from L to K! A very generic |
comment:54
Replying to @JohnCremona:
I agree -- that's horrible! It's not so generic actually: the offending code is the method
This is mathematically meaningless unless either the other field is isomorphic to self, or x is actually in Q. I suggest we raise this on sage-nt, and maybe open a ticket to fix it ASAP. |
comment:55
Replying to @jdemeyer:
Python ints are fine with me, I was afraid it would be a pari object. I would have liked some uniformity, but that's missing already.
I want all symbols to behave nicely with division by Sage integers, but that's fine with
|
comment:56
Replying to @JohnCremona:
Is there a ticket for this yet? |
comment:57
Sage-nt thread here: http://groups.google.com/group/sage-nt/browse_thread/thread/9108218411e7f0a6 |
comment:58
Replying to @mstreng:
Just made one: #11869. |
comment:59
Replying to @jdemeyer:
I could, but I wouldn't be able to test it, and it may need to be rebased afterwards: I failed to install #11130. |
comment:60
Positive review for the reviewer patch. I noticed that it included extra -1 examples and removed the duplicate example, and I did not find removing examples worth the trouble. I also managed to build #11130 and found that all tests pass. I'm assuming Jeroen gives a positive review to what he didn't change, and that his reviewer patch was ready for review, so I'm setting the whole ticket to positive review. |
Changed work issues from add/remove some doctests to none |
Milestone sage-4.7.3 deleted |
Merged: sage-4.8.alpha1 |
PARI has Hilbert symbols for number fields. Hilbert symbols can be implemented by wrapping PARI's function
nfhilbert
.Apply attachment: trac_9334_nfhilbert.patch and attachment: 9334_review_jdemeyer.patch.
Depends on #11304
Depends on #11540
Depends on #11130
Upstream: Fixed upstream, in a later stable release.
CC: @mstreng @jdemeyer
Component: number fields
Keywords: hilbert symbol
Author: Aly Deines, Marco Streng, Jeroen Demeyer
Reviewer: David Loeffler, John Cremona, Marco Streng, Jeroen Demeyer
Merged: sage-4.8.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/9334
The text was updated successfully, but these errors were encountered: