Reputation: 79
how could I replace the letters in the number clause that served as symbols? I used a sym library.
I have
from sympy.logic.boolalg import to_cnf
from sympy.abc import A, B, D
to_cnf(~(A | B) | D)
cnf:
(D | ~A) & (D | ~B)
And I need replace letters with numbers
A as 1
B as 2
D as 2
example
to_cnf(~(1 | 2) | 3)
cnf:
(3 | ~1) & (3 | ~2)
it is possible?
Upvotes: 1
Views: 53