Message Boards Message Boards


Length limit for BooleanConvert

Posted 3 months ago
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

True is a correct logical rewrite for that Boolean expression.

Posted 3 months ago

What do you mean by this please? I see that it isn't tautology. And should be that rewrite be in form (!(!(!X->Y)->Z)->((!X->!Y)->!Z))?

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[{X, Y, Z} -> # &, 
   Flatten[Outer[List, {True, False}, {True, False}, {True, False}], 

(* 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} *)
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract