Disjoint sum of finsets #
This file defines the disjoint sum of two finsets as Finset (α ⊕ β). Beware not to confuse with
the Finset.sum operation which computes the additive sum.
Main declarations #
Finset.disjSum:s.disjSum tis the disjoint sum ofsandt.Finset.toLeft: Given a finset of elementsα ⊕ β, extracts all the elements of the formα.Finset.toRight: Given a finset of elementsα ⊕ β, extracts all the elements of the formβ.
Given a finset of elements α ⊕ β, extract all the elements of the form α. This
forms a quasi-inverse to disjSum, in that it recovers its left input.
See also List.partitionMap.
Instances For
Given a finset of elements α ⊕ β, extract all the elements of the form β. This
forms a quasi-inverse to disjSum, in that it recovers its right input.
See also List.partitionMap.
Instances For
Finsets on sum types are equivalent to pairs of finsets on each summand.