       Re: Replacement Rule with Sqrt in denominator

• To: mathgroup at smc.vnet.net
• Subject: [mg114639] Re: Replacement Rule with Sqrt in denominator
• From: David Bevan <david.bevan at pb.com>
• Date: Sat, 11 Dec 2010 01:54:18 -0500 (EST)

```It seems to me that the reason rules seem counterintuitive to some na=EFve users is due to the difference between FullForm and StandardForm. Obviously rules can't be based on some nebulous concept of mathematical understanding and must be applied syntactically to a specific form of expressions; Mathematica implements rules against FullForm.

If it were possible to represent StandardForm as a 'tree structure' (rather than just as a visible display), then rules could be applied against that form. For example, we might have:

FullForm[x/Sqrt + 1/z + I]

Plus[Times[Power[5, Rational[-1, 2]], x], Power[z, -1], Complex[0, 1]]

FullStandardForm[x/Sqrt + 1/z + I]

Plus[Divide[x, Sqrt], Divide[1, z], I]

Of course, this does not provide any more mathematical intuition than apply ing rules to FullForm, but the ability to apply rules to FullStandardForm would perhaps sometimes be a bit closer to what some users expect / want.

Maybe this is something Wolfram might consider.

David %^>

-----Original Message-----
From: AES [mailto:siegman at stanford.edu]
Sent: 10 December 2010 07:30
To: mathgroup at smc.vnet.net
Subject: [mg114639] [mg114611] Re: Replacement Rule with Sqrt in denominator

In article <idnqq6\$q5i\$1 at smc.vnet.net>,
Noqsi <noqsiaerospace at gmail.com> wrote:

> It is easy to see the kind of chaos the vague and ambiguous "rules
> should be interpreted semantically in a way that makes mathematical
> sense" would cause. How should
>
> a + b I /. I->-I
>
> be interpreted *semantically*?

I do not possess anything like the depth of knowledge of symbolic
algebra or the understanding of the principles of semantics that would
embolden me to offer any answer to the preceding question.

But I will offer the following opinion:  However the above rule is to be
interpreted, in any decent symbolic algebra system, assuming a and b
have not yet been assigned any values, the symbol I should be
interpreted (i.e., modified) identically -- i.e., in *exactly* the same
fashion -- for either of the inputs

a + b I /. I->-I      OR     a + 2 b I /. I->-I

This is NOT the case in Mathematica.  This behavior is a "gotcha" that
can be responsible for large and hard to trace difficulties for many
users

Furthermore, I believe that Mathematica WILL interpret (i.e. , modify)
the two inputs above in exactly the same fashion if the character I in
thee two expressions is replaced by ANY OTHER single upper or lower case
letter in the alphabet.  Does anyone else find this not to be true?

```

• Prev by Date: Re: DSolve on 'simple' differential equations
• Next by Date: Re: On the foundation of Mathematica, was Re: Foo /: Plus[b_Foo] := b
• Previous by thread: Re: Replacement Rule with Sqrt in denominator
• Next by thread: Re: Replacement Rule with Sqrt in denominator