The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V04. Order and lattices

Mathlib.Order.Partition.Basic

105 declarations. Mathlib docs · Source

Partitions

A Partition of an element a in a complete lattice is an independent family of nontrivial elements whose supremum is a.

An important special case is where s : Set α, where a Partition s corresponds to a partition of the elements of s into a family of nonempty sets. This is equivalent to a transitive and symmetric binary relation r : α → α → Prop where s is the set of all x for which r x x.

Partitions are ordered by refinement: P ≤ Q if every part of P is less than or equal to a part of Q.

Main declarations

  • Partition s: For [CompleteLattice α] and s : α, a Partition s is an independent collection of nontrivial elements whose supremum is s.
  • Partition.removeBot: A constructor for Partition s that removes ⊥ from a set of parts.
  • Partition.instOrderTop: Partition s has a top element, consisting of just s if s ≠ ⊥ or nothing otherwise.
  • Partition.instSemilatticeInf: Partition s has finite meets P ⊓ Q when α is a frame, given by the collection of all non-bottom infima p ⊓ q of parts of the two partitions.
  • Partition.Rel: The partial equivalence relation induced by a partition of a set.
  • Partition.IsRepFun: A predicate characterizing a representative function for a partition.

Representative functions (IsRepFun)

IsRepFun P f means that f sends each element of the support to a representative in its Partition.Rel-class, agrees on related elements, and is the identity outside the support.

This is useful whenever a construction must pick one distinguished element per part of a partition. For example, in graph theory one may partition edges into parallel classes or vertices into connected components; a representative function can specify which edge remains when simplifying parallel edges, or how supervertices are labeled after contraction. Similar uses arise in matroid theory and in the definition of minors.

Tempting alternatives are to use Classical.choice or fix a global well-order and take minimal representatives. However, these lead to issues with inconsistencies: independent choices need not respect relations between different instances (e.g. monotonicity of simplifications with respect to subgraph order), a global order can clash with structure already carried by the type, and maps between different types need not intertwine two separate canonical choices. Stating hypotheses with IsRepFun keeps the chosen representatives explicit; existence under suitable conditions can be proved separately.

TODO

  • Link this to Finpartition.
  • Show that when α is a frame Partition α also has finite joins, i.e. that it is a lattice.

Induced relation

Representative functions

See the module docstring for motivation (graph simplification, minors, and why we use an explicit IsRepFun hypothesis rather than a global choice of representatives).

theorem Partition.mk.inj E1 #

∀ {α : Type u_1} {inst : CompleteLattice α} {s : α} {parts : Set α} {sSupIndep' : sSupIndep parts}
  {bot_notMem' : ⊥ ∉ parts} {sSup_eq' : sSup parts = s} {parts_1 : Set α} {sSupIndep'_1 : sSupIndep parts_1}
  {bot_notMem'_1 : ⊥ ∉ parts_1} {sSup_eq'_1 : sSup parts_1 = s},
  { parts := parts, sSupIndep' := sSupIndep', bot_notMem' := bot_notMem', sSup_eq' := sSup_eq' } =
      { parts := parts_1, sSupIndep' := sSupIndep'_1, bot_notMem' := bot_notMem'_1, sSup_eq' := sSup_eq'_1 } →
    parts = parts_1

theorem Partition.removeBot.congr_simp E1 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] (P P_1 : Set α) (e_P : P = P_1) (indep : sSupIndep P)
  (hsSup : sSup P = s), Partition.removeBot P indep hsSup = Partition.removeBot P_1 ⋯ ⋯

theorem Partition.mk.injEq E0 #

∀ {α : Type u_1} [inst : CompleteLattice α] {s : α} (parts : Set α) (sSupIndep' : sSupIndep parts)
  (bot_notMem' : ⊥ ∉ parts) (sSup_eq' : sSup parts = s) (parts_1 : Set α) (sSupIndep'_1 : sSupIndep parts_1)
  (bot_notMem'_1 : ⊥ ∉ parts_1) (sSup_eq'_1 : sSup parts_1 = s),
  ({ parts := parts, sSupIndep' := sSupIndep', bot_notMem' := bot_notMem', sSup_eq' := sSup_eq' } =
      { parts := parts_1, sSupIndep' := sSupIndep'_1, bot_notMem' := bot_notMem'_1, sSup_eq' := sSup_eq'_1 }) =
    (parts = parts_1)

theorem Partition.rep.congr_simp E1 #

∀ {α : Type u_1} {u t t_1 : Set α} (e_t : t = t_1) (P P_1 : Partition u) (e_P : P = P_1) (ht : t ∈ P),
  P.rep ht = P_1.rep ⋯

def Partition.ctorIdx E1 #

{α : Type u_1} → {inst : CompleteLattice α} → {s : α} → Partition s → ℕ

theorem Partition.mk.congr_simp E1 #

∀ {α : Type u_1} [inst : CompleteLattice α] {s : α} (parts parts_1 : Set α) (e_parts : parts = parts_1)
  (sSupIndep' : sSupIndep parts) (bot_notMem' : ⊥ ∉ parts) (sSup_eq' : sSup parts = s),
  { parts := parts, sSupIndep' := sSupIndep', bot_notMem' := bot_notMem', sSup_eq' := sSup_eq' } =
    { parts := parts_1, sSupIndep' := ⋯, bot_notMem' := ⋯, sSup_eq' := ⋯ }

structure Partition E3 #

{α : Type u_1} → [CompleteLattice α] → α → Type u_1

A Partition of an element s of a CompleteLattice is a collection of independent nontrivial elements whose supremum is s.

ctor Partition.mk E0 #

{α : Type u_1} →
  [inst : CompleteLattice α] → {s : α} → (parts : Set α) → sSupIndep parts → ⊥ ∉ parts → sSup parts = s → Partition s

abbrev Partition.parts E1 #

{α : Type u_1} → [inst : CompleteLattice α] → {s : α} → Partition s → Set α

The collection of parts

theorem Partition.sSupIndep' E1 #

∀ {α : Type u_1} [inst : CompleteLattice α] {s : α} (self : Partition s), sSupIndep self.parts

The parts are sSupIndep.

theorem Partition.bot_notMem' E1 #

∀ {α : Type u_1} [inst : CompleteLattice α] {s : α} (self : Partition s), ⊥ ∉ self.parts

The bottom element is not a part.

theorem Partition.sSup_eq' E1 #

∀ {α : Type u_1} [inst : CompleteLattice α] {s : α} (self : Partition s), sSup self.parts = s

The supremum of all parts is s.

instance Partition.instSetLike E0 #

{α : Type u_1} → [inst : CompleteLattice α] → {s : α} → SetLike (Partition s) α

def Partition.Simps.coe E1 #

{α : Type u_1} → [inst : CompleteLattice α] → {s : α} → Partition s → Set α

See Note [custom simps projection].

theorem Partition.coe_parts E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] {P : Partition s}, P.parts = ↑P

theorem Partition.ext E1 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] {P Q : Partition s}, (∀ (x : α), x ∈ P ↔ x ∈ Q) → P = Q

theorem Partition.ext_iff E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] {P Q : Partition s}, P = Q ↔ ∀ (x : α), x ∈ P ↔ x ∈ Q

theorem Partition.sSupIndep E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] (P : Partition s), sSupIndep ↑P

theorem Partition.disjoint E1 #

∀ {α : Type u_1} {s x y : α} [inst : CompleteLattice α] {P : Partition s}, x ∈ P → y ∈ P → x ≠ y → Disjoint x y

theorem Partition.pairwiseDisjoint E1 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] {P : Partition s}, (↑P).PairwiseDisjoint id

theorem Partition.sSup_eq E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] (P : Partition s), sSup ↑P = s

theorem Partition.iSup_eq E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] (P : Partition s), ⨆ x ∈ P, x = s

theorem Partition.le_of_mem E1 #

∀ {α : Type u_1} {s x : α} [inst : CompleteLattice α] (P : Partition s), x ∈ P → x ≤ s

theorem Partition.parts_nonempty E1 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] (P : Partition s), s ≠ ⊥ → (↑P).Nonempty

theorem Partition.bot_notMem E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] (P : Partition s), ⊥ ∉ P

theorem Partition.ne_bot_of_mem E1 #

∀ {α : Type u_1} {s x : α} [inst : CompleteLattice α] {P : Partition s}, x ∈ P → x ≠ ⊥

theorem Partition.bot_lt_of_mem E1 #

∀ {α : Type u_1} {s x : α} [inst : CompleteLattice α] {P : Partition s}, x ∈ P → ⊥ < x

def Partition.copy E1 #

{α : Type u_1} → {s t : α} → [inst : CompleteLattice α] → Partition s → s = t → Partition t

Convert a Partition s into a Partition t via an equality s = t.

theorem Partition.coe_copy E0 #

∀ {α : Type u_1} {s t : α} [inst : CompleteLattice α] (P : Partition s) (hst : s = t), ↑(P.copy hst) = ↑P

theorem Partition.mem_copy_iff E0 #

∀ {α : Type u_1} {s t x : α} [inst : CompleteLattice α] {P : Partition s} (hst : s = t), x ∈ P.copy hst ↔ x ∈ P

def Partition.partscopyEquiv E1 #

{α : Type u_1} → {s t : α} → [inst : CompleteLattice α] → (P : Partition s) → (hst : s = t) → ↥(P.copy hst) ≃ ↥P

The natural equivalence between the subtype of parts and the subtype of parts of a copy.

theorem Partition.partscopyEquiv_symm_apply_coe E0 #

∀ {α : Type u_1} {s t : α} [inst : CompleteLattice α] (P : Partition s) (hst : s = t) (b : { b // (fun x ↦ x ∈ ↑P) b }),
  ↑((P.partscopyEquiv hst).symm b) = ↑b

theorem Partition.partscopyEquiv_apply_coe E0 #

∀ {α : Type u_1} {s t : α} [inst : CompleteLattice α] (P : Partition s) (hst : s = t)
  (a : { a // (fun x ↦ x ∈ ↑(P.copy hst)) a }), ↑((P.partscopyEquiv hst) a) = ↑a

def Partition.removeBot E3 #

{α : Type u_1} → {s : α} → [inst : CompleteLattice α] → (P : Set α) → sSupIndep P → sSup P = s → Partition s

A constructor for Partition s that removes ⊥ from the set of parts.

theorem Partition.coe_removeBot E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] (P : Set α) (indep : sSupIndep P) (hsSup : sSup P = s),
  ↑(Partition.removeBot P indep hsSup) = P \ {⊥}

theorem Partition.mem_removeBot E0 #

∀ {α : Type u_1} {s x : α} [inst : CompleteLattice α] (P : Set α) (indep : sSupIndep P) (hsSup : sSup P = s),
  x ∈ Partition.removeBot P indep hsSup ↔ x ∈ P ∧ x ≠ ⊥

theorem Partition.notMem_of_bot E0 #

∀ {α : Type u_1} [inst : CompleteLattice α] (P : Partition ⊥) (x : α), x ∉ P

instance Partition.instUniqueBot E0 #

{α : Type u_1} → [inst : CompleteLattice α] → Unique (Partition ⊥)

There is a unique partition of ⊥.

theorem Partition.ne_bot_of_mem' E1 #

∀ {α : Type u_1} {s x : α} [inst : CompleteLattice α] {P : Partition s}, x ∈ P → s ≠ ⊥

instance Partition.instPartialOrder E0 #

{α : Type u_1} → {s : α} → [inst : CompleteLattice α] → PartialOrder (Partition s)

Partitions on s are ordered by refinement: P ≤ Q if every part of P is contained in a part of Q.

theorem Partition.le_def E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] {P Q : Partition s}, P ≤ Q ↔ ∀ x ∈ P, ∃ y ∈ Q, x ≤ y

theorem Partition.exists_le_of_mem_le E1 #

∀ {α : Type u_1} {s x : α} [inst : CompleteLattice α] {P Q : Partition s}, P ≤ Q → x ∈ P → ∃ y ∈ Q, x ≤ y

theorem Partition.existsUnique_of_mem_le E1 #

∀ {α : Type u_1} {s x : α} [inst : CompleteLattice α] {P Q : Partition s}, P ≤ Q → x ∈ P → ∃! y, y ∈ Q ∧ x ≤ y

instance Partition.instOrderTop E3 #

{α : Type u_1} → {s : α} → [inst : CompleteLattice α] → OrderTop (Partition s)

The top partition of s is the partition with the single part s, or no parts if s is the bottom element.

theorem Partition.top_def E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α], ⊤ = Partition.removeBot {s} ⋯ ⋯

theorem Partition.parts_top E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α], s ≠ ⊥ → ↑⊤ = {s}

theorem Partition.mem_top_iff E0 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α] {a : α}, a ∈ ⊤ ↔ a = s ∧ a ≠ ⊥

theorem Partition.parts_top_subset E1 #

∀ {α : Type u_1} {s : α} [inst : CompleteLattice α], ↑⊤ ⊆ {s}

instance Partition.instSemilatticeInf E3 #

{α : Type u_2} → [inst : Order.Frame α] → (s : α) → SemilatticeInf (Partition s)

When α is a frame, the meet P ⊓ Q of two partitions is the partition consisting of all non-bottom meets p ⊓ q for p ∈ P and q ∈ Q.

Note that while finite meets of partitions can be constructed in this way, arbitrary meets generally do not exist: for example when α is the frame of open subsets of the Cantor space, Partition α has no bottom element.

theorem Partition.mem_inf_iff E0 #

∀ {α : Type u_2} [inst : Order.Frame α] {s a : α} {P Q : Partition s}, a ∈ P ⊓ Q ↔ a ≠ ⊥ ∧ ∃ p ∈ P, ∃ q ∈ Q, a = p ⊓ q

theorem Partition.sUnion_eq E0 #

∀ {α : Type u_1} {s : Set α} (P : Partition s), ⋃₀ ↑P = s

theorem Partition.nonempty_of_mem E1 #

∀ {α : Type u_1} {u t : Set α} {P : Partition u}, t ∈ P → t.Nonempty

theorem Partition.empty_notMem E1 #

∀ {α : Type u_1} {u : Set α} {P : Partition u}, ∅ ∉ P

theorem Partition.subset_of_mem E1 #

∀ {α : Type u_1} {u t : Set α} {P : Partition u}, t ∈ P → t ⊆ u

theorem Partition.mem_iff_exists E0 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, x ∈ u ↔ ∃ t ∈ P, x ∈ t

theorem Partition.mem_iff_unique E0 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, x ∈ u ↔ ∃! t, t ∈ P ∧ x ∈ t

theorem Partition.subset_sUnion_and_mem_iff_mem E1 #

∀ {α : Type u_1} {S : Set (Set α)} {u t : Set α} {P : Partition u}, S ⊆ ↑P → (t ⊆ ⋃₀ S ∧ t ∈ P ↔ t ∈ S)

theorem Partition.subset_sUnion_iff_mem E1 #

∀ {α : Type u_1} {S : Set (Set α)} {u t : Set α} {P : Partition u}, t ∈ P → S ⊆ P.parts → (t ⊆ ⋃₀ S ↔ t ∈ S)

def Partition.rep E1 #

{α : Type u_1} → {u t : Set α} → (P : Partition u) → t ∈ P → α

Noncomputably choose a representative from an equivalence class.

theorem Partition.rep_mem E0 #

∀ {α : Type u_1} {u t : Set α} {P : Partition u} (ht : t ∈ P), P.rep ht ∈ t

The representative of a part belongs to that part.

theorem Partition.rep_mem_supp E0 #

∀ {α : Type u_1} {u t : Set α} {P : Partition u} (ht : t ∈ P), P.rep ht ∈ u

The representative of a part belongs to the underlying set.

def Partition.Rel E3 #

{α : Type u_1} → {s : Set α} → Partition s → α → α → Prop

Every partition of s : Set α induces a transitive, symmetric binary relation on α whose equivalence classes are the parts of P. The relation is irreflexive outside s.

theorem Partition.rel_le_iff_le E1 #

∀ {α : Type u_1} {u : Set α} {P Q : Partition u}, P.Rel ≤ Q.Rel ↔ P ≤ Q

theorem Partition.Rel.exists E1 #

∀ {α : Type u_1} {x y : α} {u : Set α} {P : Partition u}, P.Rel x y → ∃ t ∈ P, x ∈ t ∧ y ∈ t

theorem Partition.Rel.forall E1 #

∀ {α : Type u_1} {x y : α} {u t : Set α} {P : Partition u}, P.Rel x y → t ∈ P → (x ∈ t ↔ y ∈ t)

theorem Partition.rel_rfl_iff E0 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, P.Rel x x ↔ x ∈ u

instance Partition.instSymmRel E0 #

∀ {α : Type u_1} {u : Set α} (P : Partition u), Std.Symm P.Rel

instance Partition.instIsTransRel E0 #

∀ {α : Type u_1} {u : Set α} (P : Partition u), IsTrans α P.Rel

theorem Partition.Rel.symm E1 #

∀ {α : Type u_1} {x y : α} {u : Set α} {P : Partition u}, P.Rel x y → P.Rel y x

theorem Partition.rel_comm E1 #

∀ {α : Type u_1} {x y : α} {u : Set α} {P : Partition u}, P.Rel x y ↔ P.Rel y x

theorem Partition.Rel.trans E1 #

∀ {α : Type u_1} {x y z : α} {u : Set α} {P : Partition u}, P.Rel x y → P.Rel y z → P.Rel x z

theorem Partition.Rel.left_mem E1 #

∀ {α : Type u_1} {x y : α} {u : Set α} {P : Partition u}, P.Rel x y → x ∈ u

theorem Partition.Rel.right_mem E1 #

∀ {α : Type u_1} {x y : α} {u : Set α} {P : Partition u}, P.Rel x y → y ∈ u

theorem Partition.rep_rel E1 #

∀ {α : Type u_1} {x : α} {u t : Set α} {P : Partition u} (ht : t ∈ P), x ∈ t → P.Rel x (P.rep ht)

Any element of a part is related to the representative of that part.

def Partition.partOf E1 #

{α : Type u_1} → {u : Set α} → Partition u → α → Set α

The part of a partition containing a given element. If the element is not in the underlying set, this is empty.

theorem Partition.partOf_subset E1 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, P.partOf x ⊆ u

theorem Partition.mem_partOf_iff E0 #

∀ {α : Type u_1} {x y : α} {u : Set α} {P : Partition u}, x ∈ P.partOf y ↔ P.Rel y x

theorem Partition.mem_iff_mem_partOf_mem E0 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, x ∈ u ↔ x ∈ P.partOf x ∧ P.partOf x ∈ P

theorem Partition.mem_partOf E0 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, x ∈ u → x ∈ P.partOf x

theorem Partition.partOf_mem E1 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, x ∈ u → P.partOf x ∈ P

theorem Partition.partOf_rep E0 #

∀ {α : Type u_1} {u s : Set α} {P : Partition u} (hs : s ∈ P), P.partOf (P.rep hs) = s

theorem Partition.mem_iff_exists_partOf E0 #

∀ {α : Type u_1} {u s : Set α} {P : Partition u}, s ∈ P ↔ ∃ x ∈ u, P.partOf x = s

theorem Partition.partOf_nonempty_iff E0 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, (P.partOf x).Nonempty ↔ x ∈ u

theorem Partition.partOf_eq_empty_iff E0 #

∀ {α : Type u_1} {x : α} {u : Set α} {P : Partition u}, P.partOf x = ∅ ↔ x ∉ u

theorem Partition.rel_iff_partOf_eq_partOf_of_mem E1 #

∀ {α : Type u_1} {x y : α} {u : Set α} (P : Partition u), x ∈ u → y ∈ u → (P.Rel x y ↔ P.partOf x = P.partOf y)

theorem Partition.rel_iff_partOf_eq_partOf E1 #

∀ {α : Type u_1} {x y : α} {u : Set α} (P : Partition u), P.Rel x y ↔ ∃ (_ : x ∈ u) (_ : y ∈ u), P.partOf x = P.partOf y

structure Partition.IsRepFun E3 #

{α : Type u_1} → {u : Set α} → Partition u → (α → α) → Prop

A predicate characterizing when a function f : α → α is a representative function for a partition P. A representative function maps each element to a canonical representative in its equivalence class, is the identity outside the support, and maps related elements to the same representative.

ctor Partition.IsRepFun.mk E0 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α},
  (∀ ⦃a : α⦄, a ∉ u → f a = a) →
    (∀ ⦃a : α⦄, a ∈ u → P.Rel a (f a)) → (∀ ⦃a b : α⦄, P.Rel a b → f a = f b) → P.IsRepFun f

theorem Partition.IsRepFun.apply_of_notMem E1 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α}, P.IsRepFun f → ∀ ⦃a : α⦄, a ∉ u → f a = a

The function is the identity outside the support.

theorem Partition.IsRepFun.rel_apply E0 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α}, P.IsRepFun f → ∀ ⦃a : α⦄, a ∈ u → P.Rel a (f a)

The function maps each element in the support to a related element.

theorem Partition.IsRepFun.apply_eq_apply E0 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α}, P.IsRepFun f → ∀ ⦃a b : α⦄, P.Rel a b → f a = f b

The function maps related elements to the same representative.

theorem Partition.IsRepFun.apply_mem E1 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α} {a : α}, P.IsRepFun f → a ∈ u → f a ∈ u

theorem Partition.IsRepFun.image_subset E1 #

∀ {α : Type u_1} {s u : Set α} {P : Partition u} {f : α → α}, P.IsRepFun f → u ⊆ s → f '' s ⊆ s

theorem Partition.IsRepFun.mapsTo E1 #

∀ {α : Type u_1} {s u : Set α} {P : Partition u} {f : α → α}, P.IsRepFun f → u ⊆ s → Set.MapsTo f s s

theorem Partition.IsRepFun.mapsTo_of_disjoint E1 #

∀ {α : Type u_1} {s u : Set α} {P : Partition u} {f : α → α}, P.IsRepFun f → Disjoint u s → Set.MapsTo f s s

theorem Partition.IsRepFun.apply_mem_iff E0 #

∀ {α : Type u_1} {s u : Set α} {P : Partition u} {f : α → α} {a : α}, P.IsRepFun f → u ⊆ s → (f a ∈ s ↔ a ∈ s)

theorem Partition.IsRepFun.apply_eq_apply_iff_rel E1 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α} {a b : α}, P.IsRepFun f → a ∈ u → (f a = f b ↔ P.Rel a b)

theorem Partition.IsRepFun.apply_eq_apply_iff E0 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α} {a b : α}, P.IsRepFun f → (f a = f b ↔ a = b ∨ P.Rel a b)

theorem Partition.IsRepFun.forall_apply_eq_apply_iff E0 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α},
  P.IsRepFun f → ∀ (a : α), (∀ (x : α), f a = f x ↔ a = x) ∨ ∀ (x : α), f a = f x ↔ P.Rel a x

theorem Partition.IsRepFun.apply_eq_apply_iff' E1 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α} {a b : α},
  P.IsRepFun f → (f a = f b ↔ (a = b ∧ ∀ (c : α), f a = f c ↔ a = c) ∨ P.Rel a b)

theorem Partition.IsRepFun.idem E1 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f : α → α} {a : α}, P.IsRepFun f → f (f a) = f a

theorem Partition.IsRepFun.apply_apply E0 #

∀ {α : Type u_1} {u : Set α} {P : Partition u} {f g : α → α}, P.IsRepFun f → P.IsRepFun g → ∀ (x : α), f (g x) = f x

theorem Partition.IsRepFun.exists_extend_partial E1 #

∀ {α : Type u_1} {t u : Set α} (P : Partition u) (f₀ : ↑t → α),
  (∀ (x : ↑t), ↑x ∉ u → f₀ x = ↑x) →
    (∀ (x : ↑t), ↑x ∈ u → P.Rel (↑x) (f₀ x)) →
      (∀ (x y : ↑t), P.Rel ↑x ↑y → f₀ x = f₀ y) → ∃ f, P.IsRepFun f ∧ ∀ (x : ↑t), f ↑x = f₀ x

Any partially defined representative function extends to a complete one.

theorem Partition.IsRepFun.exists_extend_partial' E1 #

∀ {α : Type u_1} {t u : Set α} (P : Partition u),
  (∀ ⦃x y : α⦄, x ∈ t → y ∈ t → P.Rel x y → x = y) → ∃ f, P.IsRepFun f ∧ Set.EqOn f id t

For any set t containing no two distinct related elements, there is a representative function equal to the identity on t.

theorem Partition.IsRepFun.nonempty E1 #

∀ {α : Type u_1} {u : Set α} (P : Partition u), ∃ f, P.IsRepFun f

Every partition has a representative function.