File: Mathlib/GroupTheory/Perm/Fin.lean

full_name: Equiv.Perm.decomposeFin
code: /-- Permutations of `Fin (n + 1)` are equivalent to fixing a single
`Fin (n + 1)` and permuting the remaining with a `Perm (Fin n)`.
The fixed `Fin (n + 1)` is swapped with `0`. -/
def Equiv.Perm.decomposeFin {n : ℕ} : Perm (Fin n.succ) ≃ Fin n.succ × Perm (Fin n) 
goal: Equiv.Perm (Fin n.succ) ≃ Fin n.succ × Equiv.Perm (Fin n)

full_name: Equiv.Perm.decomposeFin_symm_of_refl
code: @[simp]
theorem Equiv.Perm.decomposeFin_symm_of_refl {n : ℕ} (p : Fin (n + 1)) :
    Equiv.Perm.decomposeFin.symm (p, Equiv.refl _) = swap 0 p 
goal: Equiv.Perm.decomposeFin.symm (p, Equiv.refl (Fin n)) = Equiv.swap 0 p

full_name: Equiv.Perm.decomposeFin_symm_of_one
code: @[simp]
theorem Equiv.Perm.decomposeFin_symm_of_one {n : ℕ} (p : Fin (n + 1)) :
    Equiv.Perm.decomposeFin.symm (p, 1) = swap 0 p 
goal: Equiv.Perm.decomposeFin.symm (p, 1) = Equiv.swap 0 p

full_name: Equiv.Perm.decomposeFin_symm_apply_zero
code: @[simp]
theorem Equiv.Perm.decomposeFin_symm_apply_zero {n : ℕ} (p : Fin (n + 1)) (e : Perm (Fin n)) :
    Equiv.Perm.decomposeFin.symm (p, e) 0 = p 
goal: (Equiv.Perm.decomposeFin.symm (p, e)) 0 = p

full_name: Equiv.Perm.decomposeFin_symm_apply_succ
code: @[simp]
theorem Equiv.Perm.decomposeFin_symm_apply_succ {n : ℕ} (e : Perm (Fin n)) (p : Fin (n + 1))
    (x : Fin n) : Equiv.Perm.decomposeFin.symm (p, e) x.succ = swap 0 p (e x).succ 
goal: (Equiv.Perm.decomposeFin.symm (p, e)) x.succ = (Equiv.swap 0 p) (e x).succ

full_name: Equiv.Perm.decomposeFin_symm_apply_one
code: @[simp]
theorem Equiv.Perm.decomposeFin_symm_apply_one {n : ℕ} (e : Perm (Fin (n + 1))) (p : Fin (n + 2)) :
    Equiv.Perm.decomposeFin.symm (p, e) 1 = swap 0 p (e 0).succ 
goal: (Equiv.Perm.decomposeFin.symm (p, e)) 1 = (Equiv.swap 0 p) (e 0).succ

full_name: Equiv.Perm.decomposeFin.symm_sign
code: @[simp]
theorem Equiv.Perm.decomposeFin.symm_sign {n : ℕ} (p : Fin (n + 1)) (e : Perm (Fin n)) :
    Perm.sign (Equiv.Perm.decomposeFin.symm (p, e)) = ite (p = 0) 1 (-1) * Perm.sign e 
goal: Equiv.Perm.sign (Equiv.Perm.decomposeFin.symm (p, e)) = (if p = 0 then 1 else -1) * Equiv.Perm.sign e

full_name: Finset.univ_perm_fin_succ
code: /-- The set of all permutations of `Fin (n + 1)` can be constructed by augmenting the set of
permutations of `Fin n` by each element of `Fin (n + 1)` in turn. -/
theorem Finset.univ_perm_fin_succ {n : ℕ} :
    @Finset.univ (Perm <| Fin n.succ) _ =
      (Finset.univ : Finset <| Fin n.succ × Perm (Fin n)).map
        Equiv.Perm.decomposeFin.symm.toEmbedding 
goal: Finset.univ = Finset.map Equiv.Perm.decomposeFin.symm.toEmbedding Finset.univ

full_name: finRotate_succ_eq_decomposeFin
code: theorem finRotate_succ_eq_decomposeFin {n : ℕ} :
    finRotate n.succ = decomposeFin.symm (1, finRotate n) 
goal: finRotate n.succ = Equiv.Perm.decomposeFin.symm (1, finRotate n)

full_name: sign_finRotate
code: @[simp]
theorem sign_finRotate (n : ℕ) : Perm.sign (finRotate (n + 1)) = (-1) ^ n 
goal: Equiv.Perm.sign (finRotate (n + 1)) = (-1) ^ n

full_name: support_finRotate
code: @[simp]
theorem support_finRotate {n : ℕ} : support (finRotate (n + 2)) = Finset.univ 
goal: (finRotate (n + 2)).support = Finset.univ

full_name: support_finRotate_of_le
code: theorem support_finRotate_of_le {n : ℕ} (h : 2 ≤ n) : support (finRotate n) = Finset.univ 
goal: (finRotate n).support = Finset.univ

full_name: isCycle_finRotate
code: theorem isCycle_finRotate {n : ℕ} : IsCycle (finRotate (n + 2)) 
goal: (finRotate (n + 2)).IsCycle

full_name: isCycle_finRotate_of_le
code: theorem isCycle_finRotate_of_le {n : ℕ} (h : 2 ≤ n) : IsCycle (finRotate n) 
goal: (finRotate n).IsCycle

full_name: cycleType_finRotate
code: @[simp]
theorem cycleType_finRotate {n : ℕ} : cycleType (finRotate (n + 2)) = {n + 2} 
goal: (finRotate (n + 2)).cycleType = {n + 2}

