structure
Hex.GraphIso.Nauty.FirstPre
{n k : Nat}
(G : Colored n k)
(ctx : Ctx n)
(level numcells : Nat)
(st : Search n)
:
The first descent begins before a reference leaf is installed. A previously passed cheap guard supplies the small-cell invariant at its current node.
- partition : SearchOk G level numcells st
- equitable : Equitable ctx level (SearchState.refined ctx level numcells st).lab (SearchState.refined ctx level numcells st).ptn
- trace : TraceOk ctx st
- orbits : OrbitsOk st
Every orbit pointer is connected by recorded generators.
- colors : TraceStab G st
Recorded generators stabilize the initial colour partition.
- small : st.noncheaplevel < level → SubtreeOk ctx level (SearchState.refined ctx level numcells st)
- boundary : Boundary G ctx level st
- pairs : PairsOk G ctx st
- workspace : WorkspaceOk st
- path : PathInv G ctx level st
Instances For
theorem
Hex.GraphIso.Nauty.firstChild_offset
{n k : Nat}
{G : Colored n k}
{ctx : Ctx n}
{tcLevel level numcells tv : Nat}
{st : Search n}
(hn0 : 0 < n)
(hlevel : 1 ≤ level)
(hok : SearchOk G level numcells st)
(htv : (Generic.prepareFirst ctx tcLevel level numcells st).snd.snd.fst.nextElem none = some tv)
:
The chosen first child is a valid mathematical individualization step.
theorem
Hex.GraphIso.Nauty.prepareFirst_stores
{n : Nat}
(ctx : Ctx n)
(tcLevel level numcells : Nat)
(st : Search n)
:
First-path preparation preserves allocation sizes and the existing generator trace.
theorem
Hex.GraphIso.Nauty.FirstPre.prepare_path
{n k : Nat}
{G : Colored n k}
{ctx : Ctx n}
{level numcells : Nat}
{st : Search n}
(h : FirstPre G ctx level numcells st)
(hn0 : 0 < n)
(hgsz : ctx.g.size = n)
(tcLevel : Nat)
:
First-path preparation refines the path and preserves it while recording codes and targets.
theorem
Hex.GraphIso.Nauty.FirstPre.cheap_boundary
{n k : Nat}
{G : Colored n k}
{ctx : Ctx n}
{tcLevel level numcells : Nat}
{st : Search n}
(h : FirstPre G ctx level numcells st)
(hn0 : 0 < n)
(hgsz : ctx.g.size = n)
(hsymm : ∀ (u v : Nat), u < n → v < n → ctx.g[u]!.mem v = ctx.g[v]!.mem u)
(hloop : ∀ (v : Nat), v < n → ctx.g[v]!.mem v = false)
:
Boundary G ctx (level + 1) (cheapCheck true level (Generic.prepareFirst ctx tcLevel level numcells st).snd.snd.snd.snd)
The first-path guard validates the pair needed at the next child.
theorem
Hex.GraphIso.Nauty.FirstPre.child
{n k : Nat}
{G : Colored n k}
{ctx : Ctx n}
{tcLevel level numcells tv : Nat}
{st : Search n}
(h : FirstPre G ctx level numcells st)
(hn0 : 0 < n)
(hsymm : ∀ (u v : Nat), u < n → v < n → ctx.g[u]!.mem v = ctx.g[v]!.mem u)
(htv : (Generic.prepareFirst ctx tcLevel level numcells st).snd.snd.fst.nextElem none = some tv)
(hgsz : ctx.g.size = n)
(hloop : ∀ (v : Nat), v < n → ctx.g[v]!.mem v = false)
:
A first-path child inherits the entry conditions, including the exact cheap boundary.