Ah, thank you. I think the deMorgan's application was the only thing I was running into. The equations should already have the rest of those reductions applied.
On Thursday, January 29, 2015 at 4:41:19 PM UTC-5, Aaron Meurer wrote: > > 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] > <javascript:>> 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] <javascript:>. >> To post to this group, send email to [email protected] <javascript:> >> . >> 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/7a213bca-46ec-48df-b531-2297c28bcebd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
