Skip to content

Commit 727a619

Browse files
author
Release Manager
committed
gh-36094: Height function for projective subvarieties <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> Introduces three new methods related to height of projective subvarieties. <!-- Describe your changes here in detail --> Direct transfer from #34559. Methods implemented: local_height, local_height_arch, global_height. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". -->Fixes #34559 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] Someone else has created tests covering the changes. - [x] Someone else has updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36094 Reported by: Dang Phan Reviewer(s): Kwankyu Lee
2 parents 159a6f9 + bf3b9a1 commit 727a619

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

src/sage/schemes/projective/projective_subscheme.py

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,3 +1404,101 @@ def Chow_form(self):
14041404
rel2 = rel + [CF]
14051405
assert all(f in rel2 for f in CH.gens()), "did not find a principal generator"
14061406
return alp(CF)
1407+
1408+
def global_height(self, prec=None):
1409+
"""
1410+
Return the (projective) global height of the subscheme.
1411+
1412+
INPUT:
1413+
1414+
- ``prec`` -- desired floating point precision (default:
1415+
default ``RealField`` precision).
1416+
1417+
OUTPUT:
1418+
1419+
- a real number.
1420+
1421+
EXAMPLES::
1422+
1423+
sage: R.<x> = QQ[]
1424+
sage: NF.<a> = NumberField(x^2 - 5)
1425+
sage: P.<x,y,z> = ProjectiveSpace(NF, 2)
1426+
sage: X = P.subscheme([x^2 + y*z, 2*y*z, 3*x*y])
1427+
sage: X.global_height()
1428+
0.000000000000000
1429+
1430+
::
1431+
1432+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
1433+
sage: X = P.subscheme([z^2 - 101*y^2 - 3*x*z])
1434+
sage: X.global_height() # long time
1435+
4.61512051684126
1436+
"""
1437+
return self.Chow_form().global_height(prec)
1438+
1439+
def local_height(self, v, prec=None):
1440+
"""
1441+
Return the (projective) local height of the subscheme.
1442+
1443+
INPUT:
1444+
1445+
- ``v`` -- a prime or prime ideal of the base ring.
1446+
1447+
- ``prec`` -- desired floating point precision (default:
1448+
default ``RealField`` precision).
1449+
1450+
OUTPUT:
1451+
1452+
- a real number.
1453+
1454+
EXAMPLES::
1455+
1456+
sage: R.<x> = QQ[]
1457+
sage: NF.<a> = NumberField(x^2 - 5)
1458+
sage: I = NF.ideal(3)
1459+
sage: P.<x,y,z> = ProjectiveSpace(NF, 2)
1460+
sage: X = P.subscheme([3*x*y - 5*x*z, y^2])
1461+
sage: X.local_height(I)
1462+
0.000000000000000
1463+
1464+
::
1465+
1466+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
1467+
sage: X = P.subscheme([z^2 - 101*y^2 - 3*x*z])
1468+
sage: X.local_height(2)
1469+
0.000000000000000
1470+
"""
1471+
return self.Chow_form().local_height(v, prec)
1472+
1473+
def local_height_arch(self, i, prec=None):
1474+
"""
1475+
Return the local height at the ``i``-th infinite place of the subscheme.
1476+
1477+
INPUT:
1478+
1479+
- ``i`` -- an integer.
1480+
1481+
- ``prec`` -- desired floating point precision (default:
1482+
default ``RealField`` precision).
1483+
1484+
OUTPUT:
1485+
1486+
- a real number.
1487+
1488+
EXAMPLES::
1489+
1490+
sage: R.<x> = QQ[]
1491+
sage: NF.<a> = NumberField(x^2 - 5)
1492+
sage: P.<x,y,z> = ProjectiveSpace(NF, 2)
1493+
sage: X = P.subscheme([x^2 + y*z, 3*x*y])
1494+
sage: X.local_height_arch(1)
1495+
0.0000000000000000000000000000000
1496+
1497+
::
1498+
1499+
sage: P.<x,y,z> = ProjectiveSpace(QQ, 2)
1500+
sage: X = P.subscheme([z^2 - 101*y^2 - 3*x*z])
1501+
sage: X.local_height_arch(1)
1502+
4.61512051684126
1503+
"""
1504+
return self.Chow_form().local_height_arch(i, prec)

0 commit comments

Comments
 (0)