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.Triangle.Counting

2 declarations. Mathlib docs · Source

Triangle counting lemma

In this file, we prove the triangle counting lemma.

References

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

theorem SimpleGraph.triangle_counting' E1 #

∀ {α : Type u_1} (G : SimpleGraph α) [inst : DecidableRel G.Adj] {ε : ℝ} {s t u : Finset α},
  2 * ε ≤ ↑(G.edgeDensity s t) →
    G.IsUniform ε s t →
      2 * ε ≤ ↑(G.edgeDensity s u) →
        G.IsUniform ε s u →
          2 * ε ≤ ↑(G.edgeDensity t u) →
            G.IsUniform ε t u →
              (1 - 2 * ε) * ε ^ 3 * ↑s.card * ↑t.card * ↑u.card ≤
                ↑{x ∈ s ×ˢ t ×ˢ u |
                      match x with
                      | (a, b, c) => G.Adj a b ∧ G.Adj a c ∧ G.Adj b c}.card

The Triangle Counting Lemma. If G is a graph and s, t, u are sets of vertices such that each pair is ε-uniform and 2 * ε-dense, then a proportion of at least (1 - 2 * ε) * ε ^ 3 of the triples (a, b, c) ∈ s × t × u are triangles.

theorem SimpleGraph.triangle_counting E3 #

∀ {α : Type u_1} (G : SimpleGraph α) [inst : DecidableRel G.Adj] {ε : ℝ} {s t u : Finset α} [inst_1 : DecidableEq α]
  [inst_2 : Fintype α],
  2 * ε ≤ ↑(G.edgeDensity s t) →
    G.IsUniform ε s t →
      Disjoint s t →
        2 * ε ≤ ↑(G.edgeDensity s u) →
          G.IsUniform ε s u →
            Disjoint s u →
              2 * ε ≤ ↑(G.edgeDensity t u) →
                G.IsUniform ε t u →
                  Disjoint t u → (1 - 2 * ε) * ε ^ 3 * ↑s.card * ↑t.card * ↑u.card ≤ ↑(G.cliqueFinset 3).card

The Triangle Counting Lemma. If G is a graph and s, t, u are disjoint sets of vertices such that each pair is ε-uniform and 2 * ε-dense, then G contains at least (1 - 2 * ε) * ε ^ 3 * |s| * |t| * |u| triangles.