ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
File: Mathlib/Data/Vector/Mem.lean

full_name: Mathlib.Vector.get_mem
code: @[simp]
theorem get_mem (i : Fin n) (v : Vector α n) : v.get i ∈ v.toList 
goal: v.get i ∈ v.toList

full_name: Mathlib.Vector.mem_iff_get
code: theorem mem_iff_get (v : Vector α n) : a ∈ v.toList ↔ ∃ i, v.get i = a 
goal: a ∈ v.toList ↔ ∃ i, v.get i = a

full_name: Mathlib.Vector.not_mem_nil
code: theorem not_mem_nil : a ∉ (Vector.nil : Vector α 0).toList 
goal: a ∉ Mathlib.Vector.nil.toList

full_name: Mathlib.Vector.not_mem_zero
code: theorem not_mem_zero (v : Vector α 0) : a ∉ v.toList 
goal: a ∉ v.toList

full_name: Mathlib.Vector.mem_cons_iff
code: theorem mem_cons_iff (v : Vector α n) : a' ∈ (a ::ᵥ v).toList ↔ a' = a ∨ a' ∈ v.toList 
goal: a' ∈ (a ::ᵥ v).toList ↔ a' = a ∨ a' ∈ v.toList

full_name: Mathlib.Vector.mem_succ_iff
code: theorem mem_succ_iff (v : Vector α (n + 1)) : a ∈ v.toList ↔ a = v.head ∨ a ∈ v.tail.toList 
goal: a ∈ v.toList ↔ a = v.head ∨ a ∈ v.tail.toList

full_name: Mathlib.Vector.mem_cons_self
code: theorem mem_cons_self (v : Vector α n) : a ∈ (a ::ᵥ v).toList 
goal: a ∈ (a ::ᵥ v).toList

full_name: Mathlib.Vector.head_mem
code: @[simp]
theorem head_mem (v : Vector α (n + 1)) : v.head ∈ v.toList 
goal: v.head ∈ v.toList

full_name: Mathlib.Vector.mem_cons_of_mem
code: theorem mem_cons_of_mem (v : Vector α n) (ha' : a' ∈ v.toList) : a' ∈ (a ::ᵥ v).toList 
goal: a' ∈ (a ::ᵥ v).toList

full_name: Mathlib.Vector.mem_of_mem_tail
code: theorem mem_of_mem_tail (v : Vector α n) (ha : a ∈ v.tail.toList) : a ∈ v.toList 
goal: a ∈ v.toList

full_name: Mathlib.Vector.mem_map_iff
code: theorem mem_map_iff (b : β) (v : Vector α n) (f : α → β) :
    b ∈ (v.map f).toList ↔ ∃ a : α, a ∈ v.toList ∧ f a = b 
goal: b ∈ (Mathlib.Vector.map f v).toList ↔ ∃ a ∈ v.toList, f a = b

full_name: Mathlib.Vector.not_mem_map_zero
code: theorem not_mem_map_zero (b : β) (v : Vector α 0) (f : α → β) : b ∉ (v.map f).toList 
goal: b ∉ (Mathlib.Vector.map f v).toList

full_name: Mathlib.Vector.mem_map_succ_iff
code: theorem mem_map_succ_iff (b : β) (v : Vector α (n + 1)) (f : α → β) :
    b ∈ (v.map f).toList ↔ f v.head = b ∨ ∃ a : α, a ∈ v.tail.toList ∧ f a = b 
goal: b ∈ (Mathlib.Vector.map f v).toList ↔ f v.head = b ∨ ∃ a ∈ v.tail.toList, f a = b
File: Mathlib/Data/Vector/Zip.lean

full_name: Mathlib.Vector.zipWith
code: /-- Apply the function `f : α → β → γ` to each corresponding pair of elements from two vectors. -/
def zipWith : Vector α n → Vector β n → Vector γ n 
goal: Mathlib.Vector α n → Mathlib.Vector β n → Mathlib.Vector γ n

full_name: Mathlib.Vector.zipWith_toList
code: @[simp]
theorem zipWith_toList (x : Vector α n) (y : Vector β n) :
    (Vector.zipWith f x y).toList = List.zipWith f x.toList y.toList 
