MathGroup Archive 2009

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

Search the Archive

Re: MatchQ, silly question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105112] Re: MatchQ, silly question
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Sat, 21 Nov 2009 03:34:44 -0500 (EST)
  • References: <he5v9i$3gh$1@smc.vnet.net>

Mathematica evaluates all arguments and hence _ _^_  gets evaluated as
well. Since the underscore is simply the function Blank[] this becomes
Blank[] Blank[]^Blank[]. This can be simplified to Blank[]^(Blank[]
+1). And now, the two structures are dissimilar and don't match. To
prevent this, the blanks indeed need to be labeled to prevent
simplification.

Cheers -- Sjoerd

On Nov 20, 1:41 pm, janos <janostothmeis... at gmail.com> wrote:
> MatchQ[3 x^2, #] & /@ {3 x_^2,  3 x_^_, _ x_^_, _ _^_, _ (_^_), _ *
> (_^_)}
>
> dives False in the last cases. Why? The FullForm
>
> Power[Blank[ ],Plus[1,Blank[ ]]]
>
> contains Plus, why?
>
> Thank you.
>
> J=E1nos



  • Prev by Date: Re: Undo in Mathematica
  • Next by Date: Re: PolarPlot goes upto 1.2 on axis, not 1?
  • Previous by thread: Re: MatchQ, silly question
  • Next by thread: Re: MatchQ, silly question