Processing math: 100%
Ask Your Question
0

Exterior face ring via Sage

asked 0 years ago

klaaa gravatar image

Let K be a finite simplicial complex, then the face ring of K is the ring A/I where A is the exterior algebra on the vertex set of K and I is the ideal generated by monomials corresponding to non-faces of K.

Question: Is there an easy way to obtain the exterior face ring in Sage?

Preview: (hide)

Comments

1

How does this relate to stanley_reisner_ring? Is it just that the base ring is exterior rather than polynomial? The code defining the Stanley-Reisner ring is pretty short, you could just modify it. See https://github.com/sagemath/sage/blob... and https://github.com/sagemath/sage/blob....

John Palmieri gravatar imageJohn Palmieri ( 0 years ago )

Thank you. I tried to modify the code but got an error. Here my attempt:

def extfacealgbasering(self, base_ring):
        verts = self._gen_dict.values()
        try:
            verts = sorted(verts)
        except TypeError:
            verts = sorted(verts, key=str)
        return ExteriorAlgebra(base_ring, verts)

def extfacealg(self, base_ring):
    R =extfacealgbasering(self,base_ring)
    products = []
    for f in self.minimal_nonfaces():
        prod = 1
        for v in f:
            prod *= R(self._gen_dict[v])
        products.append(prod)
    return R.quotient(products)
X = SimplicialComplex([[1,2], [0], [3]])
U=extfacealg(X,QQ)
display(U)
klaaa gravatar imageklaaa ( 0 years ago )

It seems there is a problem with the multiplication in the exterior algebra.

klaaa gravatar imageklaaa ( 0 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 0 years ago

klaaa gravatar image

With some help of ChatGPT it seems to work now, see the code below. But there is a problem remaining: The output U does not seem to be regocnized as a finite dimensional algebra over the field (here the rationals QQ). For example the command U.basis() does not work. Is there an easy fix so that the output is really a finite dimensional algebra so that the Sage tools such as .basis() are available?

def extfacealgbasering(K, base_ring):
    verts = K._gen_dict.values()
    try:
        verts = sorted(verts)
    except TypeError:
        verts = sorted(verts, key=str)
    R = ExteriorAlgebra(base_ring, names=verts)
    return R

def extfacealg(K, base_ring=ZZ):
    R = extfacealgbasering(K, base_ring)
    # Now build a dictionary: variable name -> generator
    gens = R.gens()
    varnames = R.variable_names()
    name_to_gen = dict(zip(varnames, gens))

    products = []
    for f in K.minimal_nonfaces():
        prod = R.one()
        for v in f:
            prod *= name_to_gen[K._gen_dict[v]]
        products.append(prod)
    return R.quotient(products)
X = SimplicialComplex([[1,2], [0], [3]])
U=extfacealg(X,QQ)
display(U)
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 0 years ago

Seen: 66 times

Last updated: Apr 27