180180
181181from sage .structure .unique_representation import UniqueRepresentation
182182from sage .categories .integral_domains import IntegralDomains
183- from sage .rings . ring import IntegralDomain
183+ from sage .structure . parent import Parent
184184from sage .structure .element import IntegralDomainElement
185185
186186
@@ -193,7 +193,7 @@ def normalize_extra_units(base_ring, add_units, warning=True):
193193
194194 INPUT:
195195
196- - ``base_ring`` -- an instance of :class:`IntegralDomain `
196+ - ``base_ring`` -- a ring in the category of :class:`IntegralDomains `
197197 - ``add_units`` -- list of elements from base ring
198198 - ``warning`` -- boolean (default: ``True``); to suppress a warning which
199199 is thrown if no normalization was possible
@@ -561,7 +561,7 @@ def _integer_(self, Z=None):
561561 return self ._value ._integer_ (Z = Z )
562562
563563
564- class Localization (IntegralDomain , UniqueRepresentation ):
564+ class Localization (Parent , UniqueRepresentation ):
565565 r"""
566566 The localization generalizes the construction of the field of fractions of
567567 an integral domain to an arbitrary ring. Given a (not necessarily
@@ -580,21 +580,18 @@ class Localization(IntegralDomain, UniqueRepresentation):
580580 this class relies on the construction of the field of fraction and is
581581 therefore restricted to integral domains.
582582
583- Accordingly, this class is inherited from :class:`IntegralDomain` and can
584- only be used in that context. Furthermore, the base ring should support
583+ Accordingly, the base ring must be in the category of ``IntegralDomains``.
584+ Furthermore, the base ring should support
585585 :meth:`sage.structure.element.CommutativeRingElement.divides` and the exact
586586 division operator ``//`` (:meth:`sage.structure.element.Element.__floordiv__`)
587587 in order to guarantee a successful application.
588588
589589 INPUT:
590590
591- - ``base_ring`` -- an instance of :class:`Ring` allowing the construction
592- of :meth:`fraction_field` (that is an integral domain)
591+ - ``base_ring`` -- a ring in the category of ``IntegralDomains``
593592 - ``extra_units`` -- tuple of elements of ``base_ring`` which should be
594593 turned into units
595- - ``names`` -- passed to :class:`IntegralDomain`
596- - ``normalize`` -- boolean (default: ``True``); passed to :class:`IntegralDomain`
597- - ``category`` -- (default: ``None``) passed to :class:`IntegralDomain`
594+ - ``category`` -- (default: ``None``) passed to :class:`Parent`
598595 - ``warning`` -- boolean (default: ``True``); to suppress a warning which
599596 is thrown if ``self`` cannot be represented uniquely
600597
@@ -712,7 +709,7 @@ def __init__(self, base_ring, extra_units, names=None, normalize=True, category=
712709 # since by construction the base ring must contain non units self must be infinite
713710 category = IntegralDomains ().Infinite ()
714711
715- IntegralDomain .__init__ (self , base_ring , names = names , normalize = normalize , category = category )
712+ Parent .__init__ (self , base = base_ring , names = names , normalize = normalize , category = category )
716713 self ._extra_units = tuple (extra_units )
717714 self ._fraction_field = base_ring .fraction_field ()
718715 self ._populate_coercion_lists_ ()
0 commit comments