Theorem: CategoryTheory.Paths.lift_unique
File: Mathlib/CategoryTheory/PathCategory.lean

tactic: subst_vars
state_before: V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
φ : V ⥤q C
Φ : Paths V ⥤ C
hΦ : of ⋙q Φ.toPrefunctor = φ
⊢ Φ = lift φ

tactic: fapply Functor.ext
state_before: V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
⊢ Φ = lift (of ⋙q Φ.toPrefunctor)

tactic: rintro X
state_before: case h_obj
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
⊢ ∀ (X : Paths V), Φ.obj X = (lift (of ⋙q Φ.toPrefunctor)).obj X

tactic: rfl
state_before: case h_obj
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X : Paths V
⊢ Φ.obj X = (lift (of ⋙q Φ.toPrefunctor)).obj X

tactic: rintro X Y f
state_before: case h_map
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
⊢ autoParam
    (∀ (X Y : Paths V) (f : X ⟶ Y),
      Φ.map f =
        eqToHom (_ : Φ.obj X = Φ.obj X) ≫
          (lift (of ⋙q Φ.toPrefunctor)).map f ≫ eqToHom (_ : (lift (of ⋙q Φ.toPrefunctor)).obj Y = Φ.obj Y))
    _auto✝

tactic: dsimp [lift]
state_before: case h_map
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X Y : Paths V
f : X ⟶ Y
⊢ Φ.map f =
    eqToHom (_ : Φ.obj X = Φ.obj X) ≫
      (lift (of ⋙q Φ.toPrefunctor)).map f ≫ eqToHom (_ : (lift (of ⋙q Φ.toPrefunctor)).obj Y = Φ.obj Y)

tactic: induction' f with _ _ p f' ih
state_before: case h_map
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X Y : Paths V
f : X ⟶ Y
⊢ Φ.map f =
    𝟙 (Φ.obj X) ≫ Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) f ≫ 𝟙 (Φ.obj Y)

tactic: simp only [Category.comp_id]
state_before: case h_map.nil
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X Y : Paths V
⊢ Φ.map Quiver.Path.nil =
    𝟙 (Φ.obj X) ≫
      Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) Quiver.Path.nil ≫
        𝟙 (Φ.obj X)

tactic: apply Functor.map_id
state_before: case h_map.nil
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X Y : Paths V
⊢ Φ.map Quiver.Path.nil = 𝟙 (Φ.obj X)

tactic: simp only [Category.comp_id, Category.id_comp] at ih ⊢
state_before: case h_map.cons
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X Y b✝ c✝ : Paths V
p : Quiver.Path X b✝
f' : b✝ ⟶ c✝
ih :
  Φ.map p =
    𝟙 (Φ.obj X) ≫
      Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) p ≫ 𝟙 (Φ.obj b✝)
⊢ Φ.map (Quiver.Path.cons p f') =
    𝟙 (Φ.obj X) ≫
      Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) (Quiver.Path.cons p f') ≫
        𝟙 (Φ.obj c✝)

tactic: have : Φ.map (Quiver.Path.cons p f') = Φ.map p ≫ Φ.map (Quiver.Hom.toPath f') := by
  convert Functor.map_comp Φ p (Quiver.Hom.toPath f')
state_before: case h_map.cons
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X Y b✝ c✝ : Paths V
p : Quiver.Path X b✝
f' : b✝ ⟶ c✝
ih : Φ.map p = Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) p
⊢ Φ.map (Quiver.Path.cons p f') =
    Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) p ≫
      Φ.map (Quiver.Hom.toPath f')

tactic: rw [this, ih]
state_before: case h_map.cons
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X Y b✝ c✝ : Paths V
p : Quiver.Path X b✝
f' : b✝ ⟶ c✝
ih : Φ.map p = Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) p
this : Φ.map (Quiver.Path.cons p f') = Φ.map p ≫ Φ.map (Quiver.Hom.toPath f')
⊢ Φ.map (Quiver.Path.cons p f') =
    Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) p ≫
      Φ.map (Quiver.Hom.toPath f')

tactic: convert Functor.map_comp Φ p (Quiver.Hom.toPath f')
state_before: V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
Φ : Paths V ⥤ C
X Y b✝ c✝ : Paths V
p : Quiver.Path X b✝
f' : b✝ ⟶ c✝
ih : Φ.map p = Quiver.Path.rec (𝟙 (Φ.obj X)) (fun {b c} x f ihp => ihp ≫ Φ.map (Quiver.Hom.toPath f)) p
⊢ Φ.map (Quiver.Path.cons p f') = Φ.map p ≫ Φ.map (Quiver.Hom.toPath f')