Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - factorization and multiplication of ratios of polynomials
Author Message
  Post subject:  factorization and multiplication of ratios of polynomials  Reply with quote
I'm trying to use Singular for the following computation:
in the ring of Laurent polynomials in k+4 variables x_1,...,x_k, q1,q2,q3,m
consider polynomials P_1 and P_2, which I provide in factorized form.
My goal is to compute an iterated residue (for which ordering matters)
of the ratio P_1 / P_2 in variables x at (simple) poles expressed in variables q.

First question is how to instruct Singular not to expand the building blocks of P_1 and P_2,
as it takes a long time to factor them back.

Then, at each intermediate step I need to factor the result
(so that cancellations between numerator and denominator are taken care of)
and substitute for the value of the simple pole:
the problem is that I'm not allowed to multiply factorization objects (at least in Sage).

My concrete example is written in Sage, but I'm willing to also use Singular itself if needed.
(This is currently not working for the reason above.)

Code:
def br(x):
    return 1-1/x

def meas():
    # here k and K are just an example
    k = 3
    R = PolynomialRing(ZZ, ['x%d' %p for p in range(k)]+['q1', 'q2', 'q3', 'q4', 'm'], order='invlex')
    R.inject_variables()
    K = 1 + q2 + q2^2 + q3 + q4
    X = R.gens()[:k]
    rho = [p.substitute({q4:(q1*q2*q3)^-1}) for p in K.monomials()]
    rho.reverse()

    chix = prod([ br(X[j]) for j in range(k)])
    chim = prod([ br(X[j]/m) for j in range(k)])
    chiup = prod([ prod([ br(q1*q2*X[i]/X[j]) * br(q1*q3*X[i]/X[j]) * br(q2*q3*X[i]/X[j]) * (br(X[i]/X[j]))^2 for i in range(k) if i > j]) for j in range(k)])
    chiups = prod([ prod([ br(X[i]/(X[j]*q1*q2)) * br(X[i]/(X[j]*q1*q3)) * br(X[i]/(X[j]*q2*q3)) for i in range(k) if i > j]) for j in range(k)])
    chido = prod([ prod([ br(q1*X[i]/X[j]) * br(q2*X[i]/X[j]) * br(q3*X[i]/X[j]) * br(q1*q2*q3*X[i]/X[j]) for i in range(k) if i > j]) for j in range (k)])
    chidos = prod([ prod([ br(X[i]/(X[j]*q1)) * br(X[i]/(X[j]*q2)) * br(X[i]/(X[j]*q3)) * br(X[i]/(X[j]*q1*q2*q3)) for i in range(k) if i > j]) for j in range (k)])
    dx = prod([ X[j] for j in range(k)])

    # this is P_1
    chinum = chim * chiup * chiups
    # this is P_2
    chiden = chix *chido * chidos * dx
    chi = chinum / chiden

    # this is the iterated residue at X=rho
    for xi,rhoi in zip(X,rho):
        chi = (chi*(xi-rhoi)).factor().subs({xi: rhoi})
    return chi.factor()


Thanks.
Post Posted: Fri Feb 18, 2022 6:44 pm


It is currently Fri May 13, 2022 10:54 am
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group