The adjacency array of a graph and the graph of an array #
The adjacency array SimpleGraph.adjArray G of a graph on ℕ is symmetric with false diagonal.
An array is read back as a graph by graphOfArray, the SimpleGraph.fromRel of the array: i and
j are adjacent when they are distinct and the array is true at (i, j) or at (j, i). The two
are mutually inverse on the symmetric arrays with false diagonal and intertwine relabelling of the
graph with the diagonal relabelling of the array. The adjacency array itself, its measurability and
its injectivity are in SimpleGraph/Maps.lean and SimpleGraph/Measurable.lean.
Main results #
SimpleGraph.adjArray_mem_symmetricArraysWithDiag,SimpleGraph.adjArray_comap— the adjacency array of a graph onℕlies in the carrier and intertwines relabelling.TauCeti.DenseGraphLimits.graphOfArray,graphOfArray_adj,measurable_graphOfArray,graphOfArray_pairReindex.SimpleGraph.graphOfArray_adjArray,TauCeti.DenseGraphLimits.adjArray_graphOfArray— the two round trips.
References #
- P. Diaconis, S. Janson, Graph limits and exchangeable random graphs, Rend. Mat. Appl. (7) 28 (2008), 33–61, Section 5: exchangeable random graphs as symmetric zero-diagonal arrays.
No material is adapted from cameronfreer/graphon; the adjacency array is read directly from
Mathlib's adjacency relation, and the relabelling square is SimpleGraph.comap_adj.
The adjacency array of a graph is symmetric with false diagonal.
Relabelling the graph is relabelling both axes of its adjacency array.
The graph of an array: i and j are adjacent when they are distinct and the array is
true at (i, j) or at (j, i), so on a symmetric array at either.
Equations
- TauCeti.DenseGraphLimits.graphOfArray x = SimpleGraph.fromRel fun (i j : ℕ) => x (i, j) = true
Instances For
Reading an array as a graph is measurable.
The graph of the adjacency array of a graph is the graph.
The adjacency array of the graph of a symmetric false-diagonal array is the array.
The graph of a relabelled array is the relabelling of its graph.