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 non ε-uniform pairs of parts
is less than ε.
Main declarations #
SimpleGraph.IsUniform: Graph uniformity of a pair of finsets of vertices.SimpleGraph.nonuniformWitness:G.nonuniformWitness ε s tandG.nonuniformWitness ε t stogether witness the non-uniformity ofsandt.Finpartition.nonUniforms: Non uniform 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 #
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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.
Equations
- SimpleGraph.nonuniformWitnesses G ε s t = if h : ¬SimpleGraph.IsUniform G ε s t then (Exists.choose ⋯, Exists.choose ⋯) else (s, t)
Instances For
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.
Equations
- SimpleGraph.nonuniformWitness G ε s t = if WellOrderingRel s t then (SimpleGraph.nonuniformWitnesses G ε s t).1 else (SimpleGraph.nonuniformWitnesses G ε t s).2
Instances For
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
- Finpartition.nonUniforms P G ε = Finset.filter (fun (uv : Finset α × Finset α) => ¬SimpleGraph.IsUniform G ε uv.1 uv.2) (Finset.offDiag P.parts)
Instances For
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 ε.
Equations
- Finpartition.IsUniform P G ε = (↑(Finpartition.nonUniforms P G ε).card ≤ ↑(P.parts.card * (P.parts.card - 1)) * ε)
Instances For
A choice of witnesses of non-uniformity among the parts of a finpartition.
Equations
- Finpartition.nonuniformWitnesses P G ε s = Finset.image (SimpleGraph.nonuniformWitness G ε s) (Finset.filter (fun (t : Finset α) => s ≠ t ∧ ¬SimpleGraph.IsUniform G ε s t) P.parts)