MathGroup Archive 2005

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

Search the Archive

Re: Re: Replacement equivalence?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63337] Re: [mg63313] Re: Replacement equivalence?
  • From: Pratik Desai <pdesai1 at umbc.edu>
  • Date: Sat, 24 Dec 2005 07:19:02 -0500 (EST)
  • References: <do6892$b1t$1@smc.vnet.net><200512200919.EAA28528@smc.vnet.net> <dod6tt$4fd$1@smc.vnet.net> <200512231008.FAA25926@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

carlos at colorado.edu wrote:

>>Please refer to 1.10.4 of the mathematica book or just type 1.10.4 in
>>the help browser
>>    
>>
>
>Pratik: That is a very interesting suggestion, which
>I was not aware of. I will try it.  Many thanks!
>
>I thought first of using lists, as in
>rep={b -> {1,-1}, x -> { 2,-2,2*I,-2*I}};
>But that runs into length conformity problems, 
>e.g.,  (b^2+x^4)/.rep;
>
>  
>
Perhaps something like this

Cell[BoxData[{
RowBox[{"Clear", "[",
RowBox[{"b", ",", "x"}], "]"}], "\[IndentingNewLine]",
RowBox[{"Replace", "[",
RowBox[{
RowBox[{"(",
RowBox[{
RowBox[{"x", "^", "2"}], "+",
RowBox[{"b", "^", "4"}]}], ")"}], ",",
RowBox[{"x", "->",
RowBox[{
RowBox[{
RowBox[{"(",
RowBox[{"x", "=",
RowBox[{
RowBox[{"1", "\[Or]", "x"}], "=",
RowBox[{"-", "1"}]}]}], ")"}], "\[And]", "b"}], "->",
RowBox[{"(",
RowBox[{"b", "=",
RowBox[{
RowBox[{"2", "\[Or]", "b"}], "=",
RowBox[{
RowBox[{
RowBox[{"-", "2"}], " ", "\[Or]", "b"}], "=",
RowBox[{
RowBox[{
RowBox[{"2", "*", "I"}], "\[Or]", "b"}], "=",
RowBox[{
RowBox[{"-", "2"}], "*", "I"}]}]}]}]}], ")"}]}]}]}], "]"}]}], "Input",
CellAutoOverwrite->False]

 >>17

Pratik



-- 
Pratik Desai 

...Moderation, as well as Regularity of Thinking, so much to be wished for in the Heads of those who imagine they come into the World only to watch and govern it?s Motion
Gulliver's Travels
by Jonathan Swift




  • Prev by Date: Re: Matrices with Mathematica 5.1
  • Next by Date: Re: What we from 1^Infinity, Infinity^0, and similar stuff
  • Previous by thread: Re: Replacement equivalence?
  • Next by thread: Re: Replacement equivalence?