l3lab/ntp-mathlib huggingface dataset:
/-- The counit for the equivalence `Mon_ (C ⥤ D) ≌ C ⥤ Mon_ D`.
-/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (C ⥤ Mon_ D) :=
  NatIso.ofComponents
    (fun A =>
      NatIso.ofComponents
        (fun X =>
          { hom := { hom := 𝟙 _ }
            inv := { hom := 𝟙 _ } })
        (by aesop_cat))
    (by 

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : MonoidalCategory D
⊢ ∀ {X Y : C ⥤ Mon_ D} (f : X ⟶ Y),
    (inverse ⋙ functor).map f ≫
        ((fun A =>
              NatIso.ofComponents fun X =>
                Iso.mk (Mon_.Hom.mk (𝟙 (((inverse ⋙ functor).obj A).obj X).X))
                  (Mon_.Hom.mk (𝟙 (((𝟭 (C ⥤ Mon_ D)).obj A).obj X).X)))
            Y).hom =
      ((fun A =>
              NatIso.ofComponents fun X =>
                Iso.mk (Mon_.Hom.mk (𝟙 (((inverse ⋙ functor).obj A).obj X).X))
                  (Mon_.Hom.mk (𝟙 (((𝟭 (C ⥤ Mon_ D)).obj A).obj X).X)))
            X).hom ≫
        (𝟭 (C ⥤ Mon_ D)).map f

Next tactic:
aesop_cat
/-- Functor translating a functor into the category of commutative monoid objects
to a commutative monoid object in the functor category
-/
@[simps!]
def inverse : (C ⥤ CommMon_ D) ⥤ CommMon_ (C ⥤ D) where
  obj F :=
    { (monFunctorCategoryEquivalence C D).inverse.obj (F ⋙ CommMon_.forget₂Mon_ D) with
      mul_comm := by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
F : C ⥤ CommMon_ D
src✝ : Mon_ (C ⥤ D) := (monFunctorCategoryEquivalence C D).inverse.obj (F ⋙ CommMon_.forget₂Mon_ D)
⊢ (β_ (Mon_.mk src✝.X src✝.one src✝.mul).X (Mon_.mk src✝.X src✝.one src✝.mul).X).hom ≫
      (Mon_.mk src✝.X src✝.one src✝.mul).mul =
    (Mon_.mk src✝.X src✝.one src✝.mul).mul

Next tactic:
ext X
/-- Functor translating a functor into the category of commutative monoid objects
to a commutative monoid object in the functor category
-/
@[simps!]
def inverse : (C ⥤ CommMon_ D) ⥤ CommMon_ (C ⥤ D) where
  obj F :=
    { (monFunctorCategoryEquivalence C D).inverse.obj (F ⋙ CommMon_.forget₂Mon_ D) with
      mul_comm := by ext X; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
F : C ⥤ CommMon_ D
src✝ : Mon_ (C ⥤ D) := (monFunctorCategoryEquivalence C D).inverse.obj (F ⋙ CommMon_.forget₂Mon_ D)
X : C
⊢ ((β_ (Mon_.mk src✝.X src✝.one src✝.mul).X (Mon_.mk src✝.X src✝.one src✝.mul).X).hom ≫
          (Mon_.mk src✝.X src✝.one src✝.mul).mul).app
      X =
    (Mon_.mk src✝.X src✝.one src✝.mul).mul.app X

Next tactic:
exact (F.obj X).mul_comm
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
⊢ (((𝟭 (CommMon_ (C ⥤ D))).obj A).one ≫ NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)) =
    ((functor ⋙ inverse).obj A).one

Next tactic:
ext X
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
X : C
⊢ (((𝟭 (CommMon_ (C ⥤ D))).obj A).one ≫ NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)).app X =
    ((functor ⋙ inverse).obj A).one.app X

Next tactic:
dsimp
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
X : C
⊢ A.one.app X ≫ 𝟙 (A.X.obj X) = A.one.app X

Next tactic:
simp only [Category.comp_id]
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
⊢ (((𝟭 (CommMon_ (C ⥤ D))).obj A).mul ≫ NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)) =
    ((NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)) ⊗
        NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)) ≫
      ((functor ⋙ inverse).obj A).mul

