structure
Hex.GraphIso.Nauty.Sparse.CountPartition
(level first upto : Nat)
(lab hits before ptn : Array Nat)
:
The processed boundary positions split exactly at a change of count. Positions outside that prefix retain their original partition values.
Instances For
theorem
Hex.GraphIso.Nauty.Sparse.CountPartition.different
{level first upto : Nat}
{lab hits before ptn : Array Nat}
(h : CountPartition level first upto lab hits before ptn)
(hl : first ≤ upto)
(hb : upto < before.size)
(he : hits[lab[upto]!]! ≠ hits[lab[upto + 1]!]!)
:
CountPartition level first (upto + 1) lab hits before (ptn.setIfInBounds upto level)
theorem
Hex.GraphIso.Nauty.Sparse.CountPartition.minima
{lab hits : Array Nat}
{first v2 v3 last w1 w2 level : Nat}
{ptn : Array Nat}
(h : Minima lab hits first v2 v3 last w1 w2)
(hv : v2 < v3)
(hb : v2 - 1 < ptn.size)
:
CountPartition level first (v3 - 1) lab hits ptn (ptn.setIfInBounds (v2 - 1) level)
The first two nonempty minimum fragments need exactly one new boundary.
theorem
Hex.GraphIso.Nauty.Sparse.Minima.indirect
{lab hits : Array Nat}
{first v2 v3 last w1 w2 : Nat}
(h : Minima lab hits first v2 v3 last w1 w2)
(hb : last ≤ lab.size)
:
Minima («Sort».indirect lab hits v3 (last - v3)) hits first v2 v3 last w1 w2
Sorting the larger-count tail retains both minimum fragments and their strict separation from the tail.