l3lab/ntp-mathlib huggingface dataset:
theorem sInter_apply {x : Class.{u}} {y : ZFSet.{u}} : (⋂₀ x) y ↔ ∀ z : ZFSet.{u}, x z → y ∈ z := by
  refine' ⟨fun hxy z hxz => hxy _ ⟨z, rfl, hxz⟩, _⟩
  rintro H - ⟨z, rfl, hxz⟩
  

Proof state:
case intro.intro
x : Class
y : ZFSet
H : ∀ (z : ZFSet), x z → y ∈ z
z : ZFSet
hxz : x z
⊢ y ∈ ↑z

Next tactic:
exact H _ hxz
theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
  

Proof state:
x y z : Class
hy : y ∈ ⋂₀ x
hz : z ∈ x
⊢ y ∈ z

Next tactic:
obtain ⟨w, rfl, hw⟩ := hy
theorem mem_of_mem_sInter {x y z : Class} (hy : y ∈ ⋂₀ x) (hz : z ∈ x) : y ∈ z := by
  obtain ⟨w, rfl, hw⟩ := hy
  

Proof state:
case intro.intro
x z : Class
hz : z ∈ x
w : ZFSet
hw : (⋂₀ x) w
⊢ ↑w ∈ z

Next tactic:
exact coe_mem.2 (hw z hz)
theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
  

Proof state:
x y : Class
h : Set.Nonempty x
⊢ y ∈ ⋂₀ x ↔ ∀ z ∈ x, y ∈ z

Next tactic:
refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
  refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
  

Proof state:
x y : Class
h : Set.Nonempty x
H : ∀ z ∈ x, y ∈ z
⊢ y ∈ ⋂₀ x

Next tactic:
simp_rw [mem_def, sInter_apply]
theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
  refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
  simp_rw [mem_def, sInter_apply]
  

Proof state:
x y : Class
h : Set.Nonempty x
H : ∀ z ∈ x, y ∈ z
⊢ ∃ x_1, ↑x_1 = y ∧ ∀ (z : ZFSet), x z → x_1 ∈ z

Next tactic:
obtain ⟨z, hz⟩ := h
theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
  refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
  simp_rw [mem_def, sInter_apply]
  obtain ⟨z, hz⟩ := h
  

Proof state:
case intro
x y : Class
H : ∀ z ∈ x, y ∈ z
z : ZFSet
hz : z ∈ x
⊢ ∃ x_1, ↑x_1 = y ∧ ∀ (z : ZFSet), x z → x_1 ∈ z

Next tactic:
obtain ⟨y, rfl, _⟩ := H z (coe_mem.2 hz)
theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
  refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
  simp_rw [mem_def, sInter_apply]
  obtain ⟨z, hz⟩ := h
  obtain ⟨y, rfl, _⟩ := H z (coe_mem.2 hz)
  

Proof state:
case intro.intro.intro
x : Class
z : ZFSet
hz : z ∈ x
y : ZFSet
right✝ : ↑z y
H : ∀ z ∈ x, ↑y ∈ z
⊢ ∃ x_1, ↑x_1 = ↑y ∧ ∀ (z : ZFSet), x z → x_1 ∈ z

Next tactic:
refine' ⟨y, rfl, fun w hxw => _⟩
theorem mem_sInter {x y : Class.{u}} (h : x.Nonempty) : y ∈ ⋂₀ x ↔ ∀ z, z ∈ x → y ∈ z := by
  refine' ⟨fun hy z => mem_of_mem_sInter hy, fun H => _⟩
  simp_rw [mem_def, sInter_apply]
  obtain ⟨z, hz⟩ := h
  obtain ⟨y, rfl, _⟩ := H z (coe_mem.2 hz)
  refine' ⟨y, rfl, fun w hxw => _⟩
  

Proof state:
case intro.intro.intro
x : Class
z : ZFSet
hz : z ∈ x
y : ZFSet
right✝ : ↑z y
H : ∀ z ∈ x, ↑y ∈ z
w : ZFSet
hxw : x w
⊢ y ∈ w

Next tactic:
simpa only [coe_mem, coe_apply] using H w (coe_mem.2 hxw)
@[simp]
theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) := by
  

Proof state:
⊢ ⋃₀ ∅ = ∅

Next tactic:
ext
@[simp]
theorem sUnion_empty : ⋃₀ (∅ : Class.{u}) = (∅ : Class.{u}) := by
  ext
  