full_name: cycleType_finRotate_of_le
code: theorem cycleType_finRotate_of_le {n : ℕ} (h : 2 ≤ n) : cycleType (finRotate n) = {n} 
goal: (finRotate n).cycleType = {n}

full_name: Fin.cycleRange
code: /-- `Fin.cycleRange i` is the cycle `(0 1 2 ... i)` leaving `(i+1 ... (n-1))` unchanged. -/
def cycleRange {n : ℕ} (i : Fin n) : Perm (Fin n) 
goal: Equiv.Perm (Fin n)

full_name: Fin.cycleRange_of_gt
code: theorem cycleRange_of_gt {n : ℕ} {i j : Fin n.succ} (h : i < j) : cycleRange i j = j 
goal: i.cycleRange j = j

full_name: Fin.cycleRange_of_le
code: theorem cycleRange_of_le {n : ℕ} {i j : Fin n.succ} (h : j ≤ i) :
    cycleRange i j = if j = i then 0 else j + 1 
goal: i.cycleRange j = if j = i then 0 else j + 1

full_name: Fin.coe_cycleRange_of_le
code: theorem coe_cycleRange_of_le {n : ℕ} {i j : Fin n.succ} (h : j ≤ i) :
    (cycleRange i j : ℕ) = if j = i then 0 else (j : ℕ) + 1 
goal: ↑(i.cycleRange j) = if j = i then 0 else ↑j + 1

full_name: Fin.cycleRange_of_lt
code: theorem cycleRange_of_lt {n : ℕ} {i j : Fin n.succ} (h : j < i) : cycleRange i j = j + 1 
goal: i.cycleRange j = j + 1

full_name: Fin.coe_cycleRange_of_lt
code: theorem coe_cycleRange_of_lt {n : ℕ} {i j : Fin n.succ} (h : j < i) :
    (cycleRange i j : ℕ) = j + 1 
goal: ↑(i.cycleRange j) = ↑j + 1

full_name: Fin.cycleRange_of_eq
code: theorem cycleRange_of_eq {n : ℕ} {i j : Fin n.succ} (h : j = i) : cycleRange i j = 0 
goal: i.cycleRange j = 0

full_name: Fin.cycleRange_self
code: @[simp]
theorem cycleRange_self {n : ℕ} (i : Fin n.succ) : cycleRange i i = 0 
goal: i.cycleRange i = 0

full_name: Fin.cycleRange_apply
code: theorem cycleRange_apply {n : ℕ} (i j : Fin n.succ) :
    cycleRange i j = if j < i then j + 1 else if j = i then 0 else j 
goal: i.cycleRange j = if j < i then j + 1 else if j = i then 0 else j

full_name: Fin.cycleRange_zero
code: @[simp]
theorem cycleRange_zero (n : ℕ) : cycleRange (0 : Fin n.succ) = 1 
goal: Fin.cycleRange 0 = 1

full_name: Fin.cycleRange_last
code: @[simp]
theorem cycleRange_last (n : ℕ) : cycleRange (last n) = finRotate (n + 1) 
goal: (Fin.last n).cycleRange = finRotate (n + 1)

full_name: Fin.cycleRange_zero'
code: @[simp]
theorem cycleRange_zero' {n : ℕ} (h : 0 < n) : cycleRange ⟨0, h⟩ = 1 
goal: ⟨0, h⟩.cycleRange = 1

full_name: Fin.sign_cycleRange
code: @[simp]
theorem sign_cycleRange {n : ℕ} (i : Fin n) : Perm.sign (cycleRange i) = (-1) ^ (i : ℕ) 
goal: Equiv.Perm.sign i.cycleRange = (-1) ^ ↑i

full_name: Fin.succAbove_cycleRange
code: @[simp]
theorem succAbove_cycleRange {n : ℕ} (i j : Fin n) :
    i.succ.succAbove (i.cycleRange j) = swap 0 i.succ j.succ 
goal: i.succ.succAbove (i.cycleRange j) = (Equiv.swap 0 i.succ) j.succ

full_name: Fin.cycleRange_succAbove
code: @[simp]
theorem cycleRange_succAbove {n : ℕ} (i : Fin (n + 1)) (j : Fin n) :
    i.cycleRange (i.succAbove j) = j.succ 
goal: i.cycleRange (i.succAbove j) = j.succ

full_name: Fin.cycleRange_symm_zero
code: @[simp]
theorem cycleRange_symm_zero {n : ℕ} (i : Fin (n + 1)) : i.cycleRange.symm 0 = i 
goal: (Equiv.symm i.cycleRange) 0 = i

full_name: Fin.cycleRange_symm_succ
code: @[simp]
theorem cycleRange_symm_succ {n : ℕ} (i : Fin (n + 1)) (j : Fin n) :
    i.cycleRange.symm j.succ = i.succAbove j 
goal: (Equiv.symm i.cycleRange) j.succ = i.succAbove j

full_name: Fin.isCycle_cycleRange
code: theorem isCycle_cycleRange {n : ℕ} {i : Fin (n + 1)} (h0 : i ≠ 0) : IsCycle (cycleRange i) 
goal: i.cycleRange.IsCycle

full_name: Fin.cycleType_cycleRange
code: @[simp]
theorem cycleType_cycleRange {n : ℕ} {i : Fin (n + 1)} (h0 : i ≠ 0) :
    cycleType (cycleRange i) = {(i + 1 : ℕ)} 
goal: i.cycleRange.cycleType = {↑i + 1}

full_name: Fin.isThreeCycle_cycleRange_two
code: theorem isThreeCycle_cycleRange_two {n : ℕ} : IsThreeCycle (cycleRange 2 : Perm (Fin (n + 3))) 
goal: (Fin.cycleRange 2).IsThreeCycle