@@ -689,6 +689,8 @@ def orbit(self, p, n):
689
689
...
690
690
TypeError: not a constant polynomial
691
691
692
+ ::
693
+
692
694
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
693
695
sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
694
696
sage: d.orbit(2, [1, 2, 3])
@@ -714,18 +716,6 @@ def orbit(self, p, n):
714
716
...
715
717
ValueError: [2, 1] cannot be in descending order
716
718
"""
717
- # if isinstance(n, Integer) or isinstance(n, int):
718
- # if n < 0:
719
- # raise ValueError(str(n) + " must be a nonnegative integer")
720
- # return self.orbit(p, [0, n])
721
- # if not isinstance(n, Collection):
722
- # raise TypeError(str(n) + " must be an integer or list or tuple of two integers")
723
- # if not len(n) == 2:
724
- # raise ValueError(str(n) + " must be an integer or list or tuple of two integers")
725
- # if n[0] < 0 or n[1] < 0:
726
- # raise ValueError(str(n) + " must contain exactly two nonnegative integers")
727
- # if n[0] > n[1]:
728
- # raise ValueError(str(n) + " cannot be in descending order")
729
719
730
720
if not isinstance (n , Collection ):
731
721
n = ZZ (n )
@@ -735,9 +725,9 @@ def orbit(self, p, n):
735
725
736
726
if not len (n ) == 2 :
737
727
raise ValueError (str (n ) + " must be an integer or list or tuple of two integers" )
738
- if n [0 ] < 0 or n [1 ] < 0 :
728
+ if ZZ ( n [0 ]) < 0 or ZZ ( n [1 ]) < 0 :
739
729
raise ValueError (str (n ) + " must contain exactly two nonnegative integers" )
740
- if n [0 ] > n [1 ]:
730
+ if ZZ ( n [0 ]) > ZZ ( n [1 ]) :
741
731
raise ValueError (str (n ) + " cannot be in descending order" )
742
732
743
733
result = []
0 commit comments