Skip to content

Commit

Permalink
Created Chow Ring class
Browse files Browse the repository at this point in the history
  • Loading branch information
25shriya committed Jun 23, 2024
1 parent d51bd1d commit 462ce6c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/sage/matroids/chow_ring.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from sage.matroids.chow_ring_ideal import *
from sage.rings.quotient_ring import QuotientRing_nc
from sage.rings.quotient_ring_element import QuotientRingElement
from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis
import sage.misc.latex as latex

class ChowRing(QuotientRing_nc, category=GradedAlgebrasWithBasis):
def __init__(self, R, M):
self._matroid = M
self._ideal = ChowRingIdeal(M, R)
self.poly_ring = self._ideal.poly_ring
QuotientRing_nc.__init__(R, self._ideal, names=self.poly_ring.variable_names, category=GradedAlgebrasWithBasis)

def _repr_(self):
return "Chow ring of {}".format(self._matroid)

def _latex_(self):
return "%s/%s" % (latex.latex(self.poly_ring), latex.latex(self._ideal))

0 comments on commit 462ce6c

Please sign in to comment.