##### 7.5.15.0. ensureLeftNcfrac

Procedure from library `ncfrac.lib` (see ncfrac_lib).

Usage:
  ensureLeftNcfrac(frac), ncfrac frac

Purpose:
  ensures that frac has a left representation (by computing it if not alreaDy known)

Return:
  ncfrac, a representation of frac which has a left representation

Example:

    LIB "ncfrac.lib";
    ==> // ** redefining testNcfrac (LIB "ncfrac.lib";) ./examples/ensureLeftNcfr\
       ac.sing:1
    ==> // ** redefining testNcloc (    LIB "ncloc.lib";) ncfrac.lib::mod_init:11\
       3
    ring R = 0,(x,y,Dx,Dy),dp;
    def S = Weyl();
    setring S; S;
    ==> // coefficients: QQ considered as a field
    ==> // 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;
    list L = g1,g2;
    ncloc loc0 = L;
    poly g = g1^2*g2;
    poly f = Dx;
    ncfrac frac0 = [0,0,f,g];
    frac0.loc = loc0;
    ncfrac rm = ensureLeftNcfrac(frac0);
    print(rm);
    ==> left repr.: (x^8*y^4+12*x^7*y^4+54*x^6*y^4+108*x^5*y^4+81*x^4*y^4,x^5*y^3\
       *Dx+6*x^4*y^3*Dx-3*x^4*y^3+9*x^3*y^3*Dx-12*x^3*y^3-9*x^2*y^3)
    ==> right repr.: (Dx,x^3*y+6*x^2*y+9*x*y)
    rm.lnum*g-rm.lden*f;
    ==> 0
    // geometric localization
    ncloc loc1 = ideal(x-1,y-3);
    f = Dx;
    g = x^2+y;
    ncfrac frac1 = [0,0,f,g];
    frac1.loc = loc1;
    ncfrac rg = ensureLeftNcfrac(frac1);
    print(rg);
    ==> left repr.: (x^4+2*x^2*y+y^2,x^2*Dx+y*Dx-2*x)
    ==> right repr.: (Dx,x^2+y)
    rg.lnum*g-rg.lden*f;
    ==> 0
    // rational localization
    intvec rat = 1;
    ncloc loc2 = rat;
    f = Dx+Dy;
    g = x;
    ncfrac frac2 = [0,0,f,g];
    frac2.loc = loc2;
    ncfrac rr = ensureLeftNcfrac(frac2);
    print(rr);
    ==> left repr.: (x^2,x*Dx+x*Dy-1)
    ==> right repr.: (Dx+Dy,x)
    rr.lnum*g-rr.lden*f;
    ==> 0

User manual for Singular version 4.4.1, 2025, generated by texi2html.