l3lab/ntp-mathlib huggingface dataset:
nonrec theorem BoundedAtFilter.mul [NormedField β] {l : Filter α} {f g : α → β}
    (hf : BoundedAtFilter l f) (hg : BoundedAtFilter l g) : BoundedAtFilter l (f * g) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝ : NormedField β
l : Filter α
f g : α → β
hf : BoundedAtFilter l f
hg : BoundedAtFilter l g
⊢ BoundedAtFilter l (f * g)

Next tactic:
refine' (hf.mul hg).trans _
nonrec theorem BoundedAtFilter.mul [NormedField β] {l : Filter α} {f g : α → β}
    (hf : BoundedAtFilter l f) (hg : BoundedAtFilter l g) : BoundedAtFilter l (f * g) := by
  refine' (hf.mul hg).trans _
  

Proof state:
α : Type u_1
β : Type u_2
inst✝ : NormedField β
l : Filter α
f g : α → β
hf : BoundedAtFilter l f
hg : BoundedAtFilter l g
⊢ (fun x => OfNat.ofNat 1 x * OfNat.ofNat 1 x) =O[l] 1

Next tactic:
convert Asymptotics.isBigO_refl (E := ℝ) _ l
nonrec theorem BoundedAtFilter.mul [NormedField β] {l : Filter α} {f g : α → β}
    (hf : BoundedAtFilter l f) (hg : BoundedAtFilter l g) : BoundedAtFilter l (f * g) := by
  refine' (hf.mul hg).trans _
  convert Asymptotics.isBigO_refl (E := ℝ) _ l
  

Proof state:
case h.e'_8.h
α : Type u_1
β : Type u_2
inst✝ : NormedField β
l : Filter α
f g : α → β
hf : BoundedAtFilter l f
hg : BoundedAtFilter l g
x✝ : α
⊢ OfNat.ofNat 1 x✝ = OfNat.ofNat 1 x✝ * OfNat.ofNat 1 x✝

Next tactic:
simp
/-- The subalgebra of functions that are bounded along a filter `l`. -/
def boundedFilterSubalgebra [NormedField β] (l : Filter α) : Subalgebra β (α → β) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝ : NormedField β
l : Filter α
⊢ Subalgebra β (α → β)

Next tactic:
refine' Submodule.toSubalgebra (boundedFilterSubmodule l) _ fun f g hf hg ↦ _
/-- The subalgebra of functions that are bounded along a filter `l`. -/
def boundedFilterSubalgebra [NormedField β] (l : Filter α) : Subalgebra β (α → β) := by
  refine' Submodule.toSubalgebra (boundedFilterSubmodule l) _ fun f g hf hg ↦ _
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
inst✝ : NormedField β
l : Filter α
⊢ 1 ∈ boundedFilterSubmodule l

Next tactic:
exact const_boundedAtFilter l (1 : β)
/-- The subalgebra of functions that are bounded along a filter `l`. -/
def boundedFilterSubalgebra [NormedField β] (l : Filter α) : Subalgebra β (α → β) := by
  refine' Submodule.toSubalgebra (boundedFilterSubmodule l) _ fun f g hf hg ↦ _
  · exact const_boundedAtFilter l (1 : β)
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
inst✝ : NormedField β
l : Filter α
f g : α → β
hf : f ∈ boundedFilterSubmodule l
hg : g ∈ boundedFilterSubmodule l
⊢ f * g ∈ boundedFilterSubmodule l

Next tactic:
simpa only [Pi.one_apply, mul_one, norm_mul] using hf.mul hg
instance uniqueToTop [OrderTop X] {x : X} : Unique (x ⟶ ⊤) where
  default := homOfLE le_top
  uniq := fun a => by 

Proof state:
X : Type u
inst✝¹ : Preorder X
inst✝ : OrderTop X
x : X
a : x ⟶ ⊤
⊢ a = default