Proof state:
case a
z✝ : ZFSet
⊢ (⋃₀ ∅) z✝ ↔ ∅ z✝

Next tactic:
simp
@[simp]
theorem sInter_empty : ⋂₀ (∅ : Class.{u}) = univ := by
  

Proof state:
⊢ ⋂₀ ∅ = univ

Next tactic:
rw [sInter, classToCong_empty, Set.sInter_empty, univ]
/-- An induction principle for sets. If every subset of a class is a member, then the class is
  universal. -/
theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
  eq_univ_of_forall
    (by
      

Proof state:
A : Class
hA : powerset A ⊆ A
⊢ ∀ (x : ZFSet), A x

Next tactic:
by_contra! hnA
/-- An induction principle for sets. If every subset of a class is a member, then the class is
  universal. -/
theorem eq_univ_of_powerset_subset {A : Class} (hA : powerset A ⊆ A) : A = univ :=
  eq_univ_of_forall
    (by
      by_contra! hnA
      

Proof state:
A : Class
hA : powerset A ⊆ A
hnA : ∃ x, ¬A x
⊢ False

Next tactic:
exact
        WellFounded.min_mem ZFSet.mem_wf _ hnA
          (hA fun x hx =>
            Classical.not_not.1 fun hB =>
              WellFounded.not_lt_min ZFSet.mem_wf _ hnA hB <| coe_apply.1 hx)
theorem iota_val (A : Class) (x : ZFSet) (H : ∀ y, A y ↔ y = x) : iota A = ↑x :=
  ext fun y =>
    ⟨fun ⟨_, ⟨x', rfl, h⟩, yx'⟩ => by 

Proof state:
A : Class
x : ZFSet
H : ∀ (y : ZFSet), A y ↔ y = x
y : ZFSet
x✝ : iota A y
x' : ZFSet
h : setOf (fun x => ∀ (y : ZFSet), A y ↔ y = x) x'
yx' : y ∈ ↑x'
⊢ ↑x y

Next tactic:
rwa [← (H x').1 <| (h x').2 rfl]
@[simp]
theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
    (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
  Class.iota_val _ _ fun z => by
    

Proof state:
f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
z : ZFSet
⊢ Class.ToSet (fun x_1 => ↑(map f x) (pair x_1 z)) ↑y ↔ z = f y

Next tactic:
rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
@[simp]
theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
    (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
  Class.iota_val _ _ fun z => by
    rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
    

Proof state:
f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
z : ZFSet
⊢ (∃ z_1 ∈ x, pair z_1 (f z_1) = pair y z) ↔ z = f y

Next tactic:
exact
      ⟨fun ⟨w, _, pr⟩ => by
        let ⟨wy, fw⟩ := ZFSet.pair_injective pr
        rw [← fw, wy], fun e => by
        subst e
        exact ⟨_, h, rfl⟩⟩
@[simp]
theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
    (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
  Class.iota_val _ _ fun z => by
    rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
    exact
      ⟨fun ⟨w, _, pr⟩ => by
        

Proof state:
f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
z : ZFSet
x✝ : ∃ z_1 ∈ x, pair z_1 (f z_1) = pair y z
w : ZFSet
left✝ : w ∈ x
pr : pair w (f w) = pair y z
⊢ z = f y

Next tactic:
let ⟨wy, fw⟩ := ZFSet.pair_injective pr
@[simp]
theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
    (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
  Class.iota_val _ _ fun z => by
    rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
    exact
      ⟨fun ⟨w, _, pr⟩ => by
        let ⟨wy, fw⟩ := ZFSet.pair_injective pr
        

Proof state:
f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
z : ZFSet
x✝ : ∃ z_1 ∈ x, pair z_1 (f z_1) = pair y z
w : ZFSet
left✝ : w ∈ x
pr : pair w (f w) = pair y z
wy : w = y
fw : f w = z
⊢ z = f y

Next tactic:
rw [← fw, wy]
@[simp]
theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
    (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
  Class.iota_val _ _ fun z => by
    rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
    exact
      ⟨fun ⟨w, _, pr⟩ => by
        let ⟨wy, fw⟩ := ZFSet.pair_injective pr
        rw [← fw, wy], fun e => by
        

Proof state:
f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
z : ZFSet
e : z = f y
⊢ ∃ z_1 ∈ x, pair z_1 (f z_1) = pair y z

Next tactic:
subst e
@[simp]
theorem map_fval {f : ZFSet.{u} → ZFSet.{u}} [H : PSet.Definable 1 f] {x y : ZFSet.{u}}
    (h : y ∈ x) : (ZFSet.map f x ′ y : Class.{u}) = f y :=
  Class.iota_val _ _ fun z => by
    rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
    exact
      ⟨fun ⟨w, _, pr⟩ => by
        let ⟨wy, fw⟩ := ZFSet.pair_injective pr
        rw [← fw, wy], fun e => by
        subst e
        

Proof state:
f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
⊢ ∃ z ∈ x, pair z (f z) = pair y (f y)

Next tactic:
exact ⟨_, h, rfl⟩
theorem choice_mem_aux (y : ZFSet.{u}) (yx : y ∈ x) :
    (Classical.epsilon fun z : ZFSet.{u} => z ∈ y) ∈ y :=
  (@Classical.epsilon_spec _ fun z : ZFSet.{u} => z ∈ y) <|
    by_contradiction fun n => h <| by 

Proof state:
x : ZFSet
h : ∅ ∉ x
y : ZFSet
yx : y ∈ x
n : ¬∃ y_1, y_1 ∈ y
⊢ ∅ ∈ x

Next tactic:
rwa [← (eq_empty y).2 fun z zx => n ⟨z, zx⟩]
theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) := by
  

Proof state:
x : ZFSet
h : ∅ ∉ x
y : ZFSet
yx : y ∈ x
⊢ ↑(choice x) ′ ↑y ∈ ↑y

Next tactic:
delta choice
theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) := by
  delta choice
  

Proof state:
x : ZFSet
h : ∅ ∉ x
y : ZFSet
yx : y ∈ x
⊢ ↑(map (fun y => Classical.epsilon fun z => z ∈ y) x) ′ ↑y ∈ ↑y

Next tactic:
rw [@map_fval _ (Classical.allDefinable _) x y yx, Class.coe_mem, Class.coe_apply]
theorem choice_mem (y : ZFSet.{u}) (yx : y ∈ x) : (choice x ′ y : Class.{u}) ∈ (y : Class.{u}) := by
  delta choice
  rw [@map_fval _ (Classical.allDefinable _) x y yx, Class.coe_mem, Class.coe_apply]
  

Proof state:
x : ZFSet
h : ∅ ∉ x
y : ZFSet
yx : y ∈ x
⊢ (Classical.epsilon fun z => z ∈ y) ∈ y

Next tactic:
exact choice_mem_aux x h y yx
private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
    

Proof state:
x : ZFSet
h : ∅ ∉ x
s : Set ZFSet
hs : Small.{u, u + 1} ↑s
⊢ toSet (mk (PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x))) = s

Next tactic:
ext x
private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
    ext x
    

Proof state:
case h
x✝ : ZFSet
h : ∅ ∉ x✝
s : Set ZFSet
hs : Small.{u, u + 1} ↑s
x : ZFSet
⊢ x ∈ toSet (mk (PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x))) ↔ x ∈ s

Next tactic:
rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
    ext x
    rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
    

Proof state:
case h
x✝ : ZFSet
h : ∅ ∉ x✝
s : Set ZFSet
hs : Small.{u, u + 1} ↑s
x : ZFSet
⊢ (Quotient.out x ∈ PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x)) ↔ x ∈ s

Next tactic:
refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
    ext x
    rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
    refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
    · 

Proof state:
case h.refine'_1
x✝ : ZFSet
h : ∅ ∉ x✝
s : Set ZFSet
hs : Small.{u, u + 1} ↑s
x : ZFSet
⊢ (Quotient.out x ∈ PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x)) → x ∈ s

Next tactic:
rintro ⟨b, h2⟩
private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
    ext x
    rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
    refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
    · rintro ⟨b, h2⟩
      

Proof state:
case h.refine'_1.intro
x✝ : ZFSet
h : ∅ ∉ x✝
s : Set ZFSet
hs : Small.{u, u + 1} ↑s
x : ZFSet
b : PSet.Type (PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x))
h2 :
  PSet.Equiv (Quotient.out x)
    (PSet.Func (PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x)) b)
