Ask Your Question
1

Computing ratio of two elements in a large ring

asked 2022-11-02 00:58:58 +0100

vukov gravatar image

I have a ring (a matroid Chow ring) which has a large number of generators. It's structure is well-understood: it's graded, and the top degree is isomorphic to Q via a specific map, called the degree map. I know an explicit element whose image under the degree map is 1, call it a^{r-1}.

I have another element x of the matroid Chow ring, and I would like to compute it's degree. I can do that by computing x/a^{r-1}, but that is very slow (it seems to require a Grobner basis computation which does not finish on my computer).

When I ask sage to output x and a^{r-1}, sage outputs them as constant multiples of the same monomial. So from the output it is easy to read off what the degree is (look at the ratio of the monomials), but I would like to get it an automated way.

Example:

M = matroids.Uniform(4, 8)
A = M.chow_ring(QQ)
def flatToChow(F):
    s = 'A'
    for i in F:
        s = s + str(i)
    return A(s)

beta = A(0)
for i in range(1, M.rank()):
    for F in M.flats(i):
        if (0 not in F):
            beta = beta + flatToChow(F)
a = A(0)
for i in range(1, M.rank()):
    for F in M.flats(i):
        if (0 in F):
            a = a + flatToChow(F)
 x = beta^3
 x/a^3 #long time
edit retag flag offensive close merge delete

Comments

1

In this particular example you can compute the ratio as x.lift()/(a^3).lift() but I'm not sure it will work in general.

Max Alekseyev gravatar imageMax Alekseyev ( 2022-11-02 01:09:54 +0100 )edit
1

maybe

next(iter(x.lift().dict().values()))
FrédéricC gravatar imageFrédéricC ( 2022-11-02 07:56:00 +0100 )edit
1

or maybe

x.lc() / a.lc()
FrédéricC gravatar imageFrédéricC ( 2022-11-02 07:57:31 +0100 )edit

@Max Alekseyev, @FrédéricC, consider converting (or re-posting) your comments as answers.

slelievre gravatar imageslelievre ( 2022-11-02 10:36:09 +0100 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2022-11-02 14:35:15 +0100

Max Alekseyev gravatar image

When the ratio of two elements is known to belong to the base ring (QQ in your example), it can be computed as the ratio of the underlying polynomials (obtained via .lift() method) or just of their leading coefficients (via .lc() method, as suggested by @FrédéricC).

edit flag offensive delete link more

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: 2022-11-02 00:58:58 +0100

Seen: 204 times

Last updated: Nov 02 '22