goal: (Mathlib.Vector.zipWith f x y).toList = List.zipWith f x.toList y.toList

full_name: Mathlib.Vector.zipWith_get
code: @[simp]
theorem zipWith_get (x : Vector α n) (y : Vector β n) (i) :
    (Vector.zipWith f x y).get i = f (x.get i) (y.get i) 
goal: (Mathlib.Vector.zipWith f x y).get i = f (x.get i) (y.get i)

full_name: Mathlib.Vector.zipWith_tail
code: @[simp]
theorem zipWith_tail (x : Vector α n) (y : Vector β n) :
    (Vector.zipWith f x y).tail = Vector.zipWith f x.tail y.tail 
goal: (Mathlib.Vector.zipWith f x y).tail = Mathlib.Vector.zipWith f x.tail y.tail

full_name: Mathlib.Vector.sum_add_sum_eq_sum_zipWith
code: @[to_additive]
theorem prod_mul_prod_eq_prod_zipWith [CommMonoid α] (x y : Vector α n) :
    x.toList.prod * y.toList.prod = (Vector.zipWith (· * ·) x y).toList.prod 
goal: x.toList.sum + y.toList.sum = (Mathlib.Vector.zipWith (fun x x_1 => x + x_1) x y).toList.sum

full_name: Mathlib.Vector.prod_mul_prod_eq_prod_zipWith
code: @[to_additive]
theorem prod_mul_prod_eq_prod_zipWith [CommMonoid α] (x y : Vector α n) :
    x.toList.prod * y.toList.prod = (Vector.zipWith (· * ·) x y).toList.prod 
goal: x.toList.prod * y.toList.prod = (Mathlib.Vector.zipWith (fun x x_1 => x * x_1) x y).toList.prod
File: Mathlib/Data/NNRat/Lemmas.lean

full_name: NNRat.instMulActionOfRat
code: /-- A `MulAction` over `ℚ` restricts to a `MulAction` over `ℚ≥0`. -/
instance [MulAction ℚ α] : MulAction ℚ≥0 α 
goal: MulAction ℚ≥0 α

full_name: NNRat.instDistribMulActionOfRat
code: /-- A `DistribMulAction` over `ℚ` restricts to a `DistribMulAction` over `ℚ≥0`. -/
instance [AddCommMonoid α] [DistribMulAction ℚ α] : DistribMulAction ℚ≥0 α 
goal: DistribMulAction ℚ≥0 α

full_name: NNRat.coe_indicator
code: @[simp, norm_cast]
lemma coe_indicator (s : Set α) (f : α → ℚ≥0) (a : α) :
    ((s.indicator f a : ℚ≥0) : ℚ) = s.indicator (fun x ↦ ↑(f x)) a 
goal: ↑(s.indicator f a) = s.indicator (fun x => ↑(f x)) a

full_name: Rat.toNNRat_inv
code: lemma toNNRat_inv (q : ℚ) : toNNRat q⁻¹ = (toNNRat q)⁻¹ 
goal: q⁻¹.toNNRat = q.toNNRat⁻¹

full_name: Rat.toNNRat_div
code: lemma toNNRat_div (hp : 0 ≤ p) : toNNRat (p / q) = toNNRat p / toNNRat q 
goal: (p / q).toNNRat = p.toNNRat / q.toNNRat

full_name: Rat.toNNRat_div'
code: lemma toNNRat_div' (hq : 0 ≤ q) : toNNRat (p / q) = toNNRat p / toNNRat q 
goal: (p / q).toNNRat = p.toNNRat / q.toNNRat

full_name: NNRat.num_div_den
code: @[simp]
lemma num_div_den (q : ℚ≥0) : (q.num : ℚ≥0) / q.den = q 
goal: ↑q.num / ↑q.den = q

full_name: NNRat.rec
code: /-- A recursor for nonnegative rationals in terms of numerators and denominators. -/
protected def rec {α : ℚ≥0 → Sort*} (h : ∀ m n : ℕ, α (m / n)) (q : ℚ≥0) : α q 
goal: α q
File: Mathlib/Data/Ordering/Basic.lean

full_name: instReprOrdering_mathlib
code: Repr
goal: Repr Ordering

full_name: Ordering.orElse
code: /-- Combine two `Ordering`s lexicographically. -/
@[inline]
def orElse : Ordering → Ordering → Ordering
  
goal: Ordering → Ordering → Ordering

full_name: Ordering.toRel
code: /-- The relation corresponding to each `Ordering` constructor (e.g. `.lt.toProp a b` is `a < b`). -/
def toRel {α : Type u} [LT α] : Ordering → α → α → Prop
  
goal: Ordering → α → α → Prop

full_name: cmpUsing
code: /--
Lift a decidable relation to an `Ordering`,
assuming that incomparable terms are `Ordering.eq`.
-/
def cmpUsing {α : Type u} (lt : α → α → Prop) [DecidableRel lt] (a b : α) : Ordering 
goal: Ordering

full_name: cmp
code: /--
Construct an `Ordering` from a type with a decidable `LT` instance,
assuming that incomparable terms are `Ordering.eq`.
-/
def cmp {α : Type u} [LT α] [DecidableRel ((· < ·) : α → α → Prop)] (a b : α) : Ordering 
goal: Ordering
File: Mathlib/Data/HashMap.lean

full_name: Batteries.HashMap.keys
code: /-- The list of keys in a `HashMap`. -/
@[deprecated "This declaration is unused in Mathlib: if you need it, \
  please file an issue in the Batteries repository." (since := "2024-06-12")]
def keys (m : HashMap α β) : List α 
goal: List α

full_name: Batteries.HashMap.values
code: /-- The list of values in a `HashMap`. -/
@[deprecated "This declaration is unused in Mathlib: if you need it, \
  please file an issue in the Batteries repository." (since := "2024-06-12")]
def values (m : HashMap α β) : List β 
goal: List β

full_name: Batteries.HashMap.consVal
code: /-- Add a value to a `HashMap α (List β)` viewed as a multimap. -/
@[deprecated "This declaration is unused in Mathlib: if you need it, \
  please file an issue in the Batteries repository." (since := "2024-06-12")]
def consVal (self : HashMap α (List β)) (a : α) (b : β) : HashMap α (List β) 
goal: Batteries.HashMap α (List β)

full_name: Batteries.RBSet.insertList
code: /-- Insert all elements of a list into an `RBSet`. -/
@[deprecated "This declaration is unused in Mathlib: if you need it, \
  please file an issue in the Batteries repository." (since := "2024-06-12")]
def insertList {cmp} (m : RBSet α cmp) (L : List α) : RBSet α cmp 
goal: Batteries.RBSet α cmp
File: Mathlib/Data/Bracket.lean

full_name: Bracket.bracket
code: /-- The `Bracket` class has three intended uses:
  1. for certain binary operations on structures, like the product `⁅x, y⁆` of two elements
    `x`, `y` in a Lie algebra or the commutator of two elements `x` and `y` in a group.
  2. for certain actions of one structure on another, like the action `⁅x, m⁆` of an element `x`
    of a Lie algebra on an element `m` in one of its modules (analogous to `SMul` in the
    associative setting).
  3. for binary operations on substructures, like the commutator `⁅H, K⁆` of two subgroups `H` and
     `K` of a group. -/
class Bracket (L M : Type*) where
  /-- `⁅x, y⁆` is the result of a bracket operation on elements `x` and `y`.
  It is supported by the `Bracket` typeclass. -/
  bracket : L → M → M
goal: L → M → M

full_name: Bracket
code: /-- The `Bracket` class has three intended uses:
  1. for certain binary operations on structures, like the product `⁅x, y⁆` of two elements
    `x`, `y` in a Lie algebra or the commutator of two elements `x` and `y` in a group.
  2. for certain actions of one structure on another, like the action `⁅x, m⁆` of an element `x`
    of a Lie algebra on an element `m` in one of its modules (analogous to `SMul` in the
    associative setting).
  3. for binary operations on substructures, like the commutator `⁅H, K⁆` of two subgroups `H` and
     `K` of a group. -/
class Bracket (L M : Type*) where
  /-- `⁅x, y⁆` is the result of a bracket operation on elements `x` and `y`.
  It is supported by the `Bracket` typeclass. -/
  bracket : L → M → M
