theorem
Hex.GraphIso.Nauty.testcanlab_fst
{n : Nat}
(ctx : Ctx n)
(canong : Array (VSet n))
(lab : Array Nat)
:
(testcanlab ctx canong lab).fst = ordInt (listCmp VSet.rowCmp (leafRows ctx lab) (List.map (fun (x : Nat) => canong[x]!) (List.range n)))
testcanlab returns the trichotomy of the lexicographic VSet.rowCmp
comparison of the leaf rows against the stored rows.
theorem
Hex.GraphIso.Nauty.leafEvent_faithful
{n : Nat}
{ctx : Ctx n}
{canong : Array (VSet n)}
{canonlab lab : Array Nat}
{samerows : Nat}
(hinv : CanongInv ctx canong canonlab samerows)
:
(testcanlab ctx (updatecan ctx canong canonlab samerows) lab).fst = ordInt (listCmp VSet.rowCmp (leafRows ctx lab) (leafRows ctx canonlab)) ∧ CanongInv ctx (updatecan ctx canong canonlab samerows) canonlab n ∧ CanongInv ctx (updatecan ctx canong canonlab samerows) lab
(testcanlab ctx (updatecan ctx canong canonlab samerows) lab).snd
The per-leaf clause for the simulation induction: at a code-tied
leaf, processnode updates the store and compares. Under the store
invariant, the comparison outcome is the model row comparison of the
two leaf keys, and the updated store satisfies the invariant both at
n against the incumbent and at the returned prefix length against
the fresh leaf, so CanongInv holds again whichever way the leaf
resolves.