Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Replacement Rule with Sqrt in denominator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114666] Re: Replacement Rule with Sqrt in denominator
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Sun, 12 Dec 2010 05:43:08 -0500 (EST)


----- Original Message -----
> From: "Jack L Goldberg 1" <jackgold at umich.edu>
> To: mathgroup at smc.vnet.net
> Sent: Saturday, December 11, 2010 12:52:23 AM
> Subject: [mg114629] Re: Replacement Rule with Sqrt in denominator
> a) Input as typed: 2<=x<=4. Look at its fullform. On my Mac
> running ver. 7 of Mathematica, I get returned,
> LessEqual[2,x,4].
> 
> b) Now type in Reduce[2<=x<=4]. You will get
> Inequality[2,LessEqual,x,LessEqual,4].
> 
> These are are different expressions! How can one program replacement
> rules when one can not be sure of the FullForm? These structures are
> entirely different. Which fullform can one assume is the one
> Mathematica sees
> in some complicated module wherein one step is a replacement rule?
> 
> Jack Goldberg
> Mathematics
> University of Michigan

The FullForm seen is the one you would obtain by printing FullForm[expression] at the point of computation where you are about to do the replacement.

The example above is troublesome because it shows an ambiguity in StandardForm. The InputForms are different, though, with the one for Inequality being identical to its FullForm.

In other examples that have appeared in this thread, the StandardForm and InputForm views of expressions are not in general ambiguous so much as misleading as to the actual structure. (You probably knew that.)

Daniel Lichtblau
Wolfram Research





  • Prev by Date: Re: Replacement Rule with Sqrt in denominator
  • Next by Date: Re: Message composition was changed in v8?
  • Previous by thread: Re: Replacement Rule with Sqrt in denominator
  • Next by thread: Re: Replacement Rule with Sqrt in denominator