Opened 12 years ago

Closed 12 years ago

global_minimal_model function is sometimes wrong over number fields, when input model isn't integral.

Reported by: Owned by: William Stein John Cremona critical sage-4.7.1 elliptic curves sage-4.7.1.alpha2 William Stein John Cremona N/A

The discriminant and conductor of a global minimal model must be divisible by the same primes. However the following code (extracted from examples computed by Joanna Gaski), illustrates the Sage `global_minimal_model` function producing a model that can't possibly be a global minimal model (since the conductor and discriminant are divisible by different primes).

```sage: K.<g> = NumberField(x^2 - x - 1)
sage: E = EllipticCurve(K,[0,0,0,-1/48,161/864]).global_minimal_model(); E
Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + 12 over Number Field in g with defining polynomial x^2 - x - 1
sage: E.conductor().factor()
(Fractional ideal (3)) * (Fractional ideal (-2*g + 1))
sage: E.discriminant().factor()
(-1) * 2^12 * 3 * (-2*g + 1)^2
```

Again, the bug is that the global_minimal_model function is assuming that its input is integral, and the fix is easy, probably.

```sage: E = EllipticCurve(K,[0,0,0,-1/48,161/864]).integral_model().global_minimal_model(); E
Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 over Number Field in g with defining polynomial x^2 - x - 1
sage: E.conductor().factor()
(Fractional ideal (3)) * (Fractional ideal (-2*g + 1))
sage: E.discriminant().factor()
(-1) * 3 * (-2*g + 1)^2
```

Yes, inspecting the source code shows a *typo* related to this, i.e., somebody defines E to be a global integral model, then forgets to actually use E!

comment:1 Changed 12 years ago by William Stein

Description: modified (diff)

comment:2 Changed 12 years ago by William Stein

Description: modified (diff)

comment:3 Changed 12 years ago by William Stein

Status: new → needs_review

comment:4 Changed 12 years ago by John Cremona

Patch looks good to me -- the typo could well have been mine...

Testing now.

comment:5 Changed 12 years ago by John Cremona

Authors: → William Stein → John Cremona needs_review → positive_review

Applies fine to 4.7.rc1, tests pass.

comment:6 Changed 12 years ago by John Cremona

See the comment (#4) at #11346.

comment:7 Changed 12 years ago by Jeroen Demeyer

Merged in: → sage-4.7.1.alpha2 → fixed positive_review → closed
Note: See TracTickets for help on using tickets.