@@ -117,12 +117,12 @@ from sage.cpython.getattr import dir_with_other_class
117117from sage.misc.latex import latex, latex_variable_name
118118
119119from sage.structure.factory import UniqueFactory
120+ from sage.structure.parent cimport Parent
120121from sage.structure.element cimport Element
121122from sage.structure.category_object import normalize_names
122123from sage.categories.map cimport Map
123124from sage.categories.commutative_rings import CommutativeRings
124125from sage.categories.fields import Fields
125- from sage.rings.ring cimport CommutativeRing
126126from sage.rings.integer_ring import ZZ
127127from sage.rings.infinity import Infinity
128128
@@ -497,7 +497,7 @@ RingExtension = RingExtensionFactory("sage.rings.ring_extension.RingExtension")
497497# General extensions
498498# ###################
499499
500- cdef class RingExtension_generic(CommutativeRing ):
500+ cdef class RingExtension_generic(Parent ):
501501 r """
502502 A generic class for all ring extensions.
503503
@@ -564,8 +564,8 @@ cdef class RingExtension_generic(CommutativeRing):
564564 ...
565565 ValueError: exotic defining morphism between two rings in the tower; consider using another variable name
566566 """
567- cdef CommutativeRing base, ring
568- cdef CommutativeRing b, backend
567+ cdef Parent base, ring
568+ cdef Parent b, backend
569569 cdef Map f
570570
571571 base = defining_morphism.domain()
@@ -575,7 +575,7 @@ cdef class RingExtension_generic(CommutativeRing):
575575 # but CommutativeRings() seems safer, especially when dealing with
576576 # morphisms which do not need to preserve the base
577577 category = CommutativeRings()
578- CommutativeRing .__init__ (self , ZZ, category = category)
578+ Parent .__init__ (self , ZZ, category = category)
579579 self ._base = base
580580 self ._backend = ring
581581 self ._backend_defining_morphism = defining_morphism
@@ -1197,14 +1197,14 @@ cdef class RingExtension_generic(CommutativeRing):
11971197
11981198 :meth:`base`, :meth:`bases`, :meth:`absolute_base`
11991199 """
1200- cdef CommutativeRing b
1200+ cdef Parent b
12011201 b = self
12021202 while isinstance (b, RingExtension_generic):
12031203 if b is base or (< RingExtension_generic> b)._backend is base: return True
12041204 b = (< RingExtension_generic> b)._base
12051205 return b is base
12061206
1207- cpdef CommutativeRing _check_base(self , CommutativeRing base):
1207+ cpdef Parent _check_base(self , Parent base):
12081208 r """
12091209 Check if ``base`` is one of the successive bases of this
12101210 extension and, if it is, normalize it.
@@ -1243,7 +1243,7 @@ cdef class RingExtension_generic(CommutativeRing):
12431243 sage: L. _check_base( None) is L. base( ) # needs sage. rings. finite_rings
12441244 True
12451245 """
1246- cdef CommutativeRing b
1246+ cdef Parent b
12471247 if base is None :
12481248 return self ._base
12491249 b = self
@@ -1450,7 +1450,7 @@ cdef class RingExtension_generic(CommutativeRing):
14501450 base = self ._check_base(base)
14511451 return self ._degree_over(base)
14521452
1453- cpdef _degree_over(self , CommutativeRing base):
1453+ cpdef _degree_over(self , Parent base):
14541454 r """
14551455 Return the degree of this extension over ``base``.
14561456
@@ -1572,7 +1572,7 @@ cdef class RingExtension_generic(CommutativeRing):
15721572 sage: L. is_finite_over( ) # needs sage. rings. finite_rings
15731573 True
15741574 """
1575- cdef CommutativeRing b
1575+ cdef Parent b
15761576 base = self ._check_base(base)
15771577 if base is self :
15781578 return True
@@ -1590,7 +1590,7 @@ cdef class RingExtension_generic(CommutativeRing):
15901590 b = (< RingExtension_generic?> b)._base
15911591 raise NotImplementedError
15921592
1593- cpdef _is_finite_over(self , CommutativeRing base):
1593+ cpdef _is_finite_over(self , Parent base):
15941594 r """
15951595 Return whether or not this extension is finite over ``base``.
15961596
@@ -1635,7 +1635,7 @@ cdef class RingExtension_generic(CommutativeRing):
16351635 sage: L. is_free_over( ) # needs sage. rings. finite_rings
16361636 True
16371637 """
1638- cdef CommutativeRing b
1638+ cdef Parent b
16391639 base = self ._check_base(base)
16401640 if base is self or base.is_field():
16411641 return True
@@ -1653,7 +1653,7 @@ cdef class RingExtension_generic(CommutativeRing):
16531653 b = (< RingExtension_generic?> b)._base
16541654 raise NotImplementedError
16551655
1656- cpdef _is_free_over(self , CommutativeRing base):
1656+ cpdef _is_free_over(self , Parent base):
16571657 r """
16581658 Return whether or not this extension is finite over ``base``.
16591659
@@ -2191,7 +2191,7 @@ cdef class RingExtensionWithBasis(RingExtension_generic):
21912191 b = b.base_ring()
21922192 return base
21932193
2194- cpdef _degree_over(self , CommutativeRing base):
2194+ cpdef _degree_over(self , Parent base):
21952195 r """
21962196 Return the degree of this extension over ``base``.
21972197
@@ -2218,7 +2218,7 @@ cdef class RingExtensionWithBasis(RingExtension_generic):
22182218 else :
22192219 return len (self ._basis) * self ._base._degree_over(base)
22202220
2221- cpdef _is_finite_over(self , CommutativeRing base):
2221+ cpdef _is_finite_over(self , Parent base):
22222222 r """
22232223 Return whether or not this extension is finite over ``base``.
22242224
@@ -2237,7 +2237,7 @@ cdef class RingExtensionWithBasis(RingExtension_generic):
22372237 return True
22382238 return self ._base._is_finite_over(base)
22392239
2240- cpdef _is_free_over(self , CommutativeRing base):
2240+ cpdef _is_free_over(self , Parent base):
22412241 r """
22422242 Return whether or not this extension is free over ``base``.
22432243
@@ -2298,7 +2298,7 @@ cdef class RingExtensionWithBasis(RingExtension_generic):
22982298 base = self ._check_base(base)
22992299 return self ._basis_over(base)
23002300
2301- cpdef _basis_over(self , CommutativeRing base):
2301+ cpdef _basis_over(self , Parent base):
23022302 r """
23032303 Return a basis of this extension over ``base``.
23042304
@@ -2588,7 +2588,6 @@ cdef class RingExtensionWithGen(RingExtensionWithBasis):
25882588 RingExtensionWithBasis.__init__ (self , defining_morphism, basis, basis_names, check, ** kwargs)
25892589 self ._gen = self ._backend(gen)
25902590 self ._names = (self ._name,)
2591- self ._latex_names = (latex_variable_name(self ._name),)
25922591 self ._basis_latex_names = basis_latex_names
25932592
25942593 def _repr_topring (self , **options ):
0 commit comments