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
If x ∈ α is in 2 elements of a set of sets partitioning α, those 2 sets are equal.
Makes an equivalence relation from a set of sets partitioning α.
Equations
- Setoid.mkClasses c H = { r := fun (x y : α) => ∀ s ∈ c, x ∈ s → y ∈ s, iseqv := (_ : Equivalence fun (x y : α) => ∀ s ∈ c, x ∈ s → y ∈ s) }
Instances For
Makes the equivalence classes of an equivalence relation.
Equations
- Setoid.classes r = {s : Set α | ∃ (y : α), s = {x : α | Setoid.Rel r x y}}
Instances For
Two equivalence relations are equal iff all their equivalence classes are equal.
Two equivalence relations are equal iff their equivalence classes are equal.
The empty set is not an equivalence class.
Equivalence classes partition the type.
If x ∈ α is in 2 equivalence classes, the equivalence classes are equal.
The elements of a set of sets partitioning α are the equivalence classes of the equivalence relation defined by the set of sets.
The equivalence classes of the equivalence relation defined by a set of sets partitioning α are elements of the set of sets.
Distinct elements of a set of sets partitioning α are disjoint.
Makes an equivalence relation from a set of disjoints sets covering α.
Equations
- Setoid.setoidOfDisjointUnion hu H = Setoid.mkClasses c (_ : ∀ (a : α), ∃! (b : Set α), ∃! (x : b ∈ c), a ∈ b)
Instances For
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
- One or more equations did not get rendered due to their size.
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
- One or more equations did not get rendered due to their size.
Defining a partial order on partitions as the partial order on their induced equivalence relations.
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 = GaloisInsertion.liftCompleteLattice (OrderIso.toGaloisInsertion (Setoid.Partition.orderIso α))
A finite setoid partition furnishes a finpartition
Equations
- Setoid.IsPartition.finpartition hc = { parts := c, supIndep := (_ : Finset.SupIndep c id), sup_parts := (_ : Finset.sup c id = Set.univ), not_bot_mem := (_ : ∅ ∉ ↑c) }
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
- One or more equations did not get rendered due to their size.
Instances For
On a unique index set there is the obvious trivial partition
Equations
- One or more equations did not get rendered due to their size.
The equivalence relation associated to an indexed partition. Two elements are equivalent if they belong to the same set of the partition.
Equations
- IndexedPartition.setoid hs = Setoid.ker hs.index
Instances For
The quotient associated to an indexed partition.
Equations
Instances For
The projection onto the quotient associated to an indexed partition.
Equations
- IndexedPartition.proj hs = Quotient.mk''
Instances For
Equations
- IndexedPartition.instInhabitedQuotient hs = { default := IndexedPartition.proj hs default }
The obvious equivalence between the quotient associated to an indexed partition and the indexing type.
Equations
- IndexedPartition.equivQuotient hs = (Setoid.quotientKerEquivOfRightInverse hs.index hs.some (_ : ∀ (i : ι), hs.index (hs.some i) = i)).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
- IndexedPartition.out hs = Function.Embedding.trans (Equiv.toEmbedding (IndexedPartition.equivQuotient hs).symm) { toFun := hs.some, inj' := (_ : Function.Injective hs.some) }
Instances For
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'
.