Documentation

CslibFrontier.Foundations.Combinatorics.SimpleGraph.Matrix

Finite undirected adjacency matrices #

Cslib.Complexity.UGraphInstance is a terminal-free symmetric loopless Boolean matrix, including the empty matrix. Its graph accessor supplies the shared simple-graph interpretation for connectivity and bipartiteness; adjN extends entries by zero outside the vertex range.

An undirected graph on Fin n, given by its adjacency matrix, symmetric and with zero diagonal.

  • n : ℕ

    The number of vertices.

  • adj : Fin self.n → Fin self.n → Bool

    The adjacency matrix.

  • symm (a b : Fin self.n) : self.adj a b = self.adj b a

    The matrix is symmetric.

  • loopless (a : Fin self.n) : self.adj a a = false

    The diagonal is zero.

The simple graph of an instance.

The entries of an instance on natural numbers, false outside the vertices.