goal: Type (max u_1 u_2)

full_name: «_aux_Mathlib_Data_Bracket___macroRules_term⁅_,_⁆_1»
code: @[inherit_doc] notation "⁅" x ", " y "⁆" => Bracket.bracket x y
goal: Lean.Macro

full_name: _aux_Mathlib_Data_Bracket___unexpand_Bracket_bracket_1
code: @[inherit_doc] notation "⁅" x ", " y "⁆" => Bracket.bracket x y
goal: Lean.PrettyPrinter.Unexpander
File: Mathlib/Data/NNRat/BigOperators.lean

full_name: NNRat.coe_list_sum
code: @[norm_cast]
theorem coe_list_sum (l : List ℚ≥0) : (l.sum : ℚ) = (l.map (↑)).sum 
goal: ↑l.sum = (List.map NNRat.cast l).sum

full_name: NNRat.coe_list_prod
code: @[norm_cast]
theorem coe_list_prod (l : List ℚ≥0) : (l.prod : ℚ) = (l.map (↑)).prod 
goal: ↑l.prod = (List.map NNRat.cast l).prod

full_name: NNRat.coe_multiset_sum
code: @[norm_cast]
theorem coe_multiset_sum (s : Multiset ℚ≥0) : (s.sum : ℚ) = (s.map (↑)).sum 
goal: ↑s.sum = (Multiset.map NNRat.cast s).sum

full_name: NNRat.coe_multiset_prod
code: @[norm_cast]
theorem coe_multiset_prod (s : Multiset ℚ≥0) : (s.prod : ℚ) = (s.map (↑)).prod 
goal: ↑s.prod = (Multiset.map NNRat.cast s).prod

full_name: NNRat.coe_sum
code: @[norm_cast]
theorem coe_sum {s : Finset α} {f : α → ℚ≥0} : ↑(∑ a ∈ s, f a) = ∑ a ∈ s, (f a : ℚ) 
goal: ↑(∑ a ∈ s, f a) = ∑ a ∈ s, ↑(f a)

full_name: NNRat.toNNRat_sum_of_nonneg
code: theorem toNNRat_sum_of_nonneg {s : Finset α} {f : α → ℚ} (hf : ∀ a, a ∈ s → 0 ≤ f a) :
    (∑ a ∈ s, f a).toNNRat = ∑ a ∈ s, (f a).toNNRat 
goal: (∑ a ∈ s, f a).toNNRat = ∑ a ∈ s, (f a).toNNRat

full_name: NNRat.coe_prod
code: @[norm_cast]
theorem coe_prod {s : Finset α} {f : α → ℚ≥0} : ↑(∏ a ∈ s, f a) = ∏ a ∈ s, (f a : ℚ) 
goal: ↑(∏ a ∈ s, f a) = ∏ a ∈ s, ↑(f a)

full_name: NNRat.toNNRat_prod_of_nonneg
code: theorem toNNRat_prod_of_nonneg {s : Finset α} {f : α → ℚ} (hf : ∀ a ∈ s, 0 ≤ f a) :
    (∏ a ∈ s, f a).toNNRat = ∏ a ∈ s, (f a).toNNRat 
goal: (∏ a ∈ s, f a).toNNRat = ∏ a ∈ s, (f a).toNNRat
File: Mathlib/Data/Ordering/Lemmas.lean

full_name: Ordering.ite_eq_lt_distrib
code: @[simp]
theorem ite_eq_lt_distrib (c : Prop) [Decidable c] (a b : Ordering) :
    ((if c then a else b) = Ordering.lt) = if c then a = Ordering.lt else b = Ordering.lt 
goal: ((if c then a else b) = Ordering.lt) = if c then a = Ordering.lt else b = Ordering.lt

full_name: Ordering.ite_eq_eq_distrib
code: @[simp]
theorem ite_eq_eq_distrib (c : Prop) [Decidable c] (a b : Ordering) :
    ((if c then a else b) = Ordering.eq) = if c then a = Ordering.eq else b = Ordering.eq 
goal: ((if c then a else b) = Ordering.eq) = if c then a = Ordering.eq else b = Ordering.eq

