Re: ((a&&b)||c)==((a||c)&&(b||c))
- To: mathgroup at smc.vnet.net
- Subject: [mg62034] Re: ((a&&b)||c)==((a||c)&&(b||c))
- From: Peter Pein <petsie at dordos.net>
- Date: Wed, 9 Nov 2005 05:05:53 -0500 (EST)
- References: <dksdln$h87$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Steven T. Hatton schrieb:
> 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
> ]
>
But Mathematica does:
In[1]:= expr = ((a && b) || c) == ((a || c) && (b || c))
Out[1]= ((a && b) || c) == ((a || c) && (b || c))
In[2]:= LogicalExpand /@ expr
Out[2]= True