Next tactic:
ext X
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
X : C
⊢ (((𝟭 (CommMon_ (C ⥤ D))).obj A).mul ≫ NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)).app X =
    (((NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)) ⊗
            NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)) ≫
          ((functor ⋙ inverse).obj A).mul).app
      X

Next tactic:
dsimp
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
X : C
⊢ A.mul.app X ≫ 𝟙 (A.X.obj X) = (𝟙 (A.X.obj X) ⊗ 𝟙 (A.X.obj X)) ≫ A.mul.app X

Next tactic:
simp only [tensor_id, Category.id_comp, Category.comp_id]
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
⊢ (((functor ⋙ inverse).obj A).one ≫ NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x)) =
    ((𝟭 (CommMon_ (C ⥤ D))).obj A).one

Next tactic:
ext X
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
X : C
⊢ (((functor ⋙ inverse).obj A).one ≫ NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x)).app X =
    ((𝟭 (CommMon_ (C ⥤ D))).obj A).one.app X

Next tactic:
dsimp
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; 

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
X : C
⊢ A.one.app X ≫ 𝟙 ((CommMon_.forget₂Mon_ D).obj ((functor.obj A).obj X)).X = A.one.app X

Next tactic:
simp only [Category.comp_id]
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by
              

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
⊢ (((functor ⋙ inverse).obj A).mul ≫ NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x)) =
    ((NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x)) ⊗
        NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x)) ≫
      ((𝟭 (CommMon_ (C ⥤ D))).obj A).mul

Next tactic:
ext X
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by
              ext X
              

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
X : C
⊢ (((functor ⋙ inverse).obj A).mul ≫ NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x)).app X =
    (((NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x)) ⊗
            NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x)) ≫
          ((𝟭 (CommMon_ (C ⥤ D))).obj A).mul).app
      X

Next tactic:
dsimp
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by
              ext X
              dsimp
              

Proof state:
case w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : CommMon_ (C ⥤ D)
X : C
⊢ A.mul.app X ≫ 𝟙 ((CommMon_.forget₂Mon_ D).obj ((functor.obj A).obj X)).X =
    (𝟙 ((CommMon_.forget₂Mon_ D).obj ((functor.obj A).obj X)).X ⊗
        𝟙 ((CommMon_.forget₂Mon_ D).obj ((functor.obj A).obj X)).X) ≫
      A.mul.app X

Next tactic:
simp only [tensor_id, Category.id_comp, Category.comp_id]
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by
              ext X
              dsimp
              simp only [tensor_id, Category.id_comp, Category.comp_id] } })
    fun f => by
      

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
X✝ Y✝ : CommMon_ (C ⥤ D)
f : X✝ ⟶ Y✝
⊢ (𝟭 (CommMon_ (C ⥤ D))).map f ≫
      ((fun A =>
            Iso.mk (Mon_.Hom.mk (NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)))
              (Mon_.Hom.mk (NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x))))
          Y✝).hom =
    ((fun A =>
            Iso.mk (Mon_.Hom.mk (NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)))
              (Mon_.Hom.mk (NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x))))
          X✝).hom ≫
      (functor ⋙ inverse).map f

Next tactic:
ext X
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by
              ext X
              dsimp
              simp only [tensor_id, Category.id_comp, Category.comp_id] } })
    fun f => by
      ext X
      

