Theorem: CategoryTheory.CategoryOfElements.to_fromCostructuredArrow_eq
File: Mathlib/CategoryTheory/Elements.lean

tactic: refine' Functor.ext _ _
state_before: C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
⊢ (fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F = 𝟭 (CostructuredArrow yoneda F)

tactic: intro X
state_before: case refine'_1
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
⊢ ∀ (X : CostructuredArrow yoneda F),
    ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj X = (𝟭 (CostructuredArrow yoneda F)).obj X

tactic: cases' X with X_left X_right X_hom
state_before: case refine'_1
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X : CostructuredArrow yoneda F
⊢ ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj X = (𝟭 (CostructuredArrow yoneda F)).obj X

tactic: cases X_right
state_before: case refine'_1.mk
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X_left : C
X_right : Discrete PUnit
X_hom : yoneda.obj X_left ⟶ (Functor.fromPUnit F).obj X_right
⊢ ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj { left := X_left, right := X_right, hom := X_hom } =
    (𝟭 (CostructuredArrow yoneda F)).obj { left := X_left, right := X_right, hom := X_hom }

tactic: simp only [Functor.id_obj, Functor.rightOp_obj, toCostructuredArrow_obj, Functor.comp_obj,
  CostructuredArrow.mk]
state_before: case refine'_1.mk.mk
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X_left : C
as✝ : PUnit
X_hom : yoneda.obj X_left ⟶ (Functor.fromPUnit F).obj { as := as✝ }
⊢ ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj
      { left := X_left, right := { as := as✝ }, hom := X_hom } =
    (𝟭 (CostructuredArrow yoneda F)).obj { left := X_left, right := { as := as✝ }, hom := X_hom }

tactic: congr
state_before: case refine'_1.mk.mk
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X_left : C
as✝ : PUnit
X_hom : yoneda.obj X_left ⟶ (Functor.fromPUnit F).obj { as := as✝ }
⊢ {
      left :=
        ((fromCostructuredArrow F).obj { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.fst.unop,
      right := { as := PUnit.unit },
      hom :=
        (yonedaSections
              ((fromCostructuredArrow F).obj
                        { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.fst.unop
              F).inv
          {
            down :=
              ((fromCostructuredArrow F).obj
                      { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.snd } } =
    { left := X_left, right := { as := as✝ }, hom := X_hom }

tactic: ext x f
state_before: case refine'_1.mk.mk.e_hom
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X_left : C
as✝ : PUnit
X_hom : yoneda.obj X_left ⟶ (Functor.fromPUnit F).obj { as := as✝ }
⊢ (yonedaSections
          ((fromCostructuredArrow F).obj { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.fst.unop
          F).inv
      {
        down :=
          ((fromCostructuredArrow F).obj { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.snd } =
    X_hom

tactic: convert congr_fun (X_hom.naturality f.op).symm (𝟙 X_left)
state_before: case refine'_1.mk.mk.e_hom.w.h.h
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X_left : C
as✝ : PUnit
X_hom : yoneda.obj X_left ⟶ (Functor.fromPUnit F).obj { as := as✝ }
x : Cᵒᵖ
f :
  (yoneda.obj
        ((fromCostructuredArrow F).obj
                  { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.fst.unop).obj
    x
⊢ ((yonedaSections
              ((fromCostructuredArrow F).obj
                        { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.fst.unop
              F).inv
          {
            down :=
              ((fromCostructuredArrow F).obj
                      { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.snd }).app
      x f =
    X_hom.app x f

tactic: simp
state_before: case h.e'_3.h
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X_left : C
as✝ : PUnit
X_hom : yoneda.obj X_left ⟶ (Functor.fromPUnit F).obj { as := as✝ }
x : Cᵒᵖ
f :
  (yoneda.obj
        ((fromCostructuredArrow F).obj
                  { left := X_left, right := { as := as✝ }, hom := X_hom }.op).op.unop.fst.unop).obj
    x
e_1✝ : F.obj x = ((Functor.fromPUnit F).obj { as := as✝ }).obj x.unop.op
⊢ X_hom.app x f = ((yoneda.obj X_left).map f.op ≫ X_hom.app x.unop.op) (𝟙 X_left)

tactic: intro X Y f
state_before: case refine'_2
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
⊢ ∀ (X Y : CostructuredArrow yoneda F) (f : X ⟶ Y),
    ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).map f =
      eqToHom
          (_ :
            ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj X =
              (𝟭 (CostructuredArrow yoneda F)).obj X) ≫
        (𝟭 (CostructuredArrow yoneda F)).map f ≫
          eqToHom
            (_ :
              (𝟭 (CostructuredArrow yoneda F)).obj Y =
                ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj Y)

tactic: ext
state_before: case refine'_2
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X Y : CostructuredArrow yoneda F
f : X ⟶ Y
⊢ ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).map f =
    eqToHom
        (_ :
          ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj X = (𝟭 (CostructuredArrow yoneda F)).obj X) ≫
      (𝟭 (CostructuredArrow yoneda F)).map f ≫
        eqToHom
          (_ :
            (𝟭 (CostructuredArrow yoneda F)).obj Y = ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj Y)

tactic: simp [CostructuredArrow.eqToHom_left]
state_before: case refine'_2.h
C : Type u
inst✝ : Category C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X Y : CostructuredArrow yoneda F
f : X ⟶ Y
⊢ (((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).map f).left =
    (eqToHom
          (_ :
            ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj X =
              (𝟭 (CostructuredArrow yoneda F)).obj X) ≫
        (𝟭 (CostructuredArrow yoneda F)).map f ≫
          eqToHom
            (_ :
              (𝟭 (CostructuredArrow yoneda F)).obj Y =
                ((fromCostructuredArrow F).rightOp ⋙ toCostructuredArrow F).obj Y)).left