def lbp_cmp(f, g):
 if (sig_cmp(Sign(f), Sign(g), Polyn(f).ring.order) == (-1)):
  return (-1)
 if (Sign(f) == Sign(g)):
  if (Num(f) > Num(g)):
   return (-1)
 return 1

def lbp_cmp ( f , g ) : if ( sig_cmp ( Sign ( f ) , Sign ( g ) , Polyn ( f ) . ring . order ) == ( - 1 ) ) : return ( - 1 ) if ( Sign ( f ) == Sign ( g ) ) : if ( Num ( f ) > Num ( g ) ) : return ( - 1 ) return 1
compare two labeled polynomials .