(clauses, symbols)
return [set(append_symbol(arg, symbols) for arg in Or.make_args(c))
            for c in clauses]
Takes clauses in CNF format and puts them into an integer representation.

    Examples
    ========

    >>> from sympy.logic.boolalg import to_int_repr
    >>> from sympy.abc import x, y
    >>> to_int_repr([x | y, y], [x, y]) == [set([1, 2]), set([2])]
    True
Takes clauses in CNF format and puts them into an integer representation.
Takes clauses in CNF format and puts them into an integer representation .
def to_int_repr(clauses, symbols):
    """
    Takes clauses in CNF format and puts them into an integer representation.

    Examples
    ========

    >>> from sympy.logic.boolalg import to_int_repr
    >>> from sympy.abc import x, y
    >>> to_int_repr([x | y, y], [x, y]) == [set([1, 2]), set([2])]
    True

    """

    # Convert the symbol list into a dict
    symbols = dict(list(zip(symbols, list(xrange(1, len(symbols) + 1)))))

    def append_symbol(arg, symbols):
        if arg.func is Not:
            return -symbols[arg.args[0]]
        else:
            return symbols[arg]

    return [set(append_symbol(arg, symbols) for arg in Or.make_args(c))
            for c in clauses]
def to_int_repr ( clauses , symbols ) : # Convert the symbol list into a dict symbols = dict ( list ( zip ( symbols , list ( xrange ( 1 , len ( symbols ) + 1 ) ) ) ) ) def append_symbol ( arg , symbols ) : if arg . func is Not : return - symbols [ arg . args [ 0 ] ] else : return symbols [ arg ] return [ set ( append_symbol ( arg , symbols ) for arg in Or . make_args ( c ) ) for c in clauses ]