Skip to content

Commit 1ed8870

Browse files
committed
projective_space.py: Better test coverage and ensure maximal order
1 parent bd7b66a commit 1ed8870

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/sage/schemes/projective/projective_space.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,15 @@ def points_of_bounded_height(self, **kwds):
11081108
sage: len(sorted(list(P.points_of_bounded_height(bound=2))))
11091109
44
11101110
1111+
::
1112+
1113+
sage: R.<x> = QQ[]
1114+
sage: K.<a> = NumberField(x^3 - 7)
1115+
sage: O = K.maximal_order()
1116+
sage: P.<z,w> = ProjectiveSpace(O, 1)
1117+
sage: len(sorted(list(P.points_of_bounded_height(bound=2))))
1118+
28
1119+
11111120
::
11121121
11131122
sage: P.<w,z> = ProjectiveSpace(ZZ, 1)
@@ -1154,7 +1163,7 @@ def points_of_bounded_height(self, **kwds):
11541163
elif R in NumberFields():
11551164
# True for the rational field as well, so check is_RationalField first
11561165
field_type = True
1157-
elif (R is ZZ) or isinstance(R, Order):
1166+
elif ((R is ZZ) or isinstance(R, Order)) and R.is_integrally_closed(): # Ensure maximal order
11581167
is_ring_of_ints = True
11591168
else:
11601169
raise NotImplementedError("self must be a projective space over a number field or a ring of integers")

0 commit comments

Comments
 (0)