ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Set.mem_finset_sum
@[to_additive " The n-ary version of `Set.mem_add`. "]
theorem mem_finset_prod (t : Finset ι) (f : ι → Set α) (a : α) :
    (a ∈ ∏ i ∈ t, f i) ↔ ∃ (g : ι → α) (_ : ∀ {i}, i ∈ t → g i ∈ f i), ∏ i ∈ t, g i = a 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] (t : Finset ι) (f : ι → Set α) (a : α)
Goal: a ∈ ∑ i ∈ t, f i ↔ ∃ g, ∃ (_ : ∀ {i : ι}, i ∈ t → g i ∈ f i), ∑ i ∈ t, g i = a
-- Set.mem_fintype_sum
@[to_additive " A version of `Set.mem_finset_sum` with a simpler RHS for sums over a Fintype. "]
theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α) (_ : ∀ i, g i ∈ f i), ∏ i, g i = a 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] [Fintype ι] (f : ι → Set α) (a : α)
Goal: a ∈ ∑ i : ι, f i ↔ ∃ g, ∃ (_ : ∀ (i : ι), g i ∈ f i), ∑ i : ι, g i = a
-- Set.mem_fintype_prod
@[to_additive " A version of `Set.mem_finset_sum` with a simpler RHS for sums over a Fintype. "]
theorem mem_fintype_prod [Fintype ι] (f : ι → Set α) (a : α) :
    (a ∈ ∏ i, f i) ↔ ∃ (g : ι → α) (_ : ∀ i, g i ∈ f i), ∏ i, g i = a 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] [Fintype ι] (f : ι → Set α) (a : α)
Goal: a ∈ ∏ i : ι, f i ↔ ∃ g, ∃ (_ : ∀ (i : ι), g i ∈ f i), ∏ i : ι, g i = a
-- Set.list_sum_mem_list_sum
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i) :
    (t.map g).prod ∈ (t.map f).prod 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] (t : List ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i)
Goal: (List.map g t).sum ∈ (List.map f t).sum
-- Set.list_prod_mem_list_prod
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem list_prod_mem_list_prod (t : List ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i) :
    (t.map g).prod ∈ (t.map f).prod 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] (t : List ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i)
Goal: (List.map g t).prod ∈ (List.map f t).prod
-- Set.list_sum_subset_list_sum
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) :
    (t.map f₁).prod ⊆ (t.map f₂).prod 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] (t : List ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i)
Goal: (List.map f₁ t).sum ⊆ (List.map f₂ t).sum
-- Set.list_prod_subset_list_prod
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem list_prod_subset_list_prod (t : List ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) :
    (t.map f₁).prod ⊆ (t.map f₂).prod 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] (t : List ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i)
Goal: (List.map f₁ t).prod ⊆ (List.map f₂ t).prod
-- Set.list_sum_singleton
@[to_additive]
theorem list_prod_singleton {M : Type*} [CommMonoid M] (s : List M) :
    (s.map fun i ↦ ({i} : Set M)).prod = {s.prod} 
Arguments: {M : Type u_5} [AddCommMonoid M] (s : List M)
Goal: (List.map (fun i => {i}) s).sum = {s.sum}
-- Set.list_prod_singleton
@[to_additive]
theorem list_prod_singleton {M : Type*} [CommMonoid M] (s : List M) :
    (s.map fun i ↦ ({i} : Set M)).prod = {s.prod} 
Arguments: {M : Type u_5} [CommMonoid M] (s : List M)
Goal: (List.map (fun i => {i}) s).prod = {s.prod}
-- Set.multiset_sum_mem_multiset_sum
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g : ι → α)
    (hg : ∀ i ∈ t, g i ∈ f i) : (t.map g).prod ∈ (t.map f).prod 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] (t : Multiset ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i)
Goal: (Multiset.map g t).sum ∈ (Multiset.map f t).sum
-- Set.multiset_prod_mem_multiset_prod
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem multiset_prod_mem_multiset_prod (t : Multiset ι) (f : ι → Set α) (g : ι → α)
    (hg : ∀ i ∈ t, g i ∈ f i) : (t.map g).prod ∈ (t.map f).prod 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] (t : Multiset ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i)
Goal: (Multiset.map g t).prod ∈ (Multiset.map f t).prod
-- Set.multiset_prod_subset_multiset_prod
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι → Set α)
    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : (t.map f₁).prod ⊆ (t.map f₂).prod 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] (t : Multiset ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i)
Goal: (Multiset.map f₁ t).prod ⊆ (Multiset.map f₂ t).prod
-- Set.multiset_sum_subset_multiset_sum
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem multiset_prod_subset_multiset_prod (t : Multiset ι) (f₁ f₂ : ι → Set α)
    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : (t.map f₁).prod ⊆ (t.map f₂).prod 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] (t : Multiset ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i)
Goal: (Multiset.map f₁ t).sum ⊆ (Multiset.map f₂ t).sum
-- Set.multiset_sum_singleton
@[to_additive]
theorem multiset_prod_singleton {M : Type*} [CommMonoid M] (s : Multiset M) :
    (s.map fun i ↦ ({i} : Set M)).prod = {s.prod} 
Arguments: {M : Type u_5} [AddCommMonoid M] (s : Multiset M)
Goal: (Multiset.map (fun i => {i}) s).sum = {s.sum}
-- Set.multiset_prod_singleton
@[to_additive]
theorem multiset_prod_singleton {M : Type*} [CommMonoid M] (s : Multiset M) :
    (s.map fun i ↦ ({i} : Set M)).prod = {s.prod} 
Arguments: {M : Type u_5} [CommMonoid M] (s : Multiset M)
Goal: (Multiset.map (fun i => {i}) s).prod = {s.prod}
-- Set.finset_prod_mem_finset_prod
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι → α)
    (hg : ∀ i ∈ t, g i ∈ f i) : (∏ i ∈ t, g i) ∈ ∏ i ∈ t, f i 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] (t : Finset ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i)
Goal: ∏ i ∈ t, g i ∈ ∏ i ∈ t, f i
-- Set.finset_sum_mem_finset_sum
@[to_additive " An n-ary version of `Set.add_mem_add`. "]
theorem finset_prod_mem_finset_prod (t : Finset ι) (f : ι → Set α) (g : ι → α)
    (hg : ∀ i ∈ t, g i ∈ f i) : (∏ i ∈ t, g i) ∈ ∏ i ∈ t, f i 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] (t : Finset ι) (f : ι → Set α) (g : ι → α) (hg : ∀ i ∈ t, g i ∈ f i)
Goal: ∑ i ∈ t, g i ∈ ∑ i ∈ t, f i
-- Set.finset_prod_subset_finset_prod
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : ∏ i ∈ t, f₁ i ⊆ ∏ i ∈ t, f₂ i 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] (t : Finset ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i)
Goal: ∏ i ∈ t, f₁ i ⊆ ∏ i ∈ t, f₂ i
-- Set.finset_sum_subset_finset_sum
@[to_additive " An n-ary version of `Set.add_subset_add`. "]
theorem finset_prod_subset_finset_prod (t : Finset ι) (f₁ f₂ : ι → Set α)
    (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i) : ∏ i ∈ t, f₁ i ⊆ ∏ i ∈ t, f₂ i 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] (t : Finset ι) (f₁ f₂ : ι → Set α) (hf : ∀ i ∈ t, f₁ i ⊆ f₂ i)
Goal: ∑ i ∈ t, f₁ i ⊆ ∑ i ∈ t, f₂ i
-- Set.finset_sum_singleton
@[to_additive]
theorem finset_prod_singleton {M ι : Type*} [CommMonoid M] (s : Finset ι) (I : ι → M) :
    ∏ i ∈ s, ({I i} : Set M) = {∏ i ∈ s, I i} 
Arguments: {M : Type u_5} {ι : Type u_6} [AddCommMonoid M] (s : Finset ι) (I : ι → M)
Goal: ∑ i ∈ s, {I i} = {∑ i ∈ s, I i}
-- Set.finset_prod_singleton
@[to_additive]
theorem finset_prod_singleton {M ι : Type*} [CommMonoid M] (s : Finset ι) (I : ι → M) :
    ∏ i ∈ s, ({I i} : Set M) = {∏ i ∈ s, I i} 
