Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to use lift_x in python?

I am trying to use sage library in python3, but I have the following problem when I try to find points with given x-coordinate:

>>> from sage.all import *
>>> E = EllipticCurve('37a'); E
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
>>> E.lift_x(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/sage/schemes/elliptic_curves/ell_generic.py", line 847, in lift_x
    L = x.parent()
        ^^^^^^^^
AttributeError: 'int' object has no attribute 'parent'

How to use lift_x in python?

I am trying to use sage library in python3, but I have the following problem when I try to find points with given x-coordinate:

>>> from sage.all import *
>>> E = EllipticCurve('37a'); E
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
>>> E.lift_x(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/sage/schemes/elliptic_curves/ell_generic.py", line 847, in lift_x
    L = x.parent()
        ^^^^^^^^
AttributeError: 'int' object has no attribute 'parent'

Solution: As John Plameri pointed out, you need to use Integer(1) instead of 1.

How to use lift_x in python?

I am trying to use sage library in python3, but I have the following problem when I try to find points with given x-coordinate:

>>> from sage.all import *
>>> E = EllipticCurve('37a'); E
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
>>> E.lift_x(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/sage/schemes/elliptic_curves/ell_generic.py", line 847, in lift_x
    L = x.parent()
        ^^^^^^^^
AttributeError: 'int' object has no attribute 'parent'

Solution: As John Plameri Plameri pointed out, you need to use Integer(1) instead of 1.

How to use lift_x in python?

I am trying to use sage library in python3, but I have the following problem when I try to find points with given x-coordinate:

>>> from sage.all import *
>>> E = EllipticCurve('37a'); E
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
>>> E.lift_x(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/sage/schemes/elliptic_curves/ell_generic.py", line 847, in lift_x
    L = x.parent()
        ^^^^^^^^
AttributeError: 'int' object has no attribute 'parent'

Solution: As John Plameri pointed out, you need to use Integer(1) instead of 1.. I could also have done something like: E.lift_x(E.base_field()(1))

How to use lift_x in python?

I am trying to use sage library in python3, but I have the following problem when I try to find points with given x-coordinate:

>>> from sage.all import *
>>> E = EllipticCurve('37a'); E
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
>>> E.lift_x(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/sage/schemes/elliptic_curves/ell_generic.py", line 847, in lift_x
    L = x.parent()
        ^^^^^^^^
AttributeError: 'int' object has no attribute 'parent'

Solution: Solutions:

  1. As John Plameri pointed out, you need to use Integer(1) instead of 1. .
  2. I could also have done something like: E.lift_x(E.base_field()(1))

How to use lift_x in python?

I am trying to use sage library in python3, but I have the following problem when I try to find points with given x-coordinate:

>>> from sage.all import *
>>> E = EllipticCurve('37a'); E
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
>>> E.lift_x(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/sage/schemes/elliptic_curves/ell_generic.py", line 847, in lift_x
    L = x.parent()
        ^^^^^^^^
AttributeError: 'int' object has no attribute 'parent'

Solutions:

  1. As John Plameri pointed out, you need can to use Integer(1) instead of 1.
  2. I could also have done something like: E.lift_x(E.base_field()(1))

How to use lift_x in python?

I am trying to use sage library in python3, but I have the following problem when I try to find points with given x-coordinate:

>>> from sage.all import *
>>> E = EllipticCurve('37a'); E
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
>>> E.lift_x(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/sage/schemes/elliptic_curves/ell_generic.py", line 847, in lift_x
    L = x.parent()
        ^^^^^^^^
AttributeError: 'int' object has no attribute 'parent'

Solutions:

  1. As John Plameri pointed out, you can to use Integer(1) instead of 1.
  2. I could also have done something like: E.lift_x(E.base_field()(1))