has
test for a specified subexpression
Calling Sequence
Parameters
Description
Thread Safety
Examples
has(f, x)
f
-
expression
x
expression, list or set of expressions
The has(f, x) function returns true if f contains the expression x; otherwise false is returned.
The expression f contains x if and only if a subexpression of f (as defined by Maple's op function) is equal to x.
Note: If f contains x, it does not necessarily mean that f functionally depends on x.
If x is a list or set, then f contains x if and only if f contains at least one item in x. That is, has(f,{x,y}) is equivalent to has(f,x) or has(f,y).
If the item that you want has to search for is itself a list or set, you must enclose it in a list or set. Otherwise, has will search for items in the list or set as described above.
Since has must traverse the entire expression tree for f, it can be an expensive operation. Do not use has, when member will serve just as well.
The has command is thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
f≔a+b3+c43
f≔b3+a+c43
has⁡f,a
true
has⁡f,b3
has⁡f,b2
false
has⁡f,a+b3+c
has⁡f,a+c
has⁡f,c,d
has⁡f,d,e
f≔Int⁡g⁡t,t=a..b
f≔∫abg⁡tⅆt
has⁡f,g
has⁡f,t
diff⁡f,t
0
has⁡1,2,1,2
has⁡1,2,1,2,3
has⁡1,4,2,3,4
has⁡1,4,2,3,3,4
See Also
depends
hasfun
hastype
member
numboccur
op
Download Help Document