Hi!
You could wrap that functionality around PolyBoRi
Using the mapping:
False -> 1
True->0
or -> *
not x -> 1+x

You can map logical expressions to Boolean polynomials.

Having such a polynomial f, you calculates its zeroes, which gives the
DNF.

Example:
In [1]:f=(x(1)+x(2))

In [2]:(x(1)*x(2)).divisors()
Out[2]:{{x(1),x(2)}, {x(1)}, {x(2)}, {}}

In [3]:f.zeroesIn((x(1)*x(2)).divisors())
Out[3]:{{x(1),x(2)}, {}}

The set of zeroes immediately gives you the canonical DNF
x(1)^x(2) or (not x(1)) and (not x(2))

Best regards,
Michael Brickenstein

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to