MathGroup Archive 2010

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

Search the Archive

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

  • To: mathgroup at
  • Subject: [mg106173] Re: [mg106153] Re: More /.{I->-1} craziness
  • From: Andrzej Kozlowski <akoz at>
  • Date: Mon, 4 Jan 2010 05:58:04 -0500 (EST)
  • References: <> <hhhmn8$o9t$> <>

On 3 Jan 2010, at 17:40, Vince Virgilio wrote:

> On Jan 2, 5:06 am, Leonid Shifrin <lsh... at> wrote:
>> Regarding this issue, I think I entirely agree with what David Bailey and
>> other people said: I don't consider replacement rules as a mathematical tool
>> for end users, but rather as an inner layer of Mathematica, which is also
>> exposed for flexibility / convenience and intended primarily to be used by
>> the more advanced users. [ . . . ]
> Leonid,
> Replacement rules are as mathematical as 'Set' rules; to classify them
> otherwise would mislead. The simple difference between the two types
> of rules is that Replace is manual while Set is automatic. Both
> provide the math concept of 'function', and both can apply to
> structures that are non-mathematical. User discretion chooses between
> them. 'More advanced users' likely will find more uses for manual rule
> sets. On the other hand, they appear in Roman Maeder's introductory
> books. (Was it "Introduction to Programming in Mathematica"?)
> Vince Virgilio

I think certain special cases of Set rules and replacement rules are "mathematical". Certainly in mathematics you often evaluate functions and expressions, and this can be done in Mathematica by defining a functions as


and then evaluating f[a]. That's just an evaluation and something that mathematicians of course do all the time. The local version of this is, of course,
and that's essentially the same thing. But what is not in general "mathematical" is

f[some_pattern] := expr


expr/.some_pattern -> something

This kind of thing is rare in mathematics, and in fact,  except for the 
already discussed "function" case, I can't think of any "mathematical" 
example. What is very common in mathematics is the sort of thing that 
PolynomialReduce is for, which looks like "semantic substitution" but is 
actually replacing a given expression by simpler one which is equivalent 
to it by some equivalence relation. I think its not a great exaggeration 
to say that most of applied mathematics consists of evaluation and most 
of pure mathematics of studying the effect of various equivalence 
relations on certain expressions. Neither has much in common with 
general syntactic substitution.

Andrzej Kozlowski

  • Prev by Date: Re: NDSolve problem with switching equations
  • Next by Date: Re: Re: More /.{I->-1} craziness
  • Previous by thread: Re: More /.{I->-1} craziness
  • Next by thread: Re: More /.{I->-1} craziness