MathGroup Archive 2010

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

Search the Archive

Re: Why does this pattern fail to match?

  • To: mathgroup at
  • Subject: [mg114259] Re: Why does this pattern fail to match?
  • From: Richard Fateman <fateman at>
  • Date: Mon, 29 Nov 2010 06:07:06 -0500 (EST)
  • References: <iclfej$lb7$> <ico230$ng8$> <ictg2a$mkf$>

On 11/28/2010 3:56 AM, kj wrote:
> On Nov 25, 11:57 am, kj<no.em... at>  wrote:
>>> I'm tearing my hair out over this one.  Could someone please explain
>>> to me why all the following MatchQ expressions

You are, I think, looking for an algorithm for UNIFICATION
which would tell you under what conditions there exists a single
expression that satisfies both patterns.

Unification is not the same as pattern matching one pattern to some 

Since Mathematica conflates the notion of pattern with that of 
expression  (with some benefits), it is possible to write down
commands like your MatchQs which in reality (i.e. implementation)
don't match your mental assumptions about what is happening.

A rule of thumb:

don't have any "_" characters in expressions.

they belong in patterns.

[yes, it COULD be meaningful to violate this rule. ]


  • Prev by Date: Re: Mathematica 8 ImageKeypoints error
  • Next by Date: Re: to get all parametric plots/line traces
  • Previous by thread: Re: Why does this pattern fail to match?
  • Next by thread: Rendering transparent objects changed in M8