Two vertices lie in one orbit of the automorphism group: some
automorphism of G carries u to v.
Equations
- Hex.GraphIso.SameOrbit G u v = ∃ (p : Hex.GraphIso.Perm n), Hex.GraphIso.IsIso G G p ∧ p.get u = v
Instances For
Accept one raw generator array from the traversal: rebuild it as a
permutation of Fin n and check that it is an automorphism. This is
the only step that admits a generator, and the admission test is
checkIso.
Equations
- Hex.GraphIso.autom? G γ = match Hex.GraphIso.Perm.ofNatArray? n γ with | some p => if Hex.GraphIso.checkIso G G p = true then some p else none | none => none
Instances For
The raw generator arrays the pinned traversal records, in discovery order.
Equations
Instances For
The recorded automorphisms that pass the check, each paired with the raw array it came from. One traversal, consulted once: the two projections below are the generator list and the arrays nauty's orbit bookkeeping is stated on.
Equations
- Hex.GraphIso.Aut.checked G = List.filterMap (fun (γ : Array Nat) => Option.map (fun (p : Hex.GraphIso.Perm n) => (γ, p)) (Hex.GraphIso.autom? G γ)) (Hex.GraphIso.Aut.trace G)
Instances For
The generators: the recorded traversal automorphisms that pass the
check, in discovery order. Aut.trace_admitted in HexGraphIso.AutTrace
proves that every recorded entry passes. Completeness uses the whole
trace, including redundant code-2 entries; removing them would need a
further generation proof.
Equations
- Hex.GraphIso.Aut.gens G = List.map (fun (x : Array Nat × Hex.GraphIso.Perm n) => x.snd) (Hex.GraphIso.Aut.checked G)
Instances For
The raw arrays behind gens.
Equations
- Hex.GraphIso.Aut.raw G = List.map (fun (x : Array Nat × Hex.GraphIso.Perm n) => x.fst) (Hex.GraphIso.Aut.checked G)
Instances For
orbjoin folded over a generator list: the same computation the
search performs on the generators it admits.
Equations
- Hex.GraphIso.Aut.orbitsOf n l = List.foldl (fun (o γ : Array Nat) => (Hex.GraphIso.Nauty.orbjoin o γ n).fst) (Array.ofFn fun (i : Fin n) => ↑i) l
Instances For
nauty's vertex orbits. Every entry is the representative of its orbit.
Equations
Instances For
The number of orbits recorded by an orbit array: the vertices that represent themselves.
Equations
- Hex.GraphIso.Aut.countRoots orb n = (List.filter (fun (v : Nat) => orb[v]! == v) (List.range n)).length
Instances For
The size of the orbit of v recorded by an orbit array.
Equations
- Hex.GraphIso.Aut.sizeAt orb n v = (List.filter (fun (u : Nat) => orb[u]! == orb[v]!) (List.range n)).length
Instances For
The number of orbits.
Equations
Instances For
The size of the orbit of v.
Equations
Instances For
Give v a colour of its own, at the end of the colour order.
none when v is already alone in its cell, where the old colour
would be left unused. Every colour-preserving automorphism of the
result is an automorphism of G fixing v, so the search on it
computes the stabilizer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The orbit-stabilizer chain: multiply the length of one
non-singleton orbit by the order of the stabilizer of a point in it,
individualizing that point so that the search on the individualized
colouring computes the stabilizer. orb is the orbit array of G,
taken as an argument so that a caller holding it already does not pay
for a second traversal.
fuel = n is enough: every successful individualization adds a colour,
and a valid colouring has at most n colours. The Mathlib bridge proves
this bound in orderAux_card with the invariant n ≤ k + fuel. At
k = n, every automorphism fixes every vertex. indiv_of_orbitSize
proves that the failure arm is unreachable when an orbit is non-singleton:
colour-preserving automorphisms keep that orbit inside one colour cell.
Equations
- One or more equations did not get rendered due to their size.
- Hex.GraphIso.Aut.orderAux 0 G orb = 1
Instances For
The order of the full automorphism group, computed by the
orbit-stabilizer chain. Aut.order_card in the Mathlib bridge proves
its equality with the group's cardinality.
Equations
Instances For
The automorphism data of a coloured graph: the generators the pinned traversal discovers, in discovery order, with the vertex orbits, the orbit count and the orbit-stabilizer product nauty derives from them.
The generators, in the traversal's discovery order.
The orbit representative of each vertex.
- numOrbits : Nat
The number of orbits.
- order : Nat
The order of the full automorphism group.
Instances For
Generators of the automorphism group of a coloured graph, with the
vertex orbits, the orbit count and the orbit-stabilizer product for the
group order. Every returned permutation is an automorphism
(autos_isIso). Vertices sharing an orbit representative are in one
orbit (autos_sameOrbit_of_eq). HexGraphIso.AutComplete supplies the
biconditional autos_sameOrbit and proves in autos_complete that the
list generates the full group. The Mathlib bridge proves exact cardinality
theorems for the orbit count and order.
Computing the order runs one traversal per base point, so a
caller who wants only the generators or the orbits should take
Aut.gens or Aut.orbits.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The orbit field is the orbit array.
The orbit-count field is the orbit count.