Next tactic:
rfl
instance uniqueFromBot [OrderBot X] {x : X} : Unique (⊥ ⟶ x) where
  default := homOfLE bot_le
  uniq := fun a => by 

Proof state:
X : Type u
inst✝¹ : Preorder X
inst✝ : OrderBot X
x : X
a : ⊥ ⟶ x
⊢ a = default

Next tactic:
rfl
theorem mk_mem_sym2_iff : ⟦(a, b)⟧ ∈ s.sym2 ↔ a ∈ s ∧ b ∈ s := by
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
⊢ ⟦(a, b)⟧ ∈ Finset.sym2 s ↔ a ∈ s ∧ b ∈ s

Next tactic:
rw [mem_mk, sym2_val, Multiset.mk_mem_sym2_iff, mem_mk, mem_mk]
@[simp]
theorem mem_sym2_iff {m : Sym2 α} : m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s := by
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
m : Sym2 α
⊢ m ∈ Finset.sym2 s ↔ ∀ a ∈ m, a ∈ s

Next tactic:
rw [mem_mk, sym2_val, Multiset.mem_sym2_iff]
@[simp]
theorem mem_sym2_iff {m : Sym2 α} : m ∈ s.sym2 ↔ ∀ a ∈ m, a ∈ s := by
  rw [mem_mk, sym2_val, Multiset.mem_sym2_iff]
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
m : Sym2 α
⊢ (∀ y ∈ m, y ∈ s.val) ↔ ∀ a ∈ m, a ∈ s

Next tactic:
simp only [mem_val]
instance _root_.Sym2.instFintype [Fintype α] : Fintype (Sym2 α) where
  elems := Finset.univ.sym2
  complete := fun x ↦ by 

Proof state:
α : Type u_1
s t : Finset α
a b : α
inst✝ : Fintype α
x : Sym2 α
⊢ x ∈ Finset.sym2 univ

Next tactic:
rw [mem_sym2_iff]
instance _root_.Sym2.instFintype [Fintype α] : Fintype (Sym2 α) where
  elems := Finset.univ.sym2
  complete := fun x ↦ by rw [mem_sym2_iff]; 

Proof state:
α : Type u_1
s t : Finset α
a b : α
inst✝ : Fintype α
x : Sym2 α
⊢ ∀ a ∈ x, a ∈ univ

Next tactic:
exact (fun a _ ↦ mem_univ a)
@[simp]
theorem sym2_univ [Fintype α] (inst : Fintype (Sym2 α) := Sym2.instFintype) :
    (univ : Finset α).sym2 = univ := by
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
inst✝ : Fintype α
inst : optParam (Fintype (Sym2 α)) Sym2.instFintype
⊢ Finset.sym2 univ = univ

Next tactic:
ext
@[simp]
theorem sym2_univ [Fintype α] (inst : Fintype (Sym2 α) := Sym2.instFintype) :
    (univ : Finset α).sym2 = univ := by
  ext
  

Proof state:
case a
α : Type u_1
s t : Finset α
a b : α
inst✝ : Fintype α
inst : optParam (Fintype (Sym2 α)) Sym2.instFintype
a✝ : Sym2 α
⊢ a✝ ∈ Finset.sym2 univ ↔ a✝ ∈ univ

Next tactic:
simp only [mem_sym2_iff, mem_univ, implies_true]
@[simp, mono]
theorem sym2_mono (h : s ⊆ t) : s.sym2 ⊆ t.sym2 := by
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
h : s ⊆ t
⊢ Finset.sym2 s ⊆ Finset.sym2 t

Next tactic:
rw [← val_le_iff, sym2_val, sym2_val]
@[simp, mono]
theorem sym2_mono (h : s ⊆ t) : s.sym2 ⊆ t.sym2 := by
  rw [← val_le_iff, sym2_val, sym2_val]
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
h : s ⊆ t
⊢ Multiset.sym2 s.val ≤ Multiset.sym2 t.val

