Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: ReplaceAll in Element[] Q

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25609] Re: ReplaceAll in Element[] Q
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 16 Oct 2000 03:04:35 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8s16kc$ig6@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

it *is* replaced as you can see from

ReplaceAll[Element[Alternatives[a, b], Reals], 
  Alternatives[a__] :> (Print[{a}]; {a})]

but than the Element[{a,b},Reals] is evaluated and the
Alternatives[] are restored because 

Element[l_List,dom_] will be transformed to

Element[l_Alternatives,dom]

regards
  Jens

Arturas Acus wrote:
> 
> Dear Group,
> 
> Could anybody help me in understanding this
> obviously strange behaviour
> 
> In[22]:=$Version
> 
> Out[22]="4.0 for Linux (April 21, 1999)"
> 
> In[23]:=ReplaceAll[Element[Alternatives[a, b], Reals], Alternatives -> List]
> 
> Out[23]=(a | b) \[Element] Reals
> 
> Why not replaced ??? Compare:
> 
> In[24]:=ReplaceAll[El[Alternatives[a, b], Reals], Alternatives -> List]
> 
> Out[24]=El[{a, b}, Reals]
>  As expected
> 
> Dr. Arturas Acus
> Institute of Theoretical
> Physics and Astronomy
> Gostauto 12, 2600,Vilnius
> Lithuania


  • Prev by Date: Macintosh CONFLICT: Mathematica + Instant Palm Desktop
  • Next by Date: front end graphics display
  • Previous by thread: ReplaceAll in Element[] Q
  • Next by thread: Re: ReplaceAll in Element[] Q