⊢ x ∈ s

Next tactic:
rw [← ZFSet.eq, ZFSet.mk_out] at h2
private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
    ext x
    rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
    refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
    · rintro ⟨b, h2⟩
      rw [← ZFSet.eq, ZFSet.mk_out] at h2
      

Proof state:
case h.refine'_1.intro
x✝ : ZFSet
h : ∅ ∉ x✝
s : Set ZFSet
hs : Small.{u, u + 1} ↑s
x : ZFSet
b : PSet.Type (PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x))
h2 : x = mk (PSet.Func (PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x)) b)
⊢ x ∈ s

Next tactic:
simp [h2]
private lemma toSet_equiv_aux {s : Set ZFSet.{u}} (hs : Small.{u} s) :
  (mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink s).symm x).1.out).toSet = s := by
    ext x
    rw [mem_toSet, ← mk_out x, mk_mem_iff, mk_out]
    refine' ⟨_, λ xs ↦ ⟨equivShrink s (Subtype.mk x xs), _⟩⟩
    · rintro ⟨b, h2⟩
      rw [← ZFSet.eq, ZFSet.mk_out] at h2
      simp [h2]
    · 

Proof state:
case h.refine'_2
x✝ : ZFSet
h : ∅ ∉ x✝
s : Set ZFSet
hs : Small.{u, u + 1} ↑s
x : ZFSet
xs : x ∈ s
⊢ PSet.Equiv (Quotient.out x)
    (PSet.Func (PSet.mk (Shrink.{u, u + 1} ↑s) fun x => Quotient.out ↑((equivShrink ↑s).symm x))
      ((equivShrink ↑s) { val := x, property := xs }))

