Skip to content
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

Elements of bounded T_2 norm in a ring of algebraic integers #209

Open
bottine opened this issue Mar 10, 2021 · 0 comments
Open

Elements of bounded T_2 norm in a ring of algebraic integers #209

bottine opened this issue Mar 10, 2021 · 0 comments

Comments

@bottine
Copy link

bottine commented Mar 10, 2021

Let K be a totally real number field, and O_K its ring of integers.
I need a function that gives me all element of O_K of T_2 norm in some interval.
@thofma told me how to get those, and here is what I think a correct method definition could be:

@doc Markdown.doc"""
    short_t2_elems(O::NfAbsOrd, lb, ub) -> Vector{NfAbsOrdElem}

Return all non-zero elements $x$ in $O$ with $lb \leq T_2(x) \leq ub$, up to sign, 
under the assumption that $nf(O)$ is totally real.
"""
function short_t2_elems(O::NfAbsOrd, lb, ub)
  @assert istotally_real(nf(O))

  trace = trace_matrix(O)
  basis = basis(O)
  return [O(dot(basis,v)) for (v,t) in short_vectors(Zlattice(gram = trace), lb, ub)]
end

I'd be thankful if this (or a suitably corrected version) could be included in Hecke!
I can also turn this into a PR if that's better.

Edit: I'm not sure of the exact semantic of short_vectors regarding bounds (whether they are strict or not) but some simple tests seem to show that both are. I had missed the fact that vectors are only enumerated up to sign, and it seems that 0 does not appear, even when letting lb=0: I don't know if that's expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant