@@ -56,9 +56,9 @@ class initialization directly.
56
56
from sage .schemes .affine .affine_subscheme import AlgebraicScheme_subscheme_affine
57
57
from sage .schemes .generic .morphism import SchemeMorphism_polynomial
58
58
from sage .structure .element import get_coercion_model
59
- from sage . symbolic . ring import is_SymbolicExpressionRing
60
- from sage .symbolic . ring import var
61
- from sage . symbolic . ring import SR
59
+
60
+ import sage .rings . abc
61
+
62
62
63
63
class DynamicalSystem_affine (SchemeMorphism_polynomial_affine_space ,
64
64
DynamicalSystem ):
@@ -275,7 +275,7 @@ def __classcall_private__(cls, morphism_or_polys, domain=None):
275
275
else :
276
276
polys = [PR (poly ) for poly in polys ]
277
277
if domain is None :
278
- if PR is SR :
278
+ if isinstance ( PR , sage . rings . abc . SymbolicRing ) :
279
279
raise TypeError ("Symbolic Ring cannot be the base ring" )
280
280
if fraction_field :
281
281
PR = PR .ring ()
@@ -292,7 +292,7 @@ def __classcall_private__(cls, morphism_or_polys, domain=None):
292
292
if len (polys ) != domain .ambient_space ().coordinate_ring ().ngens ():
293
293
raise ValueError ('Number of polys does not match dimension of {}' .format (domain ))
294
294
R = domain .base_ring ()
295
- if R is SR :
295
+ if isinstance ( R , sage . rings . abc . SymbolicRing ) :
296
296
raise TypeError ("Symbolic Ring cannot be the base ring" )
297
297
if not is_AffineSpace (domain ) and not isinstance (domain , AlgebraicScheme_subscheme_affine ):
298
298
raise ValueError ('"domain" must be an affine scheme' )
@@ -529,7 +529,8 @@ def dynatomic_polynomial(self, period):
529
529
F = G .dynatomic_polynomial (period )
530
530
T = G .domain ().coordinate_ring ()
531
531
S = self .domain ().coordinate_ring ()
532
- if is_SymbolicExpressionRing (F .parent ()):
532
+ if isinstance (F .parent (), sage .rings .abc .SymbolicRing ):
533
+ from sage .symbolic .ring import var
533
534
u = var (self .domain ().coordinate_ring ().variable_name ())
534
535
return F .subs ({F .variables ()[0 ]:u ,F .variables ()[1 ]:1 })
535
536
elif T (F .denominator ()).degree () == 0 :
0 commit comments