Skip to content

Commit d2d1275

Browse files
allowed passing in one affine system into DynamicalSemigroup
1 parent aeb7cc3 commit d2d1275

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ class DynamicalSemigroup(Parent, metaclass=InheritComparisonClasscallMetaclass):
7171
Defn: Defined on coordinates by sending (x : y) to
7272
(x^2 : y^2)
7373
74+
::
75+
76+
sage: A.<x> = AffineSpace(QQ, 1)
77+
sage: f = DynamicalSystem_affine(x, A)
78+
sage: DynamicalSemigroup(f)
79+
Dynamical semigroup over Affine Space of dimension 1 over Rational Field defined by 1 dynamical system:
80+
Dynamical System of Affine Space of dimension 1 over Rational Field
81+
Defn: Defined on coordinates by sending (x) to
82+
(x)
83+
7484
::
7585
7686
sage: A.<x> = AffineSpace(QQ, 1)
@@ -268,6 +278,8 @@ def __classcall_private__(cls, ds_data):
268278
all_affine_systems = all(isinstance(ds_datum, DynamicalSystem_affine) for ds_datum in ds_data)
269279
if all_affine_systems:
270280
return DynamicalSemigroup_affine(ds_data)
281+
elif isinstance(ds_data, DynamicalSystem_affine):
282+
return DynamicalSemigroup_affine(ds_data)
271283
elif not isinstance(ds_data, DynamicalSystem):
272284
raise TypeError(str(ds_data) + " does not define a 'DynamicalSemigroup' object")
273285
return DynamicalSemigroup_projective(ds_data)

0 commit comments

Comments
 (0)