multiset.keys

Multiset of keys of an association multiset.

multiset.nodupkeys

nodupkeys s means that s has no duplicate keys.

finmap

finmap β is the type of finite maps over a multiset. It is effectively a quotient of alist β by permutation of the underlying list.

alist.to_finmap

The quotient map from alist to finmap.

finmap.lift_on

Lift a permutation-respecting function on alist to finmap.

finmap.lift_on₂

Lift a permutation-respecting function on 2 alists to 2 finmaps.

finmap.has_mem

The predicate a ∈ s means that s has a value associated to the key a.

finmap.keys

The set of keys of a finite map.

finmap.has_emptyc

The empty map.

finmap.singleton

The singleton map.

finmap.lookup

Look up the value associated to a key in a map.

finmap.replace

Replace a key with a given value in a finite map. If the key is not present it does nothing.

finmap.foldl

Fold a commutative function over the key-value pairs in the map

finmap.erase

Erase a key from the map. If the key is not present it does nothing.

finmap.insert

Insert a key-value pair into a finite map, replacing any existing pair with the same key.

finmap.extract

Erase a key from the map, and return the corresponding value, if found.

finmap.union

s₁ ∪ s₂ is the key-based union of two finite maps. It is left-biased: if there exists an a ∈ s₁, lookup a (s₁ ∪ s₂) = lookup a s₁.