Proof state:
case h.w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
X✝ Y✝ : CommMon_ (C ⥤ D)
f : X✝ ⟶ Y✝
X : C
⊢ ((𝟭 (CommMon_ (C ⥤ D))).map f ≫
            ((fun A =>
                  Iso.mk (Mon_.Hom.mk (NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)))
                    (Mon_.Hom.mk (NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x))))
                Y✝).hom).hom.app
      X =
    (((fun A =>
                  Iso.mk (Mon_.Hom.mk (NatTrans.mk fun x => 𝟙 (((𝟭 (CommMon_ (C ⥤ D))).obj A).X.obj x)))
                    (Mon_.Hom.mk (NatTrans.mk fun x => 𝟙 (((functor ⋙ inverse).obj A).X.obj x))))
                X✝).hom ≫
            (functor ⋙ inverse).map f).hom.app
      X

Next tactic:
dsimp
/-- The unit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def unitIso : 𝟭 (CommMon_ (C ⥤ D)) ≅ functor ⋙ inverse :=
  NatIso.ofComponents
    (fun A =>
      { hom :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by ext X; dsimp; simp only [tensor_id, Category.id_comp, Category.comp_id] }
        inv :=
          { hom := { app := fun _ => 𝟙 _ }
            one_hom := by ext X; dsimp; simp only [Category.comp_id]
            mul_hom := by
              ext X
              dsimp
              simp only [tensor_id, Category.id_comp, Category.comp_id] } })
    fun f => by
      ext X
      dsimp
      

Proof state:
case h.w.h
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
X✝ Y✝ : CommMon_ (C ⥤ D)
f : X✝ ⟶ Y✝
X : C
⊢ f.hom.app X ≫ 𝟙 (Y✝.X.obj X) = 𝟙 (X✝.X.obj X) ≫ f.hom.app X

