theorem
Hex.GraphIso.Nauty.Generation.CanonPast.before
{n level pos tv : Nat}
{cursor : Option Nat}
{st : SearchSt n}
{tcell : VSet n}
(h : CanonPast level pos cursor st)
(hnext : tcell.nextElem cursor = some tv)
(he : st.gcaCanon = level)
:
The reference child is strictly earlier than the next visited child.
theorem
Hex.GraphIso.Nauty.Generation.CanonPast.stateEq
{n level pos : Nat}
{cursor : Option Nat}
{st out : SearchSt n}
(h : CanonPast level pos cursor st)
(hgca : out.gcaCanon = st.gcaCanon)
(hlab : out.canonlab = st.canonlab)
:
CanonPast level pos cursor out
Updates to unrelated bookkeeping preserve the canonical source.
theorem
Hex.GraphIso.Nauty.Generation.CanonPast.recover
{n inf level pos tv : Nat}
{cursor : Option Nat}
{st child out : SearchSt n}
(h : CanonPast level pos cursor st)
(ha : After cursor tv)
(hgca : child.gcaCanon = st.gcaCanon)
(hlab : child.canonlab = st.canonlab)
(hguide : GuideRel (level + 1) child out)
(hcell : IsCell child.ptn (level + 1) pos 1)
(hat : child.lab[pos]! = tv)
:
CanonPast level pos (some tv) (Nauty.recover n inf level out)
Recovering after a child visit keeps an old source or records the visited child as the new source. The old/new disjunction is used directly; no cell-location assertion is made about an old ancestor reference.
theorem
Hex.GraphIso.Nauty.Generation.CanonPast.locate
{n : Nat}
{ctx : Ctx n}
{tcLevel specFuel level tc len numcells tv : Nat}
{codes : List Nat}
{rsLab rsPtn : Array Nat}
{cursor : Option Nat}
{tcell : VSet n}
{st child out : SearchSt n}
{best : Option (Key n)}
(h : CanonPast level tc cursor st)
(hnext : tcell.nextElem cursor = some tv)
(hrefs : FrameRefs ctx tcLevel specFuel level codes rsLab rsPtn tc len numcells st best)
(hgca : child.gcaCanon = st.gcaCanon)
(hlab : child.canonlab = st.canonlab)
(hguide : GuideRel (level + 1) child out)
(hat : out.gcaCanon = level)
:
A canonical return to this frame names an earlier original child. The return tag and old-reference alternative recover its location from the existing frame references, including after target-set pruning.