Documentation

HexGraphIso.Nauty.Sparse.MaxFirstNode

theorem Hex.GraphIso.Nauty.Sparse.Max.FirstInput.maximum {n k : Nat} {G : Sparse.Colored n k} {tcLevel fuel last : Nat} {f : Frame n} {leaf : State n} {parents : Parents n} (h : FirstInput G tcLevel f parents) (path : Generic.FirstPath (Graph.ofGraph G.graph) tcLevel fuel f.level f.numcells f.entry last leaf) (hf : n + 1 ≤ f.level + fuel) :
have out := Generic.node true (Graph.ofGraph G.graph) (n + 2) tcLevel fuel f.level f.numcells f.entry; MaxResult (Frame.key G.graph tcLevel f) none (State.best G.graph out.snd) (f.level - 1) (Witness G tcLevel parents.frames) out.fst

The complete executed first descent satisfies its maximum contract. The induction supplies each first child's result, and the established off-path theorem handles every later sibling. All contexts are derived from the actual preparations, stored ancestors and child returns.