ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Mathlib.Vector.map_map₂
@[simp]
theorem map_map₂ (f₁ : γ → ζ) (f₂ : α → β → γ) :
    map f₁ (map₂ f₂ xs ys) = map₂ (fun x y => f₁ <| f₂ x y) xs ys 
Arguments: {α : Type u_3} {n : ℕ} {β : Type u_4} (xs : Mathlib.Vector α n) (ys : Mathlib.Vector β n) {γ : Type u_1} {ζ : Type u_2} (f₁ : γ → ζ) (f₂ : α → β → γ)
Goal: Mathlib.Vector.map f₁ (Mathlib.Vector.map₂ f₂ xs ys) = Mathlib.Vector.map₂ (fun x y => f₁ (f₂ x y)) xs ys
-- Mathlib.Vector.mapAccumr₂_mapAccumr₂_left_left
@[simp]
theorem mapAccumr₂_mapAccumr₂_left_left (f₁ : γ → α → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ) :
    (mapAccumr₂ f₁ (mapAccumr₂ f₂ xs ys s₂).snd xs s₁)
    = let m := mapAccumr₂ (fun x y (s₁, s₂) =>
                let r₂ := f₂ x y s₂
                let r₁ := f₁ r₂.snd x s₁
                ((r₁.fst, r₂.fst), r₁.snd)
              )
            xs ys (s₁, s₂)
    (m.fst.fst, m.snd) 
