Opened 4 years ago

Closed 4 years ago

# EllipticCurve(..., j=...) shouldn't ignore field argument if given.

Reported by: Owned by: was cremona major sage-4.3.1 elliptic curves sage-4.3.1.rc1 John Cremona Chris Wuthrich N/A

### Description

```I found the following to be rather unexpected:

EllipticCurve(GF(144169),j=1728)
Elliptic Curve defined by y^2 = x^3 - x over Rational Field

- Victor Miller

[I understand that 1728 is considered an Integer, yet the first
argument seems to be ignored]
```

### comment:1 Changed 4 years ago by cremona

Easy to fix: where EllipticCurve? calls EllipticCurve_from_j(j) it should in fact coerce j into the parent of x (if x is not none).

### comment:2 Changed 4 years ago by wuthrich

This issue only appears in the deprecated function EllipticCurve(..,j=..). The right function to call here is EllipticCurve_from_j(GF(144169)(1728)).

My proposal for a change is to finally eliminate the deprecated function.

### comment:3 Changed 4 years ago by wuthrich

• Component changed from number theory to elliptic curves
• Owner changed from was to cremona
• Report Upstream set to N/A

### comment:4 Changed 4 years ago by cremona

Chris,

You are not quite right. What is deprecated is EllipticCurve?(j0), not EllipticCurve?(j=j0):

```sage: EllipticCurve(GF(101)(1728))
/home/john/sage-4.3.1.alpha1/local/bin/sage-ipython:1: DeprecationWarning: 'EllipticCurve(j)' is deprecated; use 'EllipticCurve_from_j(j)' or 'EllipticCurve(j=j)' instead.
#!/usr/bin/env python
Elliptic Curve defined by y^2 = x^3 + x over Finite Field of size 101
sage: EllipticCurve(j=GF(101)(1728))
Elliptic Curve defined by y^2 = x^3 + x over Finite Field of size 101
```

Now I cannot remember when that deprecation was put in, hence when it should be removed.

Anyway, Victor's point is a valid one, and I'll put up a patch!

### Changed 4 years ago by cremona

Applies to 4.3.1.alpha1

### comment:5 Changed 4 years ago by cremona

• Authors set to John Cremona
• Status changed from new to needs_review

The attached patch sorts this out, with appropriate tests.

### comment:6 Changed 4 years ago by wuthrich

• Reviewers set to Chris Wuthrich
• Status changed from needs_review to positive_review

Yes, that is fine. Thanks John.

Chris.

### comment:7 Changed 4 years ago by rlm

• Merged in set to sage-4.3.1.rc1
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.