Documentation

HexGraphIso.Nauty.Sparse.Rows

theorem Hex.SparseGraph.offset_mono {n : Nat} (G : SparseGraph n) {i j : Nat} (hij : i ≤ j) (hj : j ≤ n) :

Consecutive packed rows have monotone offsets, including the terminal offset.

theorem Hex.SparseGraph.offset_le {n : Nat} (G : SparseGraph n) {i : Nat} (hi : i ≤ n) :
theorem Hex.SparseGraph.edge_lt {n : Nat} (G : SparseGraph n) {i : Fin n} {e : Nat} (he : e < G.offsets[↑i + 1]!) :

An adjacency-loop cursor is inside the packed neighbour array.

theorem Hex.SparseGraph.edge_mem {n : Nat} (G : SparseGraph n) (i : Fin n) {e : Nat} (hlo : G.offsets[↑i]! ≤ e) (hhi : e < G.offsets[↑i + 1]!) :

Reading a packed entry in a row supplies an actual neighbour.

theorem Hex.SparseGraph.mem_edge {n : Nat} (G : SparseGraph n) {i v : Fin n} (hv : v ∈ G.nbrs i) :

Every row member is reached by a cursor of the adjacency loop.

Valid input views are precisely native simple sparse graphs.

Equations
Instances For
    theorem Hex.GraphIso.Nauty.Sparse.Graph.neighbor_lt {n : Nat} (G : SparseGraph n) (i : Fin n) {e : Nat} (he : e < G.offsets[↑i + 1]!) :
    structure Hex.GraphIso.Nauty.Sparse.Rows.Prefix {n : Nat} (R : Rows n) (G : SparseGraph n) (count : Nat) :

    A partially installed canonical graph. Only its first count rows and their offsets describe G; the remaining entries are allocated scratch. Rows retain their unsorted nauty order, so row correctness is a permutation.

    Instances For
      theorem Hex.GraphIso.Nauty.Sparse.Rows.Prefix.mono {n : Nat} {R : Rows n} {G : SparseGraph n} {count small : Nat} (h : R.Prefix G count) (hs : small ≤ count) :
      R.Prefix G small
      theorem Hex.GraphIso.Nauty.Sparse.Rows.Prefix.offset_le {n : Nat} {R : Rows n} {G : SparseGraph n} {count i : Nat} (h : R.Prefix G count) (hi : i ≤ count) :
      theorem Hex.GraphIso.Nauty.Sparse.Rows.Prefix.degree_eq {n : Nat} {R : Rows n} {G : SparseGraph n} {count : Nat} (h : R.Prefix G count) (i : Fin n) (hi : ↑i < count) :
      R.degree ↑i = G.degree i
      theorem Hex.GraphIso.Nauty.Sparse.Rows.Prefix.mem_iff {n : Nat} {R : Rows n} {G : SparseGraph n} {count : Nat} (h : R.Prefix G count) (i v : Fin n) (hi : ↑i < count) :

      Membership in an installed row agrees with the canonical graph.

      theorem Hex.GraphIso.Nauty.Sparse.Rows.Prefix.entry_lt {n : Nat} {R : Rows n} {G : SparseGraph n} {count e : Nat} (h : R.Prefix G count) (i : Fin n) (hi : ↑i < count) (hlo : R.offsets[↑i]! ≤ e) (hhi : e < R.offsets[↑i + 1]!) :

      An entry of an installed row is a vertex, even though the store is raw.