theorem
Hex.GraphIso.Nauty.Generation.Matches.stateEq
{n : Nat}
{ctx : Ctx n}
{level : Nat}
{st : Search n}
{targets : List Nat}
{key : Key n}
(h : Matches ctx level st targets key)
{out : Search n}
(hcode : out.firstcode = st.firstcode)
(htc : out.firsttc = st.firsttc)
(hlab : out.firstlab = st.firstlab)
:
Matches ctx level out targets key
The comparison witness depends only on the stored first reference.
theorem
Hex.GraphIso.Nauty.Generation.Matches.tail
{n : Nat}
{ctx : Ctx n}
{level : Nat}
{st : Search n}
{targets : List Nat}
{key : Key n}
{tc code : Nat}
(h : Matches ctx level st (tc :: targets) { codes := code :: key.codes, rows := key.rows })
:
Descending one target consumes one code and one target hint.
theorem
Hex.GraphIso.Nauty.Generation.Matches.cons
{n : Nat}
{ctx : Ctx n}
{level : Nat}
{st : Search n}
{targets : List Nat}
{key : Key n}
{tc code : Nat}
(h : Matches ctx (level + 1) st targets key)
(hcode : code = st.firstcode[level]!)
(htc : Int.ofNat tc = st.firsttc[level]!)
:
Returning from a reference child restores the enclosing code and hint once the recursive call's unchanged prefix supplies those entries.
theorem
Hex.GraphIso.Nauty.Generation.Matches.prep
{n : Nat}
{ctx : Ctx n}
{level : Nat}
{st : Search n}
{targets : List Nat}
{key : Key n}
{tcLevel : Nat}
{rs : RefineSt n}
(h : Matches ctx level st targets key)
(hleaf : HasLeaf ctx tcLevel level rs targets key)
(hlevel : st.eqlevFirst = level - 1)
:
The head of the occurrence justifies advancing the first-reference comparison in the executable preparation step.
theorem
Hex.GraphIso.Nauty.Generation.Matches.target
{n : Nat}
{ctx : Ctx n}
{level : Nat}
{st : Search n}
{key : Key n}
{tcLevel tc : Nat}
{rest : List Nat}
{rs : RefineSt n}
(h : Matches ctx level st (tc :: rest) key)
(hleaf : HasLeaf ctx tcLevel level rs (tc :: rest) key)
(hok : IterOk ctx level rs)
(heq : Equitable ctx level rs.lab rs.ptn)
:
The first target of a nonterminal occurrence justifies the stored hint, not merely the equality of refinement codes.
theorem
Hex.GraphIso.Nauty.Generation.Matches.target_spec
{n : Nat}
{ctx : Ctx n}
{level : Nat}
{st : Search n}
{key : Key n}
{tcLevel tc : Nat}
{rest : List Nat}
{rs : RefineSt n}
(h : Matches ctx level st (tc :: rest) key)
(hleaf : HasLeaf ctx tcLevel level rs (tc :: rest) key)
(hok : IterOk ctx level rs)
(heq : Equitable ctx level rs.lab rs.ptn)
:
A matching reference's complete hinted target record agrees with the specification, including the vertex set and its size.
theorem
Hex.GraphIso.Nauty.Generation.Matches.discrete
{n : Nat}
{ctx : Ctx n}
{level : Nat}
{st : Search n}
{targets : List Nat}
{key : Key n}
{tcLevel : Nat}
{rs : RefineSt n}
(h : Matches ctx level st targets key)
(hleaf : HasLeaf ctx tcLevel level rs targets key)
(hok : IterOk ctx level rs)
(hdisc : ∀ (q : Nat), q < n → rs.ptn[q]! ≤ level)
:
At a discrete matching occurrence the terminal sentinel and row comparison are both exact, even if the canonical incumbent is larger.