full_name: Ordering.ite_eq_gt_distrib
code: @[simp]
theorem ite_eq_gt_distrib (c : Prop) [Decidable c] (a b : Ordering) :
    ((if c then a else b) = Ordering.gt) = if c then a = Ordering.gt else b = Ordering.gt 
goal: ((if c then a else b) = Ordering.gt) = if c then a = Ordering.gt else b = Ordering.gt

full_name: cmpUsing_eq_lt
code: @[simp]
theorem cmpUsing_eq_lt (a b : α) : (cmpUsing lt a b = Ordering.lt) = lt a b 
goal: (cmpUsing lt a b = Ordering.lt) = lt a b

full_name: cmpUsing_eq_gt
code: @[simp]
theorem cmpUsing_eq_gt [IsStrictOrder α lt] (a b : α) : cmpUsing lt a b = Ordering.gt ↔ lt b a 
goal: cmpUsing lt a b = Ordering.gt ↔ lt b a

full_name: cmpUsing_eq_eq
code: @[simp]
theorem cmpUsing_eq_eq (a b : α) : cmpUsing lt a b = Ordering.eq ↔ ¬lt a b ∧ ¬lt b a 
goal: cmpUsing lt a b = Ordering.eq ↔ ¬lt a b ∧ ¬lt b a
File: Mathlib/Data/Multiset/Range.lean

full_name: Multiset.range
code: /-- `range n` is the multiset lifted from the list `range n`,
  that is, the set `{0, 1, ..., n-1}`. -/
def range (n : ℕ) : Multiset ℕ 
goal: Multiset ℕ

full_name: Multiset.coe_range
code: theorem coe_range (n : ℕ) : ↑(List.range n) = range n 
goal: ↑(List.range n) = Multiset.range n

full_name: Multiset.range_zero
code: @[simp]
theorem range_zero : range 0 = 0 
goal: Multiset.range 0 = 0

full_name: Multiset.range_succ
code: @[simp]
theorem range_succ (n : ℕ) : range (succ n) = n ::ₘ range n 
goal: Multiset.range n.succ = n ::ₘ Multiset.range n

full_name: Multiset.card_range
code: @[simp]
theorem card_range (n : ℕ) : card (range n) = n 
goal: Multiset.card (Multiset.range n) = n

full_name: Multiset.range_subset
code: theorem range_subset {m n : ℕ} : range m ⊆ range n ↔ m ≤ n 
goal: Multiset.range m ⊆ Multiset.range n ↔ m ≤ n

full_name: Multiset.mem_range
code: @[simp]
theorem mem_range {m n : ℕ} : m ∈ range n ↔ m < n 
goal: m ∈ Multiset.range n ↔ m < n

full_name: Multiset.not_mem_range_self
code: theorem not_mem_range_self {n : ℕ} : n ∉ range n 
goal: n ∉ Multiset.range n

full_name: Multiset.self_mem_range_succ
code: theorem self_mem_range_succ (n : ℕ) : n ∈ range (n + 1) 
goal: n ∈ Multiset.range (n + 1)

full_name: Multiset.range_add
code: theorem range_add (a b : ℕ) : range (a + b) = range a + (range b).map (a + ·) 
goal: Multiset.range (a + b) = Multiset.range a + Multiset.map (fun x => a + x) (Multiset.range b)

full_name: Multiset.range_disjoint_map_add
code: theorem range_disjoint_map_add (a : ℕ) (m : Multiset ℕ) :
    (range a).Disjoint (m.map (a + ·)) 
goal: (Multiset.range a).Disjoint (Multiset.map (fun x => a + x) m)

full_name: Multiset.range_add_eq_union
code: theorem range_add_eq_union (a b : ℕ) : range (a + b) = range a ∪ (range b).map (a + ·) 
goal: Multiset.range (a + b) = Multiset.range a ∪ Multiset.map (fun x => a + x) (Multiset.range b)
File: Mathlib/Data/Multiset/Sum.lean

full_name: Multiset.disjSum
code: /-- Disjoint sum of multisets. -/
def disjSum : Multiset (α ⊕ β) 
goal: Multiset (α ⊕ β)