Next tactic:
apply Multiset.sym2_mono
@[simp, mono]
theorem sym2_mono (h : s ⊆ t) : s.sym2 ⊆ t.sym2 := by
  rw [← val_le_iff, sym2_val, sym2_val]
  apply Multiset.sym2_mono
  

Proof state:
case h
α : Type u_1
s t : Finset α
a b : α
h : s ⊆ t
⊢ s.val ≤ t.val

Next tactic:
rwa [val_le_iff]
theorem injective_sym2 : Function.Injective (Finset.sym2 : Finset α → _) := by
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
⊢ Function.Injective Finset.sym2

Next tactic:
intro s t h
theorem injective_sym2 : Function.Injective (Finset.sym2 : Finset α → _) := by
  intro s t h
  

Proof state:
α : Type u_1
s✝ t✝ : Finset α
a b : α
s t : Finset α
h : Finset.sym2 s = Finset.sym2 t
⊢ s = t

Next tactic:
ext x
theorem injective_sym2 : Function.Injective (Finset.sym2 : Finset α → _) := by
  intro s t h
  ext x
  

Proof state:
case a
α : Type u_1
s✝ t✝ : Finset α
a b : α
s t : Finset α
h : Finset.sym2 s = Finset.sym2 t
x : α
⊢ x ∈ s ↔ x ∈ t

Next tactic:
simpa using congr(⟦(x, x)⟧ ∈ $h)
theorem sym2_toFinset [DecidableEq α] (m : Multiset α) :
    m.toFinset.sym2 = m.sym2.toFinset := by
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
inst✝ : DecidableEq α
m : Multiset α
⊢ Finset.sym2 (Multiset.toFinset m) = Multiset.toFinset (Multiset.sym2 m)

Next tactic:
ext z
theorem sym2_toFinset [DecidableEq α] (m : Multiset α) :
    m.toFinset.sym2 = m.sym2.toFinset := by
  ext z
  

Proof state:
case a
α : Type u_1
s t : Finset α
a b : α
inst✝ : DecidableEq α
m : Multiset α
z : Sym2 α
⊢ z ∈ Finset.sym2 (Multiset.toFinset m) ↔ z ∈ Multiset.toFinset (Multiset.sym2 m)

Next tactic:
refine z.ind fun x y ↦ ?_
theorem sym2_toFinset [DecidableEq α] (m : Multiset α) :
    m.toFinset.sym2 = m.sym2.toFinset := by
  ext z
  refine z.ind fun x y ↦ ?_
  

Proof state:
case a
α : Type u_1
s t : Finset α
a b : α
inst✝ : DecidableEq α
m : Multiset α
z : Sym2 α
x y : α
⊢ ⟦(x, y)⟧ ∈ Finset.sym2 (Multiset.toFinset m) ↔ ⟦(x, y)⟧ ∈ Multiset.toFinset (Multiset.sym2 m)

Next tactic:
simp only [mk_mem_sym2_iff, Multiset.mem_toFinset, Multiset.mk_mem_sym2_iff]
@[simp]
theorem sym2_eq_empty : s.sym2 = ∅ ↔ s = ∅ := by
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
⊢ Finset.sym2 s = ∅ ↔ s = ∅

Next tactic:
rw [← val_eq_zero, sym2_val, Multiset.sym2_eq_zero_iff, val_eq_zero]
@[simp]
theorem sym2_nonempty : s.sym2.Nonempty ↔ s.Nonempty := by
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
⊢ Finset.Nonempty (Finset.sym2 s) ↔ Finset.Nonempty s

Next tactic:
rw [← not_iff_not]
@[simp]
theorem sym2_nonempty : s.sym2.Nonempty ↔ s.Nonempty := by
  rw [← not_iff_not]
  

Proof state:
α : Type u_1
s t : Finset α
a b : α
⊢ ¬Finset.Nonempty (Finset.sym2 s) ↔ ¬Finset.Nonempty s