Next tactic:
simp only [Category.id_comp, Category.comp_id]
/-- The counit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (C ⥤ CommMon_ D) :=
  NatIso.ofComponents
    (fun A =>
      NatIso.ofComponents
        (fun X =>
          { hom := { hom := 𝟙 _ }
            inv := { hom := 𝟙 _ } })
        (by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
A : C ⥤ CommMon_ D
⊢ ∀ {X Y : C} (f : X ⟶ Y),
    ((inverse ⋙ functor).obj A).map f ≫
        ((fun X =>
              Iso.mk (Mon_.Hom.mk (𝟙 (((inverse ⋙ functor).obj A).obj X).X))
                (Mon_.Hom.mk (𝟙 (((𝟭 (C ⥤ CommMon_ D)).obj A).obj X).X)))
            Y).hom =
      ((fun X =>
              Iso.mk (Mon_.Hom.mk (𝟙 (((inverse ⋙ functor).obj A).obj X).X))
                (Mon_.Hom.mk (𝟙 (((𝟭 (C ⥤ CommMon_ D)).obj A).obj X).X)))
            X).hom ≫
        ((𝟭 (C ⥤ CommMon_ D)).obj A).map f

Next tactic:
aesop_cat
/-- The counit for the equivalence `CommMon_ (C ⥤ D) ≌ C ⥤ CommMon_ D`.
-/
@[simps!]
def counitIso : inverse ⋙ functor ≅ 𝟭 (C ⥤ CommMon_ D) :=
  NatIso.ofComponents
    (fun A =>
      NatIso.ofComponents
        (fun X =>
          { hom := { hom := 𝟙 _ }
            inv := { hom := 𝟙 _ } })
        (by aesop_cat))
    (by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : MonoidalCategory D
inst✝ : BraidedCategory D
⊢ ∀ {X Y : C ⥤ CommMon_ D} (f : X ⟶ Y),
    (inverse ⋙ functor).map f ≫
        ((fun A =>
              NatIso.ofComponents fun X =>
                Iso.mk (Mon_.Hom.mk (𝟙 (((inverse ⋙ functor).obj A).obj X).X))
                  (Mon_.Hom.mk (𝟙 (((𝟭 (C ⥤ CommMon_ D)).obj A).obj X).X)))
            Y).hom =
      ((fun A =>
              NatIso.ofComponents fun X =>
                Iso.mk (Mon_.Hom.mk (𝟙 (((inverse ⋙ functor).obj A).obj X).X))
                  (Mon_.Hom.mk (𝟙 (((𝟭 (C ⥤ CommMon_ D)).obj A).obj X).X)))
            X).hom ≫
        (𝟭 (C ⥤ CommMon_ D)).map f

Next tactic:
aesop_cat
theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α}
    (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i := by
  

Proof state:
α : Type u_1
ι : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : ExistsAddOfLE α
inst✝ : Finite ι
x y : ι → α
h : ∀ (i : ι), x i < y i
⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i

Next tactic:
cases nonempty_fintype ι
theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α}
    (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i := by
  cases nonempty_fintype ι
  

Proof state:
case intro
α : Type u_1
ι : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : ExistsAddOfLE α
inst✝ : Finite ι
x y : ι → α
h : ∀ (i : ι), x i < y i
val✝ : Fintype ι
⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i

Next tactic:
cases isEmpty_or_nonempty ι
theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α}
    (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i := by
  cases nonempty_fintype ι
  cases isEmpty_or_nonempty ι
  · 

Proof state:
case intro.inl
α : Type u_1
ι : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : ExistsAddOfLE α
inst✝ : Finite ι
x y : ι → α
h : ∀ (i : ι), x i < y i
val✝ : Fintype ι
h✝ : IsEmpty ι
⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i

Next tactic:
exact ⟨1, zero_lt_one, isEmptyElim⟩
theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α}
    (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i := by
  cases nonempty_fintype ι
  cases isEmpty_or_nonempty ι
  · exact ⟨1, zero_lt_one, isEmptyElim⟩
  

Proof state:
case intro.inr
α : Type u_1
ι : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : ExistsAddOfLE α
inst✝ : Finite ι
x y : ι → α
h : ∀ (i : ι), x i < y i
val✝ : Fintype ι
h✝ : Nonempty ι
⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i

Next tactic:
choose ε hε hxε using fun i => exists_pos_add_of_lt' (h i)
theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α}
    (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i := by
  cases nonempty_fintype ι
  cases isEmpty_or_nonempty ι
  · exact ⟨1, zero_lt_one, isEmptyElim⟩
  choose ε hε hxε using fun i => exists_pos_add_of_lt' (h i)
  

Proof state:
case intro.inr
α : Type u_1
ι : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : ExistsAddOfLE α
inst✝ : Finite ι
x y : ι → α
h : ∀ (i : ι), x i < y i
val✝ : Fintype ι
h✝ : Nonempty ι
ε : ι → α
hε : ∀ (i : ι), 0 < ε i
hxε : ∀ (i : ι), x i + ε i = y i
⊢ ∃ ε, 0 < ε ∧ ∀ (i : ι), x i + ε < y i

Next tactic:
obtain rfl : x + ε = y := funext hxε
theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α}
    (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i := by
  cases nonempty_fintype ι
  cases isEmpty_or_nonempty ι
  · exact ⟨1, zero_lt_one, isEmptyElim⟩
  choose ε hε hxε using fun i => exists_pos_add_of_lt' (h i)
  obtain rfl : x + ε = y := funext hxε
  

Proof state:
case intro.inr
α : Type u_1
ι : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : ExistsAddOfLE α
inst✝ : Finite ι
x : ι → α
val✝ : Fintype ι
h✝ : Nonempty ι
ε : ι → α
hε : ∀ (i : ι), 0 < ε i
h : ∀ (i : ι), x i < (x + ε) i
hxε : ∀ (i : ι), x i + ε i = (x + ε) i
⊢ ∃ ε_1, 0 < ε_1 ∧ ∀ (i : ι), x i + ε_1 < (x + ε) i

Next tactic:
have hε : 0 < Finset.univ.inf' Finset.univ_nonempty ε := (Finset.lt_inf'_iff _).2 fun i _ => hε _
theorem Pi.exists_forall_pos_add_lt [ExistsAddOfLE α] [Finite ι] {x y : ι → α}
    (h : ∀ i, x i < y i) : ∃ ε, 0 < ε ∧ ∀ i, x i + ε < y i := by
  cases nonempty_fintype ι
  cases isEmpty_or_nonempty ι
  · exact ⟨1, zero_lt_one, isEmptyElim⟩
  choose ε hε hxε using fun i => exists_pos_add_of_lt' (h i)
  obtain rfl : x + ε = y := funext hxε
  have hε : 0 < Finset.univ.inf' Finset.univ_nonempty ε := (Finset.lt_inf'_iff _).2 fun i _ => hε _
  

Proof state:
case intro.inr
α : Type u_1
ι : Type u_2
inst✝² : LinearOrderedSemifield α
inst✝¹ : ExistsAddOfLE α
inst✝ : Finite ι
x : ι → α
val✝ : Fintype ι
h✝ : Nonempty ι
ε : ι → α
hε✝ : ∀ (i : ι), 0 < ε i
h : ∀ (i : ι), x i < (x + ε) i
hxε : ∀ (i : ι), x i + ε i = (x + ε) i
hε : 0 < Finset.inf' Finset.univ (_ : Finset.Nonempty Finset.univ) ε
⊢ ∃ ε_1, 0 < ε_1 ∧ ∀ (i : ι), x i + ε_1 < (x + ε) i

Next tactic:
exact
    ⟨_, half_pos hε, fun i =>
      add_lt_add_left ((half_lt_self hε).trans_le <| Finset.inf'_le _ <| Finset.mem_univ _) _⟩
theorem Definable.map_expansion {L' : FirstOrder.Language} [L'.Structure M] (h : A.Definable L s)
    (φ : L →ᴸ L') [φ.IsExpansionOn M] : A.Definable L' s := by
  

Proof state:
M : Type w
A : Set M
L : Language
inst✝² : Structure L M
α : Type u₁
β : Type u_1
B : Set M
s : Set (α → M)
L' : Language
inst✝¹ : Structure L' M
h : Definable A L s
φ : L →ᴸ L'
inst✝ : LHom.IsExpansionOn φ M
⊢ Definable A L' s

Next tactic:
obtain ⟨ψ, rfl⟩ := h
theorem Definable.map_expansion {L' : FirstOrder.Language} [L'.Structure M] (h : A.Definable L s)
    (φ : L →ᴸ L') [φ.IsExpansionOn M] : A.Definable L' s := by
  obtain ⟨ψ, rfl⟩ := h
  

Proof state:
case intro
M : Type w
A : Set M
L : Language
inst✝² : Structure L M
α : Type u₁
β : Type u_1
B : Set M
L' : Language
inst✝¹ : Structure L' M
φ : L →ᴸ L'
inst✝ : LHom.IsExpansionOn φ M
ψ : Formula (L[[↑A]]) α
⊢ Definable A L' (setOf (Formula.Realize ψ))

Next tactic:
refine' ⟨(φ.addConstants A).onFormula ψ, _⟩
theorem Definable.map_expansion {L' : FirstOrder.Language} [L'.Structure M] (h : A.Definable L s)
    (φ : L →ᴸ L') [φ.IsExpansionOn M] : A.Definable L' s := by
  obtain ⟨ψ, rfl⟩ := h
  refine' ⟨(φ.addConstants A).onFormula ψ, _⟩
  

Proof state:
case intro
M : Type w
A : Set M
L : Language
inst✝² : Structure L M
α : Type u₁
β : Type u_1
B : Set M
L' : Language
inst✝¹ : Structure L' M
φ : L →ᴸ L'
inst✝ : LHom.IsExpansionOn φ M
ψ : Formula (L[[↑A]]) α
⊢ setOf (Formula.Realize ψ) = setOf (Formula.Realize (LHom.onFormula (LHom.addConstants (↑A) φ) ψ))

Next tactic:
ext x