l3lab/ntp-mathlib huggingface dataset:
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of structured arrows `d ⟶ F.obj c`
is contravariantly equivalent to the category of costructured arrows `F.op.obj c ⟶ op d`.
-/
def structuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (StructuredArrow d F)ᵒᵖ ≌ CostructuredArrow F.op (op d) :=
  Equivalence.mk (StructuredArrow.toCostructuredArrow F d)
    (CostructuredArrow.toStructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (StructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          dsimp [StructuredArrow.isoMk, Comma.isoMk,StructuredArrow.homMk]; simp)
    (NatIso.ofComponents
      (fun X => CostructuredArrow.isoMk (Iso.refl _))
      fun {X Y} f => by
        apply CommaMorphism.ext <;>
          

Proof state:
case left
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : CostructuredArrow F.op (op d)
f : X ⟶ Y
⊢ (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).map f ≫
        ((fun X =>
              CostructuredArrow.isoMk
                (Iso.refl
                  (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj
                      X).left))
            Y).hom).left =
    (((fun X =>
              CostructuredArrow.isoMk
                (Iso.refl
                  (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj
                      X).left))
            X).hom ≫
        (𝟭 (CostructuredArrow F.op (op d))).map f).left

Next tactic:
dsimp [CostructuredArrow.isoMk, Comma.isoMk, CostructuredArrow.homMk]
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of structured arrows `d ⟶ F.obj c`
is contravariantly equivalent to the category of costructured arrows `F.op.obj c ⟶ op d`.
-/
def structuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (StructuredArrow d F)ᵒᵖ ≌ CostructuredArrow F.op (op d) :=
  Equivalence.mk (StructuredArrow.toCostructuredArrow F d)
    (CostructuredArrow.toStructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (StructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          dsimp [StructuredArrow.isoMk, Comma.isoMk,StructuredArrow.homMk]; simp)
    (NatIso.ofComponents
      (fun X => CostructuredArrow.isoMk (Iso.refl _))
      fun {X Y} f => by
        apply CommaMorphism.ext <;>
          

Proof state:
case right
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : CostructuredArrow F.op (op d)
f : X ⟶ Y
⊢ (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).map f ≫
        ((fun X =>
              CostructuredArrow.isoMk
                (Iso.refl
                  (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj
                      X).left))
            Y).hom).right =
    (((fun X =>
              CostructuredArrow.isoMk
                (Iso.refl
                  (((CostructuredArrow.toStructuredArrow' F d).rightOp ⋙ StructuredArrow.toCostructuredArrow F d).obj
                      X).left))
            X).hom ≫
        (𝟭 (CostructuredArrow F.op (op d))).map f).right

Next tactic:
dsimp [CostructuredArrow.isoMk, Comma.isoMk, CostructuredArrow.homMk]
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of structured arrows `d ⟶ F.obj c`
is contravariantly equivalent to the category of costructured arrows `F.op.obj c ⟶ op d`.
-/
def structuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (StructuredArrow d F)ᵒᵖ ≌ CostructuredArrow F.op (op d) :=
  Equivalence.mk (StructuredArrow.toCostructuredArrow F d)
    (CostructuredArrow.toStructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (StructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          dsimp [StructuredArrow.isoMk, Comma.isoMk,StructuredArrow.homMk]; simp)
    (NatIso.ofComponents
      (fun X => CostructuredArrow.isoMk (Iso.refl _))
      fun {X Y} f => by
        apply CommaMorphism.ext <;>
          dsimp [CostructuredArrow.isoMk, Comma.isoMk, CostructuredArrow.homMk]; 

Proof state:
case left
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : CostructuredArrow F.op (op d)
f : X ⟶ Y
⊢ f.left ≫ 𝟙 Y.left = 𝟙 X.left ≫ f.left

Next tactic:
simp
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of costructured arrows
`F.obj c ⟶ d` is contravariantly equivalent to the category of structured arrows
`op d ⟶ F.op.obj c`.
-/
def costructuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (CostructuredArrow F d)ᵒᵖ ≌ StructuredArrow (op d) F.op :=
  Equivalence.mk (CostructuredArrow.toStructuredArrow F d)
    (StructuredArrow.toCostructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (CostructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : (CostructuredArrow F d)ᵒᵖ
f : X ⟶ Y
⊢ ((𝟭 (CostructuredArrow F d)ᵒᵖ).map f ≫
        ((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) Y).hom).unop =
    (((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) X).hom ≫
        (CostructuredArrow.toStructuredArrow F d ⋙ (StructuredArrow.toCostructuredArrow' F d).rightOp).map f).unop

Next tactic:
apply CommaMorphism.ext
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of costructured arrows
`F.obj c ⟶ d` is contravariantly equivalent to the category of structured arrows
`op d ⟶ F.op.obj c`.
-/
def costructuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (CostructuredArrow F d)ᵒᵖ ≌ StructuredArrow (op d) F.op :=
  Equivalence.mk (CostructuredArrow.toStructuredArrow F d)
    (StructuredArrow.toCostructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (CostructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          

Proof state:
case left
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : (CostructuredArrow F d)ᵒᵖ
f : X ⟶ Y
⊢ ((𝟭 (CostructuredArrow F d)ᵒᵖ).map f ≫
          ((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) Y).hom).unop.left =
    (((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) X).hom ≫
          (CostructuredArrow.toStructuredArrow F d ⋙ (StructuredArrow.toCostructuredArrow' F d).rightOp).map
            f).unop.left

Next tactic:
dsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of costructured arrows
`F.obj c ⟶ d` is contravariantly equivalent to the category of structured arrows
`op d ⟶ F.op.obj c`.
-/
def costructuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (CostructuredArrow F d)ᵒᵖ ≌ StructuredArrow (op d) F.op :=
  Equivalence.mk (CostructuredArrow.toStructuredArrow F d)
    (StructuredArrow.toCostructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (CostructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          

Proof state:
case right
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : (CostructuredArrow F d)ᵒᵖ
f : X ⟶ Y
⊢ ((𝟭 (CostructuredArrow F d)ᵒᵖ).map f ≫
          ((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) Y).hom).unop.right =
    (((fun X => Iso.op (CostructuredArrow.isoMk (Iso.refl X.unop.left))) X).hom ≫
          (CostructuredArrow.toStructuredArrow F d ⋙ (StructuredArrow.toCostructuredArrow' F d).rightOp).map
            f).unop.right

Next tactic:
dsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of costructured arrows
`F.obj c ⟶ d` is contravariantly equivalent to the category of structured arrows
`op d ⟶ F.op.obj c`.
-/
def costructuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (CostructuredArrow F d)ᵒᵖ ≌ StructuredArrow (op d) F.op :=
  Equivalence.mk (CostructuredArrow.toStructuredArrow F d)
    (StructuredArrow.toCostructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (CostructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          dsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]; 

Proof state:
case left
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : (CostructuredArrow F d)ᵒᵖ
f : X ⟶ Y
⊢ 𝟙 Y.unop.left ≫ f.unop.left = f.unop.left ≫ 𝟙 X.unop.left

Next tactic:
simp
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of costructured arrows
`F.obj c ⟶ d` is contravariantly equivalent to the category of structured arrows
`op d ⟶ F.op.obj c`.
-/
def costructuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (CostructuredArrow F d)ᵒᵖ ≌ StructuredArrow (op d) F.op :=
  Equivalence.mk (CostructuredArrow.toStructuredArrow F d)
    (StructuredArrow.toCostructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (CostructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          dsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]; simp)
    (NatIso.ofComponents
      (fun X => StructuredArrow.isoMk (Iso.refl _))
      fun {X Y} f => by
        

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : StructuredArrow (op d) F.op
f : X ⟶ Y
⊢ ((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).map f ≫
      ((fun X =>
            StructuredArrow.isoMk
              (Iso.refl
                (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj
                    X).right))
          Y).hom =
    ((fun X =>
            StructuredArrow.isoMk
              (Iso.refl
                (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj
                    X).right))
          X).hom ≫
      (𝟭 (StructuredArrow (op d) F.op)).map f

Next tactic:
apply CommaMorphism.ext
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of costructured arrows
`F.obj c ⟶ d` is contravariantly equivalent to the category of structured arrows
`op d ⟶ F.op.obj c`.
-/
def costructuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (CostructuredArrow F d)ᵒᵖ ≌ StructuredArrow (op d) F.op :=
  Equivalence.mk (CostructuredArrow.toStructuredArrow F d)
    (StructuredArrow.toCostructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (CostructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          dsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]; simp)
    (NatIso.ofComponents
      (fun X => StructuredArrow.isoMk (Iso.refl _))
      fun {X Y} f => by
        apply CommaMorphism.ext <;>
          

Proof state:
case left
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : StructuredArrow (op d) F.op
f : X ⟶ Y
⊢ (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).map f ≫
        ((fun X =>
              StructuredArrow.isoMk
                (Iso.refl
                  (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj
                      X).right))
            Y).hom).left =
    (((fun X =>
              StructuredArrow.isoMk
                (Iso.refl
                  (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj
                      X).right))
            X).hom ≫
        (𝟭 (StructuredArrow (op d) F.op)).map f).left

Next tactic:
dsimp [StructuredArrow.isoMk, StructuredArrow.homMk, Comma.isoMk]
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of costructured arrows
`F.obj c ⟶ d` is contravariantly equivalent to the category of structured arrows
`op d ⟶ F.op.obj c`.
-/
def costructuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (CostructuredArrow F d)ᵒᵖ ≌ StructuredArrow (op d) F.op :=
  Equivalence.mk (CostructuredArrow.toStructuredArrow F d)
    (StructuredArrow.toCostructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (CostructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          dsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]; simp)
    (NatIso.ofComponents
      (fun X => StructuredArrow.isoMk (Iso.refl _))
      fun {X Y} f => by
        apply CommaMorphism.ext <;>
          

Proof state:
case right
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : StructuredArrow (op d) F.op
f : X ⟶ Y
⊢ (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).map f ≫
        ((fun X =>
              StructuredArrow.isoMk
                (Iso.refl
                  (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj
                      X).right))
            Y).hom).right =
    (((fun X =>
              StructuredArrow.isoMk
                (Iso.refl
                  (((StructuredArrow.toCostructuredArrow' F d).rightOp ⋙ CostructuredArrow.toStructuredArrow F d).obj
                      X).right))
            X).hom ≫
        (𝟭 (StructuredArrow (op d) F.op)).map f).right

Next tactic:
dsimp [StructuredArrow.isoMk, StructuredArrow.homMk, Comma.isoMk]
/-- For a functor `F : C ⥤ D` and an object `d : D`, the category of costructured arrows
`F.obj c ⟶ d` is contravariantly equivalent to the category of structured arrows
`op d ⟶ F.op.obj c`.
-/
def costructuredArrowOpEquivalence (F : C ⥤ D) (d : D) :
    (CostructuredArrow F d)ᵒᵖ ≌ StructuredArrow (op d) F.op :=
  Equivalence.mk (CostructuredArrow.toStructuredArrow F d)
    (StructuredArrow.toCostructuredArrow' F d).rightOp
    (NatIso.ofComponents
      (fun X => (CostructuredArrow.isoMk (Iso.refl _)).op)
      fun {X Y} f => Quiver.Hom.unop_inj <| by
        apply CommaMorphism.ext <;>
          dsimp [CostructuredArrow.isoMk, CostructuredArrow.homMk, Comma.isoMk]; simp)
    (NatIso.ofComponents
      (fun X => StructuredArrow.isoMk (Iso.refl _))
      fun {X Y} f => by
        apply CommaMorphism.ext <;>
          dsimp [StructuredArrow.isoMk, StructuredArrow.homMk, Comma.isoMk]; 

Proof state:
case right
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
d : D
X Y : StructuredArrow (op d) F.op
f : X ⟶ Y
⊢ f.right ≫ 𝟙 Y.right = 𝟙 X.right ≫ f.right

Next tactic:
simp
instance : ConcreteCategory Frm := by
  

Proof state:
⊢ ConcreteCategory Frm

Next tactic:
unfold Frm
instance : ConcreteCategory Frm := by
  unfold Frm
  

Proof state:
⊢ ConcreteCategory (Bundled Frame)

Next tactic:
infer_instance
/-- Constructs an isomorphism of frames from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : Frm.{u}} (e : α ≃o β) : α ≅ β where
  hom := (e : FrameHom _ _)
  inv := (e.symm : FrameHom _ _)
  hom_inv_id := by
    

Proof state:
α β : Frm
e : ↑α ≃o ↑β
⊢ {
        toInfTopHom :=
          { toInfHom := { toFun := ⇑e, map_inf' := (_ : ∀ (a b : ↑α), e (a ⊓ b) = e a ⊓ e b) },
            map_top' := (_ : e ⊤ = ⊤) },
        map_sSup' := (_ : ∀ (s : Set ↑α), e (sSup s) = sSup (⇑e '' s)) } ≫
      {
        toInfTopHom :=
          {
            toInfHom :=
              { toFun := ⇑(OrderIso.symm e),
                map_inf' := (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⊓ b) = (OrderIso.symm e) a ⊓ (OrderIso.symm e) b) },
            map_top' := (_ : (OrderIso.symm e) ⊤ = ⊤) },
        map_sSup' := (_ : ∀ (s : Set ↑β), (OrderIso.symm e) (sSup s) = sSup (⇑(OrderIso.symm e) '' s)) } =
    𝟙 α

Next tactic:
ext
/-- Constructs an isomorphism of frames from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : Frm.{u}} (e : α ≃o β) : α ≅ β where
  hom := (e : FrameHom _ _)
  inv := (e.symm : FrameHom _ _)
  hom_inv_id := by
    ext
    

Proof state:
case w
α β : Frm
e : ↑α ≃o ↑β
x✝ : (forget Frm).obj α
⊢ ({
          toInfTopHom :=
            { toInfHom := { toFun := ⇑e, map_inf' := (_ : ∀ (a b : ↑α), e (a ⊓ b) = e a ⊓ e b) },
              map_top' := (_ : e ⊤ = ⊤) },
          map_sSup' := (_ : ∀ (s : Set ↑α), e (sSup s) = sSup (⇑e '' s)) } ≫
        {
          toInfTopHom :=
            {
              toInfHom :=
                { toFun := ⇑(OrderIso.symm e),
                  map_inf' :=
                    (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⊓ b) = (OrderIso.symm e) a ⊓ (OrderIso.symm e) b) },
              map_top' := (_ : (OrderIso.symm e) ⊤ = ⊤) },
          map_sSup' := (_ : ∀ (s : Set ↑β), (OrderIso.symm e) (sSup s) = sSup (⇑(OrderIso.symm e) '' s)) })
      x✝ =
    (𝟙 α) x✝

Next tactic:
exact e.symm_apply_apply _
/-- Constructs an isomorphism of frames from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : Frm.{u}} (e : α ≃o β) : α ≅ β where
  hom := (e : FrameHom _ _)
  inv := (e.symm : FrameHom _ _)
  hom_inv_id := by
    ext
    exact e.symm_apply_apply _
  inv_hom_id := by
    

Proof state:
α β : Frm
e : ↑α ≃o ↑β
⊢ {
        toInfTopHom :=
          {
            toInfHom :=
              { toFun := ⇑(OrderIso.symm e),
                map_inf' := (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⊓ b) = (OrderIso.symm e) a ⊓ (OrderIso.symm e) b) },
            map_top' := (_ : (OrderIso.symm e) ⊤ = ⊤) },
        map_sSup' := (_ : ∀ (s : Set ↑β), (OrderIso.symm e) (sSup s) = sSup (⇑(OrderIso.symm e) '' s)) } ≫
      {
        toInfTopHom :=
          { toInfHom := { toFun := ⇑e, map_inf' := (_ : ∀ (a b : ↑α), e (a ⊓ b) = e a ⊓ e b) },
            map_top' := (_ : e ⊤ = ⊤) },
        map_sSup' := (_ : ∀ (s : Set ↑α), e (sSup s) = sSup (⇑e '' s)) } =
    𝟙 β

Next tactic:
ext
/-- Constructs an isomorphism of frames from an order isomorphism between them. -/
@[simps]
def Iso.mk {α β : Frm.{u}} (e : α ≃o β) : α ≅ β where
  hom := (e : FrameHom _ _)
  inv := (e.symm : FrameHom _ _)
  hom_inv_id := by
    ext
    exact e.symm_apply_apply _
  inv_hom_id := by
    ext
    

Proof state:
case w
α β : Frm
e : ↑α ≃o ↑β
x✝ : (forget Frm).obj β
⊢ ({
          toInfTopHom :=
            {
              toInfHom :=
                { toFun := ⇑(OrderIso.symm e),
                  map_inf' :=
                    (_ : ∀ (a b : ↑β), (OrderIso.symm e) (a ⊓ b) = (OrderIso.symm e) a ⊓ (OrderIso.symm e) b) },
              map_top' := (_ : (OrderIso.symm e) ⊤ = ⊤) },
          map_sSup' := (_ : ∀ (s : Set ↑β), (OrderIso.symm e) (sSup s) = sSup (⇑(OrderIso.symm e) '' s)) } ≫
        {
          toInfTopHom :=
            { toInfHom := { toFun := ⇑e, map_inf' := (_ : ∀ (a b : ↑α), e (a ⊓ b) = e a ⊓ e b) },
              map_top' := (_ : e ⊤ = ⊤) },
          map_sSup' := (_ : ∀ (s : Set ↑α), e (sSup s) = sSup (⇑e '' s)) })
      x✝ =
    (𝟙 β) x✝

Next tactic:
exact e.apply_symm_apply _
@[to_additive]
theorem mul_subset {S : Submonoid M} (hs : s ⊆ S) (ht : t ⊆ S) : s * t ⊆ S := by
  

Proof state:
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝¹ : Monoid M
inst✝ : AddMonoid A
s t u : Set M
S : Submonoid M
hs : s ⊆ ↑S
ht : t ⊆ ↑S
⊢ s * t ⊆ ↑S

Next tactic:
rintro _ ⟨p, q, hp, hq, rfl⟩
@[to_additive]
theorem mul_subset {S : Submonoid M} (hs : s ⊆ S) (ht : t ⊆ S) : s * t ⊆ S := by
  rintro _ ⟨p, q, hp, hq, rfl⟩
  

Proof state:
case intro.intro.intro.intro
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝¹ : Monoid M
inst✝ : AddMonoid A
s t u : Set M
S : Submonoid M
hs : s ⊆ ↑S
ht : t ⊆ ↑S
p q : M
hp : p ∈ s
hq : q ∈ t
⊢ (fun x x_1 => x * x_1) p q ∈ ↑S

Next tactic:
exact Submonoid.mul_mem _ (hs hp) (ht hq)
@[to_additive]
theorem coe_mul_self_eq (s : Submonoid M) : (s : Set M) * s = s := by
  

Proof state:
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝¹ : Monoid M
inst✝ : AddMonoid A
s✝ t u : Set M
s : Submonoid M
⊢ ↑s * ↑s = ↑s

Next tactic:
ext x
@[to_additive]
theorem coe_mul_self_eq (s : Submonoid M) : (s : Set M) * s = s := by
  ext x
  

Proof state:
case h
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝¹ : Monoid M
inst✝ : AddMonoid A
s✝ t u : Set M
s : Submonoid M
x : M
⊢ x ∈ ↑s * ↑s ↔ x ∈ ↑s

Next tactic:
refine' ⟨_, fun h => ⟨x, 1, h, s.one_mem, mul_one x⟩⟩
@[to_additive]
theorem coe_mul_self_eq (s : Submonoid M) : (s : Set M) * s = s := by
  ext x
  refine' ⟨_, fun h => ⟨x, 1, h, s.one_mem, mul_one x⟩⟩
  

Proof state:
case h
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝¹ : Monoid M
inst✝ : AddMonoid A
s✝ t u : Set M
s : Submonoid M
x : M
⊢ x ∈ ↑s * ↑s → x ∈ ↑s

Next tactic:
rintro ⟨a, b, ha, hb, rfl⟩
@[to_additive]
theorem coe_mul_self_eq (s : Submonoid M) : (s : Set M) * s = s := by
  ext x
  refine' ⟨_, fun h => ⟨x, 1, h, s.one_mem, mul_one x⟩⟩
  rintro ⟨a, b, ha, hb, rfl⟩
  

Proof state:
case h.intro.intro.intro.intro
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝¹ : Monoid M
inst✝ : AddMonoid A
s✝ t u : Set M
s : Submonoid M
a b : M
ha : a ∈ ↑s
hb : b ∈ ↑s
⊢ (fun x x_1 => x * x_1) a b ∈ ↑s

Next tactic:
exact s.mul_mem ha hb
@[to_additive]
theorem sup_eq_closure_mul (H K : Submonoid M) : H ⊔ K = closure ((H : Set M) * (K : Set M)) :=
  le_antisymm
    (sup_le (fun h hh => subset_closure ⟨h, 1, hh, K.one_mem, mul_one h⟩) fun k hk =>
      subset_closure ⟨1, k, H.one_mem, hk, one_mul k⟩)
    ((closure_mul_le _ _).trans <| by 

Proof state:
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝¹ : Monoid M
inst✝ : AddMonoid A
s t u : Set M
H K : Submonoid M
⊢ closure ↑H ⊔ closure ↑K ≤ H ⊔ K

Next tactic:
rw [closure_eq, closure_eq]
@[to_additive]
theorem pow_smul_mem_closure_smul {N : Type*} [CommMonoid N] [MulAction M N] [IsScalarTower M N N]
    (r : M) (s : Set N) {x : N} (hx : x ∈ closure s) : ∃ n : ℕ, r ^ n • x ∈ closure (r • s) := by
  

Proof state:
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝⁴ : Monoid M
inst✝³ : AddMonoid A
s✝ t u : Set M
N : Type u_6
inst✝² : CommMonoid N
inst✝¹ : MulAction M N
inst✝ : IsScalarTower M N N
r : M
s : Set N
x : N
hx : x ∈ closure s
⊢ ∃ n, r ^ n • x ∈ closure (r • s)

Next tactic:
refine' @closure_induction N _ s (fun x : N => ∃ n : ℕ, r ^ n • x ∈ closure (r • s)) _ hx _ _ _
@[to_additive]
theorem pow_smul_mem_closure_smul {N : Type*} [CommMonoid N] [MulAction M N] [IsScalarTower M N N]
    (r : M) (s : Set N) {x : N} (hx : x ∈ closure s) : ∃ n : ℕ, r ^ n • x ∈ closure (r • s) := by
  refine' @closure_induction N _ s (fun x : N => ∃ n : ℕ, r ^ n • x ∈ closure (r • s)) _ hx _ _ _
  · 

Proof state:
case refine'_1
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝⁴ : Monoid M
inst✝³ : AddMonoid A
s✝ t u : Set M
N : Type u_6
inst✝² : CommMonoid N
inst✝¹ : MulAction M N
inst✝ : IsScalarTower M N N
r : M
s : Set N
x : N
hx : x ∈ closure s
⊢ ∀ x ∈ s, (fun x => ∃ n, r ^ n • x ∈ closure (r • s)) x

Next tactic:
intro x hx
@[to_additive]
theorem pow_smul_mem_closure_smul {N : Type*} [CommMonoid N] [MulAction M N] [IsScalarTower M N N]
    (r : M) (s : Set N) {x : N} (hx : x ∈ closure s) : ∃ n : ℕ, r ^ n • x ∈ closure (r • s) := by
  refine' @closure_induction N _ s (fun x : N => ∃ n : ℕ, r ^ n • x ∈ closure (r • s)) _ hx _ _ _
  · intro x hx
    

Proof state:
case refine'_1
α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝⁴ : Monoid M
inst✝³ : AddMonoid A
s✝ t u : Set M
N : Type u_6
inst✝² : CommMonoid N
inst✝¹ : MulAction M N
inst✝ : IsScalarTower M N N
r : M
s : Set N
x✝ : N
hx✝ : x✝ ∈ closure s
x : N
hx : x ∈ s
⊢ ∃ n, r ^ n • x ∈ closure (r • s)

Next tactic:
exact ⟨1, subset_closure ⟨_, hx, by rw [pow_one]⟩⟩