Documentation

HexGraphIso.Nauty.Sparse.BfsScan

structure Hex.GraphIso.Nauty.Sparse.Scan {n : Nat} (G : SparseGraph n) (root : Fin n) (dist queue : Array Nat) (head tail current next : Nat) (seen : List Nat) extends Hex.GraphIso.Nauty.Sparse.Bfs G root dist queue head tail :

State of one packed adjacency scan. The queue head is advanced only after all these edge obligations have been discharged.

Instances For
    theorem Hex.GraphIso.Nauty.Sparse.Scan.current_lt {n : Nat} {G : SparseGraph n} {root : Fin n} {dist queue : Array Nat} {head tail current next : Nat} {seen : List Nat} (h : Scan G root dist queue head tail current next seen) :
    current < n
    theorem Hex.GraphIso.Nauty.Sparse.Scan.current_finite {n : Nat} {G : SparseGraph n} {root : Fin n} {dist queue : Array Nat} {head tail current next : Nat} {seen : List Nat} (h : Scan G root dist queue head tail current next seen) :
    dist[current]! < n
    theorem Hex.GraphIso.Nauty.Sparse.Scan.initial {n : Nat} {G : SparseGraph n} {root : Fin n} {dist queue : Array Nat} {head tail : Nat} (h : Bfs G root dist queue head tail) (hh : head < tail) (ht : tail < n) :
    Scan G root dist queue head tail queue[head]! (dist[queue[head]!]! + 1) []
    theorem Hex.GraphIso.Nauty.Sparse.Scan.add {n : Nat} {G : SparseGraph n} {root : Fin n} {dist queue : Array Nat} {head tail current next e : Nat} {seen : List Nat} (h : Scan G root dist queue head tail current next seen) (hlo : G.offsets[current]! ≤ e) (hhi : e < G.offsets[current + 1]!) (hd : dist[(Graph.ofGraph G).neighbor e]! = n) :
    Scan G root (dist.set! ((Graph.ofGraph G).neighbor e) next) (queue.set! tail ((Graph.ofGraph G).neighbor e)) head (tail + 1) current next (seen ++ [e])
    theorem Hex.GraphIso.Nauty.Sparse.Scan.keep {n : Nat} {G : SparseGraph n} {root : Fin n} {dist queue : Array Nat} {head tail current next e : Nat} {seen : List Nat} (h : Scan G root dist queue head tail current next seen) (hhi : e < G.offsets[current + 1]!) (hd : dist[(Graph.ofGraph G).neighbor e]! ≠ n) :
    Scan G root dist queue head tail current next (seen ++ [e])
    theorem Hex.GraphIso.Nauty.Sparse.Scan.finish {n : Nat} {G : SparseGraph n} {root : Fin n} {dist queue : Array Nat} {head tail current next : Nat} (h : Scan G root dist queue head tail current next (List.range' G.offsets[current]! (G.offsets[current + 1]! - G.offsets[current]!))) :
    Bfs G root dist queue (head + 1) tail