Balls that are paths #
A map φ : ℤ → V is a ball path of radius r over the parameter interval [lo, hi]
(SimpleGraph.IsBallPath G r lo hi φ, with -r ≤ lo ≤ 0 ≤ hi ≤ r) when it is injective on
[lo, hi], two of its points are adjacent exactly when their parameters are consecutive, and every
neighbour of a point with parameter strictly between -r and r is again a point of the path. The
closed ball {x | G.edist (φ 0) x ≤ k} of every radius k ≤ r is then the image of the parameters
of absolute value at most k (SimpleGraph.IsBallPath.edist_le_iff); for k = r it is the image
of [lo, hi]. So the radius-r ball around φ 0 induces a path on hi - lo + 1 vertices with
φ 0 at position -lo.
The radius-r balls of the cycle graph cycleGraph N with N ≥ 2r + 2 are ball paths over
[-r, r] (SimpleGraph.exists_isBallPath_cycleGraph). Around vertex j of the path graph
pathGraph N, the radius-r ball is a ball path over [-min r j, min r (N - 1 - j)]
(SimpleGraph.exists_isBallPath_pathGraph). The bound N ≥ 2r + 2 is needed: in cycleGraph 3
the radius-1 ball is the whole triangle, which is not a path. Distances in pathGraph N are
differences of indices (SimpleGraph.edist_pathGraph).
These descriptions are the cycle-graph distance computations behind Hanf-locality proofs that connectivity, acyclicity and being a tree are not first-order definable, and the path-graph distances behind Gaifman-locality proofs that transitive closure and reachability are not.
Main definitions #
SimpleGraph.IsBallPath: a path parametrization of a ball.SimpleGraph.Hom.sumFold: the fold homomorphism fromG ⊕g GontoG.
Main results #
SimpleGraph.IsBallPath.edist_le_iff: the balls of radiusk ≤ raround the center.SimpleGraph.IsBallPath.sumInl,SimpleGraph.IsBallPath.sumInr: ball paths in a disjoint union.SimpleGraph.exists_isBallPath_cycleGraph: balls in cycle graphs.SimpleGraph.exists_isBallPath_pathGraph: balls in path graphs.SimpleGraph.edist_pathGraph: distances in path graphs.SimpleGraph.edist_sum_inl: distances between left-copy vertices inG ⊕g H.
φ parametrizes the radius-r ball around φ 0 in G as a path over [lo, hi]: it is
injective there, adjacency is consecutiveness of parameters, and the neighbours of interior points
(parameter strictly between -r and r) stay on the path.
The left end is at most
rsteps from the center.- lo_nonpos : lo ≤ 0
The left end is not right of the center.
- hi_nonneg : 0 ≤ hi
The right end is not left of the center.
- hi_le : hi ≤ ↑r
The right end is at most
rsteps from the center. Distinct parameters give distinct vertices.
- adj_iff ⦃s t : ℤ⦄ : s ∈ Set.Icc lo hi → t ∈ Set.Icc lo hi → (G.Adj (φ s) (φ t) ↔ s + 1 = t ∨ t + 1 = s)
Two points are adjacent exactly when their parameters are consecutive.
- exists_of_adj ⦃s : ℤ⦄ : s ∈ Set.Icc lo hi → -↑r < s → s < ↑r → ∀ ⦃y : V⦄, G.Adj (φ s) y → ∃ t ∈ Set.Icc lo hi, y = φ t
Every neighbour of an interior point is a point of the path.
The point of a ball path at parameter s is within distance |s| of the center.
The closed ball of radius k ≤ r around the center φ 0 of a ball path is the image of the
parameters of absolute value at most k.
The closed ball of radius r around the center φ 0 of a ball path is the image of
[lo, hi].
A ball path of G is a ball path of G ⊕g H through Sum.inl.
A ball path of H is a ball path of G ⊕g H through Sum.inr.
The fold homomorphism from G ⊕g G onto G, identifying the two copies.
Evaluating SimpleGraph.Hom.sumFold at a vertex.
Extended distances in G ⊕g H between vertices of the left copy agree with distances in
G.