Next tactic:
simp [PSet.Equiv.refl]
/-- `ZFSet.toSet` as an equivalence. -/
@[simps apply_coe]
noncomputable def toSet_equiv : ZFSet.{u} ≃ {s : Set ZFSet.{u} // Small.{u, u+1} s} where
  toFun x := ⟨x.toSet, x.small_toSet⟩
  invFun := λ ⟨s, h⟩ ↦ mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink.{u, u+1} s).symm x).1.out
  left_inv := Function.rightInverse_of_injective_of_leftInverse (by 

Proof state:
x : ZFSet
h : ∅ ∉ x
⊢ Function.Injective fun x => { val := toSet x, property := (_ : Small.{u, u + 1} ↑(toSet x)) }

Next tactic:
intros x y
/-- `ZFSet.toSet` as an equivalence. -/
@[simps apply_coe]
noncomputable def toSet_equiv : ZFSet.{u} ≃ {s : Set ZFSet.{u} // Small.{u, u+1} s} where
  toFun x := ⟨x.toSet, x.small_toSet⟩
  invFun := λ ⟨s, h⟩ ↦ mk $ PSet.mk (Shrink s) fun x ↦ ((equivShrink.{u, u+1} s).symm x).1.out
  left_inv := Function.rightInverse_of_injective_of_leftInverse (by intros x y; 

Proof state:
x✝ : ZFSet
h : ∅ ∉ x✝
x y : ZFSet
⊢ (fun x => { val := toSet x, property := (_ : Small.{u, u + 1} ↑(toSet x)) }) x =
      (fun x => { val := toSet x, property := (_ : Small.{u, u + 1} ↑(toSet x)) }) y →
    x = y

Next tactic:
simp
instance : Inhabited (MonoidalSingleObj C) := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.73, u_1} C
inst✝ : MonoidalCategory C
⊢ Inhabited (MonoidalSingleObj C)

Next tactic:
unfold MonoidalSingleObj
instance : Inhabited (MonoidalSingleObj C) := by
  unfold MonoidalSingleObj
  

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.73, u_1} C
inst✝ : MonoidalCategory C
⊢ Inhabited PUnit.{?u.86}

Next tactic:
infer_instance
instance : Bicategory (MonoidalSingleObj C) where
  Hom _ _ := C
  id _ := 𝟙_ C
  comp X Y := tensorObj X Y
  whiskerLeft X Y Z f := tensorHom (𝟙 X) f
  whiskerRight f Z := tensorHom f (𝟙 Z)
  associator X Y Z := α_ X Y Z
  leftUnitor X := λ_ X
  rightUnitor X := ρ_ X
  comp_whiskerLeft _ _ _ _ _ := by
    simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc, tensor_id]
  whisker_assoc _ _ _ _ _ := by simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc]
  whiskerRight_comp _ _ _ := by simp_rw [← tensor_id, associator_naturality, Iso.inv_hom_id_assoc]
  id_whiskerLeft _ := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.162, u_1} C