Arguments: {M : Type u_5} {ι : Type u_6} [CommMonoid M] (s : Finset ι) (I : ι → M)
Goal: ∏ i ∈ s, {I i} = {∏ i ∈ s, I i}
-- Set.image_finset_prod_pi
@[to_additive "The n-ary version of `Set.add_image_prod`. "]
theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
    (fun f : ι → α => ∏ i ∈ l, f i) '' (l : Set ι).pi S = ∏ i ∈ l, S i 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] (l : Finset ι) (S : ι → Set α)
Goal: (fun f => ∏ i ∈ l, f i) '' (↑l).pi S = ∏ i ∈ l, S i
-- Set.image_finset_sum_pi
@[to_additive "The n-ary version of `Set.add_image_prod`. "]
theorem image_finset_prod_pi (l : Finset ι) (S : ι → Set α) :
    (fun f : ι → α => ∏ i ∈ l, f i) '' (l : Set ι).pi S = ∏ i ∈ l, S i 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] (l : Finset ι) (S : ι → Set α)
Goal: (fun f => ∑ i ∈ l, f i) '' (↑l).pi S = ∑ i ∈ l, S i
-- Set.image_fintype_sum_pi
@[to_additive "A special case of `Set.image_finset_sum_pi` for `Finset.univ`. "]
theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
    (fun f : ι → α => ∏ i, f i) '' univ.pi S = ∏ i, S i 
Arguments: {ι : Type u_1} {α : Type u_2} [AddCommMonoid α] [Fintype ι] (S : ι → Set α)
Goal: (fun f => ∑ i : ι, f i) '' Set.univ.pi S = ∑ i : ι, S i
-- Set.image_fintype_prod_pi
@[to_additive "A special case of `Set.image_finset_sum_pi` for `Finset.univ`. "]
theorem image_fintype_prod_pi [Fintype ι] (S : ι → Set α) :
    (fun f : ι → α => ∏ i, f i) '' univ.pi S = ∏ i, S i 
Arguments: {ι : Type u_1} {α : Type u_2} [CommMonoid α] [Fintype ι] (S : ι → Set α)
Goal: (fun f => ∏ i : ι, f i) '' Set.univ.pi S = ∏ i : ι, S i
-- List.perm_rfl
lemma perm_rfl : l ~ l 
Arguments: {α : Type u_1} {l : List α}
Goal: l.Perm l
-- List.Perm.subset_congr_left
theorem Perm.subset_congr_left {l₁ l₂ l₃ : List α} (h : l₁ ~ l₂) : l₁ ⊆ l₃ ↔ l₂ ⊆ l₃ 
Arguments: {α : Type u_1} {l₁ l₂ l₃ : List α} (h : l₁.Perm l₂)
Goal: l₁ ⊆ l₃ ↔ l₂ ⊆ l₃
-- List.Perm.subset_congr_right
theorem Perm.subset_congr_right {l₁ l₂ l₃ : List α} (h : l₁ ~ l₂) : l₃ ⊆ l₁ ↔ l₃ ⊆ l₂ 
Arguments: {α : Type u_1} {l₁ l₂ l₃ : List α} (h : l₁.Perm l₂)
Goal: l₃ ⊆ l₁ ↔ l₃ ⊆ l₂
-- List.perm_comp_perm
theorem perm_comp_perm : (Perm ∘r Perm : List α → List α → Prop) = Perm 
Arguments: {α : Type u_1}
Goal: Relation.Comp List.Perm List.Perm = List.Perm
-- List.perm_comp_forall₂
theorem perm_comp_forall₂ {l u v} (hlu : Perm l u) (huv : Forall₂ r u v) :
    (Forall₂ r ∘r Perm) l v 
