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

tactic: rw [small_k.w_assoc]
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
⊢ a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂

tactic: refine' PullbackCone.isLimitAux _
  (fun s => small_k.lift s.fst s.snd (by rw [← cancel_mono f₂, assoc, s.condition, assoc]))
  (by simp) (by simp) _
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
⊢ IsLimit (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂))

tactic: . intro s m hm
  apply small_k.isLimit.hom_ext
  apply PullbackCone.equalizer_ext small_k.cone _ _
  . exact (hm WalkingCospan.left).trans (by simp)
  . exact (hm WalkingCospan.right).trans (by simp)
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
⊢ ∀ (s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)) (m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt),
    (∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j) →
      m =
        (fun s =>
            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
          s

tactic: rw [← cancel_mono f₂, assoc, s.condition, assoc]
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
⊢ PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
⊢ ∀ (s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)),
    (fun s =>
            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
          s ≫
        PullbackCone.fst (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)) =
      PullbackCone.fst s

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
⊢ ∀ (s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)),
    (fun s =>
            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
          s ≫
        PullbackCone.snd (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)) =
      PullbackCone.snd s

tactic: intro s m hm
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
⊢ ∀ (s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)) (m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt),
    (∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j) →
      m =
        (fun s =>
            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
          s

tactic: apply small_k.isLimit.hom_ext
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ m =
    (fun s =>
        lift small_k (PullbackCone.fst s) (PullbackCone.snd s) (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
      s

tactic: apply PullbackCone.equalizer_ext small_k.cone _ _
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ ∀ (j : WalkingCospan),
    m ≫ (IsPullback.cone small_k).π.app j =
      (fun s =>
            lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
              (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
          s ≫
        (IsPullback.cone small_k).π.app j

tactic: . exact (hm WalkingCospan.left).trans (by simp)
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ m ≫ PullbackCone.fst (IsPullback.cone small_k) =
    (fun s =>
          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
        s ≫
      PullbackCone.fst (IsPullback.cone small_k)

C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ m ≫ PullbackCone.snd (IsPullback.cone small_k) =
    (fun s =>
          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
        s ≫
      PullbackCone.snd (IsPullback.cone small_k)

tactic: . exact (hm WalkingCospan.right).trans (by simp)
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ m ≫ PullbackCone.snd (IsPullback.cone small_k) =
    (fun s =>
          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
        s ≫
      PullbackCone.snd (IsPullback.cone small_k)

tactic: exact (hm WalkingCospan.left).trans (by simp)
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ m ≫ PullbackCone.fst (IsPullback.cone small_k) =
    (fun s =>
          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
        s ≫
      PullbackCone.fst (IsPullback.cone small_k)

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ s.π.app WalkingCospan.left =
    (fun s =>
          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
        s ≫
      PullbackCone.fst (IsPullback.cone small_k)

tactic: exact (hm WalkingCospan.right).trans (by simp)
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ m ≫ PullbackCone.snd (IsPullback.cone small_k) =
    (fun s =>
          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
        s ≫
      PullbackCone.snd (IsPullback.cone small_k)

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
R X Y Z : C
f : X ⟶ Y
a b : R ⟶ X
f₁ : X ⟶ Y
f₂ : Y ⟶ Z
inst✝ : Mono f₂
small_k : IsKernelPair f₁ a b
s : PullbackCone (f₁ ≫ f₂) (f₁ ≫ f₂)
m : s.pt ⟶ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).pt
hm : ∀ (j : WalkingCospan), m ≫ (PullbackCone.mk a b (_ : a ≫ f₁ ≫ f₂ = b ≫ f₁ ≫ f₂)).π.app j = s.π.app j
⊢ s.π.app WalkingCospan.right =
    (fun s =>
          lift small_k (PullbackCone.fst s) (PullbackCone.snd s)
            (_ : PullbackCone.fst s ≫ f₁ = PullbackCone.snd s ≫ f₁))
        s ≫
      PullbackCone.snd (IsPullback.cone small_k)