
has - tests for the existence of a given subexpression

Calling sequence:
has(expr, expr_1)
has(expr, list)
has(expr, set)

Parameter:
expr, expr_1   --  expressions
list           --  list
set            --  set

Summary:

has tests if the expressionexpr contains the subexpression expr_1.  Only
complete subexpressions are found that can be replaced with subs.

If the second argument of has is a list or set then the elements are tested to
see if one of them is a subexpression of expr.

>>  has(a+b+c, b);

     TRUE

>>  has(a+b+c, a+b);

      FALSE

>>  has((a+b)*c, [a+b, d]);

      TRUE

>>  has(cos(x + sin(y)^2), sin);

      TRUE

>>  has([f(a) + 2, sin(x), 3], {f, g});

      TRUE

See also:  contains , subs