Arguments: {α : Type u_1} {β : Type u_2} {r : α → β → Prop} {l u : List α} {v : List β} (hlu : l.Perm u) (huv : List.Forall₂ r u v)
Goal: Relation.Comp (List.Forall₂ r) List.Perm l v
-- List.forall₂_comp_perm_eq_perm_comp_forall₂
theorem forall₂_comp_perm_eq_perm_comp_forall₂ : Forall₂ r ∘r Perm = Perm ∘r Forall₂ r 
Arguments: {α : Type u_1} {β : Type u_2} {r : α → β → Prop}
Goal: Relation.Comp (List.Forall₂ r) List.Perm = Relation.Comp List.Perm (List.Forall₂ r)
-- List.rel_perm_imp
theorem rel_perm_imp (hr : RightUnique r) : (Forall₂ r ⇒ Forall₂ r ⇒ (· → ·)) Perm Perm 
Arguments: {α : Type u_1} {β : Type u_2} {r : α → β → Prop} (hr : Relator.RightUnique r)
Goal: (List.Forall₂ r ⇒ List.Forall₂ r ⇒ fun x x_1 => x → x_1) List.Perm List.Perm
-- List.rel_perm
theorem rel_perm (hr : BiUnique r) : (Forall₂ r ⇒ Forall₂ r ⇒ (· ↔ ·)) Perm Perm 
Arguments: {α : Type u_1} {β : Type u_2} {r : α → β → Prop} (hr : Relator.BiUnique r)
Goal: (List.Forall₂ r ⇒ List.Forall₂ r ⇒ fun x x_1 => x ↔ x_1) List.Perm List.Perm
-- List.subperm_iff
lemma subperm_iff : l₁ <+~ l₂ ↔ ∃ l, l ~ l₂ ∧ l₁ <+ l 
Arguments: {α : Type u_1} {l₁ l₂ : List α}
Goal: l₁.Subperm l₂ ↔ ∃ l, l.Perm l₂ ∧ l₁.Sublist l
-- List.subperm_singleton_iff
@[simp] lemma subperm_singleton_iff : l <+~ [a] ↔ l = [] ∨ l = [a] 
Arguments: {α : Type u_1} {l : List α} {a : α}
Goal: l.Subperm [a] ↔ l = [] ∨ l = [a]
-- List.subperm_nil
@[simp]
theorem subperm_nil : List.Subperm l [] ↔ l = [] 
Arguments: {α : Type u_1} {l : List α}
Goal: l.Subperm [] ↔ l = []
-- List.subperm_cons_self
lemma subperm_cons_self : l <+~ a :: l 
Arguments: {α : Type u_1} {l : List α} {a : α}
Goal: l.Subperm (a :: l)
-- List.count_eq_count_filter_add
lemma count_eq_count_filter_add [DecidableEq α] (P : α → Prop) [DecidablePred P]
    (l : List α) (a : α) :
    count a l = count a (l.filter P) + count a (l.filter (¬ P ·)) 
Arguments: {α : Type u_1} [DecidableEq α] (P : α → Prop) [DecidablePred P] (l : List α) (a : α)
Goal: List.count a l =
  List.count a (List.filter (fun b => decide (P b)) l) + List.count a (List.filter (fun x => decide ¬P x) l)
-- List.Perm.foldl_eq
theorem Perm.foldl_eq {f : β → α → β} {l₁ l₂ : List α} (rcomm : RightCommutative f) (p : l₁ ~ l₂) :
    ∀ b, foldl f b l₁ = foldl f b l₂ 
Arguments: {α : Type u_1} {β : Type u_2} {f : β → α → β} {l₁ l₂ : List α} (rcomm : RightCommutative f) (p : l₁.Perm l₂) (b : β)
Goal: List.foldl f b l₁ = List.foldl f b l₂
-- List.Perm.foldr_eq
theorem Perm.foldr_eq {f : α → β → β} {l₁ l₂ : List α} (lcomm : LeftCommutative f) (p : l₁ ~ l₂) :
    ∀ b, foldr f b l₁ = foldr f b l₂ 
