Checked inverse axis arrays #
A valid axis array represents a finite permutation. The executable inverse-table builder returns its inverse, so applying that builder twice recovers the original axis array.
List the image of each axis under the permutation, in source-axis order.
Instances For
@[simp]
Read a natural-number list in the axis order encoded by a finite permutation.
Instances For
@[simp]
theorem
NN.MLTheory.CROWN.Graph.axisMap_length
{rank : ℕ}
(e : Equiv.Perm (Fin rank))
(xs : List ℕ)
:
theorem
NN.MLTheory.CROWN.Graph.axisMap_symm
{rank : ℕ}
(e : Equiv.Perm (Fin rank))
(xs : List ℕ)
(hlen : xs.length = rank)
:
theorem
NN.MLTheory.CROWN.Graph.exists_axisArray
{perm : Array ℕ}
{rank : ℕ}
(hperm : perm.toList.Perm (List.range rank))
:
∃ (e : Equiv.Perm (Fin rank)), perm = axisArray e
An axis list obtained by swaps has an ordinary finite permutation representation.
The checked inverse-table algorithm computes the inverse finite permutation.
theorem
NN.MLTheory.CROWN.Graph.permuteShape_properties
{s t : Spec.Shape}
{perm : Array ℕ}
(h : s.permute? perm.toList = some t)
:
A successful shape check has the declared rank and reads precisely its requested axes.