theorem
Hex.GraphIso.Nauty.Sparse.bestcellCached_eq
{n : Nat}
(G : SparseGraph n)
(lab ptn : Array Nat)
(level : Nat)
(s : Scratch)
(l : Label n)
(hl : Label.ofArray? n lab = some l)
(hptn : ptn.size = n)
(hend : ptn[n - 1]! ≤ level)
(hidx : Index.Valid n lab ptn level s.cellstart s.cellend)
(hsize : s.hits.size = n)
:
Fresh and cached sparse best-cell selection agree for any admissible cache, including arbitrary initial count values and empty partitions.
theorem
Hex.GraphIso.Nauty.Sparse.Target.first_mem
{ptn : Array Nat}
{n level : Nat}
(hs : ptn.size = n)
(hend : ptn[n - 1]! ≤ level)
(hne : nontrivial (cells ptn level n) ≠ [])
:
(List.find? (fun (i : Nat) => decide (ptn[i]! > level)) (List.range n)).getD 0 ∈ nontrivial (cells ptn level n)
The first open position is the start of the first nontrivial cell.