# Length limit for BooleanConvert

Posted 3 months ago
436 Views
|
3 Replies
|
0 Total Likes
|
 Hello guys, I'm trying to use BooleanConvert for converting long bool expression to a specified format. The function however, returns bool value(true) instead of a converted expression. If I use a shorter expression, the converter returns correct expression. For example expression: ((X[Or]Y)[Implies]Z)[Or]((!X[Implies]!Y)[Implies]!Z) returns true instead of expected expression: (!(!(!X->Y)->Z)->((!X->!Y)->!Z)). I'm using BooleanConvert[((X\[Or]Y)\[Implies]Z)\[Or]((!X\[Implies]!Y)\[Implies]!Z) , "IMPLIES"] BooleanConvert[((X\[Or]Y)\[Implies]Z)\[Or]((!X\[Implies]!Y)\[Implies]!Z) , {"AND", "OR"}] Is there a length limit for bool expression or am I doing something wrong? I'll be happy for any help. Thanks!
3 Replies
Sort By:
Posted 3 months ago
 True is a correct logical rewrite for that Boolean expression.
 Okay, maybe it's not a tautology. But it sure quacks like one. boolean = ((X \[Or] Y) \[Implies] Z) \[Or] ((! X \[Implies] ! Y) \[Implies] ! Z); ruleList = Map[Thread, Map[{X, Y, Z} -> # &, Flatten[Outer[List, {True, False}, {True, False}, {True, False}], 2]]] (* Out[116]= {{X -> True, Y -> True, Z -> True}, {X -> True, Y -> True, Z -> False}, {X -> True, Y -> False, Z -> True}, {X -> True, Y -> False, Z -> False}, {X -> False, Y -> True, Z -> True}, {X -> False, Y -> True, Z -> False}, {X -> False, Y -> False, Z -> True}, {X -> False, Y -> False, Z -> False}} *) boolean /. ruleList (* Out[117]= {True, True, True, True, True, True, True, True} *)