Next tactic:
simp_rw [not_nonempty_iff_eq_empty, sym2_eq_empty]
/-- Finset **stars and bars** for the case `n = 2`. -/
theorem card_sym2 (s : Finset α) : s.sym2.card = Nat.choose (s.card + 1) 2 := by
  

Proof state:
α : Type u_1
s✝ t : Finset α
a b : α
s : Finset α
⊢ card (Finset.sym2 s) = Nat.choose (card s + 1) 2

Next tactic:
rw [card_def, sym2_val, Multiset.card_sym2, ← card_def]
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
⊢ Finset.sym2 s = image (Quotient.mk (Sym2.Rel.setoid α)) (s ×ˢ s)

Next tactic:
ext z
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  

Proof state:
case a
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
z : Sym2 α
⊢ z ∈ Finset.sym2 s ↔ z ∈ image (Quotient.mk (Sym2.Rel.setoid α)) (s ×ˢ s)

Next tactic:
refine z.ind fun x y ↦ ?_
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  

Proof state:
case a
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
z : Sym2 α
x y : α
⊢ ⟦(x, y)⟧ ∈ Finset.sym2 s ↔ ⟦(x, y)⟧ ∈ image (Quotient.mk (Sym2.Rel.setoid α)) (s ×ˢ s)

Next tactic:
rw [mk_mem_sym2_iff, mem_image]
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  

Proof state:
case a
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
z : Sym2 α
x y : α
⊢ x ∈ s ∧ y ∈ s ↔ ∃ a ∈ s ×ˢ s, ⟦a⟧ = ⟦(x, y)⟧

Next tactic:
constructor
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  constructor
  · 

Proof state:
case a.mp
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
z : Sym2 α
x y : α
⊢ x ∈ s ∧ y ∈ s → ∃ a ∈ s ×ˢ s, ⟦a⟧ = ⟦(x, y)⟧

Next tactic:
intro h
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  constructor
  · intro h
    

Proof state:
case a.mp
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
z : Sym2 α
x y : α
h : x ∈ s ∧ y ∈ s
⊢ ∃ a ∈ s ×ˢ s, ⟦a⟧ = ⟦(x, y)⟧

Next tactic:
use (x, y)
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  constructor
  · intro h
    use (x, y)
    

Proof state:
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
z : Sym2 α
x y : α
h : x ∈ s ∧ y ∈ s
⊢ (x, y) ∈ s ×ˢ s ∧ ⟦(x, y)⟧ = ⟦(x, y)⟧

Next tactic:
simp only [mem_product, h, and_self, true_and]
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  constructor
  · intro h
    use (x, y)
    simp only [mem_product, h, and_self, true_and]
  · 

Proof state:
case a.mpr
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
z : Sym2 α
x y : α
⊢ (∃ a ∈ s ×ˢ s, ⟦a⟧ = ⟦(x, y)⟧) → x ∈ s ∧ y ∈ s

Next tactic:
rintro ⟨⟨a, b⟩, h⟩
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  constructor
  · intro h
    use (x, y)
    simp only [mem_product, h, and_self, true_and]
  · rintro ⟨⟨a, b⟩, h⟩
    

Proof state:
case a.mpr.intro.mk
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
z : Sym2 α
x y a b : α
h : (a, b) ∈ s ×ˢ s ∧ ⟦(a, b)⟧ = ⟦(x, y)⟧
⊢ x ∈ s ∧ y ∈ s

Next tactic:
simp only [mem_product, Sym2.eq_iff] at h
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  constructor
  · intro h
    use (x, y)
    simp only [mem_product, h, and_self, true_and]
  · rintro ⟨⟨a, b⟩, h⟩
    simp only [mem_product, Sym2.eq_iff] at h
    

Proof state:
case a.mpr.intro.mk
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
z : Sym2 α
x y a b : α
h : (a ∈ s ∧ b ∈ s) ∧ (a = x ∧ b = y ∨ a = y ∧ b = x)
⊢ x ∈ s ∧ y ∈ s

