Condition in replacement rule
- To: mathgroup at smc.vnet.net
- Subject: [mg67736] Condition in replacement rule
- From: "wandering.the.cosmos at gmail.com" <wandering.the.cosmos at gmail.com>
- Date: Thu, 6 Jul 2006 06:52:34 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I have a replacement rule that goes like A[V,W_] -> A[V,W] + B[W] but I want to perform this replacement if and only if V and W are not the same. It seems A[V,W_/;W!=V] -> A[V,W] + B[W] does not seem to work. How should I do this? Thanks!