ProjetPP / PPP-CAS

Computer Algebra System module for the Projet Pensées Profondes
MIT License
2 stars 3 forks source link

Adds support of boolean logic #16

Closed Tpt closed 9 years ago

Tpt commented 9 years ago

Supported by Sympy http://docs.sympy.org/latest/modules/logic.html

Example in SympyGamma http://www.sympygamma.com/input/?i=%28x%20|%20y%29%20%26%20%28x%20|%20~y%29%20%26%20%28~x%20|%20y%29

marc-chevalier commented 9 years ago

What for? Sympy has not as only aim to be used as backend of online CAS. I can return the inpu formula just as Sympy Gamma but it's not very interesting.

Le 02/02/2015 10:54, Thomas Tanon a écrit :

Supported by Sympy http://docs.sympy.org/latest/modules/logic.html

Example in SympyGamma http://www.sympygamma.com/input/?i=%28x%20|%20y%29%20%26%20%28x%20|%20~y%29%20%26%20%28~x%20|%20y%29 http://www.sympygamma.com/input/?i=%28x%20%7C%20y%29%20%26%20%28x%20%7C%20%7Ey%29%20%26%20%28%7Ex%20%7C%20y%29

— Reply to this email directly or view it on GitHub https://github.com/ProjetPP/PPP-CAS/issues/16.

Marc Chevalier

ENS de Lyon Site Monod M1 Informatique Fondamentale

Tpt commented 9 years ago

Sympy Gamma outputs a simplification of the formula

marc-chevalier commented 9 years ago

Do you seriously want to run a SAT solver? He knows that the computation ends so, it can do it..

Tpt commented 9 years ago

Yes. Formula aren't so huge and Sympy looks to do it well: http://docs.sympy.org/latest/modules/logic.html#simplification-and-equivalence-testing

Tpt commented 9 years ago

Note: Mathematica boolean logic features: http://reference.wolfram.com/language/guide/LogicAndBooleanAlgebra.html

marc-chevalier commented 9 years ago

That work now. http://askplatyp.us/?lang=en&q=satisfiable%28x+%26+x+%26+x+|+x+%26+y%29 http://askplatyp.us/?lang=en&q=y+%26+~x+|+y+%26+x http://askplatyp.us/?lang=en&q=And%28x%2CNot%28x%29%29

Tpt commented 9 years ago

Cool! Thanks a lot!