diff --git a/src/sage/categories/kahler_algebras.py b/src/sage/categories/kahler_algebras.py index d43b6267d72..cda0ce871a9 100644 --- a/src/sage/categories/kahler_algebras.py +++ b/src/sage/categories/kahler_algebras.py @@ -5,6 +5,15 @@ - Shriya M """ +# **************************************************************************** +# Copyright (C) 2024 Shriya M <25shriya at gmail.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** from sage.categories.category_types import Category_over_base_ring from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis @@ -15,15 +24,6 @@ from sage.misc.cachefunc import cached_method -# **************************************************************************** -# Copyright (C) 2024 Shriya M <25shriya at gmail.com> -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# https://www.gnu.org/licenses/ -# **************************************************************************** class KahlerAlgebras(Category_over_base_ring): r""" The category of graded algebras satisfying the Kähler package. @@ -134,7 +134,7 @@ def lefschetz_element(self): def hodge_riemann_relations(self, k): r""" - Return the quadratic form for the corresponding ``k`` + Return the quadratic form for the corresponding ``k`` (`< \frac{r}{2}`) for the Kähler algebra, where `r` is the top degree. EXAMPLES:: diff --git a/src/sage/matroids/chow_ring.py b/src/sage/matroids/chow_ring.py index e642e1bb475..5fea543aeb3 100644 --- a/src/sage/matroids/chow_ring.py +++ b/src/sage/matroids/chow_ring.py @@ -5,6 +5,15 @@ - Shriya M """ +# **************************************************************************** +# Copyright (C) 2024 Shriya M <25shriya at gmail.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** from sage.matroids.chow_ring_ideal import ChowRingIdeal_nonaug, AugmentedChowRingIdeal_fy, AugmentedChowRingIdeal_atom_free from sage.rings.quotient_ring import QuotientRing_generic @@ -284,31 +293,6 @@ def lefschetz_element(self): 6*A01234^3, 6*A01234^3, 2*A01234^3, 2*A01234^3, 6*A01234^3, 2*A01234^3, 6*A01234^3, 6*A01234^3, 2*A01234^3, 6*A01234^3, 6*A01234^3, 6*A01234^3, -20*A01234^3], 3: [0]} - - TESTS:: - - 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 """ w = sum(len(F) * (len(self.matroid().groundset()) - len(F)) * gen for F, gen in self.defining_ideal().flats_to_generator_dict().items()) diff --git a/src/sage/matroids/chow_ring_ideal.py b/src/sage/matroids/chow_ring_ideal.py index 625bec8d7b9..00b5592ee42 100644 --- a/src/sage/matroids/chow_ring_ideal.py +++ b/src/sage/matroids/chow_ring_ideal.py @@ -5,6 +5,15 @@ - Shriya M """ +# **************************************************************************** +# Copyright (C) 2024 Shriya M <25shriya at gmail.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** from sage.rings.polynomial.multi_polynomial_ideal import MPolynomialIdeal from sage.matroids.utilities import cmp_elements_key