Arguments: {α : Type u_1} {β : Type u_2} {f : α → β → β} {l₁ l₂ : List α} (lcomm : LeftCommutative f) (p : l₁.Perm l₂) (b : β)
Goal: List.foldr f b l₁ = List.foldr f b l₂
-- List.Perm.fold_op_eq
theorem Perm.fold_op_eq {l₁ l₂ : List α} {a : α} (h : l₁ ~ l₂) : (l₁ <*> a) = l₂ <*> a 
Arguments: {α : Type u_1} {op : α → α → α} [IA : Std.Associative op] [IC : Std.Commutative op] {l₁ l₂ : List α} {a : α} (h : l₁.Perm l₂)
Goal: List.foldl op a l₁ = List.foldl op a l₂
-- List.perm_option_to_list
theorem perm_option_to_list {o₁ o₂ : Option α} : o₁.toList ~ o₂.toList ↔ o₁ = o₂ 
Arguments: {α : Type u_1} {o₁ o₂ : Option α}
Goal: o₁.toList.Perm o₂.toList ↔ o₁ = o₂
-- List.cons_subperm_of_mem
theorem cons_subperm_of_mem {a : α} {l₁ l₂ : List α} (d₁ : Nodup l₁) (h₁ : a ∉ l₁) (h₂ : a ∈ l₂)
    (s : l₁ <+~ l₂) : a :: l₁ <+~ l₂ 
Arguments: {α : Type u_1} {a : α} {l₁ l₂ : List α} (d₁ : l₁.Nodup) (h₁ : a ∉ l₁) (h₂ : a ∈ l₂) (s : l₁.Subperm l₂)
Goal: (a :: l₁).Subperm l₂
-- List.Nodup.subperm
protected theorem Nodup.subperm (d : Nodup l₁) (H : l₁ ⊆ l₂) : l₁ <+~ l₂ 
Arguments: {α : Type u_1} {l₁ l₂ : List α} (d : l₁.Nodup) (H : l₁ ⊆ l₂)
Goal: l₁.Subperm l₂
-- List.Perm.bagInter_right
theorem Perm.bagInter_right {l₁ l₂ : List α} (t : List α) (h : l₁ ~ l₂) :
    l₁.bagInter t ~ l₂.bagInter t 
Arguments: {α : Type u_1} [DecidableEq α] {l₁ l₂ : List α} (t : List α) (h : l₁.Perm l₂)
Goal: (l₁.bagInter t).Perm (l₂.bagInter t)
-- List.Perm.bagInter_left
theorem Perm.bagInter_left (l : List α) {t₁ t₂ : List α} (p : t₁ ~ t₂) :
    l.bagInter t₁ = l.bagInter t₂ 
Arguments: {α : Type u_1} [DecidableEq α] (l : List α) {t₁ t₂ : List α} (p : t₁.Perm t₂)
Goal: l.bagInter t₁ = l.bagInter t₂
-- List.Perm.bagInter
theorem Perm.bagInter {l₁ l₂ t₁ t₂ : List α} (hl : l₁ ~ l₂) (ht : t₁ ~ t₂) :
    l₁.bagInter t₁ ~ l₂.bagInter t₂ 
Arguments: {α : Type u_1} [DecidableEq α] {l₁ l₂ t₁ t₂ : List α} (hl : l₁.Perm l₂) (ht : t₁.Perm t₂)
Goal: (l₁.bagInter t₁).Perm (l₂.bagInter t₂)
-- List.perm_replicate_append_replicate
theorem perm_replicate_append_replicate {l : List α} {a b : α} {m n : ℕ} (h : a ≠ b) :
    l ~ replicate m a ++ replicate n b ↔ count a l = m ∧ count b l = n ∧ l ⊆ [a, b] 
Arguments: {α : Type u_1} [DecidableEq α] {l : List α} {a b : α} {m n : ℕ} (h : a ≠ b)
Goal: l.Perm (List.replicate m a ++ List.replicate n b) ↔ List.count a l = m ∧ List.count b l = n ∧ l ⊆ [a, b]
-- List.Perm.dedup
theorem Perm.dedup {l₁ l₂ : List α} (p : l₁ ~ l₂) : dedup l₁ ~ dedup l₂ 
Arguments: {α : Type u_1} [DecidableEq α] {l₁ l₂ : List α} (p : l₁.Perm l₂)
Goal: l₁.dedup.Perm l₂.dedup
-- List.Perm.inter_append
theorem Perm.inter_append {l t₁ t₂ : List α} (h : Disjoint t₁ t₂) :
    l ∩ (t₁ ++ t₂) ~ l ∩ t₁ ++ l ∩ t₂ 
