Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: More /.{I->-1} craziness, con brio

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106633] Re: More /.{I->-1} craziness, con brio
  • From: Richard Fateman <fateman at cs.berkeley.edu>
  • Date: Tue, 19 Jan 2010 05:14:31 -0500 (EST)
  • References: <200912300915.EAA17299@smc.vnet.net> <hhhmn8$o9t$1@smc.vnet.net> <his71l$lad$1@smc.vnet.net> <201001171213.HAA09349@smc.vnet.net> <hj131g$bdr$1@smc.vnet.net>

Andrzej Kozlowski wrote:

> 
> I is never evaluated and is seen as an object with Head Symbol.

Yes, so that explains why the "error" is not caught and the message 
given for that case, too.  In fact the "symbol" is converted to 
something like  I$1234, which was explained in my note. Explaining why a 
system behaves in a certain way is not equivalent to proving that it is 
correct.  At least in my book.

  So
> everything works for this reason, 

No, as I said,
With[{I=-I}, 3+4 I]  returns 3-4 I,
  v=3+4I;   With[{I=-I},v]  returns 3+4I.

You can, of course, say that "this works, we meant to do that, any user 
who does not read and understand the full documentation should not use 
With, or more generally, should not expect Mathematica to conform to any 
particular ordinary beliefs about mathematics except by coincidence".

I explained why, and frankly, the idea that you can (in the technical 
sense) lambda-bind numbers, is a novelty.   Just as you cannot locally 
bind 3 to 4, you should not be able to locally bind I to 4, at least if 
I is a constant.  That's not a feature, and explaining how it works is 
to point out a solution to the puzzle of this buggy behavior, and 
perhaps point to a solution.   Properly implementing lambda-binding 
would be one solution, instead of constructing new names like I$1234 
would be one way.

RJF





  • Prev by Date: First function debug help
  • Next by Date: Re: More /.{I->-1} craziness, con brio
  • Previous by thread: Re: More /.{I->-1} craziness, con brio
  • Next by thread: Re: More /.{I->-1} craziness, con brio