AFTD Auto-Formalizing Theoretical Domains

rearrangement_operator

def

For a permutation $P \in \mathrm{Equiv.Perm}(\mathrm{Fin}\,m)$, the rearrangement operator $\widehat{P}$ acts on an array $A : \mathrm{Fin}\,m \to \mathrm{Fin}\,m$ under the source-index convention by $\widehat{P}(A) = A \circ P$.

Statement

def rearrangement_operator {m : ℕ} (P : Equiv.Perm (Fin m)) (A : Arr m) : Arr m
Defined in
arXiv:2611.05397, Section 2.2, Definition 2: Ranking and Unranking Permutations in Heap's Order
Verified
08 Nov 2026
Axioms
none listed
Built on 1
  • ArrThe set of arrangement arrays of order $m$ is represented as the type of functions from $\mathrm{Fin}\,m$ to $\mathrm{Fin}\,m$.
Used by 3

Read back from the Lean

For a natural number $m$, a permutation $P$ of $\mathrm{Fin}(m)$, and a function $A : \mathrm{Fin}(m) \to \mathrm{Fin}(m)$ (an element of Arr m), rearrangement_operator P A is defined as the composite function $A \circ P : \mathrm{Fin}(m) \to \mathrm{Fin}(m)$, mapping each $i \in \mathrm{Fin}(m)$ to $A(P(i))$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The rearrangement operator associated to a permutation acting on an array under the source-index convention. -/
def rearrangement_operator {m : ℕ} (P : Equiv.Perm (Fin m)) (A : Arr m) : Arr m := A ∘ P
See it in the graphDiscuss this resultChallenge it