l3lab/ntp-mathlib huggingface dataset:
lemma mem_distinguishedTriangles_iff' (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔
      ∃ (T' : Triangle C) (_ : T' ∈ distTriang C),
        Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T')) := by
  rw [mem_distinguishedTriangles_iff]
  constructor
  · 

Proof state:
case mp
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
⊢ ((triangleOpEquivalence C).inverse.obj T).unop ∈ Pretriangulated.distinguishedTriangles →
    ∃ T',
      ∃ (_ : T' ∈ Pretriangulated.distinguishedTriangles),
        Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T'))

Next tactic:
intro hT
lemma mem_distinguishedTriangles_iff' (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔
      ∃ (T' : Triangle C) (_ : T' ∈ distTriang C),
        Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T')) := by
  rw [mem_distinguishedTriangles_iff]
  constructor
  · intro hT
    

Proof state:
case mp
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
hT : ((triangleOpEquivalence C).inverse.obj T).unop ∈ Pretriangulated.distinguishedTriangles
⊢ ∃ T',
    ∃ (_ : T' ∈ Pretriangulated.distinguishedTriangles),
      Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T'))

Next tactic:
exact ⟨_ ,hT, ⟨(triangleOpEquivalence C).counitIso.symm.app T⟩⟩
lemma mem_distinguishedTriangles_iff' (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔
      ∃ (T' : Triangle C) (_ : T' ∈ distTriang C),
        Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T')) := by
  rw [mem_distinguishedTriangles_iff]
  constructor
  · intro hT
    exact ⟨_ ,hT, ⟨(triangleOpEquivalence C).counitIso.symm.app T⟩⟩
  · 

Proof state:
case mpr
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
⊢ (∃ T',
      ∃ (_ : T' ∈ Pretriangulated.distinguishedTriangles),
        Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T'))) →
    ((triangleOpEquivalence C).inverse.obj T).unop ∈ Pretriangulated.distinguishedTriangles

Next tactic:
rintro ⟨T', hT', ⟨e⟩⟩
lemma mem_distinguishedTriangles_iff' (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔
      ∃ (T' : Triangle C) (_ : T' ∈ distTriang C),
        Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T')) := by
  rw [mem_distinguishedTriangles_iff]
  constructor
  · intro hT
    exact ⟨_ ,hT, ⟨(triangleOpEquivalence C).counitIso.symm.app T⟩⟩
  · rintro ⟨T', hT', ⟨e⟩⟩
    

Proof state:
case mpr.intro.intro.intro
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
T' : Triangle C
hT' : T' ∈ Pretriangulated.distinguishedTriangles
e : T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T')
⊢ ((triangleOpEquivalence C).inverse.obj T).unop ∈ Pretriangulated.distinguishedTriangles

Next tactic:
refine' isomorphic_distinguished _ hT' _ _
lemma mem_distinguishedTriangles_iff' (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔
      ∃ (T' : Triangle C) (_ : T' ∈ distTriang C),
        Nonempty (T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T')) := by
  rw [mem_distinguishedTriangles_iff]
  constructor
  · intro hT
    exact ⟨_ ,hT, ⟨(triangleOpEquivalence C).counitIso.symm.app T⟩⟩
  · rintro ⟨T', hT', ⟨e⟩⟩
    refine' isomorphic_distinguished _ hT' _ _
    

Proof state:
case mpr.intro.intro.intro
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
T' : Triangle C
hT' : T' ∈ Pretriangulated.distinguishedTriangles
e : T ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T')
⊢ ((triangleOpEquivalence C).inverse.obj T).unop ≅ T'

Next tactic:
exact Iso.unop ((triangleOpEquivalence C).unitIso.app (Opposite.op T') ≪≫
      (triangleOpEquivalence C).inverse.mapIso e.symm)
lemma isomorphic_distinguished (T₁ : Triangle Cᵒᵖ)
    (hT₁ : T₁ ∈ distinguishedTriangles C) (T₂ : Triangle Cᵒᵖ) (e : T₂ ≅ T₁) :
    T₂ ∈ distinguishedTriangles C := by
  

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T₁ : Triangle Cᵒᵖ
hT₁ : T₁ ∈ distinguishedTriangles C
T₂ : Triangle Cᵒᵖ
e : T₂ ≅ T₁
⊢ T₂ ∈ distinguishedTriangles C

Next tactic:
simp only [mem_distinguishedTriangles_iff] at hT₁ ⊢
lemma isomorphic_distinguished (T₁ : Triangle Cᵒᵖ)
    (hT₁ : T₁ ∈ distinguishedTriangles C) (T₂ : Triangle Cᵒᵖ) (e : T₂ ≅ T₁) :
    T₂ ∈ distinguishedTriangles C := by
  simp only [mem_distinguishedTriangles_iff] at hT₁ ⊢
  

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T₁ T₂ : Triangle Cᵒᵖ
e : T₂ ≅ T₁
hT₁ : ((triangleOpEquivalence C).inverse.obj T₁).unop ∈ Pretriangulated.distinguishedTriangles
⊢ ((triangleOpEquivalence C).inverse.obj T₂).unop ∈ Pretriangulated.distinguishedTriangles

Next tactic:
exact Pretriangulated.isomorphic_distinguished _ hT₁ _
    ((triangleOpEquivalence C).inverse.mapIso e).unop.symm
/-- Up to rotation, the contractible triangle `X ⟶ X ⟶ 0 ⟶ X⟦1⟧` for `X : Cᵒᵖ` corresponds
to the contractible triangle for `X.unop` in `C`. -/
@[simps!]
noncomputable def contractibleTriangleIso (X : Cᵒᵖ) :
    contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj
      (Opposite.op (contractibleTriangle X.unop).invRotate) :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
    (IsZero.iso (isZero_zero _) (by
      

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.234851, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ IsZero ((triangleOpEquivalence C).functor.obj (Opposite.op (Triangle.invRotate (contractibleTriangle X.unop)))).obj₃

Next tactic:
dsimp
/-- Up to rotation, the contractible triangle `X ⟶ X ⟶ 0 ⟶ X⟦1⟧` for `X : Cᵒᵖ` corresponds
to the contractible triangle for `X.unop` in `C`. -/
@[simps!]
noncomputable def contractibleTriangleIso (X : Cᵒᵖ) :
    contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj
      (Opposite.op (contractibleTriangle X.unop).invRotate) :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
    (IsZero.iso (isZero_zero _) (by
      dsimp
      

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.234851, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ IsZero (Opposite.op ((shiftFunctor C (-1)).obj 0))

Next tactic:
rw [IsZero.iff_id_eq_zero]
/-- Up to rotation, the contractible triangle `X ⟶ X ⟶ 0 ⟶ X⟦1⟧` for `X : Cᵒᵖ` corresponds
to the contractible triangle for `X.unop` in `C`. -/
@[simps!]
noncomputable def contractibleTriangleIso (X : Cᵒᵖ) :
    contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj
      (Opposite.op (contractibleTriangle X.unop).invRotate) :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
    (IsZero.iso (isZero_zero _) (by
      dsimp
      rw [IsZero.iff_id_eq_zero]
      

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.234851, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ 𝟙 (Opposite.op ((shiftFunctor C (-1)).obj 0)) = 0

Next tactic:
change (𝟙 ((0 : C)⟦(-1 : ℤ)⟧)).op = 0
/-- Up to rotation, the contractible triangle `X ⟶ X ⟶ 0 ⟶ X⟦1⟧` for `X : Cᵒᵖ` corresponds
to the contractible triangle for `X.unop` in `C`. -/
@[simps!]
noncomputable def contractibleTriangleIso (X : Cᵒᵖ) :
    contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj
      (Opposite.op (contractibleTriangle X.unop).invRotate) :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
    (IsZero.iso (isZero_zero _) (by
      dsimp
      rw [IsZero.iff_id_eq_zero]
      change (𝟙 ((0 : C)⟦(-1 : ℤ)⟧)).op = 0
      

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.234851, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ (𝟙 ((shiftFunctor C (-1)).obj 0)).op = 0

Next tactic:
rw [← Functor.map_id, id_zero, Functor.map_zero, op_zero]
/-- Up to rotation, the contractible triangle `X ⟶ X ⟶ 0 ⟶ X⟦1⟧` for `X : Cᵒᵖ` corresponds
to the contractible triangle for `X.unop` in `C`. -/
@[simps!]
noncomputable def contractibleTriangleIso (X : Cᵒᵖ) :
    contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj
      (Opposite.op (contractibleTriangle X.unop).invRotate) :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
    (IsZero.iso (isZero_zero _) (by
      dsimp
      rw [IsZero.iff_id_eq_zero]
      change (𝟙 ((0 : C)⟦(-1 : ℤ)⟧)).op = 0
      rw [← Functor.map_id, id_zero, Functor.map_zero, op_zero]))
    (by 

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.234851, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ (contractibleTriangle X).mor₁ ≫ (Iso.refl (contractibleTriangle X).obj₂).hom =
    (Iso.refl (contractibleTriangle X).obj₁).hom ≫
      ((triangleOpEquivalence C).functor.obj (Opposite.op (Triangle.invRotate (contractibleTriangle X.unop)))).mor₁

Next tactic:
aesop_cat
/-- Up to rotation, the contractible triangle `X ⟶ X ⟶ 0 ⟶ X⟦1⟧` for `X : Cᵒᵖ` corresponds
to the contractible triangle for `X.unop` in `C`. -/
@[simps!]
noncomputable def contractibleTriangleIso (X : Cᵒᵖ) :
    contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj
      (Opposite.op (contractibleTriangle X.unop).invRotate) :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
    (IsZero.iso (isZero_zero _) (by
      dsimp
      rw [IsZero.iff_id_eq_zero]
      change (𝟙 ((0 : C)⟦(-1 : ℤ)⟧)).op = 0
      rw [← Functor.map_id, id_zero, Functor.map_zero, op_zero]))
    (by aesop_cat) (by 

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.234851, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ (contractibleTriangle X).mor₂ ≫
      (IsZero.iso (_ : IsZero 0)
          (_ :
            IsZero
              ((triangleOpEquivalence C).functor.obj
                  (Opposite.op (Triangle.invRotate (contractibleTriangle X.unop)))).obj₃)).hom =
    (Iso.refl (contractibleTriangle X).obj₂).hom ≫
      ((triangleOpEquivalence C).functor.obj (Opposite.op (Triangle.invRotate (contractibleTriangle X.unop)))).mor₂

Next tactic:
aesop_cat
/-- Up to rotation, the contractible triangle `X ⟶ X ⟶ 0 ⟶ X⟦1⟧` for `X : Cᵒᵖ` corresponds
to the contractible triangle for `X.unop` in `C`. -/
@[simps!]
noncomputable def contractibleTriangleIso (X : Cᵒᵖ) :
    contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj
      (Opposite.op (contractibleTriangle X.unop).invRotate) :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
    (IsZero.iso (isZero_zero _) (by
      dsimp
      rw [IsZero.iff_id_eq_zero]
      change (𝟙 ((0 : C)⟦(-1 : ℤ)⟧)).op = 0
      rw [← Functor.map_id, id_zero, Functor.map_zero, op_zero]))
    (by aesop_cat) (by aesop_cat) (by 

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.234851, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ (contractibleTriangle X).mor₃ ≫ (shiftFunctor Cᵒᵖ 1).map (Iso.refl (contractibleTriangle X).obj₁).hom =
    (IsZero.iso (_ : IsZero 0)
          (_ :
            IsZero
              ((triangleOpEquivalence C).functor.obj
                  (Opposite.op (Triangle.invRotate (contractibleTriangle X.unop)))).obj₃)).hom ≫
      ((triangleOpEquivalence C).functor.obj (Opposite.op (Triangle.invRotate (contractibleTriangle X.unop)))).mor₃

Next tactic:
aesop_cat
lemma contractible_distinguished (X : Cᵒᵖ) :
    contractibleTriangle X ∈ distinguishedTriangles C := by
  

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ contractibleTriangle X ∈ distinguishedTriangles C

Next tactic:
rw [mem_distinguishedTriangles_iff']
lemma contractible_distinguished (X : Cᵒᵖ) :
    contractibleTriangle X ∈ distinguishedTriangles C := by
  rw [mem_distinguishedTriangles_iff']
  

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ ∃ T',
    ∃ (_ : T' ∈ Pretriangulated.distinguishedTriangles),
      Nonempty (contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj (Opposite.op T'))

Next tactic:
exact ⟨_, inv_rot_of_distTriang _ (Pretriangulated.contractible_distinguished X.unop),
    ⟨contractibleTriangleIso X⟩⟩
/-- Isomorphism expressing a compatibility of the equivalence `triangleOpEquivalence C`
with the rotation of triangles. -/
noncomputable def rotateTriangleOpEquivalenceInverseObjRotateUnopIso (T : Triangle Cᵒᵖ) :
    ((triangleOpEquivalence C).inverse.obj T.rotate).unop.rotate ≅
      ((triangleOpEquivalence C).inverse.obj T).unop :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
      (-((opShiftFunctorEquivalence C 1).unitIso.app T.obj₁).unop) (by 

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.263944, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
⊢ (Triangle.rotate ((triangleOpEquivalence C).inverse.obj (Triangle.rotate T)).unop).mor₁ ≫
      (Iso.refl (Triangle.rotate ((triangleOpEquivalence C).inverse.obj (Triangle.rotate T)).unop).obj₂).hom =
    (Iso.refl (Triangle.rotate ((triangleOpEquivalence C).inverse.obj (Triangle.rotate T)).unop).obj₁).hom ≫
      ((triangleOpEquivalence C).inverse.obj T).unop.mor₁

Next tactic:
simp
/-- Isomorphism expressing a compatibility of the equivalence `triangleOpEquivalence C`
with the rotation of triangles. -/
noncomputable def rotateTriangleOpEquivalenceInverseObjRotateUnopIso (T : Triangle Cᵒᵖ) :
    ((triangleOpEquivalence C).inverse.obj T.rotate).unop.rotate ≅
      ((triangleOpEquivalence C).inverse.obj T).unop :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
      (-((opShiftFunctorEquivalence C 1).unitIso.app T.obj₁).unop) (by simp)
        (Quiver.Hom.op_inj (by 

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.263944, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
⊢ ((Triangle.rotate ((triangleOpEquivalence C).inverse.obj (Triangle.rotate T)).unop).mor₂ ≫
        (-Iso.unop ((opShiftFunctorEquivalence C 1).unitIso.app T.obj₁)).hom).op =
    ((Iso.refl (Triangle.rotate ((triangleOpEquivalence C).inverse.obj (Triangle.rotate T)).unop).obj₂).hom ≫
        ((triangleOpEquivalence C).inverse.obj T).unop.mor₂).op

Next tactic:
aesop_cat
/-- Isomorphism expressing a compatibility of the equivalence `triangleOpEquivalence C`
with the rotation of triangles. -/
noncomputable def rotateTriangleOpEquivalenceInverseObjRotateUnopIso (T : Triangle Cᵒᵖ) :
    ((triangleOpEquivalence C).inverse.obj T.rotate).unop.rotate ≅
      ((triangleOpEquivalence C).inverse.obj T).unop :=
  Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _)
      (-((opShiftFunctorEquivalence C 1).unitIso.app T.obj₁).unop) (by simp)
        (Quiver.Hom.op_inj (by aesop_cat)) (by 

Proof state:
C : Type u_1
inst✝⁵ : Category.{?u.263944, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
⊢ (Triangle.rotate ((triangleOpEquivalence C).inverse.obj (Triangle.rotate T)).unop).mor₃ ≫
      (shiftFunctor C 1).map
        (Iso.refl (Triangle.rotate ((triangleOpEquivalence C).inverse.obj (Triangle.rotate T)).unop).obj₁).hom =
    (-Iso.unop ((opShiftFunctorEquivalence C 1).unitIso.app T.obj₁)).hom ≫
      ((triangleOpEquivalence C).inverse.obj T).unop.mor₃

Next tactic:
aesop_cat
lemma rotate_distinguished_triangle (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔ T.rotate ∈ distinguishedTriangles C := by
  

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
⊢ T ∈ distinguishedTriangles C ↔ Triangle.rotate T ∈ distinguishedTriangles C

Next tactic:
simp only [mem_distinguishedTriangles_iff, Pretriangulated.rotate_distinguished_triangle
    ((triangleOpEquivalence C).inverse.obj (T.rotate)).unop]
lemma rotate_distinguished_triangle (T : Triangle Cᵒᵖ) :
    T ∈ distinguishedTriangles C ↔ T.rotate ∈ distinguishedTriangles C := by
  simp only [mem_distinguishedTriangles_iff, Pretriangulated.rotate_distinguished_triangle
    ((triangleOpEquivalence C).inverse.obj (T.rotate)).unop]
  

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
T : Triangle Cᵒᵖ
⊢ ((triangleOpEquivalence C).inverse.obj T).unop ∈ Pretriangulated.distinguishedTriangles ↔
    Triangle.rotate ((triangleOpEquivalence C).inverse.obj (Triangle.rotate T)).unop ∈
      Pretriangulated.distinguishedTriangles

Next tactic:
exact distinguished_iff_of_iso (rotateTriangleOpEquivalenceInverseObjRotateUnopIso T).symm
lemma distinguished_cocone_triangle {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    ∃ (Z : Cᵒᵖ) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧),
      Triangle.mk f g h ∈ distinguishedTriangles C := by
  

Proof state:
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X Y : Cᵒᵖ
f : X ⟶ Y
⊢ ∃ Z g h, Triangle.mk f g h ∈ distinguishedTriangles C

Next tactic:
obtain ⟨Z, g, h, H⟩ := Pretriangulated.distinguished_cocone_triangle₁ f.unop
lemma distinguished_cocone_triangle {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    ∃ (Z : Cᵒᵖ) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧),
      Triangle.mk f g h ∈ distinguishedTriangles C := by
  obtain ⟨Z, g, h, H⟩ := Pretriangulated.distinguished_cocone_triangle₁ f.unop
  

Proof state:
case intro.intro.intro
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X Y : Cᵒᵖ
f : X ⟶ Y
Z : C
g : Z ⟶ Y.unop
h : X.unop ⟶ (shiftFunctor C 1).obj Z
H : Triangle.mk g f.unop h ∈ Pretriangulated.distinguishedTriangles
⊢ ∃ Z g h, Triangle.mk f g h ∈ distinguishedTriangles C

Next tactic:
refine' ⟨_, g.op, (opShiftFunctorEquivalence C 1).counitIso.inv.app (Opposite.op Z) ≫
    (shiftFunctor Cᵒᵖ (1 : ℤ)).map h.op, _⟩
lemma distinguished_cocone_triangle {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    ∃ (Z : Cᵒᵖ) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧),
      Triangle.mk f g h ∈ distinguishedTriangles C := by
  obtain ⟨Z, g, h, H⟩ := Pretriangulated.distinguished_cocone_triangle₁ f.unop
  refine' ⟨_, g.op, (opShiftFunctorEquivalence C 1).counitIso.inv.app (Opposite.op Z) ≫
    (shiftFunctor Cᵒᵖ (1 : ℤ)).map h.op, _⟩
  

Proof state:
case intro.intro.intro
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X Y : Cᵒᵖ
f : X ⟶ Y
Z : C
g : Z ⟶ Y.unop
h : X.unop ⟶ (shiftFunctor C 1).obj Z
H : Triangle.mk g f.unop h ∈ Pretriangulated.distinguishedTriangles
⊢ Triangle.mk f g.op
      ((opShiftFunctorEquivalence C 1).counitIso.inv.app (Opposite.op Z) ≫ (shiftFunctor Cᵒᵖ 1).map h.op) ∈
    distinguishedTriangles C

Next tactic:
simp only [mem_distinguishedTriangles_iff]
lemma distinguished_cocone_triangle {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    ∃ (Z : Cᵒᵖ) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧),
      Triangle.mk f g h ∈ distinguishedTriangles C := by
  obtain ⟨Z, g, h, H⟩ := Pretriangulated.distinguished_cocone_triangle₁ f.unop
  refine' ⟨_, g.op, (opShiftFunctorEquivalence C 1).counitIso.inv.app (Opposite.op Z) ≫
    (shiftFunctor Cᵒᵖ (1 : ℤ)).map h.op, _⟩
  simp only [mem_distinguishedTriangles_iff]
  

Proof state:
case intro.intro.intro
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X Y : Cᵒᵖ
f : X ⟶ Y
Z : C
g : Z ⟶ Y.unop
h : X.unop ⟶ (shiftFunctor C 1).obj Z
H : Triangle.mk g f.unop h ∈ Pretriangulated.distinguishedTriangles
⊢ ((triangleOpEquivalence C).inverse.obj
        (Triangle.mk f g.op
          ((opShiftFunctorEquivalence C 1).counitIso.inv.app (Opposite.op Z) ≫ (shiftFunctor Cᵒᵖ 1).map h.op))).unop ∈
    Pretriangulated.distinguishedTriangles

Next tactic:
refine' Pretriangulated.isomorphic_distinguished _ H _ _
lemma distinguished_cocone_triangle {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    ∃ (Z : Cᵒᵖ) (g : Y ⟶ Z) (h : Z ⟶ X⟦(1 : ℤ)⟧),
      Triangle.mk f g h ∈ distinguishedTriangles C := by
  obtain ⟨Z, g, h, H⟩ := Pretriangulated.distinguished_cocone_triangle₁ f.unop
  refine' ⟨_, g.op, (opShiftFunctorEquivalence C 1).counitIso.inv.app (Opposite.op Z) ≫
    (shiftFunctor Cᵒᵖ (1 : ℤ)).map h.op, _⟩
  simp only [mem_distinguishedTriangles_iff]
  refine' Pretriangulated.isomorphic_distinguished _ H _ _
  

Proof state:
case intro.intro.intro
C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), Functor.Additive (shiftFunctor C n)
inst✝ : Pretriangulated C
X Y : Cᵒᵖ
f : X ⟶ Y
Z : C
g : Z ⟶ Y.unop
h : X.unop ⟶ (shiftFunctor C 1).obj Z
H : Triangle.mk g f.unop h ∈ Pretriangulated.distinguishedTriangles
⊢ ((triangleOpEquivalence C).inverse.obj
        (Triangle.mk f g.op
          ((opShiftFunctorEquivalence C 1).counitIso.inv.app (Opposite.op Z) ≫ (shiftFunctor Cᵒᵖ 1).map h.op))).unop ≅
    Triangle.mk g f.unop h

Next tactic:
exact Triangle.isoMk _ _ (Iso.refl _) (Iso.refl _) (Iso.refl _) (by aesop_cat) (by aesop_cat)
    (Quiver.Hom.op_inj (by simp [shift_unop_opShiftFunctorEquivalence_counitIso_inv_app]))