Skip to content

Commit 74f7748

Browse files
fixed three things
1 parent f7c0045 commit 74f7748

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,8 @@ def orbit(self, p, n):
689689
...
690690
TypeError: not a constant polynomial
691691
692+
::
693+
692694
sage: P.<x,y> = ProjectiveSpace(QQ, 1)
693695
sage: d = DynamicalSemigroup(([x, y], [x^2, y^2]))
694696
sage: d.orbit(2, [1, 2, 3])
@@ -714,18 +716,6 @@ def orbit(self, p, n):
714716
...
715717
ValueError: [2, 1] cannot be in descending order
716718
"""
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")
729719

730720
if not isinstance(n, Collection):
731721
n = ZZ(n)
@@ -735,9 +725,9 @@ def orbit(self, p, n):
735725

736726
if not len(n) == 2:
737727
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:
739729
raise ValueError(str(n) + " must contain exactly two nonnegative integers")
740-
if n[0] > n[1]:
730+
if ZZ(n[0]) > ZZ(n[1]):
741731
raise ValueError(str(n) + " cannot be in descending order")
742732

743733
result = []

0 commit comments

Comments
 (0)