(cp)
return lbp_sub(lbp_mul_term(cp[2], cp[1]), lbp_mul_term(cp[5], cp[4]))
Compute the S-polynomial of a critical pair.

    The S-polynomial of a critical pair cp is cp[1] * cp[2] - cp[4] * cp[5].
Compute the S-polynomial of a critical pair.
Compute the S - polynomial of a critical pair .
def s_poly(cp):
    """
    Compute the S-polynomial of a critical pair.

    The S-polynomial of a critical pair cp is cp[1] * cp[2] - cp[4] * cp[5].
    """
    return lbp_sub(lbp_mul_term(cp[2], cp[1]), lbp_mul_term(cp[5], cp[4]))
def s_poly ( cp ) : return lbp_sub ( lbp_mul_term ( cp [ 2 ] , cp [ 1 ] ) , lbp_mul_term ( cp [ 5 ] , cp [ 4 ] ) )