A permutation of the vertex set Fin n, stored as the array of images:
vertex i maps to vec[i]. The two proof fields record that the array is
duplicate-free and contains every vertex; both are decidable, and carrying
both makes the inverse constructible directly.
The image array: vertex
imaps tovec[i].The image array has no duplicate entries.
Every vertex occurs in the image array.
Instances For
Build a permutation from an injective-and-surjective entry function.
Equations
- Hex.GraphIso.Perm.ofFn f hinj hsurj = { vec := Hex.Vector.ofFn' f, nodup := ⋯, complete := ⋯ }
Instances For
Checked construction: accepts exactly the duplicate-free complete vertex arrays.
Equations
Instances For
The identity permutation.
Equations
- Hex.GraphIso.Perm.id n = Hex.GraphIso.Perm.ofFn (fun (i : Fin n) => i) ⋯ ⋯
Instances For
The image array of the inverse, built by one scatter pass over the
vertices: each i is written at position p.get i. Every position is
written, because p is surjective.
Equations
- p.invVec = List.foldl p.scatterStep (Hex.Vector.ofFn' fun (i : Fin n) => i) (List.finRange n)
Instances For
Checked permutation construction from raw entries, for literal data emitted by tactics: entries must be in range, duplicate-free, and complete.
Equations
Instances For
A canonical-labelling result array in nauty's canonlab convention:
l[i] is the old vertex placed at new position i. The underlying data is
the same duplicate-free complete vertex array as Perm. The wrapper marks
the direction.
- perm : Perm n
The underlying bijection sending each new position to the old vertex placed there.
Instances For
Checked construction from a vertex array.
Equations
Instances For
The identity labelling.
Equations
- Hex.GraphIso.Label.id n = { perm := Hex.GraphIso.Perm.id n }
Instances For
Checked construction from a raw array of vertex numbers: none
unless the array has length n, entries below n, and describes a
permutation.
Equations
- One or more equations did not get rendered due to their size.