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 / V30. Combinatorics

Mathlib.Combinatorics.SimpleGraph.Regularity.Uniform

58 declarations. Mathlib docs · Source

Graph uniformity and uniform partitions

In this file we define uniformity of a pair of vertices in a graph and uniformity of a partition of vertices of a graph. Both are also known as ε-regularity.

Finsets of vertices s and t are ε-uniform in a graph G if their edge density is at most ε-far from the density of any big enough s' and t' where s' ⊆ s, t' ⊆ t. The definition is pretty technical, but it amounts to the edges between s and t being "random" The literature contains several definitions which are equivalent up to scaling ε by some constant when the partition is equitable.

A partition P of the vertices is ε-uniform if the proportion of ε-uniform pairs of parts is greater than (1 - ε).

Main declarations

  • SimpleGraph.IsUniform: Graph uniformity of a pair of finsets of vertices.
  • SimpleGraph.nonuniformWitness: G.nonuniformWitness ε s t and G.nonuniformWitness ε t s together witness the non-uniformity of s and t.
  • Finpartition.nonUniforms: Nonuniform pairs of parts of a partition.
  • Finpartition.IsUniform: Uniformity of a partition.
  • Finpartition.nonuniformWitnesses: For each non-uniform pair of parts of a partition, pick witnesses of non-uniformity and dump them all together.

References

[Yaël Dillies, Bhavik Mehta, Formalising Szemerédi’s Regularity Lemma in Lean][srl_itp]

Graph uniformity

Uniform partitions

Equipartitions

Reduced graph

theorem Finpartition.IsUniform.congr_simp E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  (P P_1 : Finpartition A),
  P = P_1 →
    ∀ (G G_1 : SimpleGraph α),
      G = G_1 →
        ∀ {inst_3 : DecidableRel G.Adj} [inst_4 : DecidableRel G_1.Adj] (ε ε_1 : 𝕜),
          ε = ε_1 → P.IsUniform G ε = P_1.IsUniform G_1 ε_1

theorem SimpleGraph.edgeDensity.congr_simp E1 #

∀ {α : Type u_4} (G G_1 : SimpleGraph α),
  G = G_1 →
    ∀ {inst : DecidableRel G.Adj} [inst_1 : DecidableRel G_1.Adj] (a a_1 : Finset α),
      a = a_1 → ∀ (a_2 a_3 : Finset α), a_2 = a_3 → G.edgeDensity a a_2 = G_1.edgeDensity a_1 a_3

theorem SimpleGraph.regularityReduced.congr_simp E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  (P P_1 : Finpartition A),
  P = P_1 →
    ∀ (G G_1 : SimpleGraph α),
      G = G_1 →
        ∀ {inst_3 : DecidableRel G.Adj} [inst_4 : DecidableRel G_1.Adj] (ε ε_1 : 𝕜),
          ε = ε_1 →
            ∀ (δ δ_1 : 𝕜),
              δ = δ_1 → SimpleGraph.regularityReduced P G ε δ = SimpleGraph.regularityReduced P_1 G_1 ε_1 δ_1

theorem Finpartition.sparsePairs.match_1.congr_eq_1 E1 #

∀ {α : Type u_1} (motive : Finset α × Finset α → Sort u_2) (x : Finset α × Finset α)
  (h_1 : (u v : Finset α) → motive (u, v)) (u v : Finset α),
  x = (u, v) →
    (match x with
      | (u, v) => h_1 u v) ≍
      h_1 u v

theorem SimpleGraph.nonuniformWitnesses.congr_simp E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G G_1 : SimpleGraph α),
  G = G_1 →
    ∀ {inst_3 : DecidableRel G.Adj} [inst_4 : DecidableRel G_1.Adj] (ε ε_1 : 𝕜),
      ε = ε_1 →
        ∀ (s s_1 : Finset α),
          s = s_1 → ∀ (t t_1 : Finset α), t = t_1 → G.nonuniformWitnesses ε s t = G_1.nonuniformWitnesses ε_1 s_1 t_1

theorem Finpartition.nonUniforms.congr_simp E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  (P P_1 : Finpartition A),
  P = P_1 →
    ∀ (G G_1 : SimpleGraph α),
      G = G_1 →
        ∀ {inst_3 : DecidableRel G.Adj} [inst_4 : DecidableRel G_1.Adj] (ε ε_1 : 𝕜),
          ε = ε_1 → P.nonUniforms G ε = P_1.nonUniforms G_1 ε_1

