File: Mathlib/Data/List/Rotate.lean

full_name: List.rotate_mod
code: theorem rotate_mod (l : List α) (n : ℕ) : l.rotate (n % l.length) = l.rotate n 
goal: l.rotate (n % l.length) = l.rotate n

full_name: List.rotate_nil
code: @[simp]
theorem rotate_nil (n : ℕ) : ([] : List α).rotate n = [] 
goal: [].rotate n = []

full_name: List.rotate_zero
code: @[simp]
theorem rotate_zero (l : List α) : l.rotate 0 = l 
goal: l.rotate 0 = l

full_name: List.rotate'_nil
code: theorem rotate'_nil (n : ℕ) : ([] : List α).rotate' n = [] 
goal: [].rotate' n = []

full_name: List.rotate'_zero
code: @[simp]
theorem rotate'_zero (l : List α) : l.rotate' 0 = l 
goal: l.rotate' 0 = l

full_name: List.rotate'_cons_succ
code: theorem rotate'_cons_succ (l : List α) (a : α) (n : ℕ) :
    (a :: l : List α).rotate' n.succ = (l ++ [a]).rotate' n 
goal: (a :: l).rotate' n.succ = (l ++ [a]).rotate' n

full_name: List.length_rotate'
code: @[simp]
theorem length_rotate' : ∀ (l : List α) (n : ℕ), (l.rotate' n).length = l.length
  
