Mathematica 9 is now available

FreeQ

Usage

• 如果在expr中没有任何表达式匹配formFreeQ[expr, form]产生True 否则产生False
FreeQ[expr, form, levelspec]仅测试在expr的那些由levelspec指定的层的部分。


Notes

form 可以是一个模式.
• 例如: FreeQ[f[x^2] + y^2, x^_]LongRightArrow .
FreeQ 察看原始表达式的头,测试这些头是否匹配form.
• 参见 Mathematica 全书: 1.8.5节, 2.1.5节 and 2.3.5节.
• 同时参见: MemberQ, Count.
Further Examples

(同时参见 the Further Examples for the Heads option.)

This example shows a feature of FreeQ that is absent from MemberQ: here, FreeQ recognizes that the sum a+c is a subexpression of the larger sum.

In[1]:=  

Out[1]=

Here we see how the level argument to FreeQ affects its result. When no level is specified, matches at any level are reported.

In[2]:=  

Out[2]=

In[3]:=  

Out[3]=

In[4]:=  

Out[4]=

In[5]:=  

Out[5]=



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.