inst✝ : MonoidalCategory C
a✝ b✝ : MonoidalSingleObj C
f✝ g✝ : a✝ ⟶ b✝
x✝ : f✝ ⟶ g✝
⊢ (fun {a b c} X Y Z f => 𝟙 X ⊗ f) (𝟙 a✝) f✝ g✝ x✝ =
    ((fun {a b} X => λ_ X) f✝).hom ≫ x✝ ≫ ((fun {a b} X => λ_ X) g✝).inv

Next tactic:
simp_rw [leftUnitor_inv_naturality, Iso.hom_inv_id_assoc]
instance : Bicategory (MonoidalSingleObj C) where
  Hom _ _ := C
  id _ := 𝟙_ C
  comp X Y := tensorObj X Y
  whiskerLeft X Y Z f := tensorHom (𝟙 X) f
  whiskerRight f Z := tensorHom f (𝟙 Z)
  associator X Y Z := α_ X Y Z
  leftUnitor X := λ_ X
  rightUnitor X := ρ_ X
  comp_whiskerLeft _ _ _ _ _ := by
    

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.162, u_1} C
inst✝ : MonoidalCategory C
a✝ b✝ c✝ d✝ : MonoidalSingleObj C
x✝⁴ : a✝ ⟶ b✝
x✝³ : b✝ ⟶ c✝
x✝² x✝¹ : c✝ ⟶ d✝
x✝ : x✝² ⟶ x✝¹
⊢ (fun {a b c} X Y Z f => 𝟙 X ⊗ f) (x✝⁴ ≫ x✝³) x✝² x✝¹ x✝ =
    ((fun {a b c d} X Y Z => α_ X Y Z) x✝⁴ x✝³ x✝²).hom ≫
      (fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝⁴ (x✝³ ≫ x✝²) (x✝³ ≫ x✝¹) ((fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝³ x✝² x✝¹ x✝) ≫
        ((fun {a b c d} X Y Z => α_ X Y Z) x✝⁴ x✝³ x✝¹).inv

Next tactic:
simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc, tensor_id]
instance : Bicategory (MonoidalSingleObj C) where
  Hom _ _ := C
  id _ := 𝟙_ C
  comp X Y := tensorObj X Y
  whiskerLeft X Y Z f := tensorHom (𝟙 X) f
  whiskerRight f Z := tensorHom f (𝟙 Z)
  associator X Y Z := α_ X Y Z
  leftUnitor X := λ_ X
  rightUnitor X := ρ_ X
  comp_whiskerLeft _ _ _ _ _ := by
    simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc, tensor_id]
  whisker_assoc _ _ _ _ _ := by simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc]
  whiskerRight_comp _ _ _ := by simp_rw [← tensor_id, associator_naturality, Iso.inv_hom_id_assoc]
  id_whiskerLeft _ := by simp_rw [leftUnitor_inv_naturality, Iso.hom_inv_id_assoc]
  whiskerRight_id _ := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.162, u_1} C
inst✝ : MonoidalCategory C
a✝ b✝ : MonoidalSingleObj C
f✝ g✝ : a✝ ⟶ b✝
x✝ : f✝ ⟶ g✝
⊢ (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) x✝ (𝟙 b✝) =
    ((fun {a b} X => ρ_ X) f✝).hom ≫ x✝ ≫ ((fun {a b} X => ρ_ X) g✝).inv

Next tactic:
simp_rw [rightUnitor_inv_naturality, Iso.hom_inv_id_assoc]
instance : Bicategory (MonoidalSingleObj C) where
  Hom _ _ := C
  id _ := 𝟙_ C
  comp X Y := tensorObj X Y
  whiskerLeft X Y Z f := tensorHom (𝟙 X) f
  whiskerRight f Z := tensorHom f (𝟙 Z)
  associator X Y Z := α_ X Y Z
  leftUnitor X := λ_ X
  rightUnitor X := ρ_ X
  comp_whiskerLeft _ _ _ _ _ := by
    simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc, tensor_id]
  whisker_assoc _ _ _ _ _ := by simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc]
  whiskerRight_comp _ _ _ := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.162, u_1} C
