Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of Chow ring ideal and Chow ring classes #38281

Draft
wants to merge 88 commits into
base: develop
Choose a base branch
from

Conversation

25shriya
Copy link
Contributor

@25shriya 25shriya commented Jun 26, 2024

This PR is focused on addition of classes for Chow ring ideal and Chow ring of matroids.
Check relevant issue.
The ideals classes consist of the Chow ring ideal and Augmented Chow ring ideal, with Gröbner basis for each of them.

The Chow ring class is an initial version.
@tscrim

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented Jun 26, 2024

Documentation preview for this PR (built with commit 980c63f; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Collaborator

@tscrim tscrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And similar comments to similar classes/parts of code.


..MATH::

A(M)_R := R[y_{e_1}, \ldots, y_{e_n}, x_{F_1}, \ldots, x_{F_k}] / (I_M + J_M)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A(M)_R := R[y_{e_1}, \ldots, y_{e_n}, x_{F_1}, \ldots, x_{F_k}] / (I_M + J_M)
A(M)_R := R[y_{e_1}, \ldots, y_{e_n}, x_{F_1}, \ldots, x_{F_k}] / (I_M + J_M),

Comment on lines 42 to 44
A(M)_R := R[x_{F_1}, \ldots, x_{F_k}] / I_{af}M

where `I_{af}M` is the augmented Chow ring ideal of matroid `M` of atom-free presentation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A(M)_R := R[x_{F_1}, \ldots, x_{F_k}] / I_{af}M
where `I_{af}M` is the augmented Chow ring ideal of matroid `M` of atom-free presentation.
A(M)_R := R[x_{F_1}, \ldots, x_{F_k}] / I_M^{af},
where `I_M^{af}` is the augmented Chow ring ideal of matroid `M` in the atom-free presentation.

else:
self._ideal = ChowRingIdeal_nonaug(M, R)
C = CommutativeRings().Quotients() & GradedAlgebrasWithBasis(R).FiniteDimensional()
QuotientRing_generic.__init__(self, R=self._ideal.ring(), I=self._ideal, names=self._ideal.ring().variable_names(), category=C)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
QuotientRing_generic.__init__(self, R=self._ideal.ring(), I=self._ideal, names=self._ideal.ring().variable_names(), category=C)
QuotientRing_generic.__init__(self, R=self._ideal.ring(),
I=self._ideal,
names=self._ideal.ring().variable_names(),
category=C)

So it is closer to 80 char/ line.

Comment on lines 130 to 131
import sage.misc.latex as latex
return "%s/%s" % (latex.latex(self._ideal.ring()), latex.latex(self._ideal))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import sage.misc.latex as latex
return "%s/%s" % (latex.latex(self._ideal.ring()), latex.latex(self._ideal))
From sage.misc.latex import latex
return "{} / {}".format(latex(self._ideal.ring()), latex(self._ideal))

Comment on lines 137 to 139
TESTS::


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TESTS::
TESTS::

sage: ch
Chow ring ideal of Fano: Binary matroid of rank 3 on 7 elements, type (3, 0)
"""
return "Chow ring ideal of {}".format(self._matroid)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t this be more specific? Also, please add a _latex_() method.

Comment on lines 194 to 199
Returns the Groebner basis of the Chow ring ideal.

EXAMPLES::

sage: from sage.matroids.basis_matroid import BasisMatroid

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Returns the Groebner basis of the Chow ring ideal.
EXAMPLES::
sage: from sage.matroids.basis_matroid import BasisMatroid
Return the Groebner basis of `self`.
EXAMPLES::
sage: from sage.matroids.basis_matroid import BasisMatroid

It would be better to use the standard Sage global namespace way to build the matroid rather than via an import.

src/sage/matroids/chow_ring_ideal.py Show resolved Hide resolved

A(M)_R := R[y_{e_1}, \ldots, y_{e_n}, x_{F_1}, \ldots, x_{F_k}] / (I_M + J_M)

where `(I_M + J_M)` is the augmented Chow ring ideal of matroid `M`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
where `(I_M + J_M)` is the augmented Chow ring ideal of matroid `M`
where `(I_M + J_M)` is the :class:`augmented Chow ring ideal
<sage.matroids.chow_ring_ideal.ChowRingIdeal_fy>`
of the matroid `M` in the

Comment on lines +59 to +61
* ``"atom-free" - Atom-free presentation*


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* ``"atom-free" - Atom-free presentation*
* ``"atom-free" - Atom-free presentation*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants