Could someone help me to explain the following strange behavior of Mathematica with the following expression:
In[903]:= Replace[And[a, b], {And[x__] :> List[x]}]
Out[903]= {a && b}
in comparison to:
In[891]:= Replace[and[a, b], {and[x__] :> List[x]}]
Out[891]= {a, b}
I expected to get the result of the second example {a, b} for the first expression instead of {a && b}. In the Pattern "And[x__] " the "And" seems not to be properly recognized for substitution, so that it is still remaining in the result {a && b}.
The second example with the meaningless symbol "and" is working as expected. I guess it is a special behavior of the BuildIn-Function "And".
Thank you in advance. Uwe Möhring