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

Decoupled computation of height so it can be called for ambient spaces #1187

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions src/EllCrv/Heights.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,17 @@
################################################################################

export local_height, canonical_height, naive_height, height_pairing,
regulator, neron_tate_height, CPS_dvev_real, CPS_dvev_complex, CPS_non_archimedean, CPS_height_bounds, derivative, refine_alpha_bound
regulator, neron_tate_height, CPS_dvev_real, CPS_dvev_complex, CPS_non_archimedean,
CPS_height_bounds, derivative, refine_alpha_bound

################################################################################
#
# Naive Height
#
################################################################################

@doc raw"""
naive_height(P::EllCrvPt{QQFieldElem}, prec) -> arb

Return the naive height of a point $P$ on an elliptic curve defined over
$\mathbb{Q}$.
"""
function naive_height(P::EllCrvPt{QQFieldElem}, prec::Int = 100)
function naive_height_coordinate(x::QQFieldElem, prec::Int = 100)
attempt = 1
x = P[1]
p = numerator(x)
q = denominator(x)
r = max(abs(p), abs(q))
Expand All @@ -69,18 +63,21 @@ function naive_height(P::EllCrvPt{QQFieldElem}, prec::Int = 100)
end

@doc raw"""
naive_height(P::EllCrvPt{nf_elem}, prec) -> arb
naive_height(P::EllCrvPt{QQFieldElem}, prec) -> arb

Return the naive height of a point $P$ on an elliptic curve defined over
a number field.
$\mathbb{Q}$.
"""
function naive_height(P::EllCrvPt{nf_elem}, prec::Int = 100)
function naive_height(P::EllCrvPt{QQFieldElem}, prec::Int = 100)
return naive_height_coordinate(P[1], prec)
end

function naive_height_coordinate(x::nf_elem, prec::Int = 100)
attempt = 1

K = base_field(parent(P))
K = parent(x)
OK = ring_of_integers(K)

x = P[1]
q = K(denominator(x))

N = norm(ideal(OK, x) + 1*OK)
Expand Down Expand Up @@ -115,6 +112,17 @@ function naive_height(P::EllCrvPt{nf_elem}, prec::Int = 100)
end
end

@doc raw"""
naive_height(P::EllCrvPt{nf_elem}, prec) -> arb

Return the naive height of a point $P$ on an elliptic curve defined over
a number field.
"""
function naive_height(P::EllCrvPt{nf_elem}, prec::Int = 100)
return naive_height_coordinate(P[1], prec)
end


################################################################################
#
# Local Height at finite prime
Expand Down
Loading