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
reduction map modulo a number field prime ideal still not 100% done #1951
Comments
Attachment: 1951-residues.patch.gz |
comment:1
The patch fixes this, so that any element which is P-integral can be reduced modulo P (non-P-integral elements will raise a ZeroDivisionError with an explanation). It took a long time to find out where to put the new code, since the structure of the residue fields and reduction maps code is so byzantine! In the end the solution was not hard, though I used a different method from what was suggested (see comments in the patch). The new code is in sage.rings.residue_field.pyx; I also put a doctest into number_field.number_field_ideal.py. By the way, it is not really necessary to use recursion since when the function calls itself it always bottoms out right away. So it would be easy to rewrite it without any; I just found it easier to write |
Changed keywords from none to number field residue field reduction |
Attachment: 1951-residues-1.patch.gz |
comment:2
It's a small thing but I just noticed that the number field function residue_field() has this definition:
where the "check" parameter claims to control whether "prime" really is prime, but this is ignored. It should be passed down through the call to Example:
The second patch fixes this. Note that the default was "check=False", while the called function ResidueField() has its default as "check=True". I thought it safer to change the deafult to "check=True" since this makes the new default behaviour like the old behaviour. (If you use check=False and the ideal is not prime, the first error which arises is a bit obscure:
since smallest_integer() is defined only for prime ideals. But something has to go wrong at some point in this situation, and at least now it will only happen when the user has deliberately turned off checking. |
comment:3
Looks good, applies cleanly against 3.1.2, and passes relevant doctests (checked sage/rings, sage/schemes, and sage/modular). |
comment:4
Merged in Sage 3.1.3.alpha1 |
This should work:
The problem is that a in terms of a basis for the maximal order still has
some 5's in the denominator, even though a is P[0]-integral. To fix this
in general, one could:
Find an element b of the ring of integers that is 1 modulo P[0] and is 0 modulo all the other P[i] (using the not-implemented-right now CRT),
Multiply a through by some power of b.
Reduce.
Divide back through by the reduction of b.
Component: number theory
Keywords: number field residue field reduction
Issue created by migration from https://trac.sagemath.org/ticket/1951
The text was updated successfully, but these errors were encountered: