Re: substitution rules and patterns
- To: mathgroup at smc.vnet.net
- Subject: [mg3421] Re: [mg3410] substitution rules and patterns
- From: Lou Talman <me at talmanl.mscd.edu>
- Date: Wed, 6 Mar 1996 01:46:32 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Susan Rempe wrote:
> Could someone tell me why the first substitution rule
> works and the second doesn't----
>
> In[70]:= (c^2)^(d/2)/.{(a_^2)^(b_ /2)->a^b}
>
> Out[70]= c^d
>
> In[71]:= (c^2)^(5/2)/.{(a_^2)^(b_ /2)->a^b}
>
> Out[71]= (c^2)^(5/2)
In[1]:=
FullForm[a/b]
Out[1]//FullForm=
Times[a, Power[b, -1]]
In[2]:=
FullForm[5/2]
Out[2]//FullForm=
Rational[5, 2]
==== [MESSAGE SEPARATOR] ====