Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
#15114 minor fixes to elliptic_curves code and tests mixing RR with RIF
Browse files Browse the repository at this point in the history
  • Loading branch information
mezzarobba committed Jan 21, 2021
1 parent ee5fd27 commit ba66ce3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/heegner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6765,7 +6765,7 @@ def _adjust_heegner_index(self, a):
EXAMPLES::
sage: E = EllipticCurve('11a1')
sage: a = RIF(sqrt(2))-1.4142135623730951
sage: a = RIF(sqrt(2))-RIF(1.4142135623730951)
sage: E._adjust_heegner_index(a)
1.?e-8
"""
Expand Down
3 changes: 2 additions & 1 deletion src/sage/schemes/elliptic_curves/height.py
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ def complex_intersection_is_empty(self, Bk, v, verbose=False, use_half=True):
break
else:
z = CIF(intersection.innermost_point())
if all(wp((k+1)*z) < B for k, B in enumerate(bounds)):
if all(wp((k+1)*z).upper() < B for k, B in enumerate(bounds)):
return False

# Now try to prove a positive result.
Expand All @@ -1719,6 +1719,7 @@ def complex_intersection_is_empty(self, Bk, v, verbose=False, use_half=True):
for B, n in sorted(zip(bounds, ZZ.range(1, k+1))):

T = PeriodicRegion(CDF(1), CDF(tau), vals < B, full=not use_half).expand().refine()
B = RIF(B)
leaning_right = tau.real() / tau.imag() >= 0
def check_line(z):
wpz = wp(z)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/period_lattice_region.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ cdef class PeriodicRegion:
sage: S = PeriodicRegion(CDF(1), CDF(I), data)
sage: S.border()
[(1, 1, 0), (2, 1, 0), (1, 1, 1), (1, 2, 1)]
sage: condition = lambda z: z.real().abs()<0.5
sage: condition = lambda z: z.real().abs()<1/2
sage: S.verify(condition)
False
sage: condition = lambda z: z.real().abs()<1
Expand Down
4 changes: 2 additions & 2 deletions src/sage/schemes/elliptic_curves/sha_tate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ def bound_kolyvagin(self, D=0, regulator=None,
hZ = regulator/2
else:
hZ = F.regulator(use_database=True)/2
I = RIF(alpha) * RIF(LE1-err_E, LE1+err_E) * RIF(LF1-err_F, LF1+err_F) / hZ
I = RIF(alpha) * RIF(LE1-err_E, LE1+err_E) * RIF(LF1-err_F, LF1+err_F) / RIF(hZ)

else: # E has odd rank

Expand All @@ -1037,7 +1037,7 @@ def bound_kolyvagin(self, D=0, regulator=None,
err_E = max(err_E, MIN_ERR)
# I = alpha * LE1 * LF1 / hZ

I = RIF(alpha) * RIF(LE1-err_E, LE1+err_E) * RIF(LF1-err_F, LF1+err_F) / hZ
I = RIF(alpha) * RIF(LE1-err_E, LE1+err_E) * RIF(LF1-err_F, LF1+err_F) / RIF(hZ)

verbose('interval = %s' % I)
t, n = I.is_int()
Expand Down

0 comments on commit ba66ce3

Please sign in to comment.