theorem SimpleGraph.IsUniform.congr_simp E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] (G G_1 : SimpleGraph α),
  G = G_1 →
    ∀ {inst_2 : DecidableRel G.Adj} [inst_3 : DecidableRel G_1.Adj] (ε ε_1 : 𝕜),
      ε = ε_1 →
        ∀ (s s_1 : Finset α), s = s_1 → ∀ (t t_1 : Finset α), t = t_1 → G.IsUniform ε s t = G_1.IsUniform ε_1 s_1 t_1

theorem Finpartition.sparsePairs.congr_simp E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  (P P_1 : Finpartition A),
  P = P_1 →
    ∀ (G G_1 : SimpleGraph α),
      G = G_1 →
        ∀ {inst_3 : DecidableRel G.Adj} [inst_4 : DecidableRel G_1.Adj] (ε ε_1 : 𝕜),
          ε = ε_1 → P.sparsePairs G ε = P_1.sparsePairs G_1 ε_1

def SimpleGraph.IsUniform E3 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [Field 𝕜] → [LinearOrder 𝕜] → (G : SimpleGraph α) → [DecidableRel G.Adj] → 𝕜 → Finset α → Finset α → Prop

A pair of finsets of vertices is ε-uniform (aka ε-regular) iff their edge density is close to the density of any big enough pair of subsets. Intuitively, the edges between them are random-like.

instance SimpleGraph.instDecidableIsUniform E0 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [inst : Field 𝕜] →
      [inst_1 : LinearOrder 𝕜] →
        (G : SimpleGraph α) → [inst_2 : DecidableRel G.Adj] → (ε : 𝕜) → (s t : Finset α) → Decidable (G.IsUniform ε s t)

theorem SimpleGraph.IsUniform.mono E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {G : SimpleGraph α}
  [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α} {ε' : 𝕜}, ε ≤ ε' → G.IsUniform ε s t → G.IsUniform ε' s t

instance SimpleGraph.instSymmFinsetIsUniform E0 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] {G : SimpleGraph α}
  [inst_2 : DecidableRel G.Adj] {ε : 𝕜}, Std.Symm (G.IsUniform ε)

theorem SimpleGraph.IsUniform.symm E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] {G : SimpleGraph α}
  [inst_2 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α}, G.IsUniform ε s t → G.IsUniform ε t s

theorem SimpleGraph.isUniform_comm E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] (G : SimpleGraph α)
  [inst_2 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α}, G.IsUniform ε s t ↔ G.IsUniform ε t s

theorem SimpleGraph.isUniform_one E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] (G : SimpleGraph α)
  [inst_3 : DecidableRel G.Adj] {s t : Finset α}, G.IsUniform 1 s t

theorem SimpleGraph.IsUniform.pos E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {G : SimpleGraph α}
  [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α}, G.IsUniform ε s t → 0 < ε