full_name: Multiset.zero_disjSum
code: @[simp]
theorem zero_disjSum : (0 : Multiset α).disjSum t = t.map inr 
goal: Multiset.disjSum 0 t = Multiset.map Sum.inr t

full_name: Multiset.disjSum_zero
code: @[simp]
theorem disjSum_zero : s.disjSum (0 : Multiset β) = s.map inl 
goal: s.disjSum 0 = Multiset.map Sum.inl s

full_name: Multiset.card_disjSum
code: @[simp]
theorem card_disjSum : Multiset.card (s.disjSum t) = Multiset.card s + Multiset.card t 
goal: Multiset.card (s.disjSum t) = Multiset.card s + Multiset.card t

full_name: Multiset.mem_disjSum
code: theorem mem_disjSum : x ∈ s.disjSum t ↔ (∃ a, a ∈ s ∧ inl a = x) ∨ ∃ b, b ∈ t ∧ inr b = x 
goal: x ∈ s.disjSum t ↔ (∃ a ∈ s, Sum.inl a = x) ∨ ∃ b ∈ t, Sum.inr b = x

full_name: Multiset.inl_mem_disjSum
code: @[simp]
theorem inl_mem_disjSum : inl a ∈ s.disjSum t ↔ a ∈ s 
goal: Sum.inl a ∈ s.disjSum t ↔ a ∈ s

full_name: Multiset.inr_mem_disjSum
code: @[simp]
theorem inr_mem_disjSum : inr b ∈ s.disjSum t ↔ b ∈ t 
goal: Sum.inr b ∈ s.disjSum t ↔ b ∈ t

full_name: Multiset.disjSum_mono
code: theorem disjSum_mono (hs : s₁ ≤ s₂) (ht : t₁ ≤ t₂) : s₁.disjSum t₁ ≤ s₂.disjSum t₂ 
goal: s₁.disjSum t₁ ≤ s₂.disjSum t₂

full_name: Multiset.disjSum_mono_left
code: theorem disjSum_mono_left (t : Multiset β) : Monotone fun s : Multiset α => s.disjSum t 
goal: Monotone fun s => s.disjSum t

full_name: Multiset.disjSum_mono_right
code: theorem disjSum_mono_right (s : Multiset α) :
    Monotone (s.disjSum : Multiset β → Multiset (α ⊕ β)) 
goal: Monotone s.disjSum

full_name: Multiset.disjSum_lt_disjSum_of_lt_of_le
code: theorem disjSum_lt_disjSum_of_lt_of_le (hs : s₁ < s₂) (ht : t₁ ≤ t₂) :
    s₁.disjSum t₁ < s₂.disjSum t₂ 
goal: s₁.disjSum t₁ < s₂.disjSum t₂

full_name: Multiset.disjSum_lt_disjSum_of_le_of_lt
code: theorem disjSum_lt_disjSum_of_le_of_lt (hs : s₁ ≤ s₂) (ht : t₁ < t₂) :
    s₁.disjSum t₁ < s₂.disjSum t₂ 
goal: s₁.disjSum t₁ < s₂.disjSum t₂

full_name: Multiset.disjSum_strictMono_left
code: theorem disjSum_strictMono_left (t : Multiset β) : StrictMono fun s : Multiset α => s.disjSum t 
goal: StrictMono fun s => s.disjSum t

full_name: Multiset.disjSum_strictMono_right
code: theorem disjSum_strictMono_right (s : Multiset α) :
    StrictMono (s.disjSum : Multiset β → Multiset (α ⊕ β)) 
goal: StrictMono s.disjSum

full_name: Multiset.Nodup.disjSum
code: protected theorem Nodup.disjSum (hs : s.Nodup) (ht : t.Nodup) : (s.disjSum t).Nodup 
goal: (s.disjSum t).Nodup
File: Mathlib/Data/Multiset/Antidiagonal.lean

full_name: Multiset.antidiagonal
code: /-- The antidiagonal of a multiset `s` consists of all pairs `(t₁, t₂)`
    such that `t₁ + t₂ = s`. These pairs are counted with multiplicities. -/
