Message Boards Message Boards

Equivalent and TautologyQ won't(?) work with SameTest on Boolean Functions

Please see attached. Any insights would be appreciated.
Thank you!
--Mark

Attachments:
POSTED BY: Mark Tuttle
2 Replies

It's a precedence issue: as written, the SameTest function is

TautologyQ[Function[Equivalent[Slot[1], Slot[2]]]]

which just gives False.

Try

In[10]:= Union[conjunct2, SameTest -> (TautologyQ[Equivalent[#1, #2]] &)]

Out[10]= {False, True, x, y, x && y, x && ! y, y && ! x, ! x && ! y, ! x, ! y, ! (x && y), ! (x \[Xor] y), 
          x || y, x || ! y, ! x || y, x \[Xor] y}
POSTED BY: Ilian Gachevski

Thank you. I thought I had explored the position of the &; obviously I hadn't done it sufficiently. I need a deeper understanding of precedence in this context. I appreciate your prompt response. -- Mark

POSTED BY: Mark Tuttle
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract