def eq_assoc(u, v, eq=core.eq, n=None):
    uop, uargs = op_args(u)
    vop, vargs = op_args(v)
    if uop and vop:
        return conde([(core.eq, u, v)],
                     [(eq, uop, vop), (associative, uop),
                      lambda s: assocunify(u, v, s, eq, n)])

    if uop or vop:
        if vop:
            uop, vop = vop, uop
            uargs, vargs = vargs, uargs
            v, u = u, v
        return conde([(core.eq, u, v)],
                     [(associative, uop),
                      lambda s: assocunify(u, v, s, eq, n)])

    return (core.eq, u, v)
Goal for associative equality
dataset/ETHPy150Open logpy/logpy/logpy/assoccomm.py/eq_assoc