|
7.5.23.0. addLeftFractions
Procedure from library olga.lib (see olga_lib).
- Usage:
- addLeftFractions(a, b, locType, locData(, override)),
vector a, b, int locType, list/vector/intvec locData(, int override)
- Purpose:
- add two left fractions in the specified localization
- Assume:
- Return:
- vector
- Note:
- the returned vector is the sum 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 = addLeftFractions(frac1, frac2, 0, L);
print(rm);
==> [x^2*y+4*x*y+3*y,x*y*Dx+y*Dx+x*Dy+3*Dy]
// geometric localization
ideal p = x-1, y-3;
vector rg = addLeftFractions(frac1, frac2, 1, p);
print(rg);
==> [x^2*y+4*x*y+3*y,x*y*Dx+y*Dx+x*Dy+3*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 rr = addLeftFractions(frac1, frac2, 2, v);
print(rr);
==> [y^3-y^2-y-2,y^2*Dy+y*Dx+y*Dy-2*Dx+Dy]
|
|