theorem SimpleGraph.isUniform_singleton E0 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {G : SimpleGraph α}
  [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {a b : α}, G.IsUniform ε {a} {b} ↔ 0 < ε

theorem SimpleGraph.not_isUniform_zero E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {G : SimpleGraph α}
  [inst_3 : DecidableRel G.Adj] {s t : Finset α}, ¬G.IsUniform 0 s t

theorem SimpleGraph.not_isUniform_iff E0 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {G : SimpleGraph α}
  [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  ¬G.IsUniform ε s t ↔
    ∃ s' ⊆ s, ∃ t' ⊆ t, ↑s.card * ε ≤ ↑s'.card ∧ ↑t.card * ε ≤ ↑t'.card ∧ ε ≤ ↑|G.edgeDensity s' t' - G.edgeDensity s t|

def SimpleGraph.nonuniformWitnesses E1 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [inst : Field 𝕜] →
      [inst_1 : LinearOrder 𝕜] →
        [IsStrictOrderedRing 𝕜] →
          (G : SimpleGraph α) → [DecidableRel G.Adj] → 𝕜 → Finset α → Finset α → Finset α × Finset α

An arbitrary pair of subsets witnessing the non-uniformity of (s, t). If (s, t) is uniform, returns (s, t). Witnesses for (s, t) and (t, s) don't necessarily match. See SimpleGraph.nonuniformWitness.

theorem SimpleGraph.left_nonuniformWitnesses_subset E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  ¬G.IsUniform ε s t → (G.nonuniformWitnesses ε s t).1 ⊆ s

theorem SimpleGraph.left_nonuniformWitnesses_card E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  ¬G.IsUniform ε s t → ↑s.card * ε ≤ ↑(G.nonuniformWitnesses ε s t).1.card

theorem SimpleGraph.right_nonuniformWitnesses_subset E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  ¬G.IsUniform ε s t → (G.nonuniformWitnesses ε s t).2 ⊆ t

theorem SimpleGraph.right_nonuniformWitnesses_card E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  ¬G.IsUniform ε s t → ↑t.card * ε ≤ ↑(G.nonuniformWitnesses ε s t).2.card

theorem SimpleGraph.nonuniformWitnesses_spec E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  ¬G.IsUniform ε s t →
    ε ≤ ↑|G.edgeDensity (G.nonuniformWitnesses ε s t).1 (G.nonuniformWitnesses ε s t).2 - G.edgeDensity s t|

def SimpleGraph.nonuniformWitness E3 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [inst : Field 𝕜] →
      [inst_1 : LinearOrder 𝕜] →
        [IsStrictOrderedRing 𝕜] → (G : SimpleGraph α) → [DecidableRel G.Adj] → 𝕜 → Finset α → Finset α → Finset α

Arbitrary witness of non-uniformity. G.nonuniformWitness ε s t and G.nonuniformWitness ε t s form a pair of subsets witnessing the non-uniformity of (s, t). If (s, t) is uniform, returns s.

theorem SimpleGraph.nonuniformWitness_subset E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  ¬G.IsUniform ε s t → G.nonuniformWitness ε s t ⊆ s

theorem SimpleGraph.le_card_nonuniformWitness E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  ¬G.IsUniform ε s t → ↑s.card * ε ≤ ↑(G.nonuniformWitness ε s t).card

theorem SimpleGraph.nonuniformWitness_spec E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {s t : Finset α},
  s ≠ t →
    ¬G.IsUniform ε s t →
      ε ≤ ↑|G.edgeDensity (G.nonuniformWitness ε s t) (G.nonuniformWitness ε t s) - G.edgeDensity s t|

def Finpartition.sparsePairs E1 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [Field 𝕜] →
      [LinearOrder 𝕜] →
        [inst : DecidableEq α] →
          {A : Finset α} →
            Finpartition A → (G : SimpleGraph α) → [DecidableRel G.Adj] → 𝕜 → Finset (Finset α × Finset α)

The pairs of parts of a partition P which are not ε-dense in a graph G. Note that we dismiss the diagonal. We do not care whether s is ε-dense with itself.

theorem Finpartition.mk_mem_sparsePairs E0 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  (P : Finpartition A) (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] (u v : Finset α) (ε : 𝕜),
  (u, v) ∈ P.sparsePairs G ε ↔ u ∈ P.parts ∧ v ∈ P.parts ∧ u ≠ v ∧ ↑(G.edgeDensity u v) < ε

theorem Finpartition.sparsePairs_mono E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  (P : Finpartition A) (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε ε' : 𝕜},
  ε ≤ ε' → P.sparsePairs G ε ⊆ P.sparsePairs G ε'

def Finpartition.nonUniforms E3 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [Field 𝕜] →
      [LinearOrder 𝕜] →
        [inst : DecidableEq α] →
          {A : Finset α} →
            Finpartition A → (G : SimpleGraph α) → [DecidableRel G.Adj] → 𝕜 → Finset (Finset α × Finset α)

The pairs of parts of a partition P which are not ε-uniform in a graph G. Note that we dismiss the diagonal. We do not care whether s is ε-uniform with itself.

theorem Finpartition.mk_mem_nonUniforms E0 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  (P : Finpartition A) (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] {ε : 𝕜} {u v : Finset α},
  (u, v) ∈ P.nonUniforms G ε ↔ u ∈ P.parts ∧ v ∈ P.parts ∧ u ≠ v ∧ ¬G.IsUniform ε u v

theorem Finpartition.nonUniforms_mono E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} (P : Finpartition A) (G : SimpleGraph α) [inst_4 : DecidableRel G.Adj]
  {ε ε' : 𝕜}, ε ≤ ε' → P.nonUniforms G ε' ⊆ P.nonUniforms G ε

theorem Finpartition.nonUniforms_bot E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} (G : SimpleGraph α) [inst_4 : DecidableRel G.Adj] {ε : 𝕜},
  0 < ε → ⊥.nonUniforms G ε = ∅

def Finpartition.IsUniform E3 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [Field 𝕜] →
      [LinearOrder 𝕜] →
        [inst : DecidableEq α] → {A : Finset α} → Finpartition A → (G : SimpleGraph α) → [DecidableRel G.Adj] → 𝕜 → Prop

A finpartition of a graph's vertex set is ε-uniform (aka ε-regular) iff the proportion of its pairs of parts that are not ε-uniform is at most ε.

theorem Finpartition.bot_isUniform E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} (G : SimpleGraph α) [inst_4 : DecidableRel G.Adj] {ε : 𝕜},
  0 < ε → ⊥.IsUniform G ε

theorem Finpartition.isUniform_one E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} (P : Finpartition A) (G : SimpleGraph α) [inst_4 : DecidableRel G.Adj],
  P.IsUniform G 1

