How does a rule get applied?
- To: mathgroup@smc.vnet.net
- Subject: [mg12417] How does a rule get applied?
- From: fyaitsah@gsbux1.uchicago.edu (Yacine Ait-Sahalia)
- Date: Thu, 14 May 1998 11:15:26 -0400
- Organization: University of Chicago
Hi, I'm having trouble understanding how rules are applied after /. Consider the following example: x^a + x^(1+a) /. x^(n_) + x^(n_+1) ->0 x^3 + x^(1+3) /. x^(n_) + x^(n_+1) ->0 x^3 /. x^(n_) ->0 Out[388]= 0 Out[389]= 3 4 x + x Out[390]= 0 Could anyone please explain to me why x^a + x^(1+a) /. x^(n_) + x^(n_+1) ->0 returns 0 (as expected), whereas x^3 + x^(1+3) /. x^(n_) + x^(n_+1) ->0 returns 3 4 x + x instead of 0? Thanks for your help.