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 t
andG.nonuniformWitness ε t s
together witness the non-uniformity ofs
andt
.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
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
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
- G.nonuniformWitness ε s t = if WellOrderingRel s t then (G.nonuniformWitnesses ε s t).1 else (G.nonuniformWitnesses ε t s).2
Instances For
Uniform partitions #
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.
Equations
Instances For
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
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 ε
.
Instances For
A choice of witnesses of non-uniformity among the parts of a finpartition.
Equations
- P.nonuniformWitnesses G ε s = Finset.image (G.nonuniformWitness ε s) (Finset.filter (fun (t : Finset α) => s ≠ t ∧ ¬G.IsUniform ε s t) P.parts)
Instances For
Equipartitions #
Reduced graph #
The reduction of the graph G
along partition P
has edges between ε
-uniform pairs of parts
that have edge density at least δ
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- SimpleGraph.regularityReduced.instDecidableRel_adj P G = id inferInstance