File: Mathlib/Data/Sym/Sym2.lean

full_name: Sym2.Rel
code: /-- This is the relation capturing the notion of pairs equivalent up to permutations. -/
@[aesop (rule_sets := [Sym2]) [safe [constructors, cases], norm]]
inductive Rel (α : Type u) : α × α → α × α → Prop
  | refl (x y : α) : Rel _ (x, y) (x, y)
  | swap (x y : α) : Rel _ (x, y) (y, x)
goal: α × α → α × α → Prop

full_name: Sym2.Rel.refl
code: /-- This is the relation capturing the notion of pairs equivalent up to permutations. -/
@[aesop (rule_sets := [Sym2]) [safe [constructors, cases], norm]]
inductive Rel (α : Type u) : α × α → α × α → Prop
  | refl (x y : α) : Rel _ (x, y) (x, y)
  | swap (x y : α) : Rel _ (x, y) (y, x)
goal: Sym2.Rel α (x, y) (x, y)

full_name: Sym2.Rel.swap
code: /-- This is the relation capturing the notion of pairs equivalent up to permutations. -/
@[aesop (rule_sets := [Sym2]) [safe [constructors, cases], norm]]
inductive Rel (α : Type u) : α × α → α × α → Prop
  | refl (x y : α) : Rel _ (x, y) (x, y)
  | swap (x y : α) : Rel _ (x, y) (y, x)
goal: Sym2.Rel α (x, y) (y, x)

full_name: Sym2.Rel.symm
code: @[symm]
theorem Rel.symm {x y : α × α} : Rel α x y → Rel α y x 
goal: Sym2.Rel α x y → Sym2.Rel α y x

full_name: Sym2.Rel.trans
code: @[trans]
theorem Rel.trans {x y z : α × α} (a : Rel α x y) (b : Rel α y z) : Rel α x z 
goal: Sym2.Rel α x z

full_name: Sym2.Rel.is_equivalence
code: theorem Rel.is_equivalence : Equivalence (Rel α) 
goal: Equivalence (Sym2.Rel α)

full_name: Sym2.Rel.setoid
code: /-- One can use `attribute [local instance] Sym2.Rel.setoid` to temporarily
make `Quotient` functionality work for `α × α`. -/
def Rel.setoid (α : Type u) : Setoid (α × α) 
goal: Setoid (α × α)

full_name: Sym2.rel_iff'
code: @[simp]
theorem rel_iff' {p q : α × α} : Rel α p q ↔ p = q ∨ p = q.swap 
goal: Sym2.Rel α p q ↔ p = q ∨ p = q.swap

