MathGroup Archive 2002

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

Search the Archive

Re: Why doesn't this rule work?

  • To: mathgroup at
  • Subject: [mg32470] Re: Why doesn't this rule work?
  • From: atelesforos at (Orestis Vantzos)
  • Date: Tue, 22 Jan 2002 03:19:52 -0500 (EST)
  • References: <a2ghu1$ki$>
  • Sender: owner-wri-mathgroup at

The correct rule is 
Plus[n1_. a, n2_. c, R___] /; n1 == -n2 :> Plus[R]
Repeat after me: FullForm is my best friend, FullForm is my best
Indeed FullForm[a-b-c] for instance returns
It is evident that a rule of the form (n1_. a + n2_. b) simply does
not match, since the only _Plus expression present contains many more
things than a and c.
Hope that helped,

  • Prev by Date: confusion with triple integral...
  • Next by Date: Re: Translations
  • Previous by thread: Why doesn't this rule work?
  • Next by thread: Re: Why doesn't this rule work?