ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Array.get_set
theorem get_set (a : Array α) (i : Fin a.size) (j : Nat) (hj : j < a.size) (v : α) :
    (a.set i v)[j]'(by simp [*]) = if i = j then v else a[j] 
Arguments: {α : Type u_1} (a : Array α) (i : Fin a.size) (j : Nat) (hj : j < a.size) (v : α)
Goal: (a.set i v)[j] = if ↑i = j then v else a[j]
-- Array.get_set_ne
@[simp] theorem get_set_ne (a : Array α) (i : Fin a.size) {j : Nat} (v : α) (hj : j < a.size)
    (h : i.1 ≠ j) : (a.set i v)[j]'(by simp [*]) = a[j] 
Arguments: {α : Type u_1} (a : Array α) (i : Fin a.size) {j : Nat} (v : α) (hj : j < a.size) (h : ↑i ≠ j)
Goal: (a.set i v)[j] = a[j]
-- Array.getElem_setD
theorem getElem_setD (a : Array α) (i : Nat) (v : α) (h : i < (setD a i v).size) :
  (setD a i v)[i] = v 
Arguments: {α : Type u_1} (a : Array α) (i : Nat) (v : α) (h : i < (a.setD i v).size)
Goal: (a.setD i v)[i] = v
-- Array.set_set
theorem set_set (a : Array α) (i : Fin a.size) (v v' : α) :
    (a.set i v).set ⟨i, by simp [i.2]⟩ v' = a.set i v' 
Arguments: {α : Type u_1} (a : Array α) (i : Fin a.size) (v v' : α)
Goal: (a.set i v).set ⟨↑i, ⋯⟩ v' = a.set i v'
-- _private.«.lake».packages.lean4.src.lean.Init.Data.Array.Lemmas.0.Array.fin_cast_val
private theorem fin_cast_val (e : n = n') (i : Fin n) : e ▸ i = ⟨i.1, e ▸ i.2⟩ 
Arguments: {n n' : Nat} (e : n = n') (i : Fin n)
Goal: e ▸ i = ⟨↑i, ⋯⟩
-- Array.swap_def
theorem swap_def (a : Array α) (i j : Fin a.size) :
    a.swap i j = (a.set i (a.get j)).set ⟨j.1, by simp [j.2]⟩ (a.get i) 
Arguments: {α : Type u_1} (a : Array α) (i j : Fin a.size)
Goal: a.swap i j = (a.set i (a.get j)).set ⟨↑j, ⋯⟩ (a.get i)
-- Array.data_swap
theorem data_swap (a : Array α) (i j : Fin a.size) :
    (a.swap i j).data = (a.data.set i (a.get j)).set j (a.get i) 
Arguments: {α : Type u_1} (a : Array α) (i j : Fin a.size)
Goal: (a.swap i j).data = (a.data.set (↑i) (a.get j)).set (↑j) (a.get i)
-- Array.get?_swap
theorem get?_swap (a : Array α) (i j : Fin a.size) (k : Nat) : (a.swap i j)[k]? =
    if j = k then some a[i.1] else if i = k then some a[j.1] else a[k]? 
Arguments: {α : Type u_1} (a : Array α) (i j : Fin a.size) (k : Nat)
Goal: (a.swap i j)[k]? = if ↑j = k then some a[↑i] else if ↑i = k then some a[↑j] else a[k]?
-- Array.swapAt_def
@[simp] theorem swapAt_def (a : Array α) (i : Fin a.size) (v : α) :
    a.swapAt i v = (a[i.1], a.set i v) 
Arguments: {α : Type u_1} (a : Array α) (i : Fin a.size) (v : α)
Goal: a.swapAt i v = (a[↑i], a.set i v)
-- Array.swapAt!_def
theorem swapAt!_def (a : Array α) (i : Nat) (v : α) (h : i < a.size) :
    a.swapAt! i v = (a[i], a.set ⟨i, h⟩ v) 
Arguments: {α : Type u_1} (a : Array α) (i : Nat) (v : α) (h : i < a.size)
Goal: a.swapAt! i v = (a[i], a.set ⟨i, h⟩ v)
-- Array.data_pop
@[simp] theorem data_pop (a : Array α) : a.pop.data = a.data.dropLast 
Arguments: {α : Type u_1} (a : Array α)
Goal: a.pop.data = a.data.dropLast
-- Array.pop_empty
@[simp] theorem pop_empty : (#[] : Array α).pop = #[] 
Arguments: {α : Type u_1}
Goal: #[].pop = #[]
-- Array.pop_push
@[simp] theorem pop_push (a : Array α) : (a.push x).pop = a 
Arguments: {α : Type u_1} {x : α} (a : Array α)
Goal: (a.push x).pop = a
-- Array.getElem_pop
@[simp] theorem getElem_pop (a : Array α) (i : Nat) (hi : i < a.pop.size) :
    a.pop[i] = a[i]'(Nat.lt_of_lt_of_le (a.size_pop ▸ hi) (Nat.sub_le _ _)) 
Arguments: {α : Type u_1} (a : Array α) (i : Nat) (hi : i < a.pop.size)
Goal: a.pop[i] = a[i]
-- Array.eq_empty_of_size_eq_zero
theorem eq_empty_of_size_eq_zero {as : Array α} (h : as.size = 0) : as = #[] 
Arguments: {α : Type u_1} {as : Array α} (h : as.size = 0)
Goal: as = #[]
-- Array.eq_push_pop_back_of_size_ne_zero
theorem eq_push_pop_back_of_size_ne_zero [Inhabited α] {as : Array α} (h : as.size ≠ 0) :
    as = as.pop.push as.back 
Arguments: {α : Type u_1} [Inhabited α] {as : Array α} (h : as.size ≠ 0)
Goal: as = as.pop.push as.back
-- Array.eq_push_of_size_ne_zero
theorem eq_push_of_size_ne_zero {as : Array α} (h : as.size ≠ 0) :
    ∃ (bs : Array α) (c : α), as = bs.push c 
Arguments: {α : Type u_1} {as : Array α} (h : as.size ≠ 0)
Goal: ∃ bs c, as = bs.push c
-- Array.size_eq_length_data
theorem size_eq_length_data (as : Array α) : as.size = as.data.length 
Arguments: {α : Type u_1} (as : Array α)
Goal: as.size = as.data.length
-- Array.size_swap!
@[simp] theorem size_swap! (a : Array α) (i j) :
    (a.swap! i j).size = a.size 
Arguments: {α : Type u_1} (a : Array α) (i j : Nat)
Goal: (a.swap! i j).size = a.size
-- Array.size_reverse.go
@[simp] theorem size_reverse (a : Array α) : a.reverse.size = a.size 
Arguments: {α : Type u_1} (as : Array α) (i : Nat) (j : Fin as.size)
Goal: (Array.reverse.loop as i j).size = as.size
-- Array.size_reverse
@[simp] theorem size_reverse (a : Array α) : a.reverse.size = a.size 
Arguments: {α : Type u_1} (a : Array α)
Goal: a.reverse.size = a.size
-- Array.size_range
@[simp] theorem size_range {n : Nat} : (range n).size = n 
Arguments: {n : Nat}
Goal: (Array.range n).size = n
-- Array.reverse_data.go
@[simp] theorem reverse_data (a : Array α) : a.reverse.data = a.data.reverse 
Arguments: {α : Type u_1} (a as : Array α) (i j : Nat) (hj : j < as.size) (h : i + j + 1 = a.size) (h₂ : as.size = a.size) (H : ∀ (k : Nat), as.data.get? k = if i ≤ k ∧ k ≤ j then a.data.get? k else a.data.reverse.get? k) (k : Nat)
Goal: (Array.reverse.loop as i ⟨j, hj⟩).data.get? k = a.data.reverse.get? k
-- Array.reverse_data
@[simp] theorem reverse_data (a : Array α) : a.reverse.data = a.data.reverse 
Arguments: {α : Type u_1} (a : Array α)
Goal: a.reverse.data = a.data.reverse
-- Array.foldl_induction.go
theorem foldl_induction
    {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive 0 init) {f : β → α → β}
    (hf : ∀ i : Fin as.size, ∀ b, motive i.1 b → motive (i.1 + 1) (f b as[i])) :
    motive as.size (as.foldl f init) 
Arguments: {α : Type u_1} {β : Type u_2} {as : Array α} (motive : Nat → β → Prop) {f : β → α → β} (hf : ∀ (i : Fin as.size) (b : β), motive (↑i) b → motive (↑i + 1) (f b as[i])) {i j : Nat} {b : β} (h₁ : j ≤ as.size) (h₂ : as.size ≤ i + j) (H : motive j b)
Goal: motive as.size (Array.foldlM.loop f as as.size ⋯ i j b)
-- Array.foldl_induction
theorem foldl_induction
    {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive 0 init) {f : β → α → β}
    (hf : ∀ i : Fin as.size, ∀ b, motive i.1 b → motive (i.1 + 1) (f b as[i])) :
    motive as.size (as.foldl f init) 
Arguments: {α : Type u_1} {β : Type u_2} {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive 0 init) {f : β → α → β} (hf : ∀ (i : Fin as.size) (b : β), motive (↑i) b → motive (↑i + 1) (f b as[i]))
Goal: motive as.size (Array.foldl f init as 0)
-- Array.foldr_induction.go
theorem foldr_induction
    {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive as.size init) {f : α → β → β}
    (hf : ∀ i : Fin as.size, ∀ b, motive (i.1 + 1) b → motive i.1 (f as[i] b)) :
    motive 0 (as.foldr f init) 
Arguments: {α : Type u_1} {β : Type u_2} {as : Array α} (motive : Nat → β → Prop) {f : α → β → β} (hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → motive (↑i) (f as[i] b)) {i : Nat} {b : β} (hi : i ≤ as.size) (H : motive i b)
Goal: motive 0 (Array.foldrM.fold f as 0 i hi b)
-- Array.foldr_induction
theorem foldr_induction
    {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive as.size init) {f : α → β → β}
    (hf : ∀ i : Fin as.size, ∀ b, motive (i.1 + 1) b → motive i.1 (f as[i] b)) :
    motive 0 (as.foldr f init) 
Arguments: {α : Type u_1} {β : Type u_2} {as : Array α} (motive : Nat → β → Prop) {init : β} (h0 : motive as.size init) {f : α → β → β} (hf : ∀ (i : Fin as.size) (b : β), motive (↑i + 1) b → motive (↑i) (f as[i] b))
Goal: motive 0 (Array.foldr f init as as.size)
-- Array.mem_map
@[simp] theorem mem_map {f : α → β} {l : Array α} : b ∈ l.map f ↔ ∃ a, a ∈ l ∧ f a = b 
Arguments: {α : Type u_1} {β : Type u_2} {b : β} {f : α → β} {l : Array α}
Goal: b ∈ Array.map f l ↔ ∃ a, a ∈ l ∧ f a = b
-- Array.mapM_eq_mapM_data
theorem mapM_eq_mapM_data [Monad m] [LawfulMonad m] (f : α → m β) (arr : Array α) :
    arr.mapM f = return mk (← arr.data.mapM f) 
Arguments: {m : Type u_1 → Type u_2} {α : Type u_3} {β : Type u_1} [Monad m] [LawfulMonad m] (f : α → m β) (arr : Array α)
Goal: Array.mapM f arr = do
  let __do_lift ← List.mapM f arr.data
  pure { data := __do_lift }
-- Array.mapM_map_eq_foldl
theorem mapM_map_eq_foldl (as : Array α) (f : α → β) (i) :
    mapM.map (m := Id) f as i b = as.foldl (start := i) (fun r a => r.push (f a)) b 
Arguments: {α : Type u_1} {β : Type u_2} {b : Array β} (as : Array α) (f : α → β) (i : Nat)
Goal: Array.mapM.map f as i b = Array.foldl (fun r a => r.push (f a)) b as i
-- Array.map_eq_foldl
theorem map_eq_foldl (as : Array α) (f : α → β) :
    as.map f = as.foldl (fun r a => r.push (f a)) #[] 
Arguments: {α : Type u_1} {β : Type u_2} (as : Array α) (f : α → β)
Goal: Array.map f as = Array.foldl (fun r a => r.push (f a)) #[] as 0
-- Array.map_induction
theorem map_induction (as : Array α) (f : α → β) (motive : Nat → Prop) (h0 : motive 0)
    (p : Fin as.size → β → Prop) (hs : ∀ i, motive i.1 → p i (f as[i]) ∧ motive (i+1)) :
    motive as.size ∧
      ∃ eq : (as.map f).size = as.size, ∀ i h, p ⟨i, h⟩ ((as.map f)[i]) 
Arguments: {α : Type u_1} {β : Type u_2} (as : Array α) (f : α → β) (motive : Nat → Prop) (h0 : motive 0) (p : Fin as.size → β → Prop) (hs : ∀ (i : Fin as.size), motive ↑i → p i (f as[i]) ∧ motive (↑i + 1))
Goal: motive as.size ∧ ∃ eq, ∀ (i : Nat) (h : i < as.size), p ⟨i, h⟩ (Array.map f as)[i]
-- Array.map_spec
theorem map_spec (as : Array α) (f : α → β) (p : Fin as.size → β → Prop)
    (hs : ∀ i, p i (f as[i])) :
    ∃ eq : (as.map f).size = as.size, ∀ i h, p ⟨i, h⟩ ((as.map f)[i]) 
Arguments: {α : Type u_1} {β : Type u_2} (as : Array α) (f : α → β) (p : Fin as.size → β → Prop) (hs : ∀ (i : Fin as.size), p i (f as[i]))
Goal: ∃ eq, ∀ (i : Nat) (h : i < as.size), p ⟨i, h⟩ (Array.map f as)[i]
-- Array.getElem_map
@[simp] theorem getElem_map (f : α → β) (as : Array α) (i : Nat) (h) :
    ((as.map f)[i]) = f (as[i]'(size_map .. ▸ h)) 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → β) (as : Array α) (i : Nat) (h : i < (Array.map f as).size)
Goal: (Array.map f as)[i] = f as[i]
-- Array.mapIdx_induction.go
theorem mapIdx_induction (as : Array α) (f : Fin as.size → α → β)
    (motive : Nat → Prop) (h0 : motive 0)
    (p : Fin as.size → β → Prop)
    (hs : ∀ i, motive i.1 → p i (f i as[i]) ∧ motive (i + 1)) :
    motive as.size ∧ ∃ eq : (Array.mapIdx as f).size = as.size,
      ∀ i h, p ⟨i, h⟩ ((Array.mapIdx as f)[i]) 
Arguments: {α : Type u_1} {β : Type u_2} (as : Array α) (f : Fin as.size → α → β) (motive : Nat → Prop) (p : Fin as.size → β → Prop) (hs : ∀ (i : Fin as.size), motive ↑i → p i (f i as[i]) ∧ motive (↑i + 1)) {bs : Array β} {i j : Nat} {h : i + j = as.size} (h₁ : j = bs.size) (h₂ : ∀ (i : Nat) (h : i < as.size) (h' : i < bs.size), p ⟨i, h⟩ bs[i]) (hm : motive j)
Goal: let arr := Array.mapIdxM.map as f i j h bs;
motive as.size ∧ ∃ eq, ∀ (i_1 : Nat) (h : i_1 < as.size), p ⟨i_1, h⟩ arr[i_1]
-- Array.mapIdx_induction
theorem mapIdx_induction (as : Array α) (f : Fin as.size → α → β)
    (motive : Nat → Prop) (h0 : motive 0)
    (p : Fin as.size → β → Prop)
    (hs : ∀ i, motive i.1 → p i (f i as[i]) ∧ motive (i + 1)) :
    motive as.size ∧ ∃ eq : (Array.mapIdx as f).size = as.size,
      ∀ i h, p ⟨i, h⟩ ((Array.mapIdx as f)[i]) 
Arguments: {α : Type u_1} {β : Type u_2} (as : Array α) (f : Fin as.size → α → β) (motive : Nat → Prop) (h0 : motive 0) (p : Fin as.size → β → Prop) (hs : ∀ (i : Fin as.size), motive ↑i → p i (f i as[i]) ∧ motive (↑i + 1))
Goal: motive as.size ∧ ∃ eq, ∀ (i : Nat) (h : i < as.size), p ⟨i, h⟩ (as.mapIdx f)[i]
-- Array.mapIdx_spec
theorem mapIdx_spec (as : Array α) (f : Fin as.size → α → β)
    (p : Fin as.size → β → Prop) (hs : ∀ i, p i (f i as[i])) :
    ∃ eq : (Array.mapIdx as f).size = as.size,
      ∀ i h, p ⟨i, h⟩ ((Array.mapIdx as f)[i]) 
Arguments: {α : Type u_1} {β : Type u_2} (as : Array α) (f : Fin as.size → α → β) (p : Fin as.size → β → Prop) (hs : ∀ (i : Fin as.size), p i (f i as[i]))
Goal: ∃ eq, ∀ (i : Nat) (h : i < as.size), p ⟨i, h⟩ (as.mapIdx f)[i]
-- Array.size_mapIdx
@[simp] theorem size_mapIdx (a : Array α) (f : Fin a.size → α → β) : (a.mapIdx f).size = a.size 
Arguments: {α : Type u_1} {β : Type u_2} (a : Array α) (f : Fin a.size → α → β)
Goal: (a.mapIdx f).size = a.size
-- Array.size_zipWithIndex
@[simp] theorem size_zipWithIndex (as : Array α) : as.zipWithIndex.size = as.size 
Arguments: {α : Type u_1} (as : Array α)
Goal: as.zipWithIndex.size = as.size
-- Array.getElem_mapIdx
@[simp] theorem getElem_mapIdx (a : Array α) (f : Fin a.size → α → β) (i : Nat)
    (h : i < (mapIdx a f).size) :
    haveI : i < a.size := by simp_all
    (a.mapIdx f)[i] = f ⟨i, this⟩ a[i] 
Arguments: {α : Type u_1} {β : Type u_2} (a : Array α) (f : Fin a.size → α → β) (i : Nat) (h : i < (a.mapIdx f).size)
Goal: (a.mapIdx f)[i] = f ⟨i, ⋯⟩ a[i]
-- Array.size_modify
@[simp] theorem size_modify (a : Array α) (i : Nat) (f : α → α) : (a.modify i f).size = a.size 
Arguments: {α : Type u_1} (a : Array α) (i : Nat) (f : α → α)
Goal: (a.modify i f).size = a.size
-- Array.get_modify
theorem get_modify {arr : Array α} {x i} (h : i < arr.size) :
    (arr.modify x f).get ⟨i, by simp [h]⟩ =
    if x = i then f (arr.get ⟨i, h⟩) else arr.get ⟨i, h⟩ 
Arguments: {α : Type u_1} {f : α → α} {arr : Array α} {x i : Nat} (h : i < arr.size)
Goal: (arr.modify x f).get ⟨i, ⋯⟩ = if x = i then f (arr.get ⟨i, h⟩) else arr.get ⟨i, h⟩
-- Array.filter_data
@[simp] theorem filter_data (p : α → Bool) (l : Array α) :
    (l.filter p).data = l.data.filter p 
Arguments: {α : Type u_1} (p : α → Bool) (l : Array α)
Goal: (Array.filter p l 0).data = List.filter p l.data
-- Array.filter_filter
@[simp] theorem filter_filter (q) (l : Array α) :
    filter p (filter q l) = filter (fun a => p a ∧ q a) l 
Arguments: {α : Type u_1} {p : α → Bool} (q : α → Bool) (l : Array α)
Goal: Array.filter p (Array.filter q l 0) 0 = Array.filter (fun a => decide (p a = true ∧ q a = true)) l 0
-- Array.mem_filter
@[simp] theorem mem_filter : x ∈ filter p as ↔ x ∈ as ∧ p x 
Goal: ∀ {α : Type u_1} {x : α} {p : α → Bool} {as : Array α}, x ∈ Array.filter p as 0 ↔ x ∈ as ∧ p x = true
-- Array.mem_of_mem_filter
theorem mem_of_mem_filter {a : α} {l} (h : a ∈ filter p l) : a ∈ l 
Arguments: {α : Type u_1} {p : α → Bool} {a : α} {l : Array α} (h : a ∈ Array.filter p l 0)
Goal: a ∈ l
-- Array.filterMap_data
@[simp] theorem filterMap_data (f : α → Option β) (l : Array α) :
    (l.filterMap f).data = l.data.filterMap f 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → Option β) (l : Array α)
Goal: (Array.filterMap f l 0).data = List.filterMap f l.data
-- Array.mem_filterMap
@[simp] theorem mem_filterMap (f : α → Option β) (l : Array α) {b : β} :
    b ∈ filterMap f l ↔ ∃ a, a ∈ l ∧ f a = some b 
Arguments: {α : Type u_1} {β : Type u_2} (f : α → Option β) (l : Array α) {b : β}
Goal: b ∈ Array.filterMap f l 0 ↔ ∃ a, a ∈ l ∧ f a = some b
-- Array.size_empty
theorem size_empty : (#[] : Array α).size = 0 
Arguments: {α : Type u_1}
Goal: #[].size = 0
-- Array.empty_data
theorem empty_data : (#[] : Array α).data = [] 
Arguments: {α : Type u_1}
Goal: #[].data = []
-- Array.push_eq_append_singleton
theorem push_eq_append_singleton (as : Array α) (x) : as.push x = as ++ #[x] 
Arguments: {α : Type u_1} (as : Array α) (x : α)
Goal: as.push x = as ++ #[x]
-- Array.mem_append
@[simp] theorem mem_append {a : α} {s t : Array α} : a ∈ s ++ t ↔ a ∈ s ∨ a ∈ t 
Arguments: {α : Type u_1} {a : α} {s t : Array α}
Goal: a ∈ s ++ t ↔ a ∈ s ∨ a ∈ t
-- Array.size_append
theorem size_append (as bs : Array α) : (as ++ bs).size = as.size + bs.size 
Arguments: {α : Type u_1} (as bs : Array α)
Goal: (as ++ bs).size = as.size + bs.size
-- Array.get_append_left
theorem get_append_left {as bs : Array α} {h : i < (as ++ bs).size} (hlt : i < as.size) :
    (as ++ bs)[i] = as[i] 
Arguments: {α : Type u_1} {i : Nat} {as bs : Array α} {h : i < (as ++ bs).size} (hlt : i < as.size)
Goal: (as ++ bs)[i] = as[i]
-- Array.get_append_right
theorem get_append_right {as bs : Array α} {h : i < (as ++ bs).size} (hle : as.size ≤ i)
    (hlt : i - as.size < bs.size := Nat.sub_lt_left_of_lt_add hle (size_append .. ▸ h)) :
    (as ++ bs)[i] = bs[i - as.size] 
Arguments: {α : Type u_1} {i : Nat} {as bs : Array α} {h : i < (as ++ bs).size} (hle : as.size ≤ i) (hlt : i - as.size < bs.size := ⋯)
Goal: (as ++ bs)[i] = bs[i - as.size]
-- Array.append_nil
@[simp] theorem append_nil (as : Array α) : as ++ #[] = as 
Arguments: {α : Type u_1} (as : Array α)
Goal: as ++ #[] = as
-- Array.nil_append
@[simp] theorem nil_append (as : Array α) : #[] ++ as = as 
Arguments: {α : Type u_1} (as : Array α)
Goal: #[] ++ as = as
-- Array.append_assoc
theorem append_assoc (as bs cs : Array α) : as ++ bs ++ cs = as ++ (bs ++ cs) 
Arguments: {α : Type u_1} (as bs cs : Array α)
Goal: as ++ bs ++ cs = as ++ (bs ++ cs)
-- Array.extract_loop_zero
theorem extract_loop_zero (as bs : Array α) (start : Nat) : extract.loop as 0 start bs = bs 
Arguments: {α : Type u_1} (as bs : Array α) (start : Nat)
Goal: Array.extract.loop as 0 start bs = bs
-- Array.extract_loop_succ
theorem extract_loop_succ (as bs : Array α) (size start : Nat) (h : start < as.size) :
    extract.loop as (size+1) start bs = extract.loop as size (start+1) (bs.push as[start]) 
Arguments: {α : Type u_1} (as bs : Array α) (size start : Nat) (h : start < as.size)
Goal: Array.extract.loop as (size + 1) start bs = Array.extract.loop as size (start + 1) (bs.push as[start])
-- Array.extract_loop_of_ge
theorem extract_loop_of_ge (as bs : Array α) (size start : Nat) (h : start ≥ as.size) :
    extract.loop as size start bs = bs 
Arguments: {α : Type u_1} (as bs : Array α) (size start : Nat) (h : start ≥ as.size)
Goal: Array.extract.loop as size start bs = bs
-- Array.extract_loop_eq_aux
theorem extract_loop_eq_aux (as bs : Array α) (size start : Nat) :
    extract.loop as size start bs = bs ++ extract.loop as size start #[] 
Arguments: {α : Type u_1} (as bs : Array α) (size start : Nat)
Goal: Array.extract.loop as size start bs = bs ++ Array.extract.loop as size start #[]
-- Array.extract_loop_eq
theorem extract_loop_eq (as bs : Array α) (size start : Nat) (h : start + size ≤ as.size) :
  extract.loop as size start bs = bs ++ as.extract start (start + size) 
Arguments: {α : Type u_1} (as bs : Array α) (size start : Nat) (h : start + size ≤ as.size)
Goal: Array.extract.loop as size start bs = bs ++ as.extract start (start + size)
-- Array.size_extract_loop
theorem size_extract_loop (as bs : Array α) (size start : Nat) :
    (extract.loop as size start bs).size = bs.size + min size (as.size - start) 
Arguments: {α : Type u_1} (as bs : Array α) (size start : Nat)
Goal: (Array.extract.loop as size start bs).size = bs.size + min size (as.size - start)
-- Array.size_extract
@[simp] theorem size_extract (as : Array α) (start stop : Nat) :
    (as.extract start stop).size = min stop as.size - start 
Arguments: {α : Type u_1} (as : Array α) (start stop : Nat)
Goal: (as.extract start stop).size = min stop as.size - start
-- Array.get_extract_loop_lt_aux
theorem get_extract_loop_lt_aux (as bs : Array α) (size start : Nat) (hlt : i < bs.size) :
    i < (extract.loop as size start bs).size 
Arguments: {α : Type u_1} {i : Nat} (as bs : Array α) (size start : Nat) (hlt : i < bs.size)
Goal: i < (Array.extract.loop as size start bs).size
-- Array.get_extract_loop_lt
theorem get_extract_loop_lt (as bs : Array α) (size start : Nat) (hlt : i < bs.size)
    (h := get_extract_loop_lt_aux as bs size start hlt) :
    (extract.loop as size start bs)[i] = bs[i] 
Arguments: {α : Type u_1} {i : Nat} (as bs : Array α) (size start : Nat) (hlt : i < bs.size) (h : i < (Array.extract.loop as size start bs).size := ⋯)
Goal: (Array.extract.loop as size start bs)[i] = bs[i]
-- Array.get_extract_loop_ge_aux
theorem get_extract_loop_ge_aux (as bs : Array α) (size start : Nat) (hge : i ≥ bs.size)
    (h : i < (extract.loop as size start bs).size) : start + i - bs.size < as.size 
Arguments: {α : Type u_1} {i : Nat} (as bs : Array α) (size start : Nat) (hge : i ≥ bs.size) (h : i < (Array.extract.loop as size start bs).size)
Goal: start + i - bs.size < as.size
-- Array.get_extract_loop_ge
theorem get_extract_loop_ge (as bs : Array α) (size start : Nat) (hge : i ≥ bs.size)
    (h : i < (extract.loop as size start bs).size)
    (h' := get_extract_loop_ge_aux as bs size start hge h) :
    (extract.loop as size start bs)[i] = as[start + i - bs.size] 
Arguments: {α : Type u_1} {i : Nat} (as bs : Array α) (size start : Nat) (hge : i ≥ bs.size) (h : i < (Array.extract.loop as size start bs).size) (h' : start + i - bs.size < as.size := ⋯)
Goal: (Array.extract.loop as size start bs)[i] = as[start + i - bs.size]
-- Array.get_extract_aux
theorem get_extract_aux {as : Array α} {start stop : Nat} (h : i < (as.extract start stop).size) :
    start + i < as.size 
Arguments: {α : Type u_1} {i : Nat} {as : Array α} {start stop : Nat} (h : i < (as.extract start stop).size)
Goal: start + i < as.size
-- Array.get_extract
@[simp] theorem get_extract {as : Array α} {start stop : Nat}
    (h : i < (as.extract start stop).size) :
    (as.extract start stop)[i] = as[start + i]'(get_extract_aux h) 
Arguments: {α : Type u_1} {i : Nat} {as : Array α} {start stop : Nat} (h : i < (as.extract start stop).size)
Goal: (as.extract start stop)[i] = as[start + i]
-- Array.extract_all
@[simp] theorem extract_all (as : Array α) : as.extract 0 as.size = as 
Arguments: {α : Type u_1} (as : Array α)
Goal: as.extract 0 as.size = as
-- Array.extract_empty_of_stop_le_start
theorem extract_empty_of_stop_le_start (as : Array α) {start stop : Nat} (h : stop ≤ start) :
    as.extract start stop = #[] 
Arguments: {α : Type u_1} (as : Array α) {start stop : Nat} (h : stop ≤ start)
Goal: as.extract start stop = #[]
-- Array.extract_empty_of_size_le_start
theorem extract_empty_of_size_le_start (as : Array α) {start stop : Nat} (h : as.size ≤ start) :
    as.extract start stop = #[] 
Arguments: {α : Type u_1} (as : Array α) {start stop : Nat} (h : as.size ≤ start)
Goal: as.extract start stop = #[]
-- Array.extract_empty
@[simp] theorem extract_empty (start stop : Nat) : (#[] : Array α).extract start stop = #[] 
Arguments: {α : Type u_1} (start stop : Nat)
Goal: #[].extract start stop = #[]
-- Array.anyM_loop_iff_exists
theorem anyM_loop_iff_exists (p : α → Bool) (as : Array α) (start stop) (h : stop ≤ as.size) :
    anyM.loop (m := Id) p as stop h start = true ↔
      ∃ i : Fin as.size, start ≤ ↑i ∧ ↑i < stop ∧ p as[i] = true 
Arguments: {α : Type u_1} (p : α → Bool) (as : Array α) (start stop : Nat) (h : stop ≤ as.size)
Goal: Array.anyM.loop p as stop h start = true ↔ ∃ i, start ≤ ↑i ∧ ↑i < stop ∧ p as[i] = true
-- Array.any_iff_exists
theorem any_iff_exists (p : α → Bool) (as : Array α) (start stop) :
    any as p start stop ↔ ∃ i : Fin as.size, start ≤ i.1 ∧ i.1 < stop ∧ p as[i] 
Arguments: {α : Type u_1} (p : α → Bool) (as : Array α) (start stop : Nat)
Goal: as.any p start stop = true ↔ ∃ i, start ≤ ↑i ∧ ↑i < stop ∧ p as[i] = true
-- Array.any_eq_true
theorem any_eq_true (p : α → Bool) (as : Array α) :
    any as p ↔ ∃ i : Fin as.size, p as[i] 
Arguments: {α : Type u_1} (p : α → Bool) (as : Array α)
Goal: as.any p 0 = true ↔ ∃ i, p as[i] = true
-- Array.any_def
theorem any_def {p : α → Bool} (as : Array α) : as.any p = as.data.any p 
Arguments: {α : Type u_1} {p : α → Bool} (as : Array α)
Goal: as.any p 0 = as.data.any p
-- Array.all_eq_not_any_not
theorem all_eq_not_any_not (p : α → Bool) (as : Array α) (start stop) :
    all as p start stop = !(any as (!p ·) start stop) 
Arguments: {α : Type u_1} (p : α → Bool) (as : Array α) (start stop : Nat)
Goal: as.all p start stop = !as.any (fun x => !p x) start stop
-- Array.all_iff_forall
theorem all_iff_forall (p : α → Bool) (as : Array α) (start stop) :
    all as p start stop ↔ ∀ i : Fin as.size, start ≤ i.1 ∧ i.1 < stop → p as[i] 
Arguments: {α : Type u_1} (p : α → Bool) (as : Array α) (start stop : Nat)
Goal: as.all p start stop = true ↔ ∀ (i : Fin as.size), start ≤ ↑i ∧ ↑i < stop → p as[i] = true
-- Array.all_eq_true
theorem all_eq_true (p : α → Bool) (as : Array α) : all as p ↔ ∀ i : Fin as.size, p as[i] 
Arguments: {α : Type u_1} (p : α → Bool) (as : Array α)
Goal: as.all p 0 = true ↔ ∀ (i : Fin as.size), p as[i] = true