File: Mathlib/Data/List/Sym.lean

full_name: List.sym2
code: /-- `xs.sym2` is a list of all unordered pairs of elements from `xs`.
If `xs` has no duplicates then neither does `xs.sym2`. -/
protected def sym2 : List α → List (Sym2 α)
  
goal: List α → List (Sym2 α)

full_name: List.sym2_map
code: theorem sym2_map (f : α → β) (xs : List α) :
    (xs.map f).sym2 = xs.sym2.map (Sym2.map f) 
goal: (List.map f xs).sym2 = List.map (Sym2.map f) xs.sym2

full_name: List.mem_sym2_cons_iff
code: theorem mem_sym2_cons_iff {x : α} {xs : List α} {z : Sym2 α} :
    z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y, y ∈ xs ∧ z = s(x, y)) ∨ z ∈ xs.sym2 
goal: z ∈ (x :: xs).sym2 ↔ z = s(x, x) ∨ (∃ y ∈ xs, z = s(x, y)) ∨ z ∈ xs.sym2

full_name: List.sym2_eq_nil_iff
code: @[simp]
theorem sym2_eq_nil_iff {xs : List α} : xs.sym2 = [] ↔ xs = [] 
goal: xs.sym2 = [] ↔ xs = []

full_name: List.left_mem_of_mk_mem_sym2
code: theorem left_mem_of_mk_mem_sym2 {xs : List α} {a b : α}
    (h : s(a, b) ∈ xs.sym2) : a ∈ xs 
goal: a ∈ xs

full_name: List.right_mem_of_mk_mem_sym2
code: theorem right_mem_of_mk_mem_sym2 {xs : List α} {a b : α}
    (h : s(a, b) ∈ xs.sym2) : b ∈ xs 
goal: b ∈ xs

full_name: List.mk_mem_sym2
code: theorem mk_mem_sym2 {xs : List α} {a b : α} (ha : a ∈ xs) (hb : b ∈ xs) :
    s(a, b) ∈ xs.sym2 
goal: s(a, b) ∈ xs.sym2

full_name: List.mk_mem_sym2_iff
code: theorem mk_mem_sym2_iff {xs : List α} {a b : α} :
    s(a, b) ∈ xs.sym2 ↔ a ∈ xs ∧ b ∈ xs 
goal: s(a, b) ∈ xs.sym2 ↔ a ∈ xs ∧ b ∈ xs

full_name: List.mem_sym2_iff
code: theorem mem_sym2_iff {xs : List α} {z : Sym2 α} :
    z ∈ xs.sym2 ↔ ∀ y ∈ z, y ∈ xs 
goal: z ∈ xs.sym2 ↔ ∀ y ∈ z, y ∈ xs

full_name: List.Nodup.sym2
code: protected theorem Nodup.sym2 {xs : List α} (h : xs.Nodup) : xs.sym2.Nodup 
goal: xs.sym2.Nodup

full_name: List.map_mk_sublist_sym2
code: theorem map_mk_sublist_sym2 (x : α) (xs : List α) (h : x ∈ xs) :
    map (fun y ↦ s(x, y)) xs <+ xs.sym2 
goal: (List.map (fun y => s(x, y)) xs).Sublist xs.sym2

full_name: List.map_mk_disjoint_sym2
code: theorem map_mk_disjoint_sym2 (x : α) (xs : List α) (h : x ∉ xs) :
    (map (fun y ↦ s(x, y)) xs).Disjoint xs.sym2 
goal: (List.map (fun y => s(x, y)) xs).Disjoint xs.sym2

full_name: List.dedup_sym2
code: theorem dedup_sym2 [DecidableEq α] (xs : List α) : xs.sym2.dedup = xs.dedup.sym2 
goal: xs.sym2.dedup = xs.dedup.sym2

full_name: List.Perm.sym2
code: protected theorem Perm.sym2 {xs ys : List α} (h : xs ~ ys) :
    xs.sym2 ~ ys.sym2 
goal: xs.sym2.Perm ys.sym2

full_name: List.Sublist.sym2
code: protected theorem Sublist.sym2 {xs ys : List α} (h : xs <+ ys) : xs.sym2 <+ ys.sym2 
goal: xs.sym2.Sublist ys.sym2

full_name: List.Subperm.sym2
code: protected theorem Subperm.sym2 {xs ys : List α} (h : xs <+~ ys) : xs.sym2 <+~ ys.sym2 
goal: xs.sym2.Subperm ys.sym2

full_name: List.length_sym2
code: theorem length_sym2 {xs : List α} : xs.sym2.length = Nat.choose (xs.length + 1) 2 
goal: xs.sym2.length = (xs.length + 1).choose 2

full_name: List.sym
code: /-- `xs.sym n` is all unordered `n`-tuples from the list `xs` in some order. -/
protected def sym : (n : ℕ) → List α → List (Sym α n)
  
goal: List α → List (Sym α n)

full_name: List.sym_one_eq
code: theorem sym_one_eq : xs.sym 1 = xs.map (· ::ₛ .nil) 
goal: List.sym 1 xs = List.map (fun x => x ::ₛ Sym.nil) xs

full_name: List.sym2_eq_sym_two
code: theorem sym2_eq_sym_two : xs.sym2.map (Sym2.equivSym α) = xs.sym 2 
goal: List.map (⇑(Sym2.equivSym α)) xs.sym2 = List.sym 2 xs

full_name: List.sym_map
code: theorem sym_map {β : Type*} (f : α → β) (n : ℕ) (xs : List α) :
    (xs.map f).sym n = (xs.sym n).map (Sym.map f) 
goal: List.sym n (List.map f xs) = List.map (Sym.map f) (List.sym n xs)

full_name: List.Sublist.sym
code: protected theorem Sublist.sym (n : ℕ) {xs ys : List α} (h : xs <+ ys) : xs.sym n <+ ys.sym n 
goal: (List.sym n xs).Sublist (List.sym n ys)

full_name: List.sym_sublist_sym_cons
code: theorem sym_sublist_sym_cons {a : α} : xs.sym n <+ (a :: xs).sym n 
goal: (List.sym n xs).Sublist (List.sym n (a :: xs))

full_name: List.mem_of_mem_of_mem_sym
code: theorem mem_of_mem_of_mem_sym {n : ℕ} {xs : List α} {a : α} {z : Sym α n}
    (ha : a ∈ z) (hz : z ∈ xs.sym n) : a ∈ xs 
goal: a ∈ xs

full_name: List.first_mem_of_cons_mem_sym
code: theorem first_mem_of_cons_mem_sym {xs : List α} {n : ℕ} {a : α} {z : Sym α n}
    (h : a ::ₛ z ∈ xs.sym (n + 1)) : a ∈ xs 
goal: a ∈ xs

full_name: List.Nodup.sym
code: protected theorem Nodup.sym (n : ℕ) {xs : List α} (h : xs.Nodup) : (xs.sym n).Nodup 
goal: (List.sym n xs).Nodup

full_name: List.length_sym
code: theorem length_sym {n : ℕ} {xs : List α} :
    (xs.sym n).length = Nat.multichoose xs.length n 
goal: (List.sym n xs).length = xs.length.multichoose n