Arguments: {α : Type u_1} [DecidableEq α] {l t₁ t₂ : List α} (h : t₁.Disjoint t₂)
Goal: (l ∩ (t₁ ++ t₂)).Perm (l ∩ t₁ ++ l ∩ t₂)
-- List.Perm.bind_left
theorem Perm.bind_left (l : List α) {f g : α → List β} (h : ∀ a ∈ l, f a ~ g a) :
    l.bind f ~ l.bind g 
Arguments: {α : Type u_1} {β : Type u_2} (l : List α) {f g : α → List β} (h : ∀ a ∈ l, (f a).Perm (g a))
Goal: (l.bind f).Perm (l.bind g)
-- List.bind_append_perm
theorem bind_append_perm (l : List α) (f g : α → List β) :
    l.bind f ++ l.bind g ~ l.bind fun x => f x ++ g x 
Arguments: {α : Type u_1} {β : Type u_2} (l : List α) (f g : α → List β)
Goal: (l.bind f ++ l.bind g).Perm (l.bind fun x => f x ++ g x)
-- List.map_append_bind_perm
theorem map_append_bind_perm (l : List α) (f : α → β) (g : α → List β) :
    l.map f ++ l.bind g ~ l.bind fun x => f x :: g x 
Arguments: {α : Type u_1} {β : Type u_2} (l : List α) (f : α → β) (g : α → List β)
Goal: (List.map f l ++ l.bind g).Perm (l.bind fun x => f x :: g x)
-- List.Perm.product_right
theorem Perm.product_right {l₁ l₂ : List α} (t₁ : List β) (p : l₁ ~ l₂) :
    product l₁ t₁ ~ product l₂ t₁ 
Arguments: {α : Type u_1} {β : Type u_2} {l₁ l₂ : List α} (t₁ : List β) (p : l₁.Perm l₂)
Goal: (l₁.product t₁).Perm (l₂.product t₁)
-- List.Perm.product_left
theorem Perm.product_left (l : List α) {t₁ t₂ : List β} (p : t₁ ~ t₂) :
    product l t₁ ~ product l t₂ 
Arguments: {α : Type u_1} {β : Type u_2} (l : List α) {t₁ t₂ : List β} (p : t₁.Perm t₂)
Goal: (l.product t₁).Perm (l.product t₂)
-- List.Perm.product
theorem Perm.product {l₁ l₂ : List α} {t₁ t₂ : List β} (p₁ : l₁ ~ l₂) (p₂ : t₁ ~ t₂) :
    product l₁ t₁ ~ product l₂ t₂ 
Arguments: {α : Type u_1} {β : Type u_2} {l₁ l₂ : List α} {t₁ t₂ : List β} (p₁ : l₁.Perm l₂) (p₂ : t₁.Perm t₂)
Goal: (l₁.product t₁).Perm (l₂.product t₂)
-- List.perm_lookmap
theorem perm_lookmap (f : α → Option α) {l₁ l₂ : List α}
    (H : Pairwise (fun a b => ∀ c ∈ f a, ∀ d ∈ f b, a = b ∧ c = d) l₁) (p : l₁ ~ l₂) :
    lookmap f l₁ ~ lookmap f l₂ 