inst✝ : MonoidalCategory C
a✝ b✝ c✝ d✝ : MonoidalSingleObj C
f✝ f'✝ : a✝ ⟶ b✝
x✝² : f✝ ⟶ f'✝
x✝¹ : b✝ ⟶ c✝
x✝ : c✝ ⟶ d✝
⊢ (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) x✝² (x✝¹ ≫ x✝) =
    ((fun {a b c d} X Y Z => α_ X Y Z) f✝ x✝¹ x✝).inv ≫
      (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) ((fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) x✝² x✝¹) x✝ ≫
        ((fun {a b c d} X Y Z => α_ X Y Z) f'✝ x✝¹ x✝).hom

Next tactic:
simp_rw [← tensor_id, associator_naturality, Iso.inv_hom_id_assoc]
instance : Bicategory (MonoidalSingleObj C) where
  Hom _ _ := C
  id _ := 𝟙_ C
  comp X Y := tensorObj X Y
  whiskerLeft X Y Z f := tensorHom (𝟙 X) f
  whiskerRight f Z := tensorHom f (𝟙 Z)
  associator X Y Z := α_ X Y Z
  leftUnitor X := λ_ X
  rightUnitor X := ρ_ X
  comp_whiskerLeft _ _ _ _ _ := by
    simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc, tensor_id]
  whisker_assoc _ _ _ _ _ := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.162, u_1} C
inst✝ : MonoidalCategory C
a✝ b✝ c✝ d✝ : MonoidalSingleObj C
x✝⁴ : a✝ ⟶ b✝
x✝³ x✝² : b✝ ⟶ c✝
x✝¹ : x✝³ ⟶ x✝²
x✝ : c✝ ⟶ d✝
⊢ (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) ((fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝⁴ x✝³ x✝² x✝¹) x✝ =
    ((fun {a b c d} X Y Z => α_ X Y Z) x✝⁴ x✝³ x✝).hom ≫
      (fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝⁴ (x✝³ ≫ x✝) (x✝² ≫ x✝) ((fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) x✝¹ x✝) ≫
        ((fun {a b c d} X Y Z => α_ X Y Z) x✝⁴ x✝² x✝).inv

Next tactic:
simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc]
instance : Bicategory (MonoidalSingleObj C) where
  Hom _ _ := C
  id _ := 𝟙_ C
  comp X Y := tensorObj X Y
  whiskerLeft X Y Z f := tensorHom (𝟙 X) f
  whiskerRight f Z := tensorHom f (𝟙 Z)
  associator X Y Z := α_ X Y Z
  leftUnitor X := λ_ X
  rightUnitor X := ρ_ X
  comp_whiskerLeft _ _ _ _ _ := by
    simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc, tensor_id]
  whisker_assoc _ _ _ _ _ := by simp_rw [associator_inv_naturality, Iso.hom_inv_id_assoc]
  whiskerRight_comp _ _ _ := by simp_rw [← tensor_id, associator_naturality, Iso.inv_hom_id_assoc]
  id_whiskerLeft _ := by simp_rw [leftUnitor_inv_naturality, Iso.hom_inv_id_assoc]
  whiskerRight_id _ := by simp_rw [rightUnitor_inv_naturality, Iso.hom_inv_id_assoc]
  pentagon _ _ _ _ := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.162, u_1} C
inst✝ : MonoidalCategory C
a✝ b✝ c✝ d✝ e✝ : MonoidalSingleObj C
x✝³ : a✝ ⟶ b✝
x✝² : b✝ ⟶ c✝
x✝¹ : c✝ ⟶ d✝
x✝ : d✝ ⟶ e✝
⊢ (fun {a b c} {f g} f_1 Z => f_1 ⊗ 𝟙 Z) ((fun {a b c d} X Y Z => α_ X Y Z) x✝³ x✝² x✝¹).hom x✝ ≫
      ((fun {a b c d} X Y Z => α_ X Y Z) x✝³ (x✝² ≫ x✝¹) x✝).hom ≫
        (fun {a b c} X Y Z f => 𝟙 X ⊗ f) x✝³ ((x✝² ≫ x✝¹) ≫ x✝) (x✝² ≫ x✝¹ ≫ x✝)
          ((fun {a b c d} X Y Z => α_ X Y Z) x✝² x✝¹ x✝).hom =
    ((fun {a b c d} X Y Z => α_ X Y Z) (x✝³ ≫ x✝²) x✝¹ x✝).hom ≫
      ((fun {a b c d} X Y Z => α_ X Y Z) x✝³ x✝² (x✝¹ ≫ x✝)).hom

