You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
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 lettinglb=0
: I don't know if that's expected.The text was updated successfully, but these errors were encountered: