theorem
Hex.GraphIso.Nauty.chooseFirst_fields
{n : Nat}
(ctx : Ctx n)
(tcLevel level numcells : Nat)
(st : Search n)
:
have r := chooseTarget true ctx tcLevel level numcells st;
r.snd.snd.snd = { lab := st.lab, ptn := st.ptn, active := st.active, orbits := st.orbits, fixedpts := st.fixedpts, autos := st.autos,
wsCap := st.wsCap, firstcode := st.firstcode, canoncode := st.canoncode, firsttc := st.firsttc.set! level r.fst,
firstlab := st.firstlab, canonlab := st.canonlab, canong := st.canong, samerows := st.samerows,
compCanon := st.compCanon, eqlevFirst := st.eqlevFirst, eqlevCanon := st.eqlevCanon, gcaFirst := st.gcaFirst,
gcaCanon := st.gcaCanon, canonlevel := st.canonlevel, noncheaplevel := st.noncheaplevel,
allsamelevel := st.allsamelevel, cosetindex := st.cosetindex, stabvertex := st.stabvertex, numnodes := st.numnodes,
tctotal := r.snd.snd.snd.tctotal, canupdates := st.canupdates, numorbits := st.numorbits,
numgenerators := st.numgenerators, numbadleaves := st.numbadleaves, maxlevel := st.maxlevel, order := st.order,
genTrace := st.genTrace, workperm := st.workperm }
Selecting a first-path target only writes its target slot and counter.
theorem
Hex.GraphIso.Nauty.firstPath_exists
{n k : Nat}
{G : Colored n k}
{ctx : Ctx n}
{tcLevel fuel level numcells : Nat}
{st : Search n}
(hn0 : 0 < n)
(hlevel : 1 ≤ level)
(hok : SearchOk G level numcells st)
(horbit : ∀ (v : Nat), v < n → st.orbits[v]! = v)
(hfuel : n + 1 ≤ level + fuel)
:
Every valid first-path state with identity orbits reaches a first leaf within the same depth bound used by the executable search.
theorem
Hex.GraphIso.Nauty.firstPath_reference
{n : Nat}
{ctx : Ctx n}
{inf tcLevel fuel level numcells last : Nat}
{st leaf : Search n}
(hpath : Generic.FirstPath ctx tcLevel fuel level numcells st last leaf)
:
SearchState.reference (node true ctx inf tcLevel fuel level numcells st).snd = (firstterminal last leaf).reference
A valid first-path search call returns the reference installed at its actual first leaf; subsequent sibling search cannot replace it.
The nonempty initial state has a successful first descent at the root bound.