       Re: ((a&&b)||c)==((a||c)&&(b||c))

• To: mathgroup at smc.vnet.net
• Subject: [mg62042] Re: [mg62015] ((a&&b)||c)==((a||c)&&(b||c))
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Thu, 10 Nov 2005 02:50:25 -0500 (EST)
• References: <200511090845.DAA17387@smc.vnet.net> <B544096B-72F4-4119-86F0-42F575461D2F@mimuw.edu.pl>
• Sender: owner-wri-mathgroup at wolfram.com

```On 9 Nov 2005, at 19:09, Andrzej Kozlowski wrote:

>
>
> On 9 Nov 2005, at 17:45, Steven T. Hatton wrote:
>
>> Why does Mathematica not determine that the following is true?
>>
>> ((a \[And] b) \[Or] c) == ((a \[Or] c) \[And] (b \[Or] c))
>>
>> This little function shows that the lhs  and rhs have the same
>> truth tables,
>> and are therefore equivalent:
>>
>> TruthTable[s_, argc_] := Module[
>>     {tt = Tuples[{True, False}, argc]},
>>     {#, s @@ #} & /@ tt // TableForm
>>     ]
>>
>> --
>> The Mathematica Wiki: http://www.mathematica-users.org/
>> Math for Comp Sci http://www.ifi.unizh.ch/math/bmwcs/master.html
>> Math for the WWW: http://www.w3.org/Math/
>>
>
> Because, (as I tried to explain in a reply to a recent posting of
> yours) this is not the way == is used in Mathematica. The correct
> way to show this is:
>
>
> Implies[(a â?¨ c) â?§ (b â?¨ c),(a â?§ b) â?¨ c]//FullSimplify
>
>
> True
>
>
> Implies[(a â?§ b) â?¨ c,(a â?¨ c) â?§ (b â?¨ c)]//FullSimplify
>
>
> True
>
> Andrzej Kozlowski
>
>

Actually, there is at least one more way to do this, which you may
like better:

LogicalExpand[(a â?§ b) â?¨ c]==LogicalExpand[(a â?¨ c) â?§ (b â?¨ c)]

True

But this one is actually less reliable.

Andrzej Kozlowski

```

• Prev by Date: Re: Re: To be or not to be...
• Next by Date: Course Description:,M50: An Introduction to Mathematica in the Classroom not offered online
• Previous by thread: Re: ((a&&b)||c)==((a||c)&&(b||c))
• Next by thread: Re: ((a&&b)||c)==((a||c)&&(b||c))