Next tactic:
obtain ⟨h, (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)⟩ := h
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  constructor
  · intro h
    use (x, y)
    simp only [mem_product, h, and_self, true_and]
  · rintro ⟨⟨a, b⟩, h⟩
    simp only [mem_product, Sym2.eq_iff] at h
    obtain ⟨h, (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)⟩ := h
      <;> 

Proof state:
case a.mpr.intro.mk.intro.inl.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
z : Sym2 α
a b : α
h : a ∈ s ∧ b ∈ s
⊢ a ∈ s ∧ b ∈ s

Next tactic:
simp [h]
theorem sym2_eq_image : s.sym2 = (s ×ˢ s).image (Quotient.mk _) := by
  ext z
  refine z.ind fun x y ↦ ?_
  rw [mk_mem_sym2_iff, mem_image]
  constructor
  · intro h
    use (x, y)
    simp only [mem_product, h, and_self, true_and]
  · rintro ⟨⟨a, b⟩, h⟩
    simp only [mem_product, Sym2.eq_iff] at h
    obtain ⟨h, (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩)⟩ := h
      <;> 

Proof state:
case a.mpr.intro.mk.intro.inr.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
z : Sym2 α
a b : α
h : a ∈ s ∧ b ∈ s
⊢ b ∈ s ∧ a ∈ s

Next tactic:
simp [h]
theorem not_isDiag_mk_of_mem_offDiag {a : α × α} (h : a ∈ s.offDiag) : ¬Sym2.IsDiag ⟦a⟧ := by
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b : α
a : α × α
h : a ∈ offDiag s
⊢ ¬Sym2.IsDiag ⟦a⟧

Next tactic:
rw [Sym2.isDiag_iff_proj_eq]
theorem not_isDiag_mk_of_mem_offDiag {a : α × α} (h : a ∈ s.offDiag) : ¬Sym2.IsDiag ⟦a⟧ := by
  rw [Sym2.isDiag_iff_proj_eq]
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b : α
a : α × α
h : a ∈ offDiag s
⊢ ¬a.1 = a.2

Next tactic:
exact (mem_offDiag.1 h).2.2
@[simp]
theorem diag_mem_sym2_mem_iff : (∀ b, b ∈ Sym2.diag a → b ∈ s) ↔ a ∈ s := by
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
m : Sym2 α
⊢ (∀ b ∈ Sym2.diag a, b ∈ s) ↔ a ∈ s

Next tactic:
rw [← mem_sym2_iff]
@[simp]
theorem diag_mem_sym2_mem_iff : (∀ b, b ∈ Sym2.diag a → b ∈ s) ↔ a ∈ s := by
  rw [← mem_sym2_iff]
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
m : Sym2 α
⊢ Sym2.diag a ∈ Finset.sym2 s ↔ a ∈ s

Next tactic:
exact mk_mem_sym2_iff.trans <| and_self_iff
theorem diag_mem_sym2_iff : Sym2.diag a ∈ s.sym2 ↔ a ∈ s := by 

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
m : Sym2 α
⊢ Sym2.diag a ∈ Finset.sym2 s ↔ a ∈ s

Next tactic:
simp [diag_mem_sym2_mem_iff]
theorem image_diag_union_image_offDiag :
    s.diag.image (Quotient.mk _) ∪ s.offDiag.image (Quotient.mk _) = s.sym2 := by
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
m : Sym2 α
⊢ image (Quotient.mk (Sym2.Rel.setoid α)) (diag s) ∪ image (Quotient.mk (Sym2.Rel.setoid α)) (offDiag s) = Finset.sym2 s

Next tactic:
rw [← image_union, diag_union_offDiag, sym2_eq_image]
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
n : ℕ
m : Sym α n
⊢ m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s

Next tactic:
induction' n with n ih
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · 

Proof state:
case zero
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
m : Sym α Nat.zero
⊢ m ∈ Finset.sym s Nat.zero ↔ ∀ a ∈ m, a ∈ s

