Re: Re: Replacement equivalence?
- To: mathgroup at smc.vnet.net
- Subject: [mg63252] Re: [mg63239] Re: Replacement equivalence?
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Tue, 20 Dec 2005 23:35:36 -0500 (EST)
- References: <do6892$b1t$1@smc.vnet.net> <200512200919.EAA28528@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 20 Dec 2005, at 18:19, David Bailey wrote: > carlos at colorado.edu wrote: >> This is a spinoff of an ongoing thread in s.m.s. Could the nonlinear >> replacement >> >> b^2 -> 1 >> >> be changed to the linear one >> >> b-> 1||-1 >> >> Similarly >> x^4 -> 16 to x -> 2||-2||2*I||-2*I >> >> Any possible side effects? >> > Hello, > > Quite a few really, for example: > > b^2 /. b -> 1 || -1 > > (1 || -1)^2 > > David Bailey > http://www.dbaileyconsultancy.co.uk > The only interpretation of the original post that makes any sense to me is that what the poster was trying to get at is the fact that the pattern _?(#^2 == 1 &) is equivalent to the pattern 1 | -1. Indeed: Cases[{1, -1, 2, -1, 3}, _?(#^2 == 1 &)] {1, -1, -1} Cases[{1, -1, 2, -1, 3}, 1 | -1] {1, -1, -1} Andrzej Kozlowski
- References:
- Re: Replacement equivalence?
- From: David Bailey <dave@Remove_Thisdbailey.co.uk>
- Re: Replacement equivalence?