Documentation

CslibFrontier.Foundations.GroupTheory.Perm.ListCycles

Successors in a partition into listed directed cycles #

The executed successor scans the supplied words and wraps within the first containing word. When their flattening is duplicate-free, this is exactly the product of Mathlib's List.formPerm permutations. Empty words contribute no points, singleton words retain their fixed points, and points outside the words are fixed. No bound on the ambient type is needed.

def List.nextInCycles {α : Type u_1} [DecidableEq α] (cycles : List (List α)) (a : α) :
α

Follow the first listed cycle containing a point; fix points absent from every word. The scan is bounded by the actual lists, independently of the representation of a point.

def List.cyclePermutation {α : Type u_1} [DecidableEq α] (cycles : List (List α)) :

The directed permutation represented by a list of cycle words. Overlapping words are composed in list order; the successor scan agrees when the flattening is Nodup.

@[simp]
theorem List.nextInCycles_nil {α : Type u_1} [DecidableEq α] (a : α) :
theorem List.nextInCycles_cons_of_not_mem {α : Type u_1} [DecidableEq α] (word : List α) (cycles : List (List α)) (a : α) (ha : a ∉ word) :
(word :: cycles).nextInCycles a = cycles.nextInCycles a

A head word not containing the point is skipped by the literal scan.

theorem List.cyclePermutation_apply_of_not_mem {α : Type u_1} [DecidableEq α] (cycles : List (List α)) (a : α) (ha : a ∉ cycles.flatten) :
cycles.cyclePermutation a = a

Points absent from every word are fixed by the product permutation.

theorem List.cyclePermutation_mem_flatten_iff {α : Type u_1} [DecidableEq α] (cycles : List (List α)) (a : α) :
cycles.cyclePermutation a ∈ cycles.flatten ↔ a ∈ cycles.flatten

The product preserves membership in the union of its words, even if they overlap.

theorem List.nextInCycles_eq_cyclePermutation {α : Type u_1} [DecidableEq α] (cycles : List (List α)) (hc : cycles.flatten.Nodup) (a : α) :
cycles.nextInCycles a = cycles.cyclePermutation a

A partition into directed words executes precisely the product of its cycle permutations. In particular the total lookup routine is a permutation on every covered finite carrier.

theorem List.cyclePermutation_apply_of_mem {α : Type u_1} [DecidableEq α] (cycles : List (List α)) (hc : cycles.flatten.Nodup) (word : List α) (hw : word ∈ cycles) (a : α) (ha : a ∈ word) :
cycles.cyclePermutation a = word.formPerm a

The product follows each constituent word's own directed successor.

theorem List.isCycleOn_cyclePermutation {α : Type u_1} [DecidableEq α] (cycles : List (List α)) (hc : cycles.flatten.Nodup) (word : List α) (hw : word ∈ cycles) :
cycles.cyclePermutation.IsCycleOn {a : α | a ∈ word}

Each nonempty listed word is a complete orbit of the product. Singleton words give fixed-point orbits; empty words make the assertion vacuous.

theorem List.sameCycle_cyclePermutation_iff_of_mem {α : Type u_1} [DecidableEq α] (cycles : List (List α)) (hc : cycles.flatten.Nodup) (word : List α) (hw : word ∈ cycles) (a b : α) (ha : a ∈ word) :
cycles.cyclePermutation.SameCycle a b ↔ b ∈ word

A point in a stored word has exactly that word as its complete orbit, with no ambient finiteness assumption and without discarding singleton cycles.

def List.finiteCyclePermutation (cycles : List (List ℕ)) {n : ℕ} (hcover : ∀ (i : ℕ), i ∈ cycles.flatten ↔ i < n) :

Restrict the listed cycle product to a completely covered finite interval. This is a proof-side permutation of actual positions; the executed successor remains nextInCycles.

theorem List.val_finiteCyclePermutation (cycles : List (List ℕ)) {n : ℕ} (hcover : ∀ (i : ℕ), i ∈ cycles.flatten ↔ i < n) (i : Fin n) :
↑((cycles.finiteCyclePermutation hcover) i) = cycles.cyclePermutation ↑i

Restriction retains the literal natural-number successor.

theorem List.val_finiteCyclePermutation_eq_nextInCycles (cycles : List (List ℕ)) {n : ℕ} (hcover : ∀ (i : ℕ), i ∈ cycles.flatten ↔ i < n) (hn : cycles.flatten.Nodup) (i : Fin n) :
↑((cycles.finiteCyclePermutation hcover) i) = cycles.nextInCycles ↑i

For a partition, the finite successor is the exact bounded lookup routine.

theorem List.sameCycle_finiteCyclePermutation_iff (cycles : List (List ℕ)) {n : ℕ} (hcover : ∀ (i : ℕ), i ∈ cycles.flatten ↔ i < n) (i j : Fin n) :
(cycles.finiteCyclePermutation hcover).SameCycle i j ↔ cycles.cyclePermutation.SameCycle ↑i ↑j

Restriction to the covered interval retains every complete orbit, including fixed points.