Documentation

Mathlib.Logic.Equiv.Fin.Rotate

Maximum order cyclic permutations on Fin n #

This file defines finRotate, which corresponds to the cycle (1, ..., n) on Fin n, and proves various lemmas about it.

def finRotate (n : ) :

Rotate Fin n one step to the right.

Equations
Instances For
    theorem finRotate_of_lt {n k : } (h : k < n) :
    (finRotate (n + 1)) k, = k + 1,
    theorem finRotate_last' {n : } :
    (finRotate (n + 1)) n, = 0,
    theorem finRotate_last {n : } :
    (finRotate (n + 1)) (Fin.last n) = 0
    theorem Fin.snoc_eq_cons_rotate {n : } {α : Type u_1} (v : Fin nα) (a : α) :
    snoc v a = fun (i : Fin (n + 1)) => cons a v ((finRotate (n + 1)) i)
    @[simp]
    theorem finRotate_succ_apply {n : } (i : Fin (n + 1)) :
    (finRotate (n + 1)) i = i + 1
    theorem coe_finRotate_of_ne_last {n : } {i : Fin n.succ} (h : i Fin.last n) :
    ((finRotate (n + 1)) i) = i + 1
    theorem coe_finRotate {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 {n : } (i : Fin (n + 1)) :
    i < (finRotate (n + 1)) i i Fin.last n
    theorem lt_finRotate_iff_ne_neg_one {n : } [NeZero n] (i : Fin n) :
    i < (finRotate n) i i -1
    @[simp]
    theorem finRotate_succ_symm_apply {n : } [NeZero n] (i : Fin n) :
    (Equiv.symm (finRotate n)) i = i - 1
    theorem coe_finRotate_symm_of_ne_zero {n : } [NeZero n] {i : Fin n} (hi : i 0) :
    ((Equiv.symm (finRotate n)) i) = i - 1
    theorem finRotate_symm_lt_iff_ne_zero {n : } [NeZero n] (i : Fin n) :
    (Equiv.symm (finRotate n)) i < i i 0