MathGroup Archive 2010

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

Search the Archive

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

  • To: mathgroup at
  • Subject: [mg106114] Re: More /.{I->-1} craziness
  • From: Richard Fateman <fateman at>
  • Date: Fri, 1 Jan 2010 05:39:25 -0500 (EST)
  • References: <> <hhhmn8$o9t$>

Leonid Shifrin wrote:

> I think that there are not many more objects in Mathematica which are as
> tricky as <I> or Infinity in terms of pattern-matching. 

I agree.
That's why it can be fixed.

Here's a beginning of a short list for the "we're not just talking 
syntactic replacement-- version of substitution":

If the user says   -i --> i,   then do  Complex[a_,-b_] -> Complex[a,b].
If the user says   x^2 --> y,  then do  x^(-2)-> 1/y    also.

I assume this list can be enlarged somewhat, and could even be left 
open-ended by user option of some sort.  [e.g. should x^2--> y   also 
change x^3 to x*y?   or to y^(3/2) or ....]


>  It would perhaps be nice if such
> cases were more systematically documented, but they have nothing to do with
> bugs, 

You are right if you mean  "bug in Mathematica implementation of 
intended design"  (this is not such a bug).

But there is another concept:
"bug in Mathematica design, contrary to reasonable mathematical expectation"
(this IS such a bug).

  • Prev by Date: Re: Dynamic Plot of Stock/Currency Chart
  • Next by Date: Re: List to Expression
  • Previous by thread: Re: Dynamic Plot of Stock/Currency Chart
  • Next by thread: Re: More /.{I->-1} craziness