@[reducible, inline]
abbrev
Hex.GraphIso.Nauty.Sparse.Index.Valid
(n : Nat)
(lab ptn : Array Nat)
(level : Nat)
(starts ends : Array Nat)
:
A completed cache describes every bounded cell of the partition.
Equations
- Hex.GraphIso.Nauty.Sparse.Index.Valid n lab ptn level starts ends = Hex.GraphIso.Nauty.Sparse.Index.Prefix n lab ptn level n starts ends
Instances For
theorem
Hex.GraphIso.Nauty.Sparse.Index.Prefix.extend
{lab ptn starts ends out : Array Nat}
{n level first last : Nat}
(h : Prefix n lab ptn level first starts ends)
(hc : IsCell ptn level first (last + 1 - first))
(hg : first ≤ last)
(hb : last < n)
(hs : out.size = n)
(ho :
∀ (i : Nat),
i < n → out[lab[i]!]! = if first ≤ i ∧ i ≤ last then if first < last then first else n else starts[lab[i]!]!)
:
Writing one whole cell extends the cache through its last position. Disjoint cells do not share vertices because the labelling is injective.
structure
Hex.GraphIso.Nauty.Sparse.Index.Scatter
(n : Nat)
(lab before after : Array Nat)
(first upto value : Nat)
:
A partial scatter changes precisely the already traversed positions.
Instances For
theorem
Hex.GraphIso.Nauty.Sparse.Index.Scatter.step
{lab before after : Array Nat}
{n first upto value : Nat}
(h : Scatter n lab before after first upto value)
(hbound : ∀ (i : Nat), i < n → lab[i]! < n)
(hinj : ∀ (i j : Nat), i < n → j < n → lab[i]! = lab[j]! → i = j)
(hlo : first ≤ upto)
(hhi : upto < n)
: