(f, g)
return lbp(Sign(max_poly), ret, Num(max_poly))
Subtract labeled polynomial g from f.

    The signature and number of the difference of f and g are signature
    and number of the maximum of f and g, w.r.t. lbp_cmp.
Subtract labeled polynomial g from f.
Subtract labeled polynomial g from f .
def lbp_sub(f, g):
    """
    Subtract labeled polynomial g from f.

    The signature and number of the difference of f and g are signature
    and number of the maximum of f and g, w.r.t. lbp_cmp.
    """
    if sig_cmp(Sign(f), Sign(g), Polyn(f).ring.order) < 0:
        max_poly = g
    else:
        max_poly = f

    ret = Polyn(f) - Polyn(g)

    return lbp(Sign(max_poly), ret, Num(max_poly))
def lbp_sub ( f , g ) : if sig_cmp ( Sign ( f ) , Sign ( g ) , Polyn ( f ) . ring . order ) < 0 : max_poly = g else : max_poly = f ret = Polyn ( f ) - Polyn ( g ) return lbp ( Sign ( max_poly ) , ret , Num ( max_poly ) )