def antidiagonal (s : Multiset α) : Multiset (Multiset α × Multiset α) 
goal: Multiset (Multiset α × Multiset α)

full_name: Multiset.antidiagonal_coe
code: theorem antidiagonal_coe (l : List α) : @antidiagonal α l = revzip (powersetAux l) 
goal: (↑l).antidiagonal = ↑(Multiset.powersetAux l).revzip

full_name: Multiset.antidiagonal_coe'
code: @[simp]
theorem antidiagonal_coe' (l : List α) : @antidiagonal α l = revzip (powersetAux' l) 
goal: (↑l).antidiagonal = ↑(Multiset.powersetAux' l).revzip

full_name: Multiset.mem_antidiagonal
code: /-- A pair `(t₁, t₂)` of multisets is contained in `antidiagonal s`
    if and only if `t₁ + t₂ = s`. -/
@[simp]
theorem mem_antidiagonal {s : Multiset α} {x : Multiset α × Multiset α} :
    x ∈ antidiagonal s ↔ x.1 + x.2 = s 
goal: x ∈ s.antidiagonal ↔ x.1 + x.2 = s

full_name: Multiset.antidiagonal_map_fst
code: @[simp]
theorem antidiagonal_map_fst (s : Multiset α) : (antidiagonal s).map Prod.fst = powerset s 
goal: Multiset.map Prod.fst s.antidiagonal = s.powerset

full_name: Multiset.antidiagonal_map_snd
code: @[simp]
theorem antidiagonal_map_snd (s : Multiset α) : (antidiagonal s).map Prod.snd = powerset s 
goal: Multiset.map Prod.snd s.antidiagonal = s.powerset

full_name: Multiset.antidiagonal_zero
code: @[simp]
theorem antidiagonal_zero : @antidiagonal α 0 = {(0, 0)} 
goal: Multiset.antidiagonal 0 = {(0, 0)}

full_name: Multiset.antidiagonal_cons
code: @[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) 
goal: (a ::ₘ s).antidiagonal =
  Multiset.map (Prod.map id (Multiset.cons a)) s.antidiagonal +
    Multiset.map (Prod.map (Multiset.cons a) id) s.antidiagonal

full_name: Multiset.antidiagonal_eq_map_powerset
code: theorem antidiagonal_eq_map_powerset [DecidableEq α] (s : Multiset α) :
    s.antidiagonal = s.powerset.map fun t ↦ (s - t, t) 
goal: s.antidiagonal = Multiset.map (fun t => (s - t, t)) s.powerset

full_name: Multiset.card_antidiagonal
code: @[simp]
theorem card_antidiagonal (s : Multiset α) : card (antidiagonal s) = 2 ^ card s 
goal: Multiset.card s.antidiagonal = 2 ^ Multiset.card s
File: Mathlib/Data/Multiset/Sections.lean

full_name: Multiset.Sections
code: /-- The sections of a multiset of multisets `s` consists of all those multisets
which can be put in bijection with `s`, so each element is a member of the corresponding multiset.
-/

def Sections (s : Multiset (Multiset α)) : Multiset (Multiset α) 
goal: Multiset (Multiset α)

full_name: Multiset.sections_zero
code: @[simp]
theorem sections_zero : Sections (0 : Multiset (Multiset α)) = {0} 
goal: Multiset.Sections 0 = {0}

full_name: Multiset.sections_cons
code: @[simp]
theorem sections_cons (s : Multiset (Multiset α)) (m : Multiset α) :
    Sections (m ::ₘ s) = m.bind fun a => (Sections s).map (Multiset.cons a) 
goal: (m ::ₘ s).Sections = m.bind fun a => Multiset.map (Multiset.cons a) s.Sections

full_name: Multiset.coe_sections
code: 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 α))
  
goal: (↑(List.map (fun l => ↑l) l)).Sections = ↑(List.map (fun l => ↑l) l.sections)

full_name: Multiset.sections_add
code: @[simp]
theorem sections_add (s t : Multiset (Multiset α)) :
    Sections (s + t) = (Sections s).bind fun m => (Sections t).map (m + ·) 
goal: (s + t).Sections = s.Sections.bind fun m => Multiset.map (fun x => m + x) t.Sections

full_name: Multiset.mem_sections
code: theorem mem_sections {s : Multiset (Multiset α)} :
    ∀ {a}, a ∈ Sections s ↔ s.Rel (fun s a => a ∈ s) a 
goal: a ∈ s.Sections ↔ Multiset.Rel (fun s a => a ∈ s) s a

full_name: Multiset.card_sections
code: theorem card_sections {s : Multiset (Multiset α)} : card (Sections s) = prod (s.map card) 
goal: Multiset.card s.Sections = (Multiset.map (⇑Multiset.card) s).prod
File: Mathlib/Data/Multiset/NatAntidiagonal.lean

full_name: Multiset.Nat.antidiagonal
code: /-- The antidiagonal of a natural number `n` is
    the multiset of pairs `(i, j)` such that `i + j = n`. -/
def antidiagonal (n : ℕ) : Multiset (ℕ × ℕ) 
goal: Multiset (ℕ × ℕ)

full_name: Multiset.Nat.mem_antidiagonal
code: /-- A pair (i, j) is contained in the antidiagonal of `n` if and only if `i + j = n`. -/
@[simp]
theorem mem_antidiagonal {n : ℕ} {x : ℕ × ℕ} : x ∈ antidiagonal n ↔ x.1 + x.2 = n 
goal: x ∈ Multiset.Nat.antidiagonal n ↔ x.1 + x.2 = n

full_name: Multiset.Nat.card_antidiagonal
code: /-- The cardinality of the antidiagonal of `n` is `n+1`. -/
@[simp]
theorem card_antidiagonal (n : ℕ) : card (antidiagonal n) = n + 1 
goal: Multiset.card (Multiset.Nat.antidiagonal n) = n + 1

full_name: Multiset.Nat.antidiagonal_zero
code: /-- The antidiagonal of `0` is the list `[(0, 0)]` -/
@[simp]
theorem antidiagonal_zero : antidiagonal 0 = {(0, 0)} 
goal: Multiset.Nat.antidiagonal 0 = {(0, 0)}

full_name: Multiset.Nat.nodup_antidiagonal
code: /-- The antidiagonal of `n` does not contain duplicate entries. -/
@[simp]
theorem nodup_antidiagonal (n : ℕ) : Nodup (antidiagonal n) 
goal: (Multiset.Nat.antidiagonal n).Nodup

full_name: Multiset.Nat.antidiagonal_succ
code: @[simp]
theorem antidiagonal_succ {n : ℕ} :
    antidiagonal (n + 1) = (0, n + 1) ::ₘ (antidiagonal n).map (Prod.map Nat.succ id) 
goal: Multiset.Nat.antidiagonal (n + 1) = (0, n + 1) ::ₘ Multiset.map (Prod.map Nat.succ id) (Multiset.Nat.antidiagonal n)

full_name: Multiset.Nat.antidiagonal_succ'
code: theorem antidiagonal_succ' {n : ℕ} :
    antidiagonal (n + 1) = (n + 1, 0) ::ₘ (antidiagonal n).map (Prod.map id Nat.succ) 
goal: Multiset.Nat.antidiagonal (n + 1) = (n + 1, 0) ::ₘ Multiset.map (Prod.map id Nat.succ) (Multiset.Nat.antidiagonal n)

full_name: Multiset.Nat.antidiagonal_succ_succ'
code: theorem antidiagonal_succ_succ' {n : ℕ} :
    antidiagonal (n + 2) =
      (0, n + 2) ::ₘ (n + 2, 0) ::ₘ (antidiagonal n).map (Prod.map Nat.succ Nat.succ) 
goal: Multiset.Nat.antidiagonal (n + 2) =
  (0, n + 2) ::ₘ (n + 2, 0) ::ₘ Multiset.map (Prod.map Nat.succ Nat.succ) (Multiset.Nat.antidiagonal n)

full_name: Multiset.Nat.map_swap_antidiagonal
code: theorem map_swap_antidiagonal {n : ℕ} : (antidiagonal n).map Prod.swap = antidiagonal n 
goal: Multiset.map Prod.swap (Multiset.Nat.antidiagonal n) = Multiset.Nat.antidiagonal n