full_name: Sym2.rel_iff
code: theorem rel_iff {x y z w : α} : Rel α (x, y) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z 
goal: Sym2.Rel α (x, y) (z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z

full_name: Sym2
code: /-- `Sym2 α` is the symmetric square of `α`, which, in other words, is the
type of unordered pairs.

It is equivalent in a natural way to multisets of cardinality 2 (see
`Sym2.equivMultiset`).
-/
abbrev Sym2 (α : Type u) 
goal: Type u

full_name: Sym2.mk
code: /-- Constructor for `Sym2`. This is the quotient map `α × α → Sym2 α`. -/
protected abbrev Sym2.mk {α : Type*} (p : α × α) : Sym2 α 
goal: Sym2 α

full_name: «_aux_Mathlib_Data_Sym_Sym2___macroRules_termS(_,_)_1»
code: /-- `s(x, y)` is an unordered pair,
which is to say a pair modulo the action of the symmetric group.

It is equal to `Sym2.mk (x, y)`. -/
notation3 "s(" x ", " y ")" => Sym2.mk (x, y)
goal: Lean.Macro

full_name: Sym2.sound
code: protected theorem sound {p p' : α × α} (h : Sym2.Rel α p p') : Sym2.mk p = Sym2.mk p' 
goal: Sym2.mk p = Sym2.mk p'

full_name: Sym2.exact
code: protected theorem exact {p p' : α × α} (h : Sym2.mk p = Sym2.mk p') : Sym2.Rel α p p' 
goal: Sym2.Rel α p p'

full_name: Sym2.eq
code: @[simp]
protected theorem eq {p p' : α × α} : Sym2.mk p = Sym2.mk p' ↔ Sym2.Rel α p p' 
goal: Sym2.mk p = Sym2.mk p' ↔ Sym2.Rel α p p'

full_name: Sym2.ind
code: @[elab_as_elim, cases_eliminator, induction_eliminator]
protected theorem ind {f : Sym2 α → Prop} (h : ∀ x y, f s(x, y)) : ∀ i, f i 
goal: f i

full_name: Sym2.inductionOn
code: @[elab_as_elim]
protected theorem inductionOn {f : Sym2 α → Prop} (i : Sym2 α) (hf : ∀ x y, f s(x, y)) : f i 
goal: f i

full_name: Sym2.inductionOn₂
code: @[elab_as_elim]
protected theorem inductionOn₂ {f : Sym2 α → Sym2 β → Prop} (i : Sym2 α) (j : Sym2 β)
    (hf : ∀ a₁ a₂ b₁ b₂, f s(a₁, a₂) s(b₁, b₂)) : f i j 
goal: f i j

full_name: Sym2.rec
code: /-- Dependent recursion principal for `Sym2`. See `Quot.rec`. -/
@[elab_as_elim]
protected def rec {motive : Sym2 α → Sort*}
    (f : (p : α × α) → motive (Sym2.mk p))
    (h : (p q : α × α) → (h : Sym2.Rel α p q) → Eq.ndrec (f p) (Sym2.sound h) = f q)
    (z : Sym2 α) : motive z 
goal: motive z

full_name: Sym2.recOnSubsingleton
code: /-- Dependent recursion principal for `Sym2` when the target is a `Subsingleton` type.
See `Quot.recOnSubsingleton`. -/
@[elab_as_elim]
protected abbrev recOnSubsingleton {motive : Sym2 α → Sort*}
    [(p : α × α) → Subsingleton (motive (Sym2.mk p))]
    (z : Sym2 α) (f : (p : α × α) → motive (Sym2.mk p)) : motive z 
goal: motive z

full_name: Sym2.exists
code: protected theorem «exists» {α : Sort _} {f : Sym2 α → Prop} :
    (∃ x : Sym2 α, f x) ↔ ∃ x y, f s(x, y) 
goal: (∃ x, f x) ↔ ∃ x y, f s(x, y)

full_name: Sym2.forall
code: protected theorem «forall» {α : Sort _} {f : Sym2 α → Prop} :
    (∀ x : Sym2 α, f x) ↔ ∀ x y, f s(x, y) 
goal: (∀ (x : Sym2 α), f x) ↔ ∀ (x y : α), f s(x, y)

full_name: Sym2.eq_swap
code: theorem eq_swap {a b : α} : s(a, b) = s(b, a) 
goal: s(a, b) = s(b, a)

full_name: Sym2.mk_prod_swap_eq
code: @[simp]
theorem mk_prod_swap_eq {p : α × α} : Sym2.mk p.swap = Sym2.mk p 
goal: Sym2.mk p.swap = Sym2.mk p

full_name: Sym2.congr_right
code: theorem congr_right {a b c : α} : s(a, b) = s(a, c) ↔ b = c 
goal: s(a, b) = s(a, c) ↔ b = c

full_name: Sym2.congr_left
code: theorem congr_left {a b c : α} : s(b, a) = s(c, a) ↔ b = c 
goal: s(b, a) = s(c, a) ↔ b = c

full_name: Sym2.eq_iff
code: theorem eq_iff {x y z w : α} : s(x, y) = s(z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z 
goal: s(x, y) = s(z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z

full_name: Sym2.mk_eq_mk_iff
code: theorem mk_eq_mk_iff {p q : α × α} : Sym2.mk p = Sym2.mk q ↔ p = q ∨ p = q.swap 
goal: Sym2.mk p = Sym2.mk q ↔ p = q ∨ p = q.swap

full_name: Sym2.lift
code: /-- The universal property of `Sym2`; symmetric functions of two arguments are equivalent to
functions from `Sym2`. Note that when `β` is `Prop`, it can sometimes be more convenient to use
`Sym2.fromRel` instead. -/
def lift : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ } ≃ (Sym2 α → β) 
goal: { f // ∀ (a₁ a₂ : α), f a₁ a₂ = f a₂ a₁ } ≃ (Sym2 α → β)

full_name: Sym2.lift_mk
code: @[simp]
theorem lift_mk (f : { f : α → α → β // ∀ a₁ a₂, f a₁ a₂ = f a₂ a₁ }) (a₁ a₂ : α) :
    lift f s(a₁, a₂) = (f : α → α → β) a₁ a₂ 
goal: Sym2.lift f s(a₁, a₂) = ↑f a₁ a₂

full_name: Sym2.coe_lift_symm_apply
code: @[simp]
theorem coe_lift_symm_apply (F : Sym2 α → β) (a₁ a₂ : α) :
    (lift.symm F : α → α → β) a₁ a₂ = F s(a₁, a₂) 
goal: ↑(Sym2.lift.symm F) a₁ a₂ = F s(a₁, a₂)

full_name: Sym2.lift₂
code: /-- A two-argument version of `Sym2.lift`. -/
def lift₂ :
    { f : α → α → β → β → γ //
        ∀ a₁ a₂ b₁ b₂, f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ } ≃
      (Sym2 α → Sym2 β → γ) 
goal: { f // ∀ (a₁ a₂ : α) (b₁ b₂ : β), f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ } ≃
  (Sym2 α → Sym2 β → γ)

full_name: Sym2.lift₂_mk
code: @[simp]
theorem lift₂_mk
    (f :
    { f : α → α → β → β → γ //
      ∀ a₁ a₂ b₁ b₂, f a₁ a₂ b₁ b₂ = f a₂ a₁ b₁ b₂ ∧ f a₁ a₂ b₁ b₂ = f a₁ a₂ b₂ b₁ })
    (a₁ a₂ : α) (b₁ b₂ : β) : lift₂ f s(a₁, a₂) s(b₁, b₂) = (f : α → α → β → β → γ) a₁ a₂ b₁ b₂ 
goal: Sym2.lift₂ f s(a₁, a₂) s(b₁, b₂) = ↑f a₁ a₂ b₁ b₂

full_name: Sym2.coe_lift₂_symm_apply
code: @[simp]
theorem coe_lift₂_symm_apply (F : Sym2 α → Sym2 β → γ) (a₁ a₂ : α) (b₁ b₂ : β) :
    (lift₂.symm F : α → α → β → β → γ) a₁ a₂ b₁ b₂ = F s(a₁, a₂) s(b₁, b₂) 
goal: ↑(Sym2.lift₂.symm F) a₁ a₂ b₁ b₂ = F s(a₁, a₂) s(b₁, b₂)

full_name: Sym2.map
code: /-- The functor `Sym2` is functorial, and this function constructs the induced maps.
-/
def map (f : α → β) : Sym2 α → Sym2 β 
goal: Sym2 α → Sym2 β

full_name: Sym2.map_id
code: @[simp]
theorem map_id : map (@id α) = id 
goal: Sym2.map id = id

full_name: Sym2.map_comp
code: theorem map_comp {g : β → γ} {f : α → β} : Sym2.map (g ∘ f) = Sym2.map g ∘ Sym2.map f 
goal: Sym2.map (g ∘ f) = Sym2.map g ∘ Sym2.map f

full_name: Sym2.map_map
code: theorem map_map {g : β → γ} {f : α → β} (x : Sym2 α) : map g (map f x) = map (g ∘ f) x 
goal: Sym2.map g (Sym2.map f x) = Sym2.map (g ∘ f) x

full_name: Sym2.map_pair_eq
code: @[simp]
theorem map_pair_eq (f : α → β) (x y : α) : map f s(x, y) = s(f x, f y) 
goal: Sym2.map f s(x, y) = s(f x, f y)

full_name: Sym2.map.injective
code: theorem map.injective {f : α → β} (hinj : Injective f) : Injective (map f) 
goal: Function.Injective (Sym2.map f)

full_name: Sym2.mkEmbedding_apply
code: /-- `mk a` as an embedding. This is the symmetric version of `Function.Embedding.sectl`. -/
@[simps]
def mkEmbedding (a : α) : α ↪ Sym2 α 
goal: (Sym2.mkEmbedding a) b = s(a, b)

full_name: Sym2.mkEmbedding
code: /-- `mk a` as an embedding. This is the symmetric version of `Function.Embedding.sectl`. -/
@[simps]
def mkEmbedding (a : α) : α ↪ Sym2 α 
goal: α ↪ Sym2 α

full_name: Function.Embedding.sym2Map_apply
code: /-- `Sym2.map` as an embedding. -/
@[simps]
def _root_.Function.Embedding.sym2Map (f : α ↪ β) : Sym2 α ↪ Sym2 β 
goal: ∀ (a : Sym2 α), f.sym2Map a = Sym2.map (⇑f) a

full_name: Function.Embedding.sym2Map
code: /-- `Sym2.map` as an embedding. -/
@[simps]
def _root_.Function.Embedding.sym2Map (f : α ↪ β) : Sym2 α ↪ Sym2 β 
goal: Sym2 α ↪ Sym2 β

full_name: Sym2.Mem
code: /-- This is a predicate that determines whether a given term is a member of a term of the
symmetric square.  From this point of view, the symmetric square is the subtype of
cardinality-two multisets on `α`.
-/
protected def Mem (x : α) (z : Sym2 α) : Prop 
goal: Prop

full_name: Sym2.mem_iff'
code: @[aesop norm (rule_sets := [Sym2])]
theorem mem_iff' {a b c : α} : Sym2.Mem a s(b, c) ↔ a = b ∨ a = c 
goal: Sym2.Mem a s(b, c) ↔ a = b ∨ a = c

full_name: Sym2.instSetLike
code: instance : SetLike (Sym2 α) α 
goal: SetLike (Sym2 α) α

full_name: Sym2.mem_iff_mem
code: @[simp]
theorem mem_iff_mem {x : α} {z : Sym2 α} : Sym2.Mem x z ↔ x ∈ z 
goal: Sym2.Mem x z ↔ x ∈ z

full_name: Sym2.mem_iff_exists
code: theorem mem_iff_exists {x : α} {z : Sym2 α} : x ∈ z ↔ ∃ y : α, z = s(x, y) 
goal: x ∈ z ↔ ∃ y, z = s(x, y)

full_name: Sym2.ext
code: @[ext]
theorem ext {p q : Sym2 α} (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q 
goal: p = q

full_name: Sym2.mem_mk_left
code: theorem mem_mk_left (x y : α) : x ∈ s(x, y) 
goal: x ∈ s(x, y)

full_name: Sym2.mem_mk_right
code: theorem mem_mk_right (x y : α) : y ∈ s(x, y) 
goal: y ∈ s(x, y)

full_name: Sym2.mem_iff
code: @[simp, aesop norm (rule_sets := [Sym2])]
theorem mem_iff {a b c : α} : a ∈ s(b, c) ↔ a = b ∨ a = c 
goal: a ∈ s(b, c) ↔ a = b ∨ a = c

full_name: Sym2.out_fst_mem
code: theorem out_fst_mem (e : Sym2 α) : e.out.1 ∈ e 
goal: (Quot.out e).1 ∈ e

full_name: Sym2.out_snd_mem
code: theorem out_snd_mem (e : Sym2 α) : e.out.2 ∈ e 
goal: (Quot.out e).2 ∈ e

full_name: Sym2.ball
code: theorem ball {p : α → Prop} {a b : α} : (∀ c ∈ s(a, b), p c) ↔ p a ∧ p b 
goal: (∀ c ∈ s(a, b), p c) ↔ p a ∧ p b

full_name: Sym2.Mem.other
code: /-- Given an element of the unordered pair, give the other element using `Classical.choose`.
See also `Mem.other'` for the computable version.
-/
noncomputable def Mem.other {a : α} {z : Sym2 α} (h : a ∈ z) : α 
goal: α

full_name: Sym2.other_spec
code: @[simp]
theorem other_spec {a : α} {z : Sym2 α} (h : a ∈ z) : s(a, Mem.other h) = z 
goal: s(a, Sym2.Mem.other h) = z

full_name: Sym2.other_mem
code: theorem other_mem {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other h ∈ z 
goal: Sym2.Mem.other h ∈ z

full_name: Sym2.mem_and_mem_iff
code: theorem mem_and_mem_iff {x y : α} {z : Sym2 α} (hne : x ≠ y) : x ∈ z ∧ y ∈ z ↔ z = s(x, y) 
goal: x ∈ z ∧ y ∈ z ↔ z = s(x, y)

full_name: Sym2.eq_of_ne_mem
code: theorem eq_of_ne_mem {x y : α} {z z' : Sym2 α} (h : x ≠ y) (h1 : x ∈ z) (h2 : y ∈ z) (h3 : x ∈ z')
    (h4 : y ∈ z') : z = z' 
goal: z = z'

full_name: Sym2.Mem.decidable
code: instance Mem.decidable [DecidableEq α] (x : α) (z : Sym2 α) : Decidable (x ∈ z) 
goal: Decidable (x ∈ z)

full_name: Sym2.mem_map
code: @[simp]
theorem mem_map {f : α → β} {b : β} {z : Sym2 α} : b ∈ Sym2.map f z ↔ ∃ a, a ∈ z ∧ f a = b 
goal: b ∈ Sym2.map f z ↔ ∃ a ∈ z, f a = b

full_name: Sym2.map_congr
code: @[congr]
theorem map_congr {f g : α → β} {s : Sym2 α} (h : ∀ x ∈ s, f x = g x) : map f s = map g s 
goal: Sym2.map f s = Sym2.map g s

full_name: Sym2.map_id'
code: /-- Note: `Sym2.map_id` will not simplify `Sym2.map id z` due to `Sym2.map_congr`. -/
@[simp]
theorem map_id' : (map fun x : α => x) = id 
goal: (Sym2.map fun x => x) = id

full_name: Sym2.diag
code: /-- A type `α` is naturally included in the diagonal of `α × α`, and this function gives the image
of this diagonal in `Sym2 α`.
-/
def diag (x : α) : Sym2 α 
goal: Sym2 α

full_name: Sym2.diag_injective
code: theorem diag_injective : Function.Injective (Sym2.diag : α → Sym2 α) 
goal: Function.Injective Sym2.diag

full_name: Sym2.IsDiag
code: /-- A predicate for testing whether an element of `Sym2 α` is on the diagonal.
-/
def IsDiag : Sym2 α → Prop 
goal: Sym2 α → Prop

full_name: Sym2.mk_isDiag_iff
code: theorem mk_isDiag_iff {x y : α} : IsDiag s(x, y) ↔ x = y 
goal: s(x, y).IsDiag ↔ x = y

full_name: Sym2.isDiag_iff_proj_eq
code: @[simp]
theorem isDiag_iff_proj_eq (z : α × α) : IsDiag (Sym2.mk z) ↔ z.1 = z.2 
goal: (Sym2.mk z).IsDiag ↔ z.1 = z.2

full_name: Sym2.IsDiag.map
code: protected lemma IsDiag.map : e.IsDiag → (e.map f).IsDiag 
goal: e.IsDiag → (Sym2.map f e).IsDiag

full_name: Sym2.isDiag_map
code: lemma isDiag_map (hf : Injective f) : (e.map f).IsDiag ↔ e.IsDiag 
goal: (Sym2.map f e).IsDiag ↔ e.IsDiag

full_name: Sym2.diag_isDiag
code: @[simp]
theorem diag_isDiag (a : α) : IsDiag (diag a) 
goal: (Sym2.diag a).IsDiag

full_name: Sym2.IsDiag.mem_range_diag
code: theorem IsDiag.mem_range_diag {z : Sym2 α} : IsDiag z → z ∈ Set.range (@diag α) 
goal: z.IsDiag → z ∈ Set.range Sym2.diag

full_name: Sym2.isDiag_iff_mem_range_diag
code: theorem isDiag_iff_mem_range_diag (z : Sym2 α) : IsDiag z ↔ z ∈ Set.range (@diag α) 
goal: z.IsDiag ↔ z ∈ Set.range Sym2.diag

full_name: Sym2.IsDiag.decidablePred
code: instance IsDiag.decidablePred (α : Type u) [DecidableEq α] : DecidablePred (@IsDiag α) 
goal: DecidablePred Sym2.IsDiag

full_name: Sym2.other_ne
code: theorem other_ne {a : α} {z : Sym2 α} (hd : ¬IsDiag z) (h : a ∈ z) : Mem.other h ≠ a 
goal: Sym2.Mem.other h ≠ a

full_name: Sym2.fromRel
code: /-- Symmetric relations define a set on `Sym2 α` by taking all those pairs
of elements that are related.
-/
def fromRel (sym : Symmetric r) : Set (Sym2 α) 
goal: Set (Sym2 α)

full_name: Sym2.fromRel_proj_prop
code: @[simp]
theorem fromRel_proj_prop {sym : Symmetric r} {z : α × α} : Sym2.mk z ∈ fromRel sym ↔ r z.1 z.2 
goal: Sym2.mk z ∈ Sym2.fromRel sym ↔ r z.1 z.2

full_name: Sym2.fromRel_prop
code: theorem fromRel_prop {sym : Symmetric r} {a b : α} : s(a, b) ∈ fromRel sym ↔ r a b 
goal: s(a, b) ∈ Sym2.fromRel sym ↔ r a b

full_name: Sym2.fromRel_bot
code: theorem fromRel_bot : fromRel (fun (x y : α) z => z : Symmetric ⊥) = ∅ 
goal: Sym2.fromRel ⋯ = ∅

full_name: Sym2.fromRel_top
code: theorem fromRel_top : fromRel (fun (x y : α) z => z : Symmetric ⊤) = Set.univ 
goal: Sym2.fromRel ⋯ = Set.univ

full_name: Sym2.fromRel_ne
code: theorem fromRel_ne : fromRel (fun (x y : α) z => z.symm : Symmetric Ne) = {z | ¬IsDiag z} 
goal: Sym2.fromRel ⋯ = {z | ¬z.IsDiag}

full_name: Sym2.fromRel_irreflexive
code: theorem fromRel_irreflexive {sym : Symmetric r} :
    Irreflexive r ↔ ∀ {z}, z ∈ fromRel sym → ¬IsDiag z 
goal: Irreflexive r ↔ ∀ {z : Sym2 α}, z ∈ Sym2.fromRel sym → ¬z.IsDiag

full_name: Sym2.mem_fromRel_irrefl_other_ne
code: theorem mem_fromRel_irrefl_other_ne {sym : Symmetric r} (irrefl : Irreflexive r) {a : α}
    {z : Sym2 α} (hz : z ∈ fromRel sym) (h : a ∈ z) : Mem.other h ≠ a 
goal: Sym2.Mem.other h ≠ a

full_name: Sym2.fromRel.decidablePred
code: instance fromRel.decidablePred (sym : Symmetric r) [h : DecidableRel r] :
    DecidablePred (· ∈ Sym2.fromRel sym) 
goal: DecidablePred fun x => x ∈ Sym2.fromRel sym

full_name: Sym2.ToRel
code: /-- The inverse to `Sym2.fromRel`. Given a set on `Sym2 α`, give a symmetric relation on `α`
(see `Sym2.toRel_symmetric`). -/
def ToRel (s : Set (Sym2 α)) (x y : α) : Prop 
goal: Prop

full_name: Sym2.toRel_prop
code: @[simp]
theorem toRel_prop (s : Set (Sym2 α)) (x y : α) : ToRel s x y ↔ s(x, y) ∈ s 
goal: Sym2.ToRel s x y ↔ s(x, y) ∈ s

full_name: Sym2.toRel_symmetric
code: theorem toRel_symmetric (s : Set (Sym2 α)) : Symmetric (ToRel s) 
goal: Symmetric (Sym2.ToRel s)

full_name: Sym2.toRel_fromRel
code: theorem toRel_fromRel (sym : Symmetric r) : ToRel (fromRel sym) = r 
goal: Sym2.ToRel (Sym2.fromRel sym) = r

full_name: Sym2.fromRel_toRel
code: theorem fromRel_toRel (s : Set (Sym2 α)) : fromRel (toRel_symmetric s) = s 
goal: Sym2.fromRel ⋯ = s

full_name: _private.Mathlib.Data.Sym.Sym2.0.Sym2.fromVector
code: private def fromVector : Vector α 2 → α × α
  
goal: Mathlib.Vector α 2 → α × α

full_name: _private.Mathlib.Data.Sym.Sym2.0.Sym2.perm_card_two_iff
code: private theorem perm_card_two_iff {a₁ b₁ a₂ b₂ : α} :
    [a₁, b₁].Perm [a₂, b₂] ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂ 
goal: [a₁, b₁].Perm [a₂, b₂] ↔ a₁ = a₂ ∧ b₁ = b₂ ∨ a₁ = b₂ ∧ b₁ = a₂

full_name: Sym2.sym2EquivSym'
code: /-- The symmetric square is equivalent to length-2 vectors up to permutations. -/
def sym2EquivSym' : Equiv (Sym2 α) (Sym' α 2) 
goal: Sym2 α ≃ Sym.Sym' α 2

full_name: Sym2.equivSym
code: /-- The symmetric square is equivalent to the second symmetric power. -/
def equivSym (α : Type*) : Sym2 α ≃ Sym α 2 
goal: Sym2 α ≃ Sym α 2

full_name: Sym2.equivMultiset
code: /-- The symmetric square is equivalent to multisets of cardinality
two. (This is currently a synonym for `equivSym`, but it's provided
in case the definition for `Sym` changes.) -/
def equivMultiset (α : Type*) : Sym2 α ≃ { s : Multiset α // Multiset.card s = 2 } 
goal: Sym2 α ≃ { s // Multiset.card s = 2 }

full_name: Sym2.instDecidableRel
code: /-- Given `[DecidableEq α]` and `[Fintype α]`, the following instance gives `Fintype (Sym2 α)`.
-/
instance instDecidableRel [DecidableEq α] : DecidableRel (Rel α) 
goal: DecidableRel (Sym2.Rel α)

full_name: Sym2.instDecidableRel'
code: instance instDecidableRel' [DecidableEq α] : DecidableRel (HasEquiv.Equiv (α := α × α)) 
goal: DecidableRel HasEquiv.Equiv

full_name: Sym2.instDecidableEq
code: instance [DecidableEq α] : DecidableEq (Sym2 α) 
goal: DecidableEq (Sym2 α)

full_name: _private.Mathlib.Data.Sym.Sym2.0.Sym2.pairOther
code: /--
A function that gives the other element of a pair given one of the elements.  Used in `Mem.other'`.
-/
@[aesop norm unfold (rule_sets := [Sym2])]
private def pairOther [DecidableEq α] (a : α) (z : α × α) : α 
goal: α

full_name: Sym2.Mem.other'
code: /-- Get the other element of the unordered pair using the decidable equality.
This is the computable version of `Mem.other`. -/
@[aesop norm unfold (rule_sets := [Sym2])]
def Mem.other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : α 
goal: α

full_name: Sym2.other_spec'
code: @[simp]
theorem other_spec' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : s(a, Mem.other' h) = z 
goal: s(a, Sym2.Mem.other' h) = z

full_name: Sym2.other_eq_other'
code: @[simp]
theorem other_eq_other' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) :
    Mem.other h = Mem.other' h 
goal: Sym2.Mem.other h = Sym2.Mem.other' h

full_name: Sym2.other_mem'
code: theorem other_mem' [DecidableEq α] {a : α} {z : Sym2 α} (h : a ∈ z) : Mem.other' h ∈ z 
goal: Sym2.Mem.other' h ∈ z

full_name: Sym2.other_invol'
code: theorem other_invol' [DecidableEq α] {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other' ha ∈ z) :
    Mem.other' hb = a 
goal: Sym2.Mem.other' hb = a

full_name: Sym2.other_invol
code: theorem other_invol {a : α} {z : Sym2 α} (ha : a ∈ z) (hb : Mem.other ha ∈ z) :
    Mem.other hb = a 
goal: Sym2.Mem.other hb = a

full_name: Sym2.filter_image_mk_isDiag
code: theorem filter_image_mk_isDiag [DecidableEq α] (s : Finset α) :
    ((s ×ˢ s).image Sym2.mk).filter IsDiag = s.diag.image Sym2.mk 
goal: Finset.filter Sym2.IsDiag (Finset.image Sym2.mk (s ×ˢ s)) = Finset.image Sym2.mk s.diag

full_name: Sym2.filter_image_mk_not_isDiag
code: theorem filter_image_mk_not_isDiag [DecidableEq α] (s : Finset α) :
    (((s ×ˢ s).image Sym2.mk).filter fun a : Sym2 α => ¬a.IsDiag) =
      s.offDiag.image Sym2.mk 
goal: Finset.filter (fun a => ¬a.IsDiag) (Finset.image Sym2.mk (s ×ˢ s)) = Finset.image Sym2.mk s.offDiag

full_name: Sym2.instSubsingleton
code: instance [Subsingleton α] : Subsingleton (Sym2 α) 
goal: Subsingleton (Sym2 α)

full_name: Sym2.instUnique
code: instance [Unique α] : Unique (Sym2 α) 
goal: Unique (Sym2 α)

full_name: Sym2.instIsEmpty
code: instance [IsEmpty α] : IsEmpty (Sym2 α) 
goal: IsEmpty (Sym2 α)

full_name: Sym2.instNontrivial
code: instance [Nontrivial α] : Nontrivial (Sym2 α) 
goal: Nontrivial (Sym2 α)

full_name: Sym2.instRepr
code: unsafe instance [Repr α] : Repr (Sym2 α) 
goal: Repr (Sym2 α)