Set

Set -- the class of all sets.

Function for creating sets:

  • set
  • Operations on sets:

  • Set + Set -- union
  • Set ++ Set -- disjoint union
  • Set - Set -- difference
  • Set * Set -- intersection
  • Set ** Set -- Cartesian product
  • # -- the number of elements
  • member -- whether something is a member
  • product Set -- multiply the elements
  • isSubset(Set,Set) -- whether a set is a subset of another
  • subsets Set -- a list of the subsets
  • subsets(Set,ZZ) -- a list of the subsets with given cardinality
  • sum Set -- sum the elements
  • toList -- a list of the elements

  • topindexpreviousupnext