Re: Have Equal problems whith Flat attribute?
- To: mathgroup at smc.vnet.net
- Subject: [mg42266] Re: [mg42261] Have Equal problems whith Flat attribute?
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Thu, 26 Jun 2003 05:36:22 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On Wednesday, June 25, 2003, at 06:50 PM, alvaro diaz wrote:
> There is any problem if I'm do
> SetAttributes[Equal,Flat]? This is, a know problem. Is
> it the transitive propperty, not?
>
> Thanks.
>
Actually it does not make sense to do this, unless you are after the
ability to derive logical contradictions.
The property of Flat corresponds roughly to associativity. Thus:
SetAttributes[f,Flat]
Now:
f[f[1,2],f[3,4]]
f[1,2,3,4]
But you certainly would not normally like this to be true for Equal:
Equal[Equal[1,2],Equal[3,4]]
True
Equal[1,2,3,4]
False
However, luckily, even if you try to give Equal the Flat attribute it
will probably do nothing because Equal does not hold it's arguments. To
cause real mischief you would need to give it also the attribute
HoldAll:
SetAttributes[Equal, {HoldAll, Flat}]
Equal[Equal[1,2],Equal[3,4]]
False
Since this is in effect saying that False is not equal to False you
have got a contradiction. If you nwo disguise it cleverly you might be
able to obtain some exciting proofs of still unsolved conjectures ;-)
Andrzej Kozlowski
Yokohama, Japan
http://www.mimuw.edu.pl/~akoz/
http://platon.c.u-tokyo.ac.jp/andrzej/