Next tactic:
simp_rw [pentagon]
/-- The monoidal functor from the endomorphisms of the single object
when we promote a monoidal category to a single object bicategory,
to the original monoidal category.

We subsequently show this is an equivalence.
-/
@[simps]
def endMonoidalStarFunctor : MonoidalFunctor (EndMonoidal (MonoidalSingleObj.star C)) C where
  obj X := X
  map f := f
  ε := 𝟙 _
  μ X Y := 𝟙 _
  μ_natural f g := by
    

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.17450, u_1} C
inst✝ : MonoidalCategory C
X✝ Y✝ X'✝ Y'✝ : EndMonoidal (MonoidalSingleObj.star C)
f : X✝ ⟶ Y✝
g : X'✝ ⟶ Y'✝
⊢ ((Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).map f ⊗
        (Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).map g) ≫
      (fun X Y =>
          𝟙
            ((Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).obj X ⊗
              (Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).obj Y))
        Y✝ Y'✝ =
    (fun X Y =>
          𝟙
            ((Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).obj X ⊗
              (Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).obj Y))
        X✝ X'✝ ≫
      (Functor.mk { obj := fun X => X, map := fun {X Y} f => f }).map (f ⊗ g)

Next tactic:
simp_rw [Category.id_comp, Category.comp_id]
/-- The monoidal functor from the endomorphisms of the single object
when we promote a monoidal category to a single object bicategory,
to the original monoidal category.

We subsequently show this is an equivalence.
-/
@[simps]
def endMonoidalStarFunctor : MonoidalFunctor (EndMonoidal (MonoidalSingleObj.star C)) C where
  obj X := X
  map f := f
  ε := 𝟙 _
  μ X Y := 𝟙 _
  μ_natural f g := by
    simp_rw [Category.id_comp, Category.comp_id]
    -- Should we provide further simp lemmas so this goal becomes visible?
    

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.17450, u_1} C
inst✝ : MonoidalCategory C
X✝ Y✝ X'✝ Y'✝ : EndMonoidal (MonoidalSingleObj.star C)
f : X✝ ⟶ Y✝
g : X'✝ ⟶ Y'✝
⊢ f ⊗ g = f ⊗ g

Next tactic:
exact (tensor_id_comp_id_tensor _ _).symm
/-- If `X × -` preserves colimits in `D` for any `X : D`, then the product functor `F ⨯ -` for
`F : C ⥤ D` also preserves colimits.

Note this is (mathematically) a special case of the statement that
"if limits commute with colimits in `D`, then they do as well in `C ⥤ D`"
but the story in Lean is a bit more complex, and this statement isn't directly a special case.
That is, even with a formalised proof of the general statement, there would still need to be some
work to convert to this version: namely, the natural isomorphism
`(evaluation C D).obj k ⋙ prod.functor.obj (F.obj k) ≅
  prod.functor.obj F ⋙ (evaluation C D).obj k`
-/
def FunctorCategory.prodPreservesColimits [HasBinaryProducts D] [HasColimits D]
    [∀ X : D, PreservesColimits (prod.functor.obj X)] (F : C ⥤ D) :
    PreservesColimits (prod.functor.obj F) where
  preservesColimitsOfShape {J : Type u} [Category.{u, u} J] :=
    {
      preservesColimit := fun {K : J ⥤ C ⥤ D} =>
        ( {
          preserves := fun {c : Cocone K} (t : IsColimit c) => by
            

Proof state:
C : Type u
inst✝⁶ : Category.{v₁, u} C
D : Type u₂
inst✝⁵ : Category.{u, u₂} D
E : Type u
inst✝⁴ : Category.{v₂, u} E
inst✝³ : HasBinaryProducts D
inst✝² : HasColimits D
inst✝¹ : (X : D) → PreservesColimits (prod.functor.obj X)
F : C ⥤ D
J : Type u
inst✝ : Category.{u, u} J
K : J ⥤ C ⥤ D
c : Cocone K
t : IsColimit c
⊢ IsColimit ((prod.functor.obj F).mapCocone c)

Next tactic:
apply evaluationJointlyReflectsColimits _ fun {k} => ?_