SubsetQ

SubsetQ[list1,list2]

yields True if list2 is a subset of list1, and False otherwise.

Details

  • SubsetQ tests for non-strict subsets, and yields True if the listi are equivalent.
  • SubsetQ does not account for multiplicity of elements.

Examples

open allclose all

Basic Examples  (1)

Test if a set is a subset of another set:

In[1]:=
Click for copyable input
Out[1]=

Properties & Relations  (2)

See Also

Complement  MemberQ  Subsets  ContainsAll

Introduced in 2014
(10.0)