Arguments: {α : Type u_1} (f : α → Option α) {l₁ l₂ : List α} (H : List.Pairwise (fun a b => ∀ c ∈ f a, ∀ d ∈ f b, a = b ∧ c = d) l₁) (p : l₁.Perm l₂)
Goal: (List.lookmap f l₁).Perm (List.lookmap f l₂)
-- List.Perm.take_inter
theorem Perm.take_inter [DecidableEq α] {xs ys : List α} (n : ℕ) (h : xs ~ ys)
    (h' : ys.Nodup) : xs.take n ~ ys.inter (xs.take n) 
Arguments: {α : Type u_1} [DecidableEq α] {xs ys : List α} (n : ℕ) (h : xs.Perm ys) (h' : ys.Nodup)
Goal: (List.take n xs).Perm (ys.inter (List.take n xs))
-- List.Perm.drop_inter
theorem Perm.drop_inter [DecidableEq α] {xs ys : List α} (n : ℕ) (h : xs ~ ys) (h' : ys.Nodup) :
    xs.drop n ~ ys.inter (xs.drop n) 
Arguments: {α : Type u_1} [DecidableEq α] {xs ys : List α} (n : ℕ) (h : xs.Perm ys) (h' : ys.Nodup)
Goal: (List.drop n xs).Perm (ys.inter (List.drop n xs))
-- List.Perm.dropSlice_inter
theorem Perm.dropSlice_inter [DecidableEq α] {xs ys : List α} (n m : ℕ) (h : xs ~ ys)
    (h' : ys.Nodup) : List.dropSlice n m xs ~ ys ∩ List.dropSlice n m xs 
Arguments: {α : Type u_1} [DecidableEq α] {xs ys : List α} (n m : ℕ) (h : xs.Perm ys) (h' : ys.Nodup)
Goal: (List.dropSlice n m xs).Perm (ys ∩ List.dropSlice n m xs)
-- List.perm_of_mem_permutationsAux
theorem perm_of_mem_permutationsAux :
    ∀ {ts is l : List α}, l ∈ permutationsAux ts is → l ~ ts ++ is 
Arguments: {α : Type u_1} {ts is l : List α}
Goal: l ∈ ts.permutationsAux is → l.Perm (ts ++ is)
-- List.perm_of_mem_permutations
theorem perm_of_mem_permutations {l₁ l₂ : List α} (h : l₁ ∈ permutations l₂) : l₁ ~ l₂ 
Arguments: {α : Type u_1} {l₁ l₂ : List α} (h : l₁ ∈ l₂.permutations)
Goal: l₁.Perm l₂
-- List.length_permutationsAux
theorem length_permutationsAux :
    ∀ ts is : List α, length (permutationsAux ts is) + is.length ! = (length ts + length is)! 
Arguments: {α : Type u_1} (ts is : List α)
Goal: (ts.permutationsAux is).length + is.length ! = (ts.length + is.length)!
-- List.length_permutations
theorem length_permutations (l : List α) : length (permutations l) = (length l)! 
Arguments: {α : Type u_1} (l : List α)
Goal: l.permutations.length = l.length !
-- List.mem_permutations_of_perm_lemma
theorem mem_permutations_of_perm_lemma {is l : List α}
    (H : l ~ [] ++ is → (∃ (ts' : _) (_ : ts' ~ []), l = ts' ++ is) ∨ l ∈ permutationsAux is []) :
    l ~ is → l ∈ permutations is 
Arguments: {α : Type u_1} {is l : List α} (H : l.Perm ([] ++ is) → (∃ ts', ∃ (_ : ts'.Perm []), l = ts' ++ is) ∨ l ∈ is.permutationsAux [])
Goal: l.Perm is → l ∈ is.permutations
-- List.mem_permutationsAux_of_perm
theorem mem_permutationsAux_of_perm :
    ∀ {ts is l : List α},
      l ~ is ++ ts → (∃ (is' : _) (_ : is' ~ is), l = is' ++ ts) ∨ l ∈ permutationsAux ts is 
Arguments: {α : Type u_1} {ts is l : List α}
Goal: l.Perm (is ++ ts) → (∃ is', ∃ (_ : is'.Perm is), l = is' ++ ts) ∨ l ∈ ts.permutationsAux is
-- List.mem_permutations
@[simp]
theorem mem_permutations {s t : List α} : s ∈ permutations t ↔ s ~ t 
Arguments: {α : Type u_1} {s t : List α}
Goal: s ∈ t.permutations ↔ s.Perm t
-- _private.Mathlib.Data.List.Perm.0.List.DecEq_eq
private theorem DecEq_eq [DecidableEq α] :
    List.instBEq = @instBEqOfDecidableEq (List α) instDecidableEqList 
Arguments: {α : Type u_1} [DecidableEq α]
Goal: List.instBEq = instBEqOfDecidableEq
-- List.perm_permutations'Aux_comm
theorem perm_permutations'Aux_comm (a b : α) (l : List α) :
    (permutations'Aux a l).bind (permutations'Aux b) ~
      (permutations'Aux b l).bind (permutations'Aux a) 
Arguments: {α : Type u_1} (a b : α) (l : List α)
Goal: ((List.permutations'Aux a l).bind (List.permutations'Aux b)).Perm
  ((List.permutations'Aux b l).bind (List.permutations'Aux a))
-- List.Perm.permutations'
theorem Perm.permutations' {s t : List α} (p : s ~ t) : permutations' s ~ permutations' t 
Arguments: {α : Type u_1} {s t : List α} (p : s.Perm t)
Goal: s.permutations'.Perm t.permutations'
-- List.permutations_perm_permutations'
theorem permutations_perm_permutations' (ts : List α) : ts.permutations ~ ts.permutations' 
Arguments: {α : Type u_1} (ts : List α)
Goal: ts.permutations.Perm ts.permutations'
-- List.mem_permutations'
@[simp]
theorem mem_permutations' {s t : List α} : s ∈ permutations' t ↔ s ~ t 
Arguments: {α : Type u_1} {s t : List α}
Goal: s ∈ t.permutations' ↔ s.Perm t
-- List.Perm.permutations
theorem Perm.permutations {s t : List α} (h : s ~ t) : permutations s ~ permutations t 
Arguments: {α : Type u_1} {s t : List α} (h : s.Perm t)
Goal: s.permutations.Perm t.permutations
-- List.perm_permutations_iff
@[simp]
theorem perm_permutations_iff {s t : List α} : permutations s ~ permutations t ↔ s ~ t 
Arguments: {α : Type u_1} {s t : List α}
Goal: s.permutations.Perm t.permutations ↔ s.Perm t
-- List.perm_permutations'_iff
@[simp]
theorem perm_permutations'_iff {s t : List α} : permutations' s ~ permutations' t ↔ s ~ t 
Arguments: {α : Type u_1} {s t : List α}
Goal: s.permutations'.Perm t.permutations' ↔ s.Perm t
-- List.getElem_permutations'Aux
theorem getElem_permutations'Aux (s : List α) (x : α) (n : ℕ)
    (hn : n < length (permutations'Aux x s)) :
    (permutations'Aux x s)[n] = s.insertNth n x 
Arguments: {α : Type u_1} (s : List α) (x : α) (n : ℕ) (hn : n < (List.permutations'Aux x s).length)
Goal: (List.permutations'Aux x s)[n] = List.insertNth n x s
-- List.get_permutations'Aux
theorem get_permutations'Aux (s : List α) (x : α) (n : ℕ)
    (hn : n < length (permutations'Aux x s)) :
    (permutations'Aux x s).get ⟨n, hn⟩ = s.insertNth n x 
Arguments: {α : Type u_1} (s : List α) (x : α) (n : ℕ) (hn : n < (List.permutations'Aux x s).length)
Goal: (List.permutations'Aux x s).get ⟨n, hn⟩ = List.insertNth n x s
-- List.nthLe_permutations'Aux
@[deprecated get_permutations'Aux (since := "2024-04-23")]
theorem nthLe_permutations'Aux (s : List α) (x : α) (n : ℕ)
    (hn : n < length (permutations'Aux x s)) :
    (permutations'Aux x s).nthLe n hn = s.insertNth n x 
Arguments: {α : Type u_1} (s : List α) (x : α) (n : ℕ) (hn : n < (List.permutations'Aux x s).length)
Goal: (List.permutations'Aux x s).nthLe n hn = List.insertNth n x s
-- List.count_permutations'Aux_self
theorem count_permutations'Aux_self [DecidableEq α] (l : List α) (x : α) :
    count (x :: l) (permutations'Aux x l) = length (takeWhile (x = ·) l) + 1 
Arguments: {α : Type u_1} [DecidableEq α] (l : List α) (x : α)
Goal: List.count (x :: l) (List.permutations'Aux x l) = (List.takeWhile (fun x_1 => decide (x = x_1)) l).length + 1
-- List.length_permutations'Aux
@[simp]
theorem length_permutations'Aux (s : List α) (x : α) :
    length (permutations'Aux x s) = length s + 1 
Arguments: {α : Type u_1} (s : List α) (x : α)
Goal: (List.permutations'Aux x s).length = s.length + 1