Opened 13 years ago

Closed 13 years ago

# Implementing number fields defined by non-monic polynomials

Reported by: Owned by: mabshoff was major sage-duplicate/invalid/wontfix number theory

### Description

Implementing non-monic number fields would be hard, but not if the leading coefficient is a unit :)

```sage: NumberField(x^2 - 2, 'a')
Number Field in a with defining polynomial x^2 - 2
sage: NumberField(-x^2 - 2, 'a')
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call
last)
/Users/ncalexan/Devel/Squeak-3.10-1/platforms/unix/bld/<ipython
console> in <module>()
/Users/ncalexan/sage-3.0.6/local/lib/python2.5/site-packages/sage/
rings/number_field/number_field.py in NumberField(polynomial, name,
check, names, cache)
288
289     if polynomial.degree() == 2:
--> 290         K = NumberField_quadratic(polynomial, name, check)
291     else:
292         K = NumberField_absolute(polynomial, name, None, check)
/Users/ncalexan/sage-3.0.6/local/lib/python2.5/site-packages/sage/
rings/number_field/number_field.py in __init__(self, polynomial, name,
check)
6001             Number Field in a with defining polynomial x^2 - 4
6002         """
-> 6003         NumberField_absolute.__init__(self, polynomial,
name=name, check=check)
6004         self._element_class =
6005         c, b, a = [rational.Rational(t) for t in
self.defining_polynomial().list()]
/Users/ncalexan/sage-3.0.6/local/lib/python2.5/site-packages/sage/
rings/number_field/number_field.py in __init__(self, polynomial, name,
latex_name, check)
3272
3273     def __init__(self, polynomial, name, latex_name=None,
check=True):
-> 3274         NumberField_generic.__init__(self, polynomial, name,
latex_name, check)
3275         self._element_class =
number_field_element.NumberFieldElement_absolute
3276
/Users/ncalexan/sage-3.0.6/local/lib/python2.5/site-packages/sage/
rings/number_field/number_field.py in __init__(self, polynomial, name,
latex_name, check)
668                 raise TypeError, "polynomial must be defined
over rational field"
669             if not polynomial.is_monic():
--> 670                 raise NotImplementedError, "number fields for
non-monic polynomials not yet implemented."
671             if not polynomial.is_irreducible():
672                 raise ValueError, "defining polynomial (%s)
must be irreducible"%polynomial
NotImplementedError: number fields for non-monic polynomials not yet
implemented.
```

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

• Summary changed from Implementing non-monic number fields to Implementing number fields defined by non-monic polynomials

It's not clear to me exactly what Nick means: defining polys in Z[x] with leading coefficient -1, or something more general over Q, or also relative number fields.

### comment:2 Changed 13 years ago by cremona

This ticket seems to be a duplicate of #252. So I think this one can be deleted.

### comment:3 Changed 13 years ago by mabshoff

• Resolution set to fixed
• Status changed from new to closed

As John pointed out this is a dupe of #252, so close this ticket.

Cheers,

Michael

### comment:4 Changed 13 years ago by mabshoff

• Resolution fixed deleted
• Status changed from closed to reopened

### comment:5 Changed 13 years ago by mabshoff

• Milestone changed from sage-3.1.2 to sage-duplicate/invalid
• Resolution set to duplicate
• Status changed from reopened to closed
Note: See TracTickets for help on using tickets.