Next tactic:
refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    

Proof state:
case zero
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
m : Sym α Nat.zero
⊢ m = ∅ → ∀ a ∈ m, a ∈ s

Next tactic:
rintro rfl
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    

Proof state:
case zero
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
⊢ ∀ a ∈ ∅, a ∈ s

Next tactic:
exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  

Proof state:
case succ
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
m : Sym α (Nat.succ n)
⊢ m ∈ Finset.sym s (Nat.succ n) ↔ ∀ a ∈ m, a ∈ s

Next tactic:
refine' mem_sup.trans ⟨_, fun h ↦ _⟩
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · 

Proof state:
case succ.refine'_1
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
m : Sym α (Nat.succ n)
⊢ (∃ v ∈ s, m ∈ image (Sym.cons v) (Finset.sym s n)) → ∀ a ∈ m, a ∈ s

Next tactic:
rintro ⟨a, ha, he⟩ b hb
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · rintro ⟨a, ha, he⟩ b hb
    

Proof state:
case succ.refine'_1.intro.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
m : Sym α (Nat.succ n)
a : α
ha : a ∈ s
he : m ∈ image (Sym.cons a) (Finset.sym s n)
b : α
hb : b ∈ m
⊢ b ∈ s

Next tactic:
rw [mem_image] at he
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · rintro ⟨a, ha, he⟩ b hb
    rw [mem_image] at he
    

Proof state:
case succ.refine'_1.intro.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
m : Sym α (Nat.succ n)
a : α
ha : a ∈ s
he : ∃ a_1 ∈ Finset.sym s n, a ::ₛ a_1 = m
b : α
hb : b ∈ m
⊢ b ∈ s

Next tactic:
obtain ⟨m, he, rfl⟩ := he
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · rintro ⟨a, ha, he⟩ b hb
    rw [mem_image] at he
    obtain ⟨m, he, rfl⟩ := he
    

Proof state:
case succ.refine'_1.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
a : α
ha : a ∈ s
b : α
m : Sym α n
he : m ∈ Finset.sym s n
hb : b ∈ a ::ₛ m
⊢ b ∈ s

Next tactic:
rw [Sym.mem_cons] at hb
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · rintro ⟨a, ha, he⟩ b hb
    rw [mem_image] at he
    obtain ⟨m, he, rfl⟩ := he
    rw [Sym.mem_cons] at hb
    

Proof state:
case succ.refine'_1.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
a : α
ha : a ∈ s
b : α
m : Sym α n
he : m ∈ Finset.sym s n
hb : b = a ∨ b ∈ m
⊢ b ∈ s

Next tactic:
obtain rfl | hb := hb
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · rintro ⟨a, ha, he⟩ b hb
    rw [mem_image] at he
    obtain ⟨m, he, rfl⟩ := he
    rw [Sym.mem_cons] at hb
    obtain rfl | hb := hb
    · 

Proof state:
case succ.refine'_1.intro.intro.intro.intro.inl
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b✝ : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
b : α
m : Sym α n
he : m ∈ Finset.sym s n
ha : b ∈ s
⊢ b ∈ s

Next tactic:
exact ha
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · rintro ⟨a, ha, he⟩ b hb
    rw [mem_image] at he
    obtain ⟨m, he, rfl⟩ := he
    rw [Sym.mem_cons] at hb
    obtain rfl | hb := hb
    · exact ha
    · 

Proof state:
case succ.refine'_1.intro.intro.intro.intro.inr
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b✝ : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
a : α
ha : a ∈ s
b : α
m : Sym α n
he : m ∈ Finset.sym s n
hb : b ∈ m
⊢ b ∈ s

Next tactic:
exact ih.1 he _ hb
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · rintro ⟨a, ha, he⟩ b hb
    rw [mem_image] at he
    obtain ⟨m, he, rfl⟩ := he
    rw [Sym.mem_cons] at hb
    obtain rfl | hb := hb
    · exact ha
    · exact ih.1 he _ hb
  · 

