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

Commit

Permalink
ensure correct base rings (for real this time); cf. ab4b4bf
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyx4 committed Aug 22, 2022
1 parent 9c7b344 commit 368a18e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/sage/schemes/elliptic_curves/hom_velusqrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,8 @@ def _compute_codomain(self, model=None):
From: Elliptic Curve defined by y^2 + 3*t*x*y + (3*t+2)*y = x^3 + (2*t+4)*x^2 + (t+4)*x + 3*t over Finite Field in t of size 5^2
To: Elliptic Curve defined by y^2 = x^3 + (4*t+3)*x + 2 over Finite Field in t of size 5^2
"""
poly = self._raw_domain.two_division_polynomial().monic()
R, Z = poly.parent().objgen()
R, Z = self._base_ring['Z'].objgen()
poly = self._raw_domain.two_division_polynomial().monic()(Z)

f = 1
for g,_ in poly.factor():
Expand All @@ -1038,10 +1038,9 @@ def _compute_codomain(self, model=None):
K, X0 = self._base_ring.extension(g,'T').objgen()
imX0 = self._raw_eval(X0)
try:
imX0 = imX0.polynomial()(Z) # K is a FiniteField
imX0 = imX0.polynomial() # K is a FiniteField
except AttributeError:
imX0 = imX0.lift() # K is a PolynomialQuotientRing
imX0 = imX0.change_ring(R.base_ring())
V = R['V'].gen()
f *= (Z - imX0(V)).resultant(g(V))

Expand Down

0 comments on commit 368a18e

Please sign in to comment.