goal: (l.rotate' n).length = l.length

full_name: List.rotate'_eq_drop_append_take
code: theorem rotate'_eq_drop_append_take :
    ∀ {l : List α} {n : ℕ}, n ≤ l.length → l.rotate' n = l.drop n ++ l.take n
  
goal: n ≤ l.length → l.rotate' n = List.drop n l ++ List.take n l

full_name: List.rotate'_rotate'
code: theorem rotate'_rotate' : ∀ (l : List α) (n m : ℕ), (l.rotate' n).rotate' m = l.rotate' (n + m)
  
goal: (l.rotate' n).rotate' m = l.rotate' (n + m)

full_name: List.rotate'_length
code: @[simp]
theorem rotate'_length (l : List α) : rotate' l l.length = l 
goal: l.rotate' l.length = l

full_name: List.rotate'_length_mul
code: @[simp]
theorem rotate'_length_mul (l : List α) : ∀ n : ℕ, l.rotate' (l.length * n) = l
  
goal: l.rotate' (l.length * n) = l

full_name: List.rotate'_mod
code: theorem rotate'_mod (l : List α) (n : ℕ) : l.rotate' (n % l.length) = l.rotate' n 
goal: l.rotate' (n % l.length) = l.rotate' n

full_name: List.rotate_eq_rotate'
code: theorem rotate_eq_rotate' (l : List α) (n : ℕ) : l.rotate n = l.rotate' n 
goal: l.rotate n = l.rotate' n

full_name: List.rotate_cons_succ
code: theorem rotate_cons_succ (l : List α) (a : α) (n : ℕ) :
    (a :: l : List α).rotate (n + 1) = (l ++ [a]).rotate n 
goal: (a :: l).rotate (n + 1) = (l ++ [a]).rotate n

full_name: List.mem_rotate
code: @[simp]
theorem mem_rotate : ∀ {l : List α} {a : α} {n : ℕ}, a ∈ l.rotate n ↔ a ∈ l
  
goal: a ∈ l.rotate n ↔ a ∈ l

full_name: List.length_rotate
code: @[simp]
theorem length_rotate (l : List α) (n : ℕ) : (l.rotate n).length = l.length 
goal: (l.rotate n).length = l.length

full_name: List.rotate_replicate
code: @[simp]
theorem rotate_replicate (a : α) (n : ℕ) (k : ℕ) : (replicate n a).rotate k = replicate n a 
goal: (List.replicate n a).rotate k = List.replicate n a

full_name: List.rotate_eq_drop_append_take
code: theorem rotate_eq_drop_append_take {l : List α} {n : ℕ} :
    n ≤ l.length → l.rotate n = l.drop n ++ l.take n 
goal: n ≤ l.length → l.rotate n = List.drop n l ++ List.take n l

full_name: List.rotate_eq_drop_append_take_mod
code: theorem rotate_eq_drop_append_take_mod {l : List α} {n : ℕ} :
    l.rotate n = l.drop (n % l.length) ++ l.take (n % l.length) 
goal: l.rotate n = List.drop (n % l.length) l ++ List.take (n % l.length) l

full_name: List.rotate_append_length_eq
code: @[simp]
theorem rotate_append_length_eq (l l' : List α) : (l ++ l').rotate l.length = l' ++ l 
goal: (l ++ l').rotate l.length = l' ++ l

full_name: List.rotate_rotate
code: theorem rotate_rotate (l : List α) (n m : ℕ) : (l.rotate n).rotate m = l.rotate (n + m) 
goal: (l.rotate n).rotate m = l.rotate (n + m)

full_name: List.rotate_length
code: @[simp]
theorem rotate_length (l : List α) : rotate l l.length = l 
goal: l.rotate l.length = l

full_name: List.rotate_length_mul
code: @[simp]
theorem rotate_length_mul (l : List α) (n : ℕ) : l.rotate (l.length * n) = l 
goal: l.rotate (l.length * n) = l

full_name: List.rotate_perm
code: theorem rotate_perm (l : List α) (n : ℕ) : l.rotate n ~ l 
goal: (l.rotate n).Perm l

full_name: List.nodup_rotate
code: @[simp]
theorem nodup_rotate {l : List α} {n : ℕ} : Nodup (l.rotate n) ↔ Nodup l 
goal: (l.rotate n).Nodup ↔ l.Nodup

full_name: List.rotate_eq_nil_iff
code: @[simp]
theorem rotate_eq_nil_iff {l : List α} {n : ℕ} : l.rotate n = [] ↔ l = [] 
goal: l.rotate n = [] ↔ l = []

full_name: List.nil_eq_rotate_iff
code: @[simp]
theorem nil_eq_rotate_iff {l : List α} {n : ℕ} : [] = l.rotate n ↔ [] = l 
goal: [] = l.rotate n ↔ [] = l

full_name: List.rotate_singleton
code: @[simp]
theorem rotate_singleton (x : α) (n : ℕ) : [x].rotate n = [x] 
goal: [x].rotate n = [x]

full_name: List.zipWith_rotate_distrib
code: theorem zipWith_rotate_distrib {β γ : Type*} (f : α → β → γ) (l : List α) (l' : List β) (n : ℕ)
    (h : l.length = l'.length) :
    (zipWith f l l').rotate n = zipWith f (l.rotate n) (l'.rotate n) 
goal: (List.zipWith f l l').rotate n = List.zipWith f (l.rotate n) (l'.rotate n)

full_name: List.zipWith_rotate_one
code: theorem zipWith_rotate_one {β : Type*} (f : α → α → β) (x y : α) (l : List α) :
    zipWith f (x :: y :: l) ((x :: y :: l).rotate 1) = f x y :: zipWith f (y :: l) (l ++ [x]) 
goal: List.zipWith f (x :: y :: l) ((x :: y :: l).rotate 1) = f x y :: List.zipWith f (y :: l) (l ++ [x])

full_name: List.getElem?_rotate
code: theorem getElem?_rotate {l : List α} {n m : ℕ} (hml : m < l.length) :
    (l.rotate n)[m]? = l[(m + n) % l.length]? 
goal: (l.rotate n)[m]? = l[(m + n) % l.length]?

full_name: List.getElem_rotate
code: theorem getElem_rotate (l : List α) (n : ℕ) (k : Nat) (h : k < (l.rotate n).length) :
    (l.rotate n)[k] =
      l[(k + n) % l.length]'(mod_lt _ (length_rotate l n ▸ k.zero_le.trans_lt h)) 
goal: (l.rotate n)[k] = l[(k + n) % l.length]

full_name: List.get?_rotate
code: theorem get?_rotate {l : List α} {n m : ℕ} (hml : m < l.length) :
    (l.rotate n).get? m = l.get? ((m + n) % l.length) 
goal: (l.rotate n).get? m = l.get? ((m + n) % l.length)

full_name: List.get_rotate
code: theorem get_rotate (l : List α) (n : ℕ) (k : Fin (l.rotate n).length) :
    (l.rotate n).get k =
      l.get ⟨(k + n) % l.length, mod_lt _ (length_rotate l n ▸ k.1.zero_le.trans_lt k.2)⟩ 
goal: (l.rotate n).get k = l.get ⟨(↑k + n) % l.length, ⋯⟩

full_name: List.head?_rotate
code: theorem head?_rotate {l : List α} {n : ℕ} (h : n < l.length) : head? (l.rotate n) = l[n]? 
goal: (l.rotate n).head? = l[n]?

full_name: List.nthLe_rotate
code: @[deprecated get_rotate (since := "2023-01-13")]
theorem nthLe_rotate (l : List α) (n k : ℕ) (hk : k < (l.rotate n).length) :
    (l.rotate n).nthLe k hk =
      l.nthLe ((k + n) % l.length) (mod_lt _ (length_rotate l n ▸ k.zero_le.trans_lt hk)) 
goal: (l.rotate n).nthLe k hk = l.nthLe ((k + n) % l.length) ⋯

full_name: List.nthLe_rotate_one
code: theorem nthLe_rotate_one (l : List α) (k : ℕ) (hk : k < (l.rotate 1).length) :
    (l.rotate 1).nthLe k hk =
      l.nthLe ((k + 1) % l.length) (mod_lt _ (length_rotate l 1 ▸ k.zero_le.trans_lt hk)) 
goal: (l.rotate 1).nthLe k hk = l.nthLe ((k + 1) % l.length) ⋯

full_name: List.get_eq_get_rotate
code: /-- A version of `List.get_rotate` that represents `List.get l` in terms of
`List.get (List.rotate l n)`, not vice versa. Can be used instead of rewriting `List.get_rotate`
from right to left. -/
theorem get_eq_get_rotate (l : List α) (n : ℕ) (k : Fin l.length) :
    l.get k = (l.rotate n).get ⟨(l.length - n % l.length + k) % l.length,
      (Nat.mod_lt _ (k.1.zero_le.trans_lt k.2)).trans_eq (length_rotate _ _).symm⟩ 
goal: l.get k = (l.rotate n).get ⟨(l.length - n % l.length + ↑k) % l.length, ⋯⟩

full_name: List.nthLe_rotate'
code: /-- A variant of `List.nthLe_rotate` useful for rewrites from right to left. -/
@[deprecated get_eq_get_rotate (since := "2023-03-26")]
theorem nthLe_rotate' (l : List α) (n k : ℕ) (hk : k < l.length) :
    (l.rotate n).nthLe ((l.length - n % l.length + k) % l.length)
        ((Nat.mod_lt _ (k.zero_le.trans_lt hk)).trans_le (length_rotate _ _).ge) =
      l.nthLe k hk 
goal: (l.rotate n).nthLe ((l.length - n % l.length + k) % l.length) ⋯ = l.nthLe k hk

full_name: List.rotate_eq_self_iff_eq_replicate
code: theorem rotate_eq_self_iff_eq_replicate [hα : Nonempty α] :
    ∀ {l : List α}, (∀ n, l.rotate n = l) ↔ ∃ a, l = replicate l.length a
  
goal: (∀ (n : ℕ), l.rotate n = l) ↔ ∃ a, l = List.replicate l.length a

full_name: List.rotate_one_eq_self_iff_eq_replicate
code: theorem rotate_one_eq_self_iff_eq_replicate [Nonempty α] {l : List α} :
    l.rotate 1 = l ↔ ∃ a : α, l = List.replicate l.length a 
goal: l.rotate 1 = l ↔ ∃ a, l = List.replicate l.length a

full_name: List.rotate_injective
code: theorem rotate_injective (n : ℕ) : Function.Injective fun l : List α => l.rotate n 
goal: Function.Injective fun l => l.rotate n

full_name: List.rotate_eq_rotate
code: @[simp]
theorem rotate_eq_rotate {l l' : List α} {n : ℕ} : l.rotate n = l'.rotate n ↔ l = l' 
goal: l.rotate n = l'.rotate n ↔ l = l'

full_name: List.rotate_eq_iff
code: theorem rotate_eq_iff {l l' : List α} {n : ℕ} :
    l.rotate n = l' ↔ l = l'.rotate (l'.length - n % l'.length) 
goal: l.rotate n = l' ↔ l = l'.rotate (l'.length - n % l'.length)

full_name: List.rotate_eq_singleton_iff
code: @[simp]
theorem rotate_eq_singleton_iff {l : List α} {n : ℕ} {x : α} : l.rotate n = [x] ↔ l = [x] 
goal: l.rotate n = [x] ↔ l = [x]

full_name: List.singleton_eq_rotate_iff
code: @[simp]
theorem singleton_eq_rotate_iff {l : List α} {n : ℕ} {x : α} : [x] = l.rotate n ↔ [x] = l 
goal: [x] = l.rotate n ↔ [x] = l

full_name: List.reverse_rotate
code: theorem reverse_rotate (l : List α) (n : ℕ) :
    (l.rotate n).reverse = l.reverse.rotate (l.length - n % l.length) 
goal: (l.rotate n).reverse = l.reverse.rotate (l.length - n % l.length)

full_name: List.rotate_reverse
code: theorem rotate_reverse (l : List α) (n : ℕ) :
    l.reverse.rotate n = (l.rotate (l.length - n % l.length)).reverse 
goal: l.reverse.rotate n = (l.rotate (l.length - n % l.length)).reverse

full_name: List.map_rotate
code: theorem map_rotate {β : Type*} (f : α → β) (l : List α) (n : ℕ) :
    map f (l.rotate n) = (map f l).rotate n 
goal: List.map f (l.rotate n) = (List.map f l).rotate n

full_name: List.Nodup.rotate_congr
code: theorem Nodup.rotate_congr {l : List α} (hl : l.Nodup) (hn : l ≠ []) (i j : ℕ)
    (h : l.rotate i = l.rotate j) : i % l.length = j % l.length 
goal: i % l.length = j % l.length

full_name: List.Nodup.rotate_congr_iff
code: theorem Nodup.rotate_congr_iff {l : List α} (hl : l.Nodup) {i j : ℕ} :
    l.rotate i = l.rotate j ↔ i % l.length = j % l.length ∨ l = [] 
goal: l.rotate i = l.rotate j ↔ i % l.length = j % l.length ∨ l = []

full_name: List.Nodup.rotate_eq_self_iff
code: theorem Nodup.rotate_eq_self_iff {l : List α} (hl : l.Nodup) {n : ℕ} :
    l.rotate n = l ↔ n % l.length = 0 ∨ l = [] 
goal: l.rotate n = l ↔ n % l.length = 0 ∨ l = []

full_name: List.IsRotated
code: /-- `IsRotated l₁ l₂` or `l₁ ~r l₂` asserts that `l₁` and `l₂` are cyclic permutations
  of each other. This is defined by claiming that `∃ n, l.rotate n = l'`. -/
def IsRotated : Prop 
goal: Prop

full_name: List.«_aux_Mathlib_Data_List_Rotate___macroRules_List_term_~r__1»
code: @[inherit_doc List.IsRotated]
infixr:1000 " ~r " => IsRotated
goal: Lean.Macro

full_name: List._aux_Mathlib_Data_List_Rotate___unexpand_List_IsRotated_1
code: @[inherit_doc List.IsRotated]
infixr:1000 " ~r " => IsRotated
goal: Lean.PrettyPrinter.Unexpander

full_name: List.IsRotated.refl
code: @[refl]
theorem IsRotated.refl (l : List α) : l ~r l 
goal: l ~r l

full_name: List.IsRotated.symm
code: @[symm]
theorem IsRotated.symm (h : l ~r l') : l' ~r l 
goal: l' ~r l

full_name: List.isRotated_comm
code: theorem isRotated_comm : l ~r l' ↔ l' ~r l 
goal: l ~r l' ↔ l' ~r l

full_name: List.IsRotated.forall
code: @[simp]
protected theorem IsRotated.forall (l : List α) (n : ℕ) : l.rotate n ~r l 
goal: l.rotate n ~r l

full_name: List.IsRotated.trans
code: @[trans]
theorem IsRotated.trans : ∀ {l l' l'' : List α}, l ~r l' → l' ~r l'' → l ~r l''
  
goal: l ~r l' → l' ~r l'' → l ~r l''

full_name: List.IsRotated.eqv
code: theorem IsRotated.eqv : Equivalence (@IsRotated α) 
goal: Equivalence List.IsRotated

full_name: List.IsRotated.setoid
code: /-- The relation `List.IsRotated l l'` forms a `Setoid` of cycles. -/
def IsRotated.setoid (α : Type*) : Setoid (List α) 
goal: Setoid (List α)

full_name: List.IsRotated.perm
code: theorem IsRotated.perm (h : l ~r l') : l ~ l' 
goal: l.Perm l'

full_name: List.IsRotated.nodup_iff
code: theorem IsRotated.nodup_iff (h : l ~r l') : Nodup l ↔ Nodup l' 
goal: l.Nodup ↔ l'.Nodup

full_name: List.IsRotated.mem_iff
code: theorem IsRotated.mem_iff (h : l ~r l') {a : α} : a ∈ l ↔ a ∈ l' 
goal: a ∈ l ↔ a ∈ l'

full_name: List.isRotated_nil_iff
code: @[simp]
theorem isRotated_nil_iff : l ~r [] ↔ l = [] 
goal: l ~r [] ↔ l = []

full_name: List.isRotated_nil_iff'
code: @[simp]
theorem isRotated_nil_iff' : [] ~r l ↔ [] = l 
goal: [] ~r l ↔ [] = l

full_name: List.isRotated_singleton_iff
code: @[simp]
theorem isRotated_singleton_iff {x : α} : l ~r [x] ↔ l = [x] 
goal: l ~r [x] ↔ l = [x]

full_name: List.isRotated_singleton_iff'
code: @[simp]
theorem isRotated_singleton_iff' {x : α} : [x] ~r l ↔ [x] = l 
goal: [x] ~r l ↔ [x] = l

full_name: List.isRotated_concat
code: theorem isRotated_concat (hd : α) (tl : List α) : (tl ++ [hd]) ~r (hd :: tl) 
goal: (tl ++ [hd]) ~r (hd :: tl)

full_name: List.isRotated_append
code: theorem isRotated_append : (l ++ l') ~r (l' ++ l) 
goal: (l ++ l') ~r (l' ++ l)

full_name: List.IsRotated.reverse
code: theorem IsRotated.reverse (h : l ~r l') : l.reverse ~r l'.reverse 
goal: l.reverse ~r l'.reverse

full_name: List.isRotated_reverse_comm_iff
code: theorem isRotated_reverse_comm_iff : l.reverse ~r l' ↔ l ~r l'.reverse 
goal: l.reverse ~r l' ↔ l ~r l'.reverse

full_name: List.isRotated_reverse_iff
code: @[simp]
theorem isRotated_reverse_iff : l.reverse ~r l'.reverse ↔ l ~r l' 
goal: l.reverse ~r l'.reverse ↔ l ~r l'

full_name: List.isRotated_iff_mod
code: theorem isRotated_iff_mod : l ~r l' ↔ ∃ n ≤ l.length, l.rotate n = l' 
goal: l ~r l' ↔ ∃ n ≤ l.length, l.rotate n = l'

full_name: List.isRotated_iff_mem_map_range
code: theorem isRotated_iff_mem_map_range : l ~r l' ↔ l' ∈ (List.range (l.length + 1)).map l.rotate 
goal: l ~r l' ↔ l' ∈ List.map l.rotate (List.range (l.length + 1))

full_name: List.IsRotated.map
code: theorem IsRotated.map {β : Type*} {l₁ l₂ : List α} (h : l₁ ~r l₂) (f : α → β) :
    map f l₁ ~r map f l₂ 
goal: List.map f l₁ ~r List.map f l₂

full_name: List.cyclicPermutations
code: /-- List of all cyclic permutations of `l`.
The `cyclicPermutations` of a nonempty list `l` will always contain `List.length l` elements.
This implies that under certain conditions, there are duplicates in `List.cyclicPermutations l`.
The `n`th entry is equal to `l.rotate n`, proven in `List.get_cyclicPermutations`.
The proof that every cyclic permutant of `l` is in the list is `List.mem_cyclicPermutations_iff`.

     cyclicPermutations [1, 2, 3, 2, 4] =
       [[1, 2, 3, 2, 4], [2, 3, 2, 4, 1], [3, 2, 4, 1, 2],
        [2, 4, 1, 2, 3], [4, 1, 2, 3, 2]] -/
def cyclicPermutations : List α → List (List α)
  
goal: List α → List (List α)

full_name: List.cyclicPermutations_nil
code: @[simp]
theorem cyclicPermutations_nil : cyclicPermutations ([] : List α) = [[]] 
goal: [].cyclicPermutations = [[]]

full_name: List.cyclicPermutations_cons
code: theorem cyclicPermutations_cons (x : α) (l : List α) :
    cyclicPermutations (x :: l) = dropLast (zipWith (· ++ ·) (tails (x :: l)) (inits (x :: l))) 
goal: (x :: l).cyclicPermutations = (List.zipWith (fun x x_1 => x ++ x_1) (x :: l).tails (x :: l).inits).dropLast

full_name: List.cyclicPermutations_of_ne_nil
code: theorem cyclicPermutations_of_ne_nil (l : List α) (h : l ≠ []) :
    cyclicPermutations l = dropLast (zipWith (· ++ ·) (tails l) (inits l)) 
goal: l.cyclicPermutations = (List.zipWith (fun x x_1 => x ++ x_1) l.tails l.inits).dropLast

full_name: List.length_cyclicPermutations_cons
code: theorem length_cyclicPermutations_cons (x : α) (l : List α) :
    length (cyclicPermutations (x :: l)) = length l + 1 
goal: (x :: l).cyclicPermutations.length = l.length + 1

full_name: List.length_cyclicPermutations_of_ne_nil
code: @[simp]
theorem length_cyclicPermutations_of_ne_nil (l : List α) (h : l ≠ []) :
    length (cyclicPermutations l) = length l 
goal: l.cyclicPermutations.length = l.length

full_name: List.cyclicPermutations_ne_nil
code: @[simp]
theorem cyclicPermutations_ne_nil : ∀ l : List α, cyclicPermutations l ≠ []
  
goal: l.cyclicPermutations ≠ []

full_name: List.getElem_cyclicPermutations
code: @[simp]
theorem getElem_cyclicPermutations (l : List α) (n : Nat) (h : n < length (cyclicPermutations l)) :
    (cyclicPermutations l)[n] = l.rotate n 
goal: l.cyclicPermutations[n] = l.rotate n

full_name: List.get_cyclicPermutations
code: theorem get_cyclicPermutations (l : List α) (n : Fin (length (cyclicPermutations l))) :
    (cyclicPermutations l).get n = l.rotate n 
goal: l.cyclicPermutations.get n = l.rotate ↑n

full_name: List.head_cyclicPermutations
code: @[simp]
theorem head_cyclicPermutations (l : List α) :
    (cyclicPermutations l).head (cyclicPermutations_ne_nil l) = l 
goal: l.cyclicPermutations.head ⋯ = l

full_name: List.head?_cyclicPermutations
code: @[simp]
theorem head?_cyclicPermutations (l : List α) : (cyclicPermutations l).head? = l 
goal: l.cyclicPermutations.head? = some l

full_name: List.cyclicPermutations_injective
code: theorem cyclicPermutations_injective : Function.Injective (@cyclicPermutations α) 
goal: Function.Injective List.cyclicPermutations

full_name: List.cyclicPermutations_inj
code: @[simp]
theorem cyclicPermutations_inj {l l' : List α} :
    cyclicPermutations l = cyclicPermutations l' ↔ l = l' 
goal: l.cyclicPermutations = l'.cyclicPermutations ↔ l = l'

full_name: List.length_mem_cyclicPermutations
code: theorem length_mem_cyclicPermutations (l : List α) (h : l' ∈ cyclicPermutations l) :
    length l' = length l 
goal: l'.length = l.length

full_name: List.mem_cyclicPermutations_self
code: theorem mem_cyclicPermutations_self (l : List α) : l ∈ cyclicPermutations l 
goal: l ∈ l.cyclicPermutations

full_name: List.cyclicPermutations_rotate
code: @[simp]
theorem cyclicPermutations_rotate (l : List α) (k : ℕ) :
    (l.rotate k).cyclicPermutations = l.cyclicPermutations.rotate k 
goal: (l.rotate k).cyclicPermutations = l.cyclicPermutations.rotate k

full_name: List.mem_cyclicPermutations_iff
code: @[simp]
theorem mem_cyclicPermutations_iff : l ∈ cyclicPermutations l' ↔ l ~r l' 
goal: l ∈ l'.cyclicPermutations ↔ l ~r l'

full_name: List.cyclicPermutations_eq_nil_iff
code: @[simp]
theorem cyclicPermutations_eq_nil_iff {l : List α} : cyclicPermutations l = [[]] ↔ l = [] 
goal: l.cyclicPermutations = [[]] ↔ l = []

full_name: List.cyclicPermutations_eq_singleton_iff
code: @[simp]
theorem cyclicPermutations_eq_singleton_iff {l : List α} {x : α} :
    cyclicPermutations l = [[x]] ↔ l = [x] 
goal: l.cyclicPermutations = [[x]] ↔ l = [x]

full_name: List.Nodup.cyclicPermutations
code: /-- If a `l : List α` is `Nodup l`, then all of its cyclic permutants are distinct. -/
protected theorem Nodup.cyclicPermutations {l : List α} (hn : Nodup l) :
    Nodup (cyclicPermutations l) 
goal: l.cyclicPermutations.Nodup

full_name: List.IsRotated.cyclicPermutations
code: protected theorem IsRotated.cyclicPermutations {l l' : List α} (h : l ~r l') :
    l.cyclicPermutations ~r l'.cyclicPermutations 
goal: l.cyclicPermutations ~r l'.cyclicPermutations

full_name: List.isRotated_cyclicPermutations_iff
code: @[simp]
theorem isRotated_cyclicPermutations_iff {l l' : List α} :
    l.cyclicPermutations ~r l'.cyclicPermutations ↔ l ~r l' 
goal: l.cyclicPermutations ~r l'.cyclicPermutations ↔ l ~r l'

full_name: List.isRotatedDecidable
code: instance isRotatedDecidable (l l' : List α) : Decidable (l ~r l') 
goal: Decidable (l ~r l')

full_name: List.instDecidableR_mathlib
code: instance {l l' : List α} : Decidable (@Setoid.r _ (IsRotated.setoid α) l l') 
goal: Decidable (Setoid.r l l')