Equivalence relations: partitions #
This file comprises properties of equivalence relations viewed as partitions. There are two implementations of partitions here:
- A collection
c : Set (Set α)of sets is a partition ofαif∅ ∉ cand each elementa : αbelongs to a unique setb ∈ c. This is expressed asIsPartition c - An indexed partition is a map
s : ι → αwhose image is a partition. This is expressed asIndexedPartition s.
Of course both implementations are related to Quotient and Setoid.
Setoid.isPartition.partition and Finpartition.isPartition_parts furnish
a link between Setoid.IsPartition and Finpartition.
TODO #
Could the design of Finpartition inform the one of Setoid.IsPartition? Maybe bundling it and
changing it from Set (Set α) to Set α where [Lattice α] [OrderBot α] would make it more
usable.
Tags #
setoid, equivalence, iseqv, relation, equivalence relation, partition, equivalence class
The empty set is not an equivalence class.
The elements of a set of sets partitioning α are the equivalence classes of the equivalence relation defined by the set of sets.
The equivalence relation made from the equivalence classes of an equivalence relation r equals r.
The equivalence between the quotient by an equivalence relation and its type of equivalence classes.
Equations
- r.quotientEquivClasses = Equiv.ofBijective (Quot.lift (fun (a : α) => ⟨{x : α | r x a}, ⋯⟩) ⋯) ⋯
Instances For
A collection c : Set (Set α) of sets is a partition of α into pairwise
disjoint sets if ∅ ∉ c and each element a : α belongs to a unique set b ∈ c.
Instances For
A partition of α does not contain the empty set.
All elements of a partition of α are the equivalence class of some y ∈ α.
The equivalence classes of the equivalence relation defined by a partition of α equal the original partition.
Defining ≤ on partitions as the ≤ defined on their induced equivalence relations.
Equations
- Setoid.Partition.le = { le := fun (x y : Subtype Setoid.IsPartition) => Setoid.mkClasses ↑x ⋯ ≤ Setoid.mkClasses ↑y ⋯ }
Defining a partial order on partitions as the partial order on their induced equivalence relations.
Equations
- Setoid.Partition.partialOrder = PartialOrder.mk ⋯
The order-preserving bijection between equivalence relations on a type α, and
partitions of α into subsets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A complete lattice instance for partitions; there is more infrastructure for the equivalent complete lattice on equivalence relations.
Equations
- Setoid.Partition.completeLattice = (Setoid.Partition.orderIso α).toGaloisInsertion.liftCompleteLattice
A finite setoid partition furnishes a finpartition
Equations
- hc.finpartition = { parts := c, supIndep := ⋯, sup_parts := ⋯, not_bot_mem := ⋯ }
Instances For
A finpartition gives rise to a setoid partition
Constructive information associated with a partition of a type α indexed by another type ι,
s : ι → Set α.
IndexedPartition.index sends an element to its index, while IndexedPartition.some sends
an index to an element of the corresponding set.
This type is primarily useful for definitional control of s - if this is not needed, then
Setoid.ker index by itself may be sufficient.
two indexes are equal if they are equal in membership
- some : ι → α
sends an index to an element of the corresponding set
- some_mem (i : ι) : self.some i ∈ s i
membership invariance for
some - index : α → ι
index for type
α - mem_index (x : α) : x ∈ s (self.index x)
membership invariance for
index
Instances For
The non-constructive constructor for IndexedPartition.
Equations
- IndexedPartition.mk' s dis nonempty ex = { eq_of_mem := ⋯, some := fun (i : ι) => ⋯.some, some_mem := ⋯, index := fun (x : α) => ⋯.choose, mem_index := ⋯ }
Instances For
On a unique index set there is the obvious trivial partition
Equations
- IndexedPartition.instInhabitedUnivOfUnique = { default := { eq_of_mem := ⋯, some := default, some_mem := ⋯, index := default, mem_index := ⋯ } }
The equivalence relation associated to an indexed partition. Two elements are equivalent if they belong to the same set of the partition.
Equations
- hs.setoid = Setoid.ker hs.index
Instances For
The quotient associated to an indexed partition.
Instances For
The projection onto the quotient associated to an indexed partition.
Equations
- hs.proj = Quotient.mk''
Instances For
Equations
- hs.instInhabitedQuotient = { default := hs.proj default }
The obvious equivalence between the quotient associated to an indexed partition and the indexing type.
Equations
- hs.equivQuotient = (Setoid.quotientKerEquivOfRightInverse hs.index hs.some ⋯).symm
Instances For
A map choosing a representative for each element of the quotient associated to an indexed
partition. This is a computable version of Quotient.out using IndexedPartition.some.
Equations
- hs.out = hs.equivQuotient.symm.toEmbedding.trans { toFun := hs.some, inj' := ⋯ }
Instances For
This lemma is analogous to Quotient.mk_out'.
The indices of Quotient.out and IndexedPartition.out are equal.
Alias of IndexedPartition.index_out.
The indices of Quotient.out and IndexedPartition.out are equal.
This lemma is analogous to Quotient.out_eq'.
Combine functions with disjoint domains into a new function.
You can use the regular expression def.*piecewise to search for
other ways to define piecewise functions in mathlib4.
Equations
- hs.piecewise f x = f (hs.index x) x
Instances For
A family of injective functions with pairwise disjoint domains and pairwise disjoint ranges can be glued together to form an injective function.
A family of bijective functions with pairwise disjoint domains and pairwise disjoint ranges can be glued together to form a bijective function.