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