Home Online Manual
Top
Back: multiplyLeftFractions
Forward: isInvertibleLeftFraction
FastBack:
FastForward:
Up: olga_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document
7.5.20.0. areEqualLeftFractions
Procedure from library olga.lib (see olga_lib).

Usage:
areEqualLeftFractions(a, b, locType, locData), vector a, b, int locType, list/vector/intvec locData

Purpose:
check if two given fractions are equal

Assume:

Return:
int

Note:
returns 1 or 0, depending whether a=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
poly g1 = x*y+3;
poly g2 = y^3;
list L = g1,g2;
poly s1 = g1;
poly s2 = s1*g2;
poly s3 = s2;
poly r1 = Dx;
poly r2 = g2*r1;
poly r3 = s1*r1+3;
vector fracm1 = [s1,r1,0,0];
vector fracm2 = [s2,r2,0,0];
vector fracm3 = [s3,r3,0,0];
areEqualLeftFractions(fracm1, fracm2, 0, L);
==> 1
areEqualLeftFractions(fracm1, fracm3, 0, L);
==> 0
areEqualLeftFractions(fracm2, fracm3, 0, L);
==> 0