Skip to content

Commit

Permalink
Added doctest for lefschetz_element()
Browse files Browse the repository at this point in the history
  • Loading branch information
25shriya committed Jan 6, 2025
1 parent b2802fa commit 0448df5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/sage/categories/kahler_algebras.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,34 @@ def poincare_pairing(a,b):

@abstract_method
def lefschetz_element():
r"""
Return one Lefschetz element of the given Kähler algebra.
EXAMPLES::
sage: U46 = matroids.Uniform(4,6)
sage: C = U46.chow_ring(QQ, False)
sage: w = C.lefschetz_element(); w
-2*A01 - 2*A02 - 2*A03 - 2*A04 - 2*A05 - 2*A12 - 2*A13 - 2*A14
- 2*A15 - 2*A23 - 2*A24 - 2*A25 - 2*A34 - 2*A35 - 2*A45 - 6*A012
- 6*A013 - 6*A014 - 6*A015 - 6*A023 - 6*A024 - 6*A025 - 6*A034
- 6*A035 - 6*A045 - 6*A123 - 6*A124 - 6*A125 - 6*A134 - 6*A135
- 6*A145 - 6*A234 - 6*A235 - 6*A245 - 6*A345 - 30*A012345
sage: basis_deg = {}
sage: for b in C.basis():
....: deg = b.homogeneous_degree()
....: if deg not in basis_deg:
....: basis_deg[deg] = []
....: basis_deg[deg].append(b)
sage: m = max(basis_deg); m
3
sage: len(basis_deg[1]) == len(basis_deg[2])
True
sage: matrix([(w*b).to_vector() for b in basis_deg[1]]).rank()
36
sage: len(basis_deg[2])
36
"""
pass

Check warning on line 132 in src/sage/categories/kahler_algebras.py

View check run for this annotation

Codecov / codecov/patch

src/sage/categories/kahler_algebras.py#L132

Added line #L132 was not covered by tests

def hodge_riemann_relations(self, k):
Expand Down

0 comments on commit 0448df5

Please sign in to comment.