-
Notifications
You must be signed in to change notification settings - Fork 67
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
simplify(..., canonical=true) gives noncanonical answer #1308
Comments
The polynomials g and h are totally real with the same T2-norm I don't know if there's any point in implementing this special case, but: For totally real fields the T2-norm is always an integer, so I suppose one doesn't need to work with floating point numbers in this case. In general, the T2-norm is at least always an algebraic integer. (How does Pari do it?) |
Kind of inefficient, but one could use interval arithmetic for comparisons and test whether two elements (The polynomial |
On Mon, Dec 04, 2023 at 06:01:14AM -0800, Fabian Gundlach wrote:
Kind of inefficient, but one could use interval arithmetic for comparisons and test whether two elements $\alpha,\beta\in\mathcal O_K$ have the same T2-norm by testing whether $p_\alpha(X) = p_\beta(X)$, where
$$p_\alpha(X) = \prod_{A_1,\dots,A_s,B}\left(X-2\cdot\sum_{i=1}^{s} \alpha^{(a_i)}\cdot\alpha^{(a_i')}-\sum_{u=1}^{n-2s} \left(\alpha^{(b_u)}\right)^2\right) \in \mathbb Z[X].$$
Here, $s$ is the number of pairs of complex embeddings and the product is over all ways to partition $[n]=A_1\sqcup\dots\sqcup A_s\sqcup B$ into sets $A_i = \{ a_i,a_i' \}$ of size $2$ and a set $B=\{b_1,\dots,b_{n-2s}\}$ modulo permutation of $A_1,\dots,A_s$.
(The polynomial $p_\alpha(X)$ has degree $\frac{n!}{2^s\cdot s!\cdot(n-2s)!}$.)
The issue is understood and mostly unrelated. Problem: find the shortest
primtive elements and sort the minpolys. Think of Q(zeta_n)(sqrt(alpha))
as a difficult case. I can make it totally real, but this is the hard
case.
Think alpha >> 0, then all "short" elements are in Q(zeta_n), hence not
primitive. You'll have to enumerate a huge number of elements before you
hit a primitive one. Therefor pari and we cheat. Since we know that (in
the product basis) sqrt(alpha) has to be involved somehow, we start the
enumeration at the 1st element that involves sqrt(alpha).
Unfortunately, in this example, we start with the 2nd element while the
first would have been the canonical one.
In general if alpha and beta have the same length, this is difficult to
verify. I do not have a good strategy and bound for that - and neither
has pari...
There is a possibility that the bound indeed is terrible.
(Here of course T_2(x) = trace(x^2) is in Z and exact, hence this
problem we don't have)
… --
Reply to this email directly or view it on GitHub:
#1308 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
Thanks for the explanation and the quick fix! |
According to the documentation, the function
simplify(..., canonical=true)
should produce a canonical defining polynomial of a given number field. However, it is not idempotent:outputs
The last polynomial is correct according to pari/gp:
Actually, the code has a comment that might be related:
Hecke.jl/src/NumField/NfAbs/Simplify.jl
Lines 451 to 468 in 07b4ccf
If these precision problems are hard to fix, maybe there should be a warning in the documentation?
(Sorry if this issue is already known...)
The text was updated successfully, but these errors were encountered: