Documentation

Mathlib.Combinatorics.SimpleGraph.Regularity.Equitabilise

Equitabilising a partition #

This file allows to blow partitions up into parts of controlled size. Given a partition P and a b m : β„•, we want to find a partition Q with a parts of size m and b parts of size m + 1 such that all parts of P are "as close as possible" to unions of parts of Q. By "as close as possible", we mean that each part of P can be written as the union of some parts of Q along with at most m other elements.

Main declarations #

References #

[YaΓ«l Dillies, Bhavik Mehta, Formalising SzemerΓ©di’s Regularity Lemma in Lean][srl_itp]

theorem Finpartition.equitabilise_aux {Ξ± : Type u_1} [DecidableEq Ξ±] {s : Finset Ξ±} {m a b : β„•} {P : Finpartition s} (hs : a * m + b * (m + 1) = s.card) :
βˆƒ (Q : Finpartition s), (βˆ€ x ∈ Q.parts, x.card = m ∨ x.card = m + 1) ∧ (βˆ€ x ∈ P.parts, (x \ {y ∈ Q.parts | y βŠ† x}.biUnion id).card ≀ m) ∧ {i ∈ Q.parts | i.card = m + 1}.card = b

Given a partition P of s, as well as a proof that a * m + b * (m + 1) = #s, we can find a new partition Q of s where each part has size m or m + 1, every part of P is the union of parts of Q plus at most m extra elements, there are b parts of size m + 1 and (provided m > 0, because a partition does not have parts of size 0) there are a parts of size m and hence a + b parts in total.

noncomputable def Finpartition.equitabilise {Ξ± : Type u_1} [DecidableEq Ξ±] {s : Finset Ξ±} {m a b : β„•} {P : Finpartition s} (h : a * m + b * (m + 1) = s.card) :

Given a partition P of s, as well as a proof that a * m + b * (m + 1) = #s, build a new partition Q of s where each part has size m or m + 1, every part of P is the union of parts of Q plus at most m extra elements, there are b parts of size m + 1 and (provided m > 0, because a partition does not have parts of size 0) there are a parts of size m and hence a + b parts in total.

Equations
    Instances For
      theorem Finpartition.card_eq_of_mem_parts_equitabilise {Ξ± : Type u_1} [DecidableEq Ξ±] {s t : Finset Ξ±} {m a b : β„•} {P : Finpartition s} {h : a * m + b * (m + 1) = s.card} :
      t ∈ (equitabilise h).parts β†’ t.card = m ∨ t.card = m + 1
      theorem Finpartition.equitabilise_isEquipartition {Ξ± : Type u_1} [DecidableEq Ξ±] {s : Finset Ξ±} {m a b : β„•} {P : Finpartition s} {h : a * m + b * (m + 1) = s.card} :
      theorem Finpartition.card_filter_equitabilise_big {Ξ± : Type u_1} [DecidableEq Ξ±] {s : Finset Ξ±} {m a b : β„•} (P : Finpartition s) (h : a * m + b * (m + 1) = s.card) :
      {u ∈ (equitabilise h).parts | u.card = m + 1}.card = b
      theorem Finpartition.card_filter_equitabilise_small {Ξ± : Type u_1} [DecidableEq Ξ±] {s : Finset Ξ±} {m a b : β„•} (P : Finpartition s) (h : a * m + b * (m + 1) = s.card) (hm : m β‰  0) :
      {u ∈ (equitabilise h).parts | u.card = m}.card = a
      theorem Finpartition.card_parts_equitabilise {Ξ± : Type u_1} [DecidableEq Ξ±] {s : Finset Ξ±} {m a b : β„•} (P : Finpartition s) (h : a * m + b * (m + 1) = s.card) (hm : m β‰  0) :
      theorem Finpartition.card_parts_equitabilise_subset_le {Ξ± : Type u_1} [DecidableEq Ξ±] {s t : Finset Ξ±} {m a b : β„•} (P : Finpartition s) (h : a * m + b * (m + 1) = s.card) :
      t ∈ P.parts β†’ (t \ {u ∈ (equitabilise h).parts | u βŠ† t}.biUnion id).card ≀ m
      theorem Finpartition.exists_equipartition_card_eq {Ξ± : Type u_1} [DecidableEq Ξ±] (s : Finset Ξ±) {n : β„•} (hn : n β‰  0) (hs : n ≀ s.card) :

      We can find equipartitions of arbitrary size.