Singular Manual: multiplyLeftFractions

| ##### 7.5.21.0. multiplyLeftFractions Procedure from library `olga.lib` (see olga_lib). Usage: multiplyLeftFractions(a, b, locType, locData(, override)), vector a, b, int locType, list/vector/intvec locData, int override Purpose: multiply two left fractions in the specified localization Assume: Return: vector Note: the returned vector is the product of a and b as fractions in the localization specified by locType and locData. Example:
    LIB "olga.lib";
    ring R = 0,(x,y,Dx,Dy),dp;
    def S = Weyl();
    setring S; S;
    ==> // coefficients: QQ
    ==> // number of vars : 4
    ==> //        block   1 : ordering dp
    ==> //                  : names    x y Dx Dy
    ==> //        block   2 : ordering C
    ==> // noncommutative relations:
    ==> //    Dxx=x*Dx+1
    ==> //    Dyy=y*Dy+1
    // monoidal localization
    poly g1 = x+3;
    poly g2 = x*y+y;
    list L = g1,g2;
    poly s1 = g1;
    poly s2 = g2;
    poly r1 = Dx;
    poly r2 = Dy;
    vector frac1 = [s1,r1,0,0];
    vector frac2 = [s2,r2,0,0];
    vector rm = multiplyLeftFractions(frac1, frac2, 0, L);
    print(rm);
    ==> [x^3*y^2+5*x^2*y^2+7*x*y^2+3*y^2,x*y*Dx*Dy+y*Dx*Dy-y*Dy]
    // geometric localization
    ideal p = x-1, y-3;
    vector rg = multiplyLeftFractions(frac1, frac2, 1, p);
    print(rg);
    ==> [x^3*y+5*x^2*y+7*x*y+3*y,x*Dx*Dy+Dx*Dy-Dy]
    // rational localization
    intvec v = 2;
    s1 = y^2+y+1;
    s2 = y-2;
    r1 = Dx;
    r2 = Dy;
    frac1 = [s1,r1,0,0];
    frac2 = [s2,r2,0,0];
    vector rr1 = multiplyLeftFractions(frac1, frac2, 2, v);
    print(rr1);
    ==> [y^3-y^2-y-2,Dx*Dy]
    vector rr2 = multiplyLeftFractions(frac2, frac1, 2, v);
    print(rr2);
    ==> [y^5-y^3-4*y^2-3*y-2,y^2*Dx*Dy+y*Dx*Dy-2*y*Dx+Dx*Dy-Dx]
    areEqualLeftFractions(rr1, rr2, 2, v);
    ==> 0

User manual for Singular version 4.3.2, 2023, generated by texi2html.