A set-valued interpretation of native rows for the shared equitability predicates. It is used only in proofs, never by the sparse search.
Equations
- Hex.GraphIso.Nauty.Sparse.Graph.context G = { g := Array.ofFn fun (v : Fin n) => Hex.GraphIso.Nauty.VSet.ofList ((Hex.GraphIso.Nauty.Sparse.Graph.ofGraph G).row ↑v) }
Instances For
theorem
Hex.GraphIso.Nauty.Sparse.Graph.count_context
{n : Nat}
(G : SparseGraph n)
(vertices : List Nat)
(hb : ∀ (u : Nat), u ∈ vertices → u < n)
(v : Fin n)
:
List.count (↑v) (List.flatMap (fun (u : Nat) => (ofGraph G).row u) vertices) = (List.filter (fun (u : Nat) => (context G).g[↑v]!.mem u) vertices).length
Native neighbour accumulation agrees with counting the adjacent vertices in the captured splitter list. Symmetry supplies the row orientation.
theorem
Hex.GraphIso.Nauty.Sparse.Graph.count_workset
{n first last : Nat}
(G : SparseGraph n)
(lab : Array Nat)
(hp : lab.toList.Perm (List.range n))
(hf : first ≤ last)
(hb : last < n)
(v : Fin n)
:
Native accumulated counts into a captured label interval are exactly the shared equitability predicate's set-intersection cardinalities.
theorem
Hex.GraphIso.Nauty.Sparse.Graph.constOn_workset
{n first last a len : Nat}
(G : SparseGraph n)
(lab out : Array Nat)
(hp : lab.toList.Perm (List.range n))
(hout : out.toList.Perm (List.range n))
(hf : first ≤ last)
(hb : last < n)
(ha : a + len ≤ n)
(hc :
∀ (q r : Nat),
a ≤ q →
q < a + len →
a ≤ r →
r < a + len →
List.count out[q]!
(List.flatMap (fun (j : Nat) => (ofGraph G).row lab[j]!) (List.range' first (last + 1 - first))) = List.count out[r]!
(List.flatMap (fun (j : Nat) => (ofGraph G).row lab[j]!) (List.range' first (last + 1 - first))))
:
Constant native counts imply the shared set-valued cell predicate.