theorem Finpartition.IsUniform.mono E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {G : SimpleGraph α} [inst_4 : DecidableRel G.Adj]
  {ε ε' : 𝕜}, P.IsUniform G ε → ε ≤ ε' → P.IsUniform G ε'

theorem Finpartition.isUniformOfEmpty E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  {P : Finpartition A} {G : SimpleGraph α} [inst_3 : DecidableRel G.Adj] {ε : 𝕜}, P.parts = ∅ → P.IsUniform G ε

theorem Finpartition.nonempty_of_not_uniform E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  {P : Finpartition A} {G : SimpleGraph α} [inst_3 : DecidableRel G.Adj] {ε : 𝕜}, ¬P.IsUniform G ε → P.parts.Nonempty

def Finpartition.nonuniformWitnesses E3 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [inst : Field 𝕜] →
      [inst_1 : LinearOrder 𝕜] →
        [IsStrictOrderedRing 𝕜] →
          [inst : DecidableEq α] →
            {A : Finset α} →
              Finpartition A → (G : SimpleGraph α) → [DecidableRel G.Adj] → 𝕜 → Finset α → Finset (Finset α)

A choice of witnesses of non-uniformity among the parts of a finpartition.

theorem Finpartition.card_nonuniformWitnesses_le E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {G : SimpleGraph α} [inst_4 : DecidableRel G.Adj] {ε : 𝕜}
  {s : Finset α}, (P.nonuniformWitnesses G ε s).card ≤ {t ∈ P.parts | s ≠ t ∧ ¬G.IsUniform ε s t}.card

theorem Finpartition.nonuniformWitness_mem_nonuniformWitnesses E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {G : SimpleGraph α} [inst_4 : DecidableRel G.Adj] {ε : 𝕜}
  {s t : Finset α}, ¬G.IsUniform ε s t → t ∈ P.parts → s ≠ t → G.nonuniformWitness ε s t ∈ P.nonuniformWitnesses G ε s

theorem Finpartition.IsEquipartition.card_interedges_sparsePairs_le' E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {G : SimpleGraph α} [inst_4 : DecidableRel G.Adj]
  {ε : 𝕜},
  P.IsEquipartition →
    0 ≤ ε →
      ↑((P.sparsePairs G ε).biUnion fun x ↦
              match x with
              | (U, V) => G.interedges U V).card ≤
        ε * (↑A.card + ↑P.parts.card) ^ 2

theorem Finpartition.IsEquipartition.card_interedges_sparsePairs_le E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {G : SimpleGraph α} [inst_4 : DecidableRel G.Adj]
  {ε : 𝕜},
  P.IsEquipartition →
    0 ≤ ε →
      ↑((P.sparsePairs G ε).biUnion fun x ↦
              match x with
              | (U, V) => G.interedges U V).card ≤
        4 * ε * ↑A.card ^ 2

theorem Finpartition.IsEquipartition.card_biUnion_offDiag_le' E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A},
  P.IsEquipartition → ↑(P.parts.biUnion Finset.offDiag).card ≤ ↑A.card * (↑A.card + ↑P.parts.card) / ↑P.parts.card

theorem Finpartition.IsEquipartition.card_biUnion_offDiag_le E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {ε : 𝕜},
  0 < ε → P.IsEquipartition → 4 / ε ≤ ↑P.parts.card → ↑(P.parts.biUnion Finset.offDiag).card ≤ ε / 2 * ↑A.card ^ 2

theorem Finpartition.IsEquipartition.sum_nonUniforms_lt' E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {G : SimpleGraph α} [inst_4 : DecidableRel G.Adj]
  {ε : 𝕜},
  A.Nonempty →
    0 < ε →
      P.IsEquipartition →
        P.IsUniform G ε → ∑ i ∈ P.nonUniforms G ε, ↑i.1.card * ↑i.2.card < ε * (↑A.card + ↑P.parts.card) ^ 2

theorem Finpartition.IsEquipartition.sum_nonUniforms_lt E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {G : SimpleGraph α} [inst_4 : DecidableRel G.Adj]
  {ε : 𝕜},
  A.Nonempty →
    0 < ε →
      P.IsEquipartition →
        P.IsUniform G ε →
          ↑((P.nonUniforms G ε).biUnion fun x ↦
                  match x with
                  | (U, V) => U ×ˢ V).card <
            4 * ε * ↑A.card ^ 2

def SimpleGraph.regularityReduced E1 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [Field 𝕜] →
      [LinearOrder 𝕜] →
        [inst : DecidableEq α] →
          {A : Finset α} → Finpartition A → (G : SimpleGraph α) → [DecidableRel G.Adj] → 𝕜 → 𝕜 → SimpleGraph α

The reduction of the graph G along partition P has edges between ε-uniform pairs of parts that have edge density at least δ.

theorem SimpleGraph.regularityReduced_adj E0 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  (P : Finpartition A) (G : SimpleGraph α) [inst_3 : DecidableRel G.Adj] (ε δ : 𝕜) (a b : α),
  (SimpleGraph.regularityReduced P G ε δ).Adj a b =
    (G.Adj a b ∧ ∃ U ∈ P.parts, ∃ V ∈ P.parts, a ∈ U ∧ b ∈ V ∧ U ≠ V ∧ G.IsUniform ε U V ∧ δ ≤ ↑(G.edgeDensity U V))

instance SimpleGraph.regularityReduced.instDecidableRel_adj E0 #

{α : Type u_1} →
  {𝕜 : Type u_2} →
    [inst : Field 𝕜] →
      [inst_1 : LinearOrder 𝕜] →
        [inst_2 : DecidableEq α] →
          {A : Finset α} →
            (P : Finpartition A) →
              (G : SimpleGraph α) →
                [inst_3 : DecidableRel G.Adj] → {ε δ : 𝕜} → DecidableRel (SimpleGraph.regularityReduced P G ε δ).Adj

theorem SimpleGraph.regularityReduced_le E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  {P : Finpartition A} {G : SimpleGraph α} [inst_3 : DecidableRel G.Adj] {ε δ : 𝕜},
  SimpleGraph.regularityReduced P G ε δ ≤ G

theorem SimpleGraph.regularityReduced_mono E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [IsStrictOrderedRing 𝕜]
  [inst_3 : DecidableEq α] {A : Finset α} {P : Finpartition A} {G : SimpleGraph α} [inst_4 : DecidableRel G.Adj]
  {δ ε₁ ε₂ : 𝕜}, ε₁ ≤ ε₂ → SimpleGraph.regularityReduced P G ε₁ δ ≤ SimpleGraph.regularityReduced P G ε₂ δ

theorem SimpleGraph.regularityReduced_anti E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  {P : Finpartition A} {G : SimpleGraph α} [inst_3 : DecidableRel G.Adj] {ε δ₁ δ₂ : 𝕜},
  δ₁ ≤ δ₂ → SimpleGraph.regularityReduced P G ε δ₂ ≤ SimpleGraph.regularityReduced P G ε δ₁

theorem SimpleGraph.unreduced_edges_subset E1 #

∀ {α : Type u_1} {𝕜 : Type u_2} [inst : Field 𝕜] [inst_1 : LinearOrder 𝕜] [inst_2 : DecidableEq α] {A : Finset α}
  {P : Finpartition A} {G : SimpleGraph α} [inst_3 : DecidableRel G.Adj] {ε : 𝕜},
  {x ∈ A ×ˢ A |
      match x with
      | (x, y) => G.Adj x y ∧ ¬(SimpleGraph.regularityReduced P G (ε / 8) (ε / 4)).Adj x y} ⊆
    ((P.nonUniforms G (ε / 8)).biUnion fun x ↦
          match x with
          | (U, V) => U ×ˢ V) ∪
        P.parts.biUnion Finset.offDiag ∪
      (P.sparsePairs G (ε / 4)).biUnion fun x ↦
        match x with
        | (U, V) => G.interedges U V