Proof state:
case succ.refine'_2
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
m : Sym α (Nat.succ n)
h : ∀ a ∈ m, a ∈ s
⊢ ∃ v ∈ s, m ∈ image (Sym.cons v) (Finset.sym s n)

Next tactic:
obtain ⟨a, m, rfl⟩ := m.exists_eq_cons_of_succ
@[simp]
theorem mem_sym_iff : m ∈ s.sym n ↔ ∀ a ∈ m, a ∈ s := by
  induction' n with n ih
  · refine' mem_singleton.trans ⟨_, fun _ ↦ Sym.eq_nil_of_card_zero _⟩
    rintro rfl
    exact fun a ha ↦ (Finset.not_mem_empty _ ha).elim
  refine' mem_sup.trans ⟨_, fun h ↦ _⟩
  · rintro ⟨a, ha, he⟩ b hb
    rw [mem_image] at he
    obtain ⟨m, he, rfl⟩ := he
    rw [Sym.mem_cons] at hb
    obtain rfl | hb := hb
    · exact ha
    · exact ih.1 he _ hb
  · obtain ⟨a, m, rfl⟩ := m.exists_eq_cons_of_succ
    

Proof state:
case succ.refine'_2.intro.intro
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a✝ b : α
n : ℕ
ih : ∀ {m : Sym α n}, m ∈ Finset.sym s n ↔ ∀ a ∈ m, a ∈ s
a : α
m : Sym α n
h : ∀ a_1 ∈ a ::ₛ m, a_1 ∈ s
⊢ ∃ v ∈ s, a ::ₛ m ∈ image (Sym.cons v) (Finset.sym s n)

Next tactic:
exact
      ⟨a, h _ <| Sym.mem_cons_self _ _,
        mem_image_of_mem _ <| ih.2 fun b hb ↦ h _ <| Sym.mem_cons_of_mem hb⟩
theorem replicate_mem_sym (ha : a ∈ s) (n : ℕ) : Sym.replicate n a ∈ s.sym n :=
  mem_sym_iff.2 fun b hb ↦ by 

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b✝ : α
n✝ : ℕ
m : Sym α n✝
ha : a ∈ s
n : ℕ
b : α
hb : b ∈ Sym.replicate n a
⊢ b ∈ s

Next tactic:
rwa [(Sym.mem_replicate.1 hb).2]
theorem eq_empty_of_sym_eq_empty (h : s.sym n = ∅) : s = ∅ := by
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
n : ℕ
m : Sym α n
h : Finset.sym s n = ∅
⊢ s = ∅

Next tactic:
rw [← not_nonempty_iff_eq_empty] at h ⊢
theorem eq_empty_of_sym_eq_empty (h : s.sym n = ∅) : s = ∅ := by
  rw [← not_nonempty_iff_eq_empty] at h ⊢
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
n : ℕ
m : Sym α n
h : ¬Finset.Nonempty (Finset.sym s n)
⊢ ¬Finset.Nonempty s

Next tactic:
exact fun hs ↦ h (hs.sym _)
@[simp]
theorem sym_eq_empty : s.sym n = ∅ ↔ n ≠ 0 ∧ s = ∅ := by
  

Proof state:
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
n : ℕ
m : Sym α n
⊢ Finset.sym s n = ∅ ↔ n ≠ 0 ∧ s = ∅

Next tactic:
cases n
@[simp]
theorem sym_eq_empty : s.sym n = ∅ ↔ n ≠ 0 ∧ s = ∅ := by
  cases n
  · 

Proof state:
case zero
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
a b : α
m : Sym α Nat.zero
⊢ Finset.sym s Nat.zero = ∅ ↔ Nat.zero ≠ 0 ∧ s = ∅

Next tactic:
exact iff_of_false (singleton_ne_empty _) fun h ↦ (h.1 rfl).elim