Try this in the latest version of SymPy. We got rid of the automatic
application of deMorgan's law. It will still automatically remove
duplicates, and remove or reduce to True and False when a literal True or
False is encountered, however.

Aaron Meurer

On Thu, Jan 29, 2015 at 2:40 PM, Dan Sirgey <[email protected]> wrote:

> I'm trying to use the sympy logic module for some operations on boolean
> equations. My operations need to operate on the equation as given, not in a
> standard form (the number of functions is important). However, sympy seems
> to modify the function as it seems fit. Is there any way to operate on
> equations without modifying them?
>
> As an example:
> If I do
> $ A, B, C = symbols('A B C')
> $ expr = Not(Or(And(A, B), C)
> $ print expr
> I get: And(Not(C), Or(Not(A), Not(B))) - 5 functions
> I want: Not(Or(And(A, B), C) - 3 functions
>
> Thanks,
> Dan
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/a8ca0e43-6751-4774-8e16-0334b5026ad3%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/a8ca0e43-6751-4774-8e16-0334b5026ad3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BG9Ygm_2wUmnTXy%3DQ0Oy%3DOtsrySX5dzSDNR-CnmQa%2BQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to