@@ -199,6 +199,66 @@ class DynamicalSemigroup(Parent, metaclass=InheritComparisonClasscallMetaclass):
199
199
Defn: Defined on coordinates by sending (x) to
200
200
(x^2)
201
201
202
+ A dynamical semigroup may contain dynamical systems over function fields::
203
+
204
+ sage: R.<r> = QQ[]
205
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
206
+ sage: f = DynamicalSystem([r * x, y], P)
207
+ sage: g = DynamicalSystem([x, r * y], P)
208
+ sage: DynamicalSemigroup((f, g))
209
+ Dynamical semigroup over Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field defined by 2 dynamical systems:
210
+ Dynamical System of Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field
211
+ Defn: Defined on coordinates by sending (x : y) to
212
+ (r*x : y)
213
+ Dynamical System of Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field
214
+ Defn: Defined on coordinates by sending (x : y) to
215
+ (x : r*y)
216
+
217
+ ::
218
+
219
+ sage: R.<r> = QQ[]
220
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
221
+ sage: f = DynamicalSystem([r * x, y], P)
222
+ sage: g = DynamicalSystem([x, y], P)
223
+ sage: DynamicalSemigroup((f, g))
224
+ Dynamical semigroup over Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field defined by 2 dynamical systems:
225
+ Dynamical System of Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field
226
+ Defn: Defined on coordinates by sending (x : y) to
227
+ (r*x : y)
228
+ Dynamical System of Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field
229
+ Defn: Defined on coordinates by sending (x : y) to
230
+ (x : y)
231
+
232
+ ::
233
+
234
+ sage: R.<r,s> = QQ[]
235
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
236
+ sage: f = DynamicalSystem([r * x, y], P)
237
+ sage: g = DynamicalSystem([s * x, y], P)
238
+ sage: DynamicalSemigroup((f, g))
239
+ Dynamical semigroup over Projective Space of dimension 1 over Multivariate Polynomial Ring in r, s over Rational Field defined by 2 dynamical systems:
240
+ Dynamical System of Projective Space of dimension 1 over Multivariate Polynomial Ring in r, s over Rational Field
241
+ Defn: Defined on coordinates by sending (x : y) to
242
+ (r*x : y)
243
+ Dynamical System of Projective Space of dimension 1 over Multivariate Polynomial Ring in r, s over Rational Field
244
+ Defn: Defined on coordinates by sending (x : y) to
245
+ (s*x : y)
246
+
247
+ ::
248
+
249
+ sage: R.<r,s> = QQ[]
250
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
251
+ sage: f = DynamicalSystem([r * x, s * y], P)
252
+ sage: g = DynamicalSystem([s * x, r * y], P)
253
+ sage: DynamicalSemigroup((f, g))
254
+ Dynamical semigroup over Projective Space of dimension 1 over Multivariate Polynomial Ring in r, s over Rational Field defined by 2 dynamical systems:
255
+ Dynamical System of Projective Space of dimension 1 over Multivariate Polynomial Ring in r, s over Rational Field
256
+ Defn: Defined on coordinates by sending (x : y) to
257
+ (r*x : s*y)
258
+ Dynamical System of Projective Space of dimension 1 over Multivariate Polynomial Ring in r, s over Rational Field
259
+ Defn: Defined on coordinates by sending (x : y) to
260
+ (s*x : r*y)
261
+
202
262
A dynamical semigroup may contain dynamical systems over finite fields::
203
263
204
264
sage: F = FiniteField(5)
@@ -562,7 +622,205 @@ def nth_iterate(self, p, n):
562
622
result = next_iteration
563
623
return result
564
624
565
- def _mul_ (self , other_dynamical_semigroup ):
625
+ def orbit (self , p , n ):
626
+ r"""
627
+ If ``n`` is an integer, return `(p, f(p), f^2(p), \dots, f^n(p))`. If ``n`` is a list or tuple in interval
628
+ notation `[a, b]`, return `(f^a(p), \dots, f^b(p))`.
629
+
630
+ INPUT:
631
+
632
+ - `p` -- value on which this dynamical semigroup can be evaluated
633
+ - `n` -- a nonnegative integer or a list or tuple of length 2 describing an
634
+ interval of the number line containing entirely nonnegative integers
635
+
636
+ OUTPUT: a tuple of sets of values on the domain of this dynamical semigroup.
637
+
638
+ EXAMPLES::
639
+
640
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
641
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
642
+ sage: d.orbit(2, 0)
643
+ ({(2 : 1)},)
644
+
645
+ ::
646
+
647
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
648
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
649
+ sage: d.orbit(2, 1)
650
+ ({(2 : 1)}, {(2 : 1), (4 : 1)})
651
+
652
+ ::
653
+
654
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
655
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
656
+ sage: d.orbit(2, 2)
657
+ ({(2 : 1)}, {(2 : 1), (4 : 1)}, {(2 : 1), (4 : 1), (16 : 1)})
658
+
659
+ ::
660
+
661
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
662
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
663
+ sage: d.orbit(2, [1, 2])
664
+ ({(2 : 1), (4 : 1)}, {(2 : 1), (4 : 1), (16 : 1)})
665
+
666
+ TESTS::
667
+
668
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
669
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
670
+ sage: one = QQ(1)
671
+ sage: d.orbit(2, one)
672
+ ({(2 : 1)}, {(2 : 1), (4 : 1)})
673
+
674
+ ::
675
+
676
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
677
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
678
+ sage: d.orbit(2, -2)
679
+ Traceback (most recent call last):
680
+ ...
681
+ ValueError: -2 must be a nonnegative integer
682
+
683
+ ::
684
+
685
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
686
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
687
+ sage: d.orbit(2, x)
688
+ Traceback (most recent call last):
689
+ ...
690
+ TypeError: not a constant polynomial
691
+
692
+ ::
693
+
694
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
695
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
696
+ sage: d.orbit(2, [1, 2, 3])
697
+ Traceback (most recent call last):
698
+ ...
699
+ ValueError: [1, 2, 3] must be an integer or list or tuple of two integers
700
+
701
+ ::
702
+
703
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
704
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
705
+ sage: d.orbit(2, [-2, 1])
706
+ Traceback (most recent call last):
707
+ ...
708
+ ValueError: [-2, 1] must contain exactly two nonnegative integers
709
+
710
+ ::
711
+
712
+ sage: P.<x,y> = ProjectiveSpace(QQ, 1)
713
+ sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
714
+ sage: d.orbit(2, [2, 1])
715
+ Traceback (most recent call last):
716
+ ...
717
+ ValueError: [2, 1] cannot be in descending order
718
+ """
719
+
720
+ if not isinstance (n , Collection ):
721
+ n = ZZ (n )
722
+ if n < 0 :
723
+ raise ValueError (str (n ) + " must be a nonnegative integer" )
724
+ return self .orbit (p , [0 , n ])
725
+
726
+ if not len (n ) == 2 :
727
+ raise ValueError (str (n ) + " must be an integer or list or tuple of two integers" )
728
+ if ZZ (n [0 ]) < 0 or ZZ (n [1 ]) < 0 :
729
+ raise ValueError (str (n ) + " must contain exactly two nonnegative integers" )
730
+ if ZZ (n [0 ]) > ZZ (n [1 ]):
731
+ raise ValueError (str (n ) + " cannot be in descending order" )
732
+
733
+ result = []
734
+ current_iterate = self .nth_iterate (p , n [0 ])
735
+ result .append (current_iterate )
736
+ for i in range (n [0 ] + 1 , n [1 ] + 1 ):
737
+ next_iterate = set ()
738
+ for value in current_iterate :
739
+ next_iterate .update (self (value ))
740
+ result .append (next_iterate )
741
+ current_iterate = next_iterate
742
+ return tuple (result )
743
+
744
+ def specialization (self , assignments ):
745
+ r"""
746
+ Returns the specialization of the generators of this dynamical semigroup.
747
+
748
+ INPUT:
749
+
750
+ - `assignments` -- argument for specialization of the generators of this dynamical semigroup.
751
+
752
+ OUTPUT: a dynamical semigroup with the specialization of the generators of this dynamical semigroup.
753
+
754
+ EXAMPLES::
755
+
756
+ sage: R.<r> = QQ[]
757
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
758
+ sage: f = DynamicalSystem([r * x, y], P)
759
+ sage: g = DynamicalSystem([x, r * y], P)
760
+ sage: d = DynamicalSemigroup((f, g))
761
+ sage: d.specialization({r:2})
762
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field defined by 2 dynamical systems:
763
+ Dynamical System of Projective Space of dimension 1 over Rational Field
764
+ Defn: Defined on coordinates by sending (x : y) to
765
+ (2*x : y)
766
+ Dynamical System of Projective Space of dimension 1 over Rational Field
767
+ Defn: Defined on coordinates by sending (x : y) to
768
+ (x : 2*y)
769
+
770
+ ::
771
+
772
+ sage: R.<r> = QQ[]
773
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
774
+ sage: f = DynamicalSystem([r * x, y], P)
775
+ sage: g = DynamicalSystem([x, y], P)
776
+ sage: d = DynamicalSemigroup((f, g))
777
+ sage: d.specialization({r:2})
778
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field defined by 2 dynamical systems:
779
+ Dynamical System of Projective Space of dimension 1 over Rational Field
780
+ Defn: Defined on coordinates by sending (x : y) to
781
+ (2*x : y)
782
+ Dynamical System of Projective Space of dimension 1 over Rational Field
783
+ Defn: Defined on coordinates by sending (x : y) to
784
+ (x : y)
785
+
786
+ ::
787
+
788
+ sage: R.<r,s> = QQ[]
789
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
790
+ sage: f = DynamicalSystem([r * x, y], P)
791
+ sage: g = DynamicalSystem([s * x, y], P)
792
+ sage: d = DynamicalSemigroup((f, g))
793
+ sage: d.specialization({r:2, s:3})
794
+ Dynamical semigroup over Projective Space of dimension 1 over Rational Field defined by 2 dynamical systems:
795
+ Dynamical System of Projective Space of dimension 1 over Rational Field
796
+ Defn: Defined on coordinates by sending (x : y) to
797
+ (2*x : y)
798
+ Dynamical System of Projective Space of dimension 1 over Rational Field
799
+ Defn: Defined on coordinates by sending (x : y) to
800
+ (3*x : y)
801
+
802
+ ::
803
+
804
+ sage: R.<r,s> = QQ[]
805
+ sage: P.<x,y> = ProjectiveSpace(R, 1)
806
+ sage: f = DynamicalSystem([r * x, s * y], P)
807
+ sage: g = DynamicalSystem([s * x, r * y], P)
808
+ sage: d = DynamicalSemigroup((f, g))
809
+ sage: d.specialization({s:3})
810
+ Dynamical semigroup over Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field defined by 2 dynamical systems:
811
+ Dynamical System of Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field
812
+ Defn: Defined on coordinates by sending (x : y) to
813
+ (r*x : 3*y)
814
+ Dynamical System of Projective Space of dimension 1 over Univariate Polynomial Ring in r over Rational Field
815
+ Defn: Defined on coordinates by sending (x : y) to
816
+ (3*x : r*y)
817
+ """
818
+ specialized_systems = []
819
+ for ds in self .defining_systems ():
820
+ specialized_systems .append (ds .specialization (assignments ))
821
+ return DynamicalSemigroup (specialized_systems )
822
+
823
+ def __mul__ (self , other_dynamical_semigroup ):
566
824
r"""
567
825
Return a new :class:`DynamicalSemigroup` that is the result of multiplying
568
826
this dynamical semigroup with another dynamical semigroup of the same type
0 commit comments