úÎ!V (c) Luke Palmer, 2013BSD3 Luke Palmer <lrpalmer@gmail.com> experimentalportable Safe-InferredF A Partition of a.: represents a collection of disjoint sets of a( whose union includes every element of a. Semantics: [[Partition a]] = P(P(a)) where P is the power set operation.&A partition in which every element of a! is in its own set. Semantics: ![[discrete]] = { { x } | x in a } Synonym for discrete.¨Takes a list of disjoint sets and constructs a partition containing those sets, with every remaining element being given its own set. The precondition is not checked.O (n log n ), where n3 is the total number of elements in the given sets.uTakes a list of (not necessarily disjoint) sets and constructs a partition that associates all elements shared in any of the sets.O (n k log n ), where k is the maximum set-size and n = l k1 is the total number of non-discrete elements.[Returns a list of all nontrivial sets (sets with more than one element) in the partition. joinElems x y merges the two sets containing x and y! into a single set. Semantics: Y[[joinElems x y p]] = (p `minus` find x `minus` find y) `union` { find x `union` find y }.O (max(k log n, k log k )), where k( is the size of nontrivial subsets and n. is the total number of elements in such sets.find p x finds the set that the element x# is associated with. Semantics: 1[[find p x]] = the unique s in p such that x in s.rep p x1 finds the minimum element in the set containing x.            data-partition-0.3.0.0Data.Partition PartitiondiscreteemptyfromDisjointSetsfromSetsnontrivialSets joinElemsfindrep forwardMap backwardMaprepFindcompose$fShowPartition