úÎ{}x\+      !"#$%&'()*(c) 2012 Stefan Holdermans BSD-stylestefan@vectorfabrics.com provisionalportable Safe-Inferred+,-.+.+,-.(c) 2012 Stefan Holdermans BSD-stylestefan@vectorfabrics.com provisionalportable Safe-Inferred/01//01(c) 2012 Stefan Holdermans BSD-stylestefan@vectorfabrics.com provisional!non-portable (DeriveDataTypeable) Safe-Inferred++(An element of the free abelian group on a.'A signed multiset over objects of type a.O(1)]. The empty signed multiset, i.e., the multiset in which every object has multiplicity zero.O(1)O. Create a signed multiset that contains exactly one copy of the given object.O(log n)u. Insert a new copy of the given object into a signed multiset, i.e., increment the multiplicity of the object by 1.O(log n)æ. Insert a specified number of new copies of the given object into a signed multiset, i.e., increment the multiplicity of the object by the specified number. If the specified number is negative, copies are deleted from the set.O(log n)q. Delete a copy of the given object from a signed multiset, i.e., decrement the multiplicity of the object by 1. O(log n)õ. Delete a specified number of copies of the given object from a signed multiset, i.e., decrement the multiplicity of the object by the specified number. If the specified number is negative, new copies of the object are inserted into the set. O(log n)r. Delete all copies of the given object from a signed multiset, i.e., set the multiplicity of the object to zero. O(1)a. Return whether the signed multiset is empty, i.e., whether every object has multiplicity zero. O(n)~. Return whether the signed multiset is a set, i.e., whether all object have either multiplicity zero or else multiplicity 1. O(n)U. Return whether all objects in the signed multiset have nonnegative multiplicities.O(n)U. Return whether all objects in the signed multiset have nonpositive multiplicities.O(1)s. Return the number of members of the signed multiset, i.e., the number of objects that have nonzero multiplicity.O(n)e. Return the cardinality of the signed multiset, i.e., the sum of the multiplicities of all objects.O(log n)y. Return whether the given object is a member of the signed multiset, i.e., whether the object has nonzero multiplicity.O(log n)%. Return whether the given object is notR a member of the signed multiset, i.e., whether the object has multiplicity zero.O(log n)F. Return the multiplicity of the given object in the signed multiset.O(n)„. Return whether the first signed multiset is a submultiset of the second, i.e., whether each object that has nonzero multiplicity m1 in the first multiset has nonzero multiplicity n with m <= n in the second.O(n)¬. Return the union of two signed multisets. The multiplicity of an object in the returned multiset is the maximum of its nonzero multiplicities in the argument multisets.O(n)©. Return the additive union of two signed multisets. The multiplicity of an object in the returned multiset is the sum of its multiplicities in the argument multisets.O(n)ÿ. Return the intersection of two signed multisets. If an object has nonzero multiplicity in both argument multisets, its multiplicity in the returned multiset is the minimum of its multiplicities in the argument multisets; otherwise, its multiplicity in the returned multiset is zero.O(n)°. Return the root of the signed multiset. The multiplicity of an object in the returned multiset is zero if its multiplicity in the argument multiset is zero and 1 otherwise.O(n)ª. Return the shadow of the signed multiset. The multiplicity of an object in the returned multiset is the additive inverse of its multiplicity in the argument multiset.O(n)©. Return the modulus of the signed multiset. The multiplicity of an object in the returned multiset is the absolute value of its multiplicity in the argument multiset.O(n)ÿ . Return the signum of the signed multiset. The multiplicity of an object in the returned multiset is -1 if it has negative multiplicity in the argument multiset, zero if its multiplicity in the argument multiset is zero, and 1 if it has positive multiplicity in the argument multiset.O(n)Ê. Return the left-continuous unit step of the signed multiset. The multiplicity of an object in the returned multiset is zero if it has negative multiplicity in the argument multiset, and 1 otherwise.O(n)R. Return the additive union of the given number of copies of the signed multiset. O(n * log n)ô. Apply the given function to all objects of the signed multiset. If the the function maps distinct objects to the same new object, the multiplicity of the new object is the maximum of the nonzero multiplicities of the two original objects. O(n * log n)ç. Apply the given function to all objects of the signed multiset. If the the function maps distinct objects to the same new object, the multiplicity of the new object is the sum of the multiplicities of the two original objects. O(n)². Apply the given predicate to the members of the signed multiset and their multiplicities. The returned multiset contains the copies of the members that satisfy the predicate.!O(n)ÿ . Apply the given predicate to the members of the signed multiset and their multiplicity. The first returned multiset contains the copies of the members that satisfy the predicate, while the second returned multiset contains the copies of the members that do not satisfy the predicate."O(n)õ. Split the signed multiset into a multiset containing the copies of the members with a multiplicity less than or equal to the given number and a multiset containing the copies of the members with a multiplicity greater than the given number.#O(n)Œ. Perform a right-associative fold on the members of the signed multiset and their multiplicities using the given operator and start value.$O(n)”. Perform a strict right-associative fold on the members of the signed multiset and their multiplicities using the given operator and start value.%O(n)‹. Perform a left-associative fold on the members of the signed multiset and their multiplicities using the given operator and start value.&O(n)’. Perform a strict left-associative fold on the members of the signed multiset and their multiplicities using the given operator and start value.'O(n)m. Convert the signed multiset to a list that associates all members of the multiset with their multiplicity.(O(n + k) (with kx the combined length of the returned lists). Return two lists, such that: for each object with a positive multiplicity m2 in the signed multiset, the first list contains mm copies and the second list contains no copies of the object; for each object with a negative multiplicity -n;, the first list contains no and the second list contains no copies of the object; and for each object with zero multiplicity, neither list contains a copy of the object.) O(k * log n) (with ki the length of the argument list). Construct a signed multiset from a list of object/multiplicity pairs.* O(k * log n) (with kè the combined length of the argument lists). Construct a signed multiset by, starting from the empty multiset, inserting copies of objects from the first argument list and deleting copies of objects from the second argument list.2 Monoid under .3 Monoid under .6456  !"#$%&'()*72839:;<+  !"#$%&'()*+  !"#$%&'()*2456  !"#$%&'()*72839:;<=      !"#$%&'()*+,-./0123456789:;<=>?@signed-multiset-0.4Data.SignedMultisetData.SignedMultiset.ReadData.SignedMultiset.ShowAdditive getAdditiveSignedMultisetempty singletoninsert insertManydelete deleteMany deleteAllnullisSet isPositive isNegativesize cardinalitymember notMember multiplicityisSubmultisetOfunion additiveUnion intersectionrootshadowmodulussignumunitstepmultiplymap additiveMapfilter partitionsplitfoldrfoldr'foldlfoldl'toListtoListsfromList fromLists readsMembersreadMembersPrecparenmapReadS showsMembers showsMembercons$fMonoidAdditive$fMonoidSignedMultisetSMSunSMSnormafter$fDataSignedMultiset$fReadSignedMultiset$fShowSignedMultiset$fOrdSignedMultiset$fEqSignedMultiset