Graph uniformity and uniform partitions #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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 non ε-uniform pairs of parts
is less than ε.
Main declarations #
simple_graph.is_uniform: Graph uniformity of a pair of finsets of vertices.simple_graph.nonuniform_witness:G.nonuniform_witness ε s tandG.nonuniform_witness ε t stogether witness the non-uniformity ofsandt.finpartition.non_uniforms: Non uniform pairs of parts of a partition.finpartition.is_uniform: Uniformity of a partition.finpartition.nonuniform_witnesses: 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
Graph uniformity #
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.
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
simple_graph.nonuniform_witness.
Equations
- G.nonuniform_witnesses ε s t = dite (¬G.is_uniform ε s t) (λ (h : ¬G.is_uniform ε s t), (_.some, _.some)) (λ (h : ¬¬G.is_uniform ε s t), (s, t))
Arbitrary witness of non-uniformity. G.nonuniform_witness ε s t and
G.nonuniform_witness ε t s form a pair of subsets witnessing the non-uniformity of (s, t). If
(s, t) is uniform, returns s.
Equations
- G.nonuniform_witness ε s t = ite (well_ordering_rel s t) (G.nonuniform_witnesses ε s t).fst (G.nonuniform_witnesses ε t s).snd
Uniform partitions #
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.
Equations
- P.non_uniforms G ε = finset.filter (λ (uv : finset α × finset α), ¬G.is_uniform ε uv.fst uv.snd) P.parts.off_diag
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 ε.
A choice of witnesses of non-uniformity among the parts of a finpartition.
Equations
- P.nonuniform_witnesses G ε s = finset.image (G.nonuniform_witness ε s) (finset.filter (λ (t : finset α), s ≠ t ∧ ¬G.is_uniform ε s t) P.parts)