The areas / V01. The language of Mathlib
Mathlib.Logic.Equiv.Fin.Rotate
21 declarations. Mathlib docs · Source
Cyclic permutations on Fin n
This file defines
finRotate, which corresponds to the cycle(1, ..., n)onFin nfinCycle, the permutation that adds a fixed number to each element ofFin nand proves various lemmas about them.
def finRotate E1 #
(n : ℕ) → Equiv.Perm (Fin n)
Rotate Fin n one step to the right.
theorem finRotate_zero E0 #
finRotate 0 = Equiv.refl (Fin 0)
theorem finRotate_succ E1 #
∀ (n : ℕ), finRotate (n + 1) = finAddFlip.trans (finCongr ⋯)
theorem finRotate_of_lt E1 #
∀ {n k : ℕ} (h : k < n), (finRotate (n + 1)) ⟨k, ⋯⟩ = ⟨k + 1, ⋯⟩
theorem finRotate_last' E1 #
∀ {n : ℕ}, (finRotate (n + 1)) ⟨n, ⋯⟩ = ⟨0, ⋯⟩
theorem finRotate_last E1 #
∀ {n : ℕ}, (finRotate (n + 1)) (Fin.last n) = 0
theorem Fin.snoc_eq_cons_rotate E1 #
∀ {n : ℕ} {α : Type u_1} (v : Fin n → α) (a : α), Fin.snoc v a = fun i ↦ Fin.cons a v ((finRotate (n + 1)) i)
theorem finRotate_one E0 #
finRotate 1 = Equiv.refl (Fin 1)
theorem finRotate_apply E0 #
∀ {n : ℕ} (i : Fin n), (finRotate n) i = i + 1
theorem finRotate_apply_zero E1 #
∀ {n : ℕ}, (finRotate n.succ) 0 = 1
theorem coe_finRotate_of_ne_last E0 #
∀ {n : ℕ} {i : Fin n.succ}, i ≠ Fin.last n → ↑((finRotate (n + 1)) i) = ↑i + 1
theorem coe_finRotate E0 #
∀ {n : ℕ} (i : Fin n.succ), ↑((finRotate n.succ) i) = if i = Fin.last n then 0 else ↑i + 1
theorem lt_finRotate_iff_ne_last E1 #
∀ {n : ℕ} (i : Fin (n + 1)), i < (finRotate (n + 1)) i ↔ i ≠ Fin.last n
theorem lt_finRotate_iff_ne_neg_one E1 #
∀ {n : ℕ} [inst : NeZero n] (i : Fin n), i < (finRotate n) i ↔ i ≠ -1
theorem finRotate_symm_apply E0 #
∀ {n : ℕ} (i : Fin n), (Equiv.symm (finRotate n)) i = i - 1
theorem coe_finRotate_symm_of_ne_zero E0 #
∀ {n : ℕ} [inst : NeZero n] {i : Fin n}, i ≠ 0 → ↑((Equiv.symm (finRotate n)) i) = ↑i - 1
theorem finRotate_symm_lt_iff_ne_zero E1 #
∀ {n : ℕ} [inst : NeZero n] (i : Fin n), (Equiv.symm (finRotate n)) i < i ↔ i ≠ 0
def finCycle E1 #
{n : ℕ} → Fin n → Equiv.Perm (Fin n)
The permutation on Fin n that adds k to each number.
theorem finCycle_symm_apply E0 #
∀ {n : ℕ} (k i : Fin n), (Equiv.symm (finCycle k)) i = i - k
theorem finCycle_apply E0 #
∀ {n : ℕ} (k i : Fin n), (finCycle k) i = i + k
theorem finCycle_eq_finRotate_iterate E1 #
∀ {n : ℕ} {k : Fin n}, ⇑(finCycle k) = (⇑(finRotate n))^[↑k]