Theorem: CategoryTheory.IsKernelPair.pullback
File: Mathlib/CategoryTheory/Limits/Shapes/KernelPair.lean

tactic: simp
state_before: C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
⊢ f ≫ 𝟙 Z = 𝟙 X ≫ f

tactic: simp
state_before: C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
⊢ f ≫ 𝟙 Z = 𝟙 X ≫ f

tactic: refine' ⟨⟨by rw [pullback.lift_fst, pullback.lift_fst]⟩, ⟨PullbackCone.isLimitAux _
  (fun s => pullback.lift (s.fst ≫ pullback.fst)
    (h.lift (s.fst ≫ pullback.snd) (s.snd ≫ pullback.snd) _ ) _) (fun s => _) (fun s => _)
      (fun s m hm => _)⟩⟩
state_before: C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
⊢ IsKernelPair pullback.fst
    (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
    (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))

tactic: . simp_rw [Category.assoc, ← pullback.condition, ← Category.assoc, s.condition]
state_before: case refine'_1
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g

case refine'_2
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (PullbackCone.fst s ≫ pullback.fst) ≫ f =
    lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd) ?refine'_1 ≫ a₁ ≫ g

case refine'_3
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.fst
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.fst s

case refine'_4
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.snd
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.snd s

case refine'_5
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m =
    (fun s =>
        pullback.lift (PullbackCone.fst s ≫ pullback.fst)
          (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
            (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
          (_ :
            (PullbackCone.fst s ≫ pullback.fst) ≫ f =
              lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                  (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                a₁ ≫ g))
      s

tactic: . simp only [assoc, lift_fst_assoc, pullback.condition]
state_before: case refine'_2
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (PullbackCone.fst s ≫ pullback.fst) ≫ f =
    lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
        (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
      a₁ ≫ g

case refine'_3
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.fst
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.fst s

case refine'_4
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.snd
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.snd s

case refine'_5
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m =
    (fun s =>
        pullback.lift (PullbackCone.fst s ≫ pullback.fst)
          (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
            (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
          (_ :
            (PullbackCone.fst s ≫ pullback.fst) ≫ f =
              lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                  (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                a₁ ≫ g))
      s

tactic: . apply pullback.hom_ext <;> simp
state_before: case refine'_3
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.fst
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.fst s

case refine'_4
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.snd
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.snd s

case refine'_5
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m =
    (fun s =>
        pullback.lift (PullbackCone.fst s ≫ pullback.fst)
          (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
            (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
          (_ :
            (PullbackCone.fst s ≫ pullback.fst) ≫ f =
              lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                  (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                a₁ ≫ g))
      s

tactic: . apply pullback.hom_ext
  . simp [s.condition]
  . simp
state_before: case refine'_4
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.snd
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.snd s

case refine'_5
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m =
    (fun s =>
        pullback.lift (PullbackCone.fst s ≫ pullback.fst)
          (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
            (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
          (_ :
            (PullbackCone.fst s ≫ pullback.fst) ≫ f =
              lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                  (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                a₁ ≫ g))
      s

tactic: . apply pullback.hom_ext
  . simpa using hm WalkingCospan.left =≫ pullback.fst
  . apply PullbackCone.IsLimit.hom_ext h.isLimit
    . simpa using hm WalkingCospan.left =≫ pullback.snd
    . simpa using hm WalkingCospan.right =≫ pullback.snd
state_before: case refine'_5
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m =
    (fun s =>
        pullback.lift (PullbackCone.fst s ≫ pullback.fst)
          (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
            (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
          (_ :
            (PullbackCone.fst s ≫ pullback.fst) ≫ f =
              lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                  (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                a₁ ≫ g))
      s

tactic: rw [pullback.lift_fst, pullback.lift_fst]
state_before: C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
⊢ pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫ pullback.fst =
    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫ pullback.fst

tactic: simp_rw [Category.assoc, ← pullback.condition, ← Category.assoc, s.condition]
state_before: case refine'_1
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g

tactic: simp only [assoc, lift_fst_assoc, pullback.condition]
state_before: case refine'_2
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (PullbackCone.fst s ≫ pullback.fst) ≫ f =
    lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
        (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
      a₁ ≫ g

tactic: apply pullback.hom_ext <;> simp
state_before: case refine'_3
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.fst
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.fst s

tactic: apply pullback.hom_ext
state_before: case refine'_4
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      PullbackCone.snd
        (PullbackCone.mk
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
          (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
          (_ :
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                pullback.fst =
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                pullback.fst)) =
    PullbackCone.snd s

tactic: . simp [s.condition]
state_before: case refine'_4.h₀
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        PullbackCone.snd
          (PullbackCone.mk
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
            (_ :
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                  pullback.fst =
                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                  pullback.fst))) ≫
      pullback.fst =
    PullbackCone.snd s ≫ pullback.fst

case refine'_4.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        PullbackCone.snd
          (PullbackCone.mk
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
            (_ :
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                  pullback.fst =
                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                  pullback.fst))) ≫
      pullback.snd =
    PullbackCone.snd s ≫ pullback.snd

tactic: . simp
state_before: case refine'_4.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        PullbackCone.snd
          (PullbackCone.mk
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
            (_ :
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                  pullback.fst =
                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                  pullback.fst))) ≫
      pullback.snd =
    PullbackCone.snd s ≫ pullback.snd

tactic: simp [s.condition]
state_before: case refine'_4.h₀
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        PullbackCone.snd
          (PullbackCone.mk
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
            (_ :
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                  pullback.fst =
                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                  pullback.fst))) ≫
      pullback.fst =
    PullbackCone.snd s ≫ pullback.fst

tactic: simp
state_before: case refine'_4.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
⊢ ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        PullbackCone.snd
          (PullbackCone.mk
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
            (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
            (_ :
              pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                  pullback.fst =
                pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                  pullback.fst))) ≫
      pullback.snd =
    PullbackCone.snd s ≫ pullback.snd

tactic: apply pullback.hom_ext
state_before: case refine'_5
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m =
    (fun s =>
        pullback.lift (PullbackCone.fst s ≫ pullback.fst)
          (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
            (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
          (_ :
            (PullbackCone.fst s ≫ pullback.fst) ≫ f =
              lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                  (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                a₁ ≫ g))
      s

tactic: . simpa using hm WalkingCospan.left =≫ pullback.fst
state_before: case refine'_5.h₀
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m ≫ pullback.fst =
    (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      pullback.fst

case refine'_5.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m ≫ pullback.snd =
    (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      pullback.snd

tactic: . apply PullbackCone.IsLimit.hom_ext h.isLimit
  . simpa using hm WalkingCospan.left =≫ pullback.snd
  . simpa using hm WalkingCospan.right =≫ pullback.snd
state_before: case refine'_5.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m ≫ pullback.snd =
    (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      pullback.snd

tactic: simpa using hm WalkingCospan.left =≫ pullback.fst
state_before: case refine'_5.h₀
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m ≫ pullback.fst =
    (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      pullback.fst

tactic: apply PullbackCone.IsLimit.hom_ext h.isLimit
state_before: case refine'_5.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ m ≫ pullback.snd =
    (fun s =>
          pullback.lift (PullbackCone.fst s ≫ pullback.fst)
            (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
              (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
            (_ :
              (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                    (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                  a₁ ≫ g))
        s ≫
      pullback.snd

tactic: . simpa using hm WalkingCospan.left =≫ pullback.snd
state_before: case refine'_5.h₁.h₀
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ (m ≫ pullback.snd) ≫ PullbackCone.fst (IsPullback.cone h) =
    ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        pullback.snd) ≫
      PullbackCone.fst (IsPullback.cone h)

case refine'_5.h₁.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ (m ≫ pullback.snd) ≫ PullbackCone.snd (IsPullback.cone h) =
    ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        pullback.snd) ≫
      PullbackCone.snd (IsPullback.cone h)

tactic: . simpa using hm WalkingCospan.right =≫ pullback.snd
state_before: case refine'_5.h₁.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ (m ≫ pullback.snd) ≫ PullbackCone.snd (IsPullback.cone h) =
    ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        pullback.snd) ≫
      PullbackCone.snd (IsPullback.cone h)

tactic: simpa using hm WalkingCospan.left =≫ pullback.snd
state_before: case refine'_5.h₁.h₀
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ (m ≫ pullback.snd) ≫ PullbackCone.fst (IsPullback.cone h) =
    ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        pullback.snd) ≫
      PullbackCone.fst (IsPullback.cone h)

tactic: simpa using hm WalkingCospan.right =≫ pullback.snd
state_before: case refine'_5.h₁.h₁
C : Type u
inst✝² : Category C
R X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
a b : R ⟶ X✝
X Y Z A : C
g : Y ⟶ Z
a₁ a₂ : A ⟶ Y
h : IsKernelPair g a₁ a₂
f : X ⟶ Z
inst✝¹ : HasPullback f g
inst✝ : HasPullback f (a₁ ≫ g)
s : PullbackCone pullback.fst pullback.fst
m :
  s.pt ⟶
    (PullbackCone.mk (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
        (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
        (_ :
          pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
              pullback.fst =
            pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
              pullback.fst)).pt
hm :
  ∀ (j : WalkingCospan),
    m ≫
        (PullbackCone.mk
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g))
                (pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g))
                (_ :
                  pullback.map f (a₁ ≫ g) f g (𝟙 X) a₁ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₁ ≫ g) ≫
                      pullback.fst =
                    pullback.map f (a₁ ≫ g) f g (𝟙 X) a₂ (𝟙 Z) (_ : f ≫ 𝟙 Z = 𝟙 X ≫ f) (_ : (a₁ ≫ g) ≫ 𝟙 Z = a₂ ≫ g) ≫
                      pullback.fst)).π.app
          j =
      s.π.app j
⊢ (m ≫ pullback.snd) ≫ PullbackCone.snd (IsPullback.cone h) =
    ((fun s =>
            pullback.lift (PullbackCone.fst s ≫ pullback.fst)
              (lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g))
              (_ :
                (PullbackCone.fst s ≫ pullback.fst) ≫ f =
                  lift h (PullbackCone.fst s ≫ pullback.snd) (PullbackCone.snd s ≫ pullback.snd)
                      (_ : (PullbackCone.fst s ≫ pullback.snd) ≫ g = (PullbackCone.snd s ≫ pullback.snd) ≫ g) ≫
                    a₁ ≫ g))
          s ≫
        pullback.snd) ≫
      PullbackCone.snd (IsPullback.cone h)