File: Mathlib/Data/List/Range.lean

full_name: List.range'_one
code: @[simp] theorem range'_one {s step : ℕ} : range' s 1 step = [s] 
goal: List.range' s 1 step = [s]

full_name: List.pairwise_lt_range'
code: theorem pairwise_lt_range' : ∀ s n (step := 1) (_ : 0 < step := by simp),
  Pairwise (· < ·) (range' s n step)
  
goal: autoParam (0 < step) _auto✝ → List.Pairwise (fun x x_1 => x < x_1) (List.range' s n step)

full_name: List.nodup_range'
code: theorem nodup_range' (s n : ℕ) (step := 1) (h : 0 < step := by simp) : Nodup (range' s n step) 
goal: (List.range' s n step).Nodup

full_name: List.nthLe_range'
code: @[simp]
theorem nthLe_range' {n m step} (i) (H : i < (range' n m step).length) :
    nthLe (range' n m step) i H = n + step * i 
goal: (List.range' n m step).nthLe i H = n + step * i

full_name: List.nthLe_range'_1
code: theorem nthLe_range'_1 {n m} (i) (H : i < (range' n m).length) :
    nthLe (range' n m) i H = n + i 
goal: (List.range' n m).nthLe i H = n + i

full_name: List.pairwise_lt_range
code: theorem pairwise_lt_range (n : ℕ) : Pairwise (· < ·) (range n) 
goal: List.Pairwise (fun x x_1 => x < x_1) (List.range n)

full_name: List.pairwise_le_range
code: theorem pairwise_le_range (n : ℕ) : Pairwise (· ≤ ·) (range n) 
goal: List.Pairwise (fun x x_1 => x ≤ x_1) (List.range n)

full_name: List.take_range
code: theorem take_range (m n : ℕ) : take m (range n) = range (min m n) 
goal: List.take m (List.range n) = List.range (min m n)

full_name: List.nodup_range
code: theorem nodup_range (n : ℕ) : Nodup (range n) 
goal: (List.range n).Nodup

full_name: List.chain'_range_succ
code: theorem chain'_range_succ (r : ℕ → ℕ → Prop) (n : ℕ) :
    Chain' r (range n.succ) ↔ ∀ m < n, r m m.succ 
goal: List.Chain' r (List.range n.succ) ↔ ∀ m < n, r m m.succ

full_name: List.chain_range_succ
code: theorem chain_range_succ (r : ℕ → ℕ → Prop) (n a : ℕ) :
    Chain r a (range n.succ) ↔ r a 0 ∧ ∀ m < n, r m m.succ 
goal: List.Chain r a (List.range n.succ) ↔ r a 0 ∧ ∀ m < n, r m m.succ

full_name: List.pairwise_gt_iota
code: theorem pairwise_gt_iota (n : ℕ) : Pairwise (· > ·) (iota n) 
goal: List.Pairwise (fun x x_1 => x > x_1) (List.iota n)

full_name: List.nodup_iota
code: theorem nodup_iota (n : ℕ) : Nodup (iota n) 
goal: (List.iota n).Nodup

full_name: List.finRange
code: /-- All elements of `Fin n`, from `0` to `n-1`. The corresponding finset is `Finset.univ`. -/
def finRange (n : ℕ) : List (Fin n) 
goal: List (Fin n)

full_name: List.finRange_zero
code: @[simp]
theorem finRange_zero : finRange 0 = [] 
goal: List.finRange 0 = []

full_name: List.mem_finRange
code: @[simp]
theorem mem_finRange {n : ℕ} (a : Fin n) : a ∈ finRange n 
goal: a ∈ List.finRange n

full_name: List.nodup_finRange
code: theorem nodup_finRange (n : ℕ) : (finRange n).Nodup 
goal: (List.finRange n).Nodup

full_name: List.length_finRange
code: @[simp]
theorem length_finRange (n : ℕ) : (finRange n).length = n 
goal: (List.finRange n).length = n

full_name: List.finRange_eq_nil
code: @[simp]
theorem finRange_eq_nil {n : ℕ} : finRange n = [] ↔ n = 0 
goal: List.finRange n = [] ↔ n = 0

full_name: List.pairwise_lt_finRange
code: theorem pairwise_lt_finRange (n : ℕ) : Pairwise (· < ·) (finRange n) 
goal: List.Pairwise (fun x x_1 => x < x_1) (List.finRange n)

full_name: List.pairwise_le_finRange
code: theorem pairwise_le_finRange (n : ℕ) : Pairwise (· ≤ ·) (finRange n) 
goal: List.Pairwise (fun x x_1 => x ≤ x_1) (List.finRange n)

full_name: List.enum_eq_zip_range
code: theorem enum_eq_zip_range (l : List α) : l.enum = (range l.length).zip l 
goal: l.enum = (List.range l.length).zip l

full_name: List.unzip_enum_eq_prod
code: @[simp]
theorem unzip_enum_eq_prod (l : List α) : l.enum.unzip = (range l.length, l) 
goal: l.enum.unzip = (List.range l.length, l)

full_name: List.enumFrom_eq_zip_range'
code: theorem enumFrom_eq_zip_range' (l : List α) {n : ℕ} : l.enumFrom n = (range' n l.length).zip l 
goal: List.enumFrom n l = (List.range' n l.length).zip l

full_name: List.unzip_enumFrom_eq_prod
code: @[simp]
theorem unzip_enumFrom_eq_prod (l : List α) {n : ℕ} :
    (l.enumFrom n).unzip = (range' n l.length, l) 
goal: (List.enumFrom n l).unzip = (List.range' n l.length, l)

full_name: List.nthLe_range
code: @[simp]
theorem nthLe_range {n} (i) (H : i < (range n).length) : nthLe (range n) i H = i 
goal: (List.range n).nthLe i H = i

full_name: List.getElem_finRange
code: @[simp]
theorem getElem_finRange {n : ℕ} {i : ℕ} (h) :
    (finRange n)[i] = ⟨i, length_finRange n ▸ h⟩ 
goal: (List.finRange n)[i] = ⟨i, ⋯⟩

full_name: List.get_finRange
code: theorem get_finRange {n : ℕ} {i : ℕ} (h) :
    (finRange n).get ⟨i, h⟩ = ⟨i, length_finRange n ▸ h⟩ 
goal: (List.finRange n).get ⟨i, h⟩ = ⟨i, ⋯⟩

full_name: List.finRange_map_get
code: @[simp]
theorem finRange_map_get (l : List α) : (finRange l.length).map l.get = l 
goal: List.map l.get (List.finRange l.length) = l

full_name: List.nthLe_finRange
code: @[simp]
theorem nthLe_finRange {n : ℕ} {i : ℕ} (h) :
    (finRange n).nthLe i h = ⟨i, length_finRange n ▸ h⟩ 
goal: (List.finRange n).nthLe i h = ⟨i, ⋯⟩

full_name: List.indexOf_finRange
code: @[simp] theorem indexOf_finRange {k : ℕ} (i : Fin k) : (finRange k).indexOf i = i 
goal: List.indexOf i (List.finRange k) = ↑i

full_name: List.ranges
code: /-- From `l : List ℕ`, construct `l.ranges : List (List ℕ)` such that
  `l.ranges.map List.length = l` and `l.ranges.join = range l.sum`
* Example: `[1,2,3].ranges = [[0],[1,2],[3,4,5]]` -/
def ranges : List ℕ → List (List ℕ)
  
goal: List ℕ → List (List ℕ)

full_name: List.ranges_disjoint
code: /-- The members of `l.ranges` are pairwise disjoint -/
theorem ranges_disjoint (l : List ℕ) :
    Pairwise Disjoint (ranges l) 
goal: List.Pairwise List.Disjoint l.ranges

full_name: List.ranges_length
code: /-- The lengths of the members of `l.ranges` are those given by `l` -/
theorem ranges_length (l : List ℕ) :
    l.ranges.map length = l 
goal: List.map List.length l.ranges = l

full_name: List.ranges_join'
code: /-- See `List.ranges_join` for the version about `List.sum`. -/
lemma ranges_join' : ∀ l : List ℕ, l.ranges.join = range (Nat.sum l)
  
goal: l.ranges.join = List.range (Nat.sum l)

full_name: List.mem_mem_ranges_iff_lt_natSum
code: /-- Any entry of any member of `l.ranges` is strictly smaller than `Nat.sum l`.
See `List.mem_mem_ranges_iff_lt_sum` for the version about `List.sum`. -/
lemma mem_mem_ranges_iff_lt_natSum (l : List ℕ) {n : ℕ} :
    (∃ s ∈ l.ranges, n ∈ s) ↔ n < Nat.sum l 
goal: (∃ s ∈ l.ranges, n ∈ s) ↔ n < Nat.sum l

full_name: List.ranges_nodup
code: /-- The members of `l.ranges` have no duplicate -/
theorem ranges_nodup {l s : List ℕ} (hs : s ∈ ranges l) : s.Nodup 
goal: s.Nodup