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∅ ∉ c
and 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
Alias of Setoid.empty_notMem_classes
.
The empty set is not an equivalence class.
Makes an equivalence relation from a set of disjoints sets covering α.
Equations
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}, ⋯⟩) ⋯) ⋯
A partition of α
does not contain the empty set.
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 = { le := fun (x1 x2 : Subtype Setoid.IsPartition) => x1 ≤ x2, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_le := ⋯, le_antisymm := ⋯ }
A complete lattice instance for partitions; there is more infrastructure for the equivalent complete lattice on equivalence relations.
A finite setoid partition furnishes a finpartition
Equations
- hc.finpartition = { parts := c, supIndep := ⋯, sup_parts := ⋯, bot_notMem := ⋯ }
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.
The non-constructive constructor for IndexedPartition
.
On a unique index set there is the obvious trivial partition
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
The projection onto the quotient associated to an indexed partition.
Equations
- hs.proj = Quotient.mk''
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
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' := ⋯ }
This lemma is analogous to Quotient.mk_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.
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.