Arguments: {α : Type} {n : ℕ} {β : Type} (xs : Mathlib.Vector α n) (ys : Mathlib.Vector β n) {γ σ₁ φ σ₂ : Type} {s₂ : σ₂} {s₁ : σ₁} (f₁ : γ → α → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ)
Goal: Mathlib.Vector.mapAccumr₂ f₁ (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2 xs s₁ =
  let m :=
    Mathlib.Vector.mapAccumr₂
      (fun x y x_1 =>
        match x_1 with
        | (s₁, s₂) =>
          let r₂ := f₂ x y s₂;
          let r₁ := f₁ r₂.2 x s₁;
          ((r₁.1, r₂.1), r₁.2))
      xs ys (s₁, s₂);
  (m.1.1, m.2)
-- Mathlib.Vector.mapAccumr₂_mapAccumr₂_left_right
@[simp]
theorem mapAccumr₂_mapAccumr₂_left_right
    (f₁ : γ → β → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ) :
    (mapAccumr₂ f₁ (mapAccumr₂ f₂ xs ys s₂).snd ys s₁)
    = let m := mapAccumr₂ (fun x y (s₁, s₂) =>
                let r₂ := f₂ x y s₂
                let r₁ := f₁ r₂.snd y s₁
                ((r₁.fst, r₂.fst), r₁.snd)
              )
            xs ys (s₁, s₂)
    (m.fst.fst, m.snd) 
Arguments: {α : Type} {n : ℕ} {β : Type} (xs : Mathlib.Vector α n) (ys : Mathlib.Vector β n) {γ σ₁ φ σ₂ : Type} {s₂ : σ₂} {s₁ : σ₁} (f₁ : γ → β → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ)
Goal: Mathlib.Vector.mapAccumr₂ f₁ (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2 ys s₁ =
  let m :=
    Mathlib.Vector.mapAccumr₂
      (fun x y x_1 =>
        match x_1 with
        | (s₁, s₂) =>
          let r₂ := f₂ x y s₂;
          let r₁ := f₁ r₂.2 y s₁;
          ((r₁.1, r₂.1), r₁.2))
      xs ys (s₁, s₂);
  (m.1.1, m.2)
-- Mathlib.Vector.mapAccumr₂_mapAccumr₂_right_left
@[simp]
theorem mapAccumr₂_mapAccumr₂_right_left (f₁ : α → γ → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ) :
    (mapAccumr₂ f₁ xs (mapAccumr₂ f₂ xs ys s₂).snd s₁)
    = let m := mapAccumr₂ (fun x y (s₁, s₂) =>
                let r₂ := f₂ x y s₂
                let r₁ := f₁ x r₂.snd s₁
                ((r₁.fst, r₂.fst), r₁.snd)
              )
            xs ys (s₁, s₂)
    (m.fst.fst, m.snd) 
Arguments: {α : Type} {n : ℕ} {β : Type} (xs : Mathlib.Vector α n) (ys : Mathlib.Vector β n) {γ σ₁ φ σ₂ : Type} {s₂ : σ₂} {s₁ : σ₁} (f₁ : α → γ → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ)
Goal: Mathlib.Vector.mapAccumr₂ f₁ xs (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2 s₁ =
  let m :=
    Mathlib.Vector.mapAccumr₂
      (fun x y x_1 =>
        match x_1 with
        | (s₁, s₂) =>
          let r₂ := f₂ x y s₂;
          let r₁ := f₁ x r₂.2 s₁;
          ((r₁.1, r₂.1), r₁.2))
      xs ys (s₁, s₂);
  (m.1.1, m.2)
-- Mathlib.Vector.mapAccumr₂_mapAccumr₂_right_right
@[simp]
theorem mapAccumr₂_mapAccumr₂_right_right (f₁ : β → γ → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ) :
    (mapAccumr₂ f₁ ys (mapAccumr₂ f₂ xs ys s₂).snd s₁)
    = let m := mapAccumr₂ (fun x y (s₁, s₂) =>
                let r₂ := f₂ x y s₂
                let r₁ := f₁ y r₂.snd s₁
                ((r₁.fst, r₂.fst), r₁.snd)
              )
            xs ys (s₁, s₂)
    (m.fst.fst, m.snd) 
Arguments: {α : Type} {n : ℕ} {β : Type} (xs : Mathlib.Vector α n) (ys : Mathlib.Vector β n) {γ σ₁ φ σ₂ : Type} {s₂ : σ₂} {s₁ : σ₁} (f₁ : β → γ → σ₁ → σ₁ × φ) (f₂ : α → β → σ₂ → σ₂ × γ)
Goal: Mathlib.Vector.mapAccumr₂ f₁ ys (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2 s₁ =
  let m :=
    Mathlib.Vector.mapAccumr₂
      (fun x y x_1 =>
        match x_1 with
        | (s₁, s₂) =>
          let r₂ := f₂ x y s₂;
          let r₁ := f₁ y r₂.2 s₁;
          ((r₁.1, r₂.1), r₁.2))
      xs ys (s₁, s₂);
  (m.1.1, m.2)
-- Mathlib.Vector.mapAccumr_bisim
theorem mapAccumr_bisim {f₁ : α → σ₁ → σ₁ × β} {f₂ : α → σ₂ → σ₂ × β} {s₁ : σ₁} {s₂ : σ₂}
    (R : σ₁ → σ₂ → Prop) (h₀ : R s₁ s₂)
    (hR : ∀ {s q} a, R s q → R (f₁ a s).1 (f₂ a q).1 ∧ (f₁ a s).2 = (f₂ a q).2) :
    R (mapAccumr f₁ xs s₁).fst (mapAccumr f₂ xs s₂).fst
    ∧ (mapAccumr f₁ xs s₁).snd = (mapAccumr f₂ xs s₂).snd 
Arguments: {α : Type u_2} {n : ℕ} {xs : Mathlib.Vector α n} {σ₁ : Type} {β : Type u_1} {σ₂ : Type} {f₁ : α → σ₁ → σ₁ × β} {f₂ : α → σ₂ → σ₂ × β} {s₁ : σ₁} {s₂ : σ₂} (R : σ₁ → σ₂ → Prop) (h₀ : R s₁ s₂) (hR : ∀ {s : σ₁} {q : σ₂} (a : α), R s q → R (f₁ a s).1 (f₂ a q).1 ∧ (f₁ a s).2 = (f₂ a q).2)
Goal: R (Mathlib.Vector.mapAccumr f₁ xs s₁).1 (Mathlib.Vector.mapAccumr f₂ xs s₂).1 ∧
  (Mathlib.Vector.mapAccumr f₁ xs s₁).2 = (Mathlib.Vector.mapAccumr f₂ xs s₂).2
-- Mathlib.Vector.mapAccumr_bisim_tail
theorem mapAccumr_bisim_tail {f₁ : α → σ₁ → σ₁ × β} {f₂ : α → σ₂ → σ₂ × β} {s₁ : σ₁} {s₂ : σ₂}
    (h : ∃ R : σ₁ → σ₂ → Prop, R s₁ s₂ ∧
      ∀ {s q} a, R s q → R (f₁ a s).1 (f₂ a q).1 ∧ (f₁ a s).2 = (f₂ a q).2) :
    (mapAccumr f₁ xs s₁).snd = (mapAccumr f₂ xs s₂).snd 
Arguments: {α : Type u_2} {n : ℕ} {xs : Mathlib.Vector α n} {σ₁ : Type} {β : Type u_1} {σ₂ : Type} {f₁ : α → σ₁ → σ₁ × β} {f₂ : α → σ₂ → σ₂ × β} {s₁ : σ₁} {s₂ : σ₂} (h : ∃ R, R s₁ s₂ ∧ ∀ {s : σ₁} {q : σ₂} (a : α), R s q → R (f₁ a s).1 (f₂ a q).1 ∧ (f₁ a s).2 = (f₂ a q).2)
Goal: (Mathlib.Vector.mapAccumr f₁ xs s₁).2 = (Mathlib.Vector.mapAccumr f₂ xs s₂).2
-- Mathlib.Vector.mapAccumr₂_bisim
theorem mapAccumr₂_bisim {ys : Vector β n} {f₁ : α → β → σ₁ → σ₁ × γ}
    {f₂ : α → β → σ₂ → σ₂ × γ} {s₁ : σ₁} {s₂ : σ₂}
    (R : σ₁ → σ₂ → Prop) (h₀ : R s₁ s₂)
    (hR :  ∀ {s q} a b, R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2) :
    R (mapAccumr₂ f₁ xs ys s₁).1 (mapAccumr₂ f₂ xs ys s₂).1
    ∧ (mapAccumr₂ f₁ xs ys s₁).2 = (mapAccumr₂ f₂ xs ys s₂).2 
Arguments: {α : Type} {n : ℕ} {xs : Mathlib.Vector α n} {β σ₁ γ σ₂ : Type} {ys : Mathlib.Vector β n} {f₁ : α → β → σ₁ → σ₁ × γ} {f₂ : α → β → σ₂ → σ₂ × γ} {s₁ : σ₁} {s₂ : σ₂} (R : σ₁ → σ₂ → Prop) (h₀ : R s₁ s₂) (hR : ∀ {s : σ₁} {q : σ₂} (a : α) (b : β), R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2)
Goal: R (Mathlib.Vector.mapAccumr₂ f₁ xs ys s₁).1 (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).1 ∧
  (Mathlib.Vector.mapAccumr₂ f₁ xs ys s₁).2 = (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2
-- Mathlib.Vector.mapAccumr₂_bisim_tail
theorem mapAccumr₂_bisim_tail {ys : Vector β n} {f₁ : α → β → σ₁ → σ₁ × γ}
    {f₂ : α → β → σ₂ → σ₂ × γ} {s₁ : σ₁} {s₂ : σ₂}
    (h : ∃ R : σ₁ → σ₂ → Prop, R s₁ s₂ ∧
      ∀ {s q} a b, R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2) :
    (mapAccumr₂ f₁ xs ys s₁).2 = (mapAccumr₂ f₂ xs ys s₂).2 
Arguments: {α : Type} {n : ℕ} {xs : Mathlib.Vector α n} {β σ₁ γ σ₂ : Type} {ys : Mathlib.Vector β n} {f₁ : α → β → σ₁ → σ₁ × γ} {f₂ : α → β → σ₂ → σ₂ × γ} {s₁ : σ₁} {s₂ : σ₂} (h :
  ∃ R, R s₁ s₂ ∧ ∀ {s : σ₁} {q : σ₂} (a : α) (b : β), R s q → R (f₁ a b s).1 (f₂ a b q).1 ∧ (f₁ a b s).2 = (f₂ a b q).2)
Goal: (Mathlib.Vector.mapAccumr₂ f₁ xs ys s₁).2 = (Mathlib.Vector.mapAccumr₂ f₂ xs ys s₂).2
-- Mathlib.Vector.map_eq_mapAccumr
protected theorem map_eq_mapAccumr :
    map f xs = (mapAccumr (fun x (_ : Unit) ↦ ((), f x)) xs ()).snd 
Arguments: {α : Type u_2} {n : ℕ} {xs : Mathlib.Vector α n}
Goal: ∀ {α_1 : Type u_1} {f : α → α_1}, Mathlib.Vector.map f xs = (Mathlib.Vector.mapAccumr (fun x x_1 => ((), f x)) xs ()).2
-- Mathlib.Vector.mapAccumr_eq_map
theorem mapAccumr_eq_map {f : α → σ → σ × β} {s₀ : σ} (S : Set σ) (h₀ : s₀ ∈ S)
    (closure : ∀ a s, s ∈ S → (f a s).1 ∈ S)
    (out : ∀ a s s', s ∈ S → s' ∈ S → (f a s).2 = (f a s').2) :
    (mapAccumr f xs s₀).snd = map (f · s₀ |>.snd) xs 
Arguments: {α : Type u_2} {n : ℕ} {β : Type u_1} {xs : Mathlib.Vector α n} {σ : Type} {f : α → σ → σ × β} {s₀ : σ} (S : Set σ) (h₀ : s₀ ∈ S) (closure : ∀ (a : α), ∀ s ∈ S, (f a s).1 ∈ S) (out : ∀ (a : α) (s s' : σ), s ∈ S → s' ∈ S → (f a s).2 = (f a s').2)
Goal: (Mathlib.Vector.mapAccumr f xs s₀).2 = Mathlib.Vector.map (fun x => (f x s₀).2) xs
-- Mathlib.Vector.map₂_eq_mapAccumr₂
protected theorem map₂_eq_mapAccumr₂ :
    map₂ f xs ys = (mapAccumr₂ (fun x y (_ : Unit) ↦ ((), f x y)) xs ys ()).snd 
Arguments: {α : Type} {n : ℕ} {β : Type} {xs : Mathlib.Vector α n} {ys : Mathlib.Vector β n}
Goal: ∀ {α_1 : Type} {f : α → β → α_1},
  Mathlib.Vector.map₂ f xs ys = (Mathlib.Vector.mapAccumr₂ (fun x y x_1 => ((), f x y)) xs ys ()).2
-- Mathlib.Vector.mapAccumr₂_eq_map₂
theorem mapAccumr₂_eq_map₂ {f : α → β → σ → σ × γ} {s₀ : σ} (S : Set σ) (h₀ : s₀ ∈ S)
    (closure : ∀ a b s, s ∈ S → (f a b s).1 ∈ S)
    (out : ∀ a b s s', s ∈ S → s' ∈ S → (f a b s).2 = (f a b s').2) :
    (mapAccumr₂ f xs ys s₀).snd = map₂ (f · · s₀ |>.snd) xs ys 
Arguments: {α : Type} {n : ℕ} {β : Type} {xs : Mathlib.Vector α n} {ys : Mathlib.Vector β n} {σ γ : Type} {f : α → β → σ → σ × γ} {s₀ : σ} (S : Set σ) (h₀ : s₀ ∈ S) (closure : ∀ (a : α) (b : β), ∀ s ∈ S, (f a b s).1 ∈ S) (out : ∀ (a : α) (b : β) (s s' : σ), s ∈ S → s' ∈ S → (f a b s).2 = (f a b s').2)
Goal: (Mathlib.Vector.mapAccumr₂ f xs ys s₀).2 = Mathlib.Vector.map₂ (fun x x_1 => (f x x_1 s₀).2) xs ys
-- Mathlib.Vector.mapAccumr_eq_map_of_constant_state
@[simp]
theorem mapAccumr_eq_map_of_constant_state (f : α → σ → σ × β) (s : σ) (h : ∀ a, (f a s).fst = s) :
    mapAccumr f xs s = (s, (map (fun x => (f x s).snd) xs)) 
Arguments: {α : Type u_2} {n : ℕ} {β : Type u_1} {xs : Mathlib.Vector α n} {σ : Type} (f : α → σ → σ × β) (s : σ) (h : ∀ (a : α), (f a s).1 = s)
Goal: Mathlib.Vector.mapAccumr f xs s = (s, Mathlib.Vector.map (fun x => (f x s).2) xs)
-- Mathlib.Vector.mapAccumr₂_eq_map₂_of_constant_state
@[simp]
theorem mapAccumr₂_eq_map₂_of_constant_state (f : α → β → σ → σ × γ) (s : σ)
    (h : ∀ a b, (f a b s).fst = s) :
    mapAccumr₂ f xs ys s = (s, (map₂ (fun x y => (f x y s).snd) xs ys)) 
Arguments: {α : Type} {n : ℕ} {β : Type} {xs : Mathlib.Vector α n} {ys : Mathlib.Vector β n} {σ γ : Type} (f : α → β → σ → σ × γ) (s : σ) (h : ∀ (a : α) (b : β), (f a b s).1 = s)
Goal: Mathlib.Vector.mapAccumr₂ f xs ys s = (s, Mathlib.Vector.map₂ (fun x y => (f x y s).2) xs ys)
-- Mathlib.Vector.mapAccumr_eq_map_of_unused_state
@[simp]
theorem mapAccumr_eq_map_of_unused_state (f : α → σ → σ × β) (s : σ)
    (h : ∀ a s s', (f a s).snd = (f a s').snd) :
    (mapAccumr f xs s).snd = (map (fun x => (f x s).snd) xs) 
Arguments: {α : Type u_2} {n : ℕ} {β : Type u_1} {xs : Mathlib.Vector α n} {σ : Type} (f : α → σ → σ × β) (s : σ) (h : ∀ (a : α) (s s' : σ), (f a s).2 = (f a s').2)
Goal: (Mathlib.Vector.mapAccumr f xs s).2 = Mathlib.Vector.map (fun x => (f x s).2) xs
-- Mathlib.Vector.mapAccumr₂_eq_map₂_of_unused_state
@[simp]
theorem mapAccumr₂_eq_map₂_of_unused_state (f : α → β → σ → σ × γ) (s : σ)
    (h : ∀ a b s s', (f a b s).snd = (f a b s').snd) :
    (mapAccumr₂ f xs ys s).snd = (map₂ (fun x y => (f x y s).snd) xs ys) 
Arguments: {α : Type} {n : ℕ} {β : Type} {xs : Mathlib.Vector α n} {ys : Mathlib.Vector β n} {σ γ : Type} (f : α → β → σ → σ × γ) (s : σ) (h : ∀ (a : α) (b : β) (s s' : σ), (f a b s).2 = (f a b s').2)
Goal: (Mathlib.Vector.mapAccumr₂ f xs ys s).2 = Mathlib.Vector.map₂ (fun x y => (f x y s).2) xs ys
-- Mathlib.Vector.mapAccumr_redundant_pair
@[simp]
theorem mapAccumr_redundant_pair (f : α → (σ × σ) → (σ × σ) × β)
    (h : ∀ x s, (f x (s, s)).fst.fst = (f x (s, s)).fst.snd) :
    (mapAccumr f xs (s, s)).snd = (mapAccumr (fun x (s : σ) =>
      (f x (s, s) |>.fst.fst, f x (s, s) |>.snd)
    ) xs s).snd 
Arguments: {α : Type u_2} {n : ℕ} {β : Type u_1} {xs : Mathlib.Vector α n} {σ : Type} {s : σ} (f : α → σ × σ → (σ × σ) × β) (h : ∀ (x : α) (s : σ), (f x (s, s)).1.1 = (f x (s, s)).1.2)
Goal: (Mathlib.Vector.mapAccumr f xs (s, s)).2 =
  (Mathlib.Vector.mapAccumr (fun x s => ((f x (s, s)).1.1, (f x (s, s)).2)) xs s).2
-- Mathlib.Vector.mapAccumr₂_redundant_pair
@[simp]
theorem mapAccumr₂_redundant_pair (f : α → β → (σ × σ) → (σ × σ) × γ)
    (h : ∀ x y s, let s' := (f x y (s, s)).fst; s'.fst = s'.snd) :
    (mapAccumr₂ f xs ys (s, s)).snd = (mapAccumr₂ (fun x y (s : σ) =>
      (f x y (s, s) |>.fst.fst, f x y (s, s) |>.snd)
    ) xs ys s).snd 
Arguments: {α : Type} {n : ℕ} {β : Type} {xs : Mathlib.Vector α n} {ys : Mathlib.Vector β n} {σ γ : Type} {s : σ} (f : α → β → σ × σ → (σ × σ) × γ) (h :
  ∀ (x : α) (y : β) (s : σ),
    let s' := (f x y (s, s)).1;
    s'.1 = s'.2)
Goal: (Mathlib.Vector.mapAccumr₂ f xs ys (s, s)).2 =
  (Mathlib.Vector.mapAccumr₂ (fun x y s => ((f x y (s, s)).1.1, (f x y (s, s)).2)) xs ys s).2
-- Mathlib.Vector.mapAccumr₂_unused_input_left
@[simp]
theorem mapAccumr₂_unused_input_left [Inhabited α] (f : α → β → σ → σ × γ)
    (h : ∀ a b s, f default b s = f a b s) :
    mapAccumr₂ f xs ys s = mapAccumr (fun b s => f default b s) ys s 
Arguments: {α : Type} {n : ℕ} {β : Type} {xs : Mathlib.Vector α n} {ys : Mathlib.Vector β n} {σ γ : Type} {s : σ} [Inhabited α] (f : α → β → σ → σ × γ) (h : ∀ (a : α) (b : β) (s : σ), f default b s = f a b s)
Goal: Mathlib.Vector.mapAccumr₂ f xs ys s = Mathlib.Vector.mapAccumr (fun b s => f default b s) ys s
-- Mathlib.Vector.mapAccumr₂_unused_input_right
@[simp]
theorem mapAccumr₂_unused_input_right [Inhabited β] (f : α → β → σ → σ × γ)
    (h : ∀ a b s, f a default s = f a b s) :
    mapAccumr₂ f xs ys s = mapAccumr (fun a s => f a default s) xs s 
Arguments: {α : Type} {n : ℕ} {β : Type} {xs : Mathlib.Vector α n} {ys : Mathlib.Vector β n} {σ γ : Type} {s : σ} [Inhabited β] (f : α → β → σ → σ × γ) (h : ∀ (a : α) (b : β) (s : σ), f a default s = f a b s)
Goal: Mathlib.Vector.mapAccumr₂ f xs ys s = Mathlib.Vector.mapAccumr (fun a s => f a default s) xs s
-- Mathlib.Vector.map₂_comm
theorem map₂_comm (f : α → α → β) (comm : ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁) :
    map₂ f xs ys = map₂ f ys xs 
Arguments: {α : Type u_2} {n : ℕ} (xs ys : Mathlib.Vector α n) {β : Type u_1} (f : α → α → β) (comm : ∀ (a₁ a₂ : α), f a₁ a₂ = f a₂ a₁)
Goal: Mathlib.Vector.map₂ f xs ys = Mathlib.Vector.map₂ f ys xs
-- Mathlib.Vector.mapAccumr₂_comm
theorem mapAccumr₂_comm (f : α → α → σ → σ × γ) (comm : ∀ a₁ a₂ s, f a₁ a₂ s = f a₂ a₁ s) :
    mapAccumr₂ f xs ys s = mapAccumr₂ f ys xs s 
Arguments: {α : Type} {n : ℕ} (xs ys : Mathlib.Vector α n) {σ γ : Type} {s : σ} (f : α → α → σ → σ × γ) (comm : ∀ (a₁ a₂ : α) (s : σ), f a₁ a₂ s = f a₂ a₁ s)
Goal: Mathlib.Vector.mapAccumr₂ f xs ys s = Mathlib.Vector.mapAccumr₂ f ys xs s
-- Mathlib.Vector.map₂_flip
theorem map₂_flip (f : α → β → γ) :
    map₂ f xs ys = map₂ (flip f) ys xs 
Arguments: {α : Type u_2} {n : ℕ} {β : Type u_3} (xs : Mathlib.Vector α n) (ys : Mathlib.Vector β n) {γ : Type u_1} (f : α → β → γ)
Goal: Mathlib.Vector.map₂ f xs ys = Mathlib.Vector.map₂ (flip f) ys xs
-- Mathlib.Vector.mapAccumr₂_flip
theorem mapAccumr₂_flip (f : α → β → σ → σ × γ) :
    mapAccumr₂ f xs ys s = mapAccumr₂ (flip f) ys xs s 
Arguments: {α : Type} {n : ℕ} {β : Type} (xs : Mathlib.Vector α n) (ys : Mathlib.Vector β n) {σ γ : Type} {s : σ} (f : α → β → σ → σ × γ)
Goal: Mathlib.Vector.mapAccumr₂ f xs ys s = Mathlib.Vector.mapAccumr₂ (flip f) ys xs s
-- Multiset.antidiagonal_coe
theorem antidiagonal_coe (l : List α) : @antidiagonal α l = revzip (powersetAux l) 
Arguments: {α : Type u_1} (l : List α)
Goal: (↑l).antidiagonal = ↑(Multiset.powersetAux l).revzip
-- Multiset.antidiagonal_coe'
@[simp]
theorem antidiagonal_coe' (l : List α) : @antidiagonal α l = revzip (powersetAux' l) 
Arguments: {α : Type u_1} (l : List α)
Goal: (↑l).antidiagonal = ↑(Multiset.powersetAux' l).revzip
-- Multiset.mem_antidiagonal
@[simp]
theorem mem_antidiagonal {s : Multiset α} {x : Multiset α × Multiset α} :
    x ∈ antidiagonal s ↔ x.1 + x.2 = s 
Arguments: {α : Type u_1} {s : Multiset α} {x : Multiset α × Multiset α}
Goal: x ∈ s.antidiagonal ↔ x.1 + x.2 = s
-- Multiset.antidiagonal_map_fst
@[simp]
theorem antidiagonal_map_fst (s : Multiset α) : (antidiagonal s).map Prod.fst = powerset s 
Arguments: {α : Type u_1} (s : Multiset α)
Goal: Multiset.map Prod.fst s.antidiagonal = s.powerset
-- Multiset.antidiagonal_map_snd
@[simp]
theorem antidiagonal_map_snd (s : Multiset α) : (antidiagonal s).map Prod.snd = powerset s 
Arguments: {α : Type u_1} (s : Multiset α)
Goal: Multiset.map Prod.snd s.antidiagonal = s.powerset
-- Multiset.antidiagonal_zero
@[simp]
theorem antidiagonal_zero : @antidiagonal α 0 = {(0, 0)} 
Arguments: {α : Type u_1}
Goal: Multiset.antidiagonal 0 = {(0, 0)}
-- Multiset.antidiagonal_cons
@[simp]
theorem antidiagonal_cons (a : α) (s) :
    antidiagonal (a ::ₘ s) =
      map (Prod.map id (cons a)) (antidiagonal s) + map (Prod.map (cons a) id) (antidiagonal s) 
Arguments: {α : Type u_1} (a : α) (s : Multiset α)
Goal: (a ::ₘ s).antidiagonal =
  Multiset.map (Prod.map id (Multiset.cons a)) s.antidiagonal +
    Multiset.map (Prod.map (Multiset.cons a) id) s.antidiagonal
-- Multiset.antidiagonal_eq_map_powerset
theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
    s.antidiagonal = s.powerset.map fun t ↦ (s - t, t) 
Arguments: {α : Type u_1} [DecidableEq α] (s : Multiset α)
Goal: s.antidiagonal = Multiset.map (fun t => (s - t, t)) s.powerset
-- Multiset.card_antidiagonal
@[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s 
Arguments: {α : Type u_1} (s : Multiset α)
Goal: Multiset.card s.antidiagonal = 2 ^ Multiset.card s
-- Multiset.sections_zero
@[simp]
theorem sections_zero : Sections (0 : Multiset (Multiset α)) = {0} 
Arguments: {α : Type u_1}
Goal: Multiset.Sections 0 = {0}
-- Multiset.sections_cons
@[simp]
theorem sections_cons (s : Multiset (Multiset α)) (m : Multiset α) :
    Sections (m ::ₘ s) = m.bind fun a => (Sections s).map (Multiset.cons a) 
Arguments: {α : Type u_1} (s : Multiset (Multiset α)) (m : Multiset α)
Goal: (m ::ₘ s).Sections = m.bind fun a => Multiset.map (Multiset.cons a) s.Sections
-- Multiset.coe_sections
theorem coe_sections :
    ∀ l : List (List α),
      Sections (l.map fun l : List α => (l : Multiset α) : Multiset (Multiset α)) =
        (l.sections.map fun l : List α => (l : Multiset α) : Multiset (Multiset α))
  
Arguments: {α : Type u_1} (l : List (List α))
Goal: (↑(List.map (fun l => ↑l) l)).Sections = ↑(List.map (fun l => ↑l) l.sections)
-- Multiset.sections_add
@[simp]
theorem sections_add (s t : Multiset (Multiset α)) :
    Sections (s + t) = (Sections s).bind fun m => (Sections t).map (m + ·) 
Arguments: {α : Type u_1} (s t : Multiset (Multiset α))
Goal: (s + t).Sections = s.Sections.bind fun m => Multiset.map (fun x => m + x) t.Sections
-- Multiset.mem_sections
theorem mem_sections {s : Multiset (Multiset α)} :
    ∀ {a}, a ∈ Sections s ↔ s.Rel (fun s a => a ∈ s) a 
Arguments: {α : Type u_1} {s : Multiset (Multiset α)} {a : Multiset α}
Goal: a ∈ s.Sections ↔ Multiset.Rel (fun s a => a ∈ s) s a
-- Multiset.card_sections
theorem card_sections {s : Multiset (Multiset α)} : card (Sections s) = prod (s.map card) 
Arguments: {α : Type u_1} {s : Multiset (Multiset α)}
Goal: Multiset.card s.Sections = (Multiset.map (⇑Multiset.card) s).prod
-- Multiset.Nat.mem_antidiagonal
@[simp]
theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n 
Arguments: {n : ℕ} {x : ℕ × ℕ}
Goal: x ∈ Multiset.Nat.antidiagonal n ↔ x.1 + x.2 = n
-- Multiset.Nat.card_antidiagonal
@[simp]
theorem card_antidiagonal (n : ℕ) : card (antidiagonal n) = n + 1 
Arguments: (n : ℕ)
Goal: Multiset.card (Multiset.Nat.antidiagonal n) = n + 1
-- Multiset.Nat.antidiagonal_zero
@[simp]
theorem antidiagonal_zero : antidiagonal 0 = {(0, 0)} 
Goal: Multiset.Nat.antidiagonal 0 = {(0, 0)}
-- Multiset.Nat.nodup_antidiagonal
@[simp]
theorem nodup_antidiagonal (n : ℕ) : Nodup (antidiagonal n) 
Arguments: (n : ℕ)
Goal: (Multiset.Nat.antidiagonal n).Nodup
-- Multiset.Nat.antidiagonal_succ
@[simp]
theorem antidiagonal_succ {n : ℕ} :
    antidiagonal (n + 1) = (0, n + 1) ::ₘ (antidiagonal n).map (Prod.map Nat.succ id) 
Arguments: {n : ℕ}
Goal: Multiset.Nat.antidiagonal (n + 1) = (0, n + 1) ::ₘ Multiset.map (Prod.map Nat.succ id) (Multiset.Nat.antidiagonal n)
-- Multiset.Nat.antidiagonal_succ'
theorem antidiagonal_succ' {n : ℕ} :
    antidiagonal (n + 1) = (n + 1, 0) ::ₘ (antidiagonal n).map (Prod.map id Nat.succ) 
Arguments: {n : ℕ}
Goal: Multiset.Nat.antidiagonal (n + 1) = (n + 1, 0) ::ₘ Multiset.map (Prod.map id Nat.succ) (Multiset.Nat.antidiagonal n)
-- Multiset.Nat.antidiagonal_succ_succ'
theorem antidiagonal_succ_succ' {n : ℕ} :
    antidiagonal (n + 2) =
      (0, n + 2) ::ₘ (n + 2, 0) ::ₘ (antidiagonal n).map (Prod.map Nat.succ Nat.succ) 
Arguments: {n : ℕ}
Goal: Multiset.Nat.antidiagonal (n + 2) =
  (0, n + 2) ::ₘ (n + 2, 0) ::ₘ Multiset.map (Prod.map Nat.succ Nat.succ) (Multiset.Nat.antidiagonal n)
-- Multiset.Nat.map_swap_antidiagonal
theorem map_swap_antidiagonal {n : ℕ} : (antidiagonal n).map Prod.swap = antidiagonal n 
Arguments: {n : ℕ}
Goal: Multiset.map Prod.swap (Multiset.Nat.antidiagonal n) = Multiset.Nat.antidiagonal n
-- Multiset.coe_sort
@[simp]
theorem coe_sort (l : List α) : sort r l = mergeSort r l 
Arguments: {α : Type u_1} (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm α r] [IsTotal α r] (l : List α)
Goal: Multiset.sort r ↑l = List.mergeSort r l
-- Multiset.sort_sorted
@[simp]
theorem sort_sorted (s : Multiset α) : Sorted r (sort r s) 
Arguments: {α : Type u_1} (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm α r] [IsTotal α r] (s : Multiset α)
Goal: List.Sorted r (Multiset.sort r s)
-- Multiset.sort_eq
@[simp]
theorem sort_eq (s : Multiset α) : ↑(sort r s) = s 
Arguments: {α : Type u_1} (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm α r] [IsTotal α r] (s : Multiset α)
Goal: ↑(Multiset.sort r s) = s
-- Multiset.mem_sort
@[simp]
theorem mem_sort {s : Multiset α} {a : α} : a ∈ sort r s ↔ a ∈ s 
Arguments: {α : Type u_1} (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm α r] [IsTotal α r] {s : Multiset α} {a : α}
Goal: a ∈ Multiset.sort r s ↔ a ∈ s
-- Multiset.length_sort
@[simp]
theorem length_sort {s : Multiset α} : (sort r s).length = card s 
Arguments: {α : Type u_1} (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm α r] [IsTotal α r] {s : Multiset α}
Goal: (Multiset.sort r s).length = Multiset.card s
-- Multiset.sort_zero
@[simp]
theorem sort_zero : sort r 0 = [] 
Arguments: {α : Type u_1} (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm α r] [IsTotal α r]
Goal: Multiset.sort r 0 = []
-- Multiset.sort_singleton
@[simp]
theorem sort_singleton (a : α) : sort r {a} = [a] 
Arguments: {α : Type u_1} (r : α → α → Prop) [DecidableRel r] [IsTrans α r] [IsAntisymm α r] [IsTotal α r] (a : α)
Goal: Multiset.sort r {a} = [a]
-- Multiset.coe_ndinsert
@[simp]
theorem coe_ndinsert (a : α) (l : List α) : ndinsert a l = (insert a l : List α) 
Arguments: {α : Type u_1} [DecidableEq α] (a : α) (l : List α)
Goal: Multiset.ndinsert a ↑l = ↑(insert a l)
-- Multiset.ndinsert_zero
@[simp]
theorem ndinsert_zero (a : α) : ndinsert a 0 = {a} 
Arguments: {α : Type u_1} [DecidableEq α] (a : α)
Goal: Multiset.ndinsert a 0 = {a}
-- Multiset.ndinsert_of_mem
@[simp]
theorem ndinsert_of_mem {a : α} {s : Multiset α} : a ∈ s → ndinsert a s = s 
Arguments: {α : Type u_1} [DecidableEq α] {a : α} {s : Multiset α}
Goal: a ∈ s → Multiset.ndinsert a s = s
-- Multiset.ndinsert_of_not_mem
@[simp]
theorem ndinsert_of_not_mem {a : α} {s : Multiset α} : a ∉ s → ndinsert a s = a ::ₘ s 
Arguments: {α : Type u_1} [DecidableEq α] {a : α} {s : Multiset α}
Goal: a ∉ s → Multiset.ndinsert a s = a ::ₘ s
-- Multiset.mem_ndinsert
@[simp]
theorem mem_ndinsert {a b : α} {s : Multiset α} : a ∈ ndinsert b s ↔ a = b ∨ a ∈ s 
Arguments: {α : Type u_1} [DecidableEq α] {a b : α} {s : Multiset α}
Goal: a ∈ Multiset.ndinsert b s ↔ a = b ∨ a ∈ s
-- Multiset.le_ndinsert_self
@[simp]
theorem le_ndinsert_self (a : α) (s : Multiset α) : s ≤ ndinsert a s 
Arguments: {α : Type u_1} [DecidableEq α] (a : α) (s : Multiset α)
Goal: s ≤ Multiset.ndinsert a s
-- Multiset.mem_ndinsert_self
theorem mem_ndinsert_self (a : α) (s : Multiset α) : a ∈ ndinsert a s 
Arguments: {α : Type u_1} [DecidableEq α] (a : α) (s : Multiset α)
Goal: a ∈ Multiset.ndinsert a s