Ticket #11429: trac_11429_fix_doctests.patch
File trac_11429_fix_doctests.patch, 4.8 KB (added by , 11 years ago) |
---|
-
sage/schemes/generic/toric_divisor.py
# HG changeset patch # User Volker Braun <vbraun@stp.dias.ie> # Date 1323987866 0 # Node ID 2dbcae4b68ea2248816d8a62df92bd4dc74fee06 # Parent 28c4f191e4592696b12c98d267c112aec27a9f10 Trac #11429: Fix doctests because the ordering of points changed diff --git a/sage/schemes/generic/toric_divisor.py b/sage/schemes/generic/toric_divisor.py
a b 120 120 sage: H = P2.divisor(0); H 121 121 V(x) 122 122 sage: H.sections() 123 (M( 0, 0), M(-1, 0), M(-1, 1))123 (M(-1, 0), M(-1, 1), M(0, 0)) 124 124 sage: H.sections_monomials() 125 ( x, z, y)125 (z, y, x) 126 126 127 127 Note that the space of sections is always spanned by 128 128 monomials. Therefore, we can grade the sections (as homogeneous … … 1284 1284 [A vertex at (1, -1), A vertex at (0, 1), A vertex at (1, 0), 1285 1285 A vertex at (-1, 1), A vertex at (-1, -1)] 1286 1286 sage: P_antiK.integral_points() 1287 [(1, -1), (0, 1), (1, 0), (-1, 1), (-1, -1), (-1, 0), (0, -1), (0, 0)]1287 ((-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 0), (0, 1), (1, -1), (1, 0)) 1288 1288 1289 1289 Example 6.1.3, 6.1.11, 6.1.17 of [CLS]_:: 1290 1290 … … 1321 1321 An inequality (0, 0, -1) x + 1 >= 0, An inequality (0, 1, 2) x + 1 >= 0, 1322 1322 An inequality (0, 1, 3) x + 1 >= 0, An inequality (1, 0, 4) x + 1 >= 0] 1323 1323 sage: P_D.integral_points() 1324 [(1, 1, 1), (1, -3, 1), (-5, 1, 1), (-5, -3, 1), (0, 1, 1),1325 ( -1, 1, 1), (-2, 1, 1), (-3, 1, 1), (-4, 1, 1), (1, 0, 1),1326 ( 0, 0, 1), (-1, 0, 1), (-2, 0, 1), (-3, 0, 1), (-4, 0, 1),1327 ( -5, 0, 1), (1, -1, 1), (0, -1, 1), (-1, -1, 1), (-2, -1, 1),1328 (- 3, -1, 1), (-4, -1, 1), (-5, -1, 1), (1, -2, 1), (0, -2, 1),1329 (- 1, -2, 1), (-2, -2, 1), (-3, -2, 1), (-4, -2, 1), (-5, -2, 1),1330 ( 0, -3, 1), (-1, -3, 1), (-2, -3, 1), (-3, -3, 1), (-4, -3, 1),1331 ( 1, 1, 0), (0, 1, 0), (-1, 1, 0), (1, 0, 0), (0, 0, 0), (-1, 0, 0),1332 ( 1, -1, 0), (0, -1, 0), (-1, -1, 0)]1324 ((-1, -1, 0), (0, -1, 0), (1, -1, 0), (-1, 0, 0), (0, 0, 0), 1325 (1, 0, 0), (-1, 1, 0), (0, 1, 0), (1, 1, 0), (-5, -3, 1), 1326 (-4, -3, 1), (-3, -3, 1), (-2, -3, 1), (-1, -3, 1), (0, -3, 1), 1327 (1, -3, 1), (-5, -2, 1), (-4, -2, 1), (-3, -2, 1), (-2, -2, 1), 1328 (-1, -2, 1), (0, -2, 1), (1, -2, 1), (-5, -1, 1), (-4, -1, 1), 1329 (-3, -1, 1), (-2, -1, 1), (-1, -1, 1), (0, -1, 1), (1, -1, 1), 1330 (-5, 0, 1), (-4, 0, 1), (-3, 0, 1), (-2, 0, 1), (-1, 0, 1), 1331 (0, 0, 1), (1, 0, 1), (-5, 1, 1), (-4, 1, 1), (-3, 1, 1), 1332 (-2, 1, 1), (-1, 1, 1), (0, 1, 1), (1, 1, 1)) 1333 1333 """ 1334 1334 try: 1335 1335 return self._polyhedron … … 1358 1358 sage: P2.fan().nrays() 1359 1359 3 1360 1360 sage: P2.divisor(0).sections() 1361 (M( 0, 0), M(-1, 0), M(-1, 1))1361 (M(-1, 0), M(-1, 1), M(0, 0)) 1362 1362 sage: P2.divisor(1).sections() 1363 (M(0, 0), M(0, -1), M(1, -1))1363 (M(0, -1), M(0, 0), M(1, -1)) 1364 1364 sage: P2.divisor(2).sections() 1365 (M(0, 1), M(1, 0), M(0, 0))1365 (M(0, 0), M(0, 1), M(1, 0)) 1366 1366 1367 1367 The divisor can be non-nef yet still have sections:: 1368 1368 … … 1406 1406 sage: P2.fan().nrays() 1407 1407 3 1408 1408 sage: P2.divisor(0).sections_monomials() 1409 ( x, z, y)1409 (z, y, x) 1410 1410 sage: P2.divisor(1).sections_monomials() 1411 ( y, z, x)1411 (z, y, x) 1412 1412 sage: P2.divisor(2).sections_monomials() 1413 ( y, x, z)1413 (z, y, x) 1414 1414 1415 1415 From [CoxTutorial]_ page 38:: 1416 1416 … … 1421 1421 sage: dP7 = ToricVariety( FaceFan(lp), 'x1, x2, x3, x4, x5') 1422 1422 sage: AK = -dP7.K() 1423 1423 sage: AK.sections() 1424 (M(-1, 1), M(1, 1), M(1, -1), M(0, -1),1425 M( -1, 0), M(1, 0), M(0, 0), M(0, 1))1424 (M(-1, 0), M(-1, 1), M(0, -1), M(0, 0), 1425 M(0, 1), M(1, -1), M(1, 0), M(1, 1)) 1426 1426 sage: AK.sections_monomials() 1427 (x 2*x3^2*x4^2, x1^2*x2^3*x3^2, x1^2*x2*x5^2, x1*x4*x5^2,1428 x 3*x4^2*x5, x1^2*x2^2*x3*x5, x1*x2*x3*x4*x5, x1*x2^2*x3^2*x4)1429 1427 (x3*x4^2*x5, x2*x3^2*x4^2, x1*x4*x5^2, x1*x2*x3*x4*x5, 1428 x1*x2^2*x3^2*x4, x1^2*x2*x5^2, x1^2*x2^2*x3*x5, x1^2*x2^3*x3^2) 1429 1430 1430 REFERENCES: 1431 1431 1432 1432 .. [CoxTutorial] … … 1803 1803 sage: D6 = dP6.divisor(5) 1804 1804 sage: D = -D3 + 2*D5 - D6 1805 1805 sage: D.cohomology_support() 1806 (M( 2, 0), M(1, 0), M(0, 0), M(1, 1))1806 (M(0, 0), M(1, 0), M(2, 0), M(1, 1)) 1807 1807 """ 1808 1808 X = self.parent().scheme() 1809 1809 M = X.fan().dual_lattice()