Theorem: CategoryTheory.Cat.free_map_map
File: Mathlib/CategoryTheory/Category/Quiv.lean

Proof steps:
state_before: V : Quiv
⊢ { obj := fun V => of (Paths ↑V),
          map := fun {X Y} F =>
            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
              map_comp := ⋯ } }.map
      (𝟙 V) =
    𝟙
      ({ obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.obj
        V)
state_after: V : Quiv
⊢ (let_fun this :=
      { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        (𝟙 V);
    this) =
    𝟙
      ({ obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.obj
        V)
tactic: change (show Paths V ⥤ _ from _) = _
state_before: V : Quiv
⊢ (let_fun this :=
      { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        (𝟙 V);
    this) =
    𝟙
      ({ obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.obj
        V)
state_after: case h_obj.h
V : Quiv
x✝ : Paths ↑V
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (𝟙 V);
        this).obj
      x✝ =
    (𝟙
          ({ obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.obj
            V)).obj
      x✝

case h
V : Quiv
a✝ b✝ : ↑V
e✝ : a✝ ⟶ b✝
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (𝟙 V);
        this).map
      e✝.toPath =
    eqToHom ⋯ ≫
      (𝟙
              ({ obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.obj
                V)).map
          e✝.toPath ≫
        eqToHom ⋯
tactic: ext
state_before: case h_obj.h
V : Quiv
x✝ : Paths ↑V
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (𝟙 V);
        this).obj
      x✝ =
    (𝟙
          ({ obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.obj
            V)).obj
      x✝

case h
V : Quiv
a✝ b✝ : ↑V
e✝ : a✝ ⟶ b✝
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (𝟙 V);
        this).map
      e✝.toPath =
    eqToHom ⋯ ≫
      (𝟙
              ({ obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.obj
                V)).map
          e✝.toPath ≫
        eqToHom ⋯
state_after: case h
V : Quiv
a✝ b✝ : ↑V
e✝ : a✝ ⟶ b✝
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (𝟙 V);
        this).map
      e✝.toPath =
    eqToHom ⋯ ≫
      (𝟙
              ({ obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.obj
                V)).map
          e✝.toPath ≫
        eqToHom ⋯

case h_obj.h
V : Quiv
x✝ : Paths ↑V
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (𝟙 V);
        this).obj
      x✝ =
    (𝟙
          ({ obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.obj
            V)).obj
      x✝
tactic: swap
state_before: U x✝¹ x✝ : Quiv
F : U ⟶ x✝¹
G : x✝¹ ⟶ x✝
⊢ { obj := fun V => of (Paths ↑V),
          map := fun {X Y} F =>
            { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
              map_comp := ⋯ } }.map
      (F ≫ G) =
    { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        F ≫
      { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        G
state_after: U x✝¹ x✝ : Quiv
F : U ⟶ x✝¹
G : x✝¹ ⟶ x✝
⊢ (let_fun this :=
      { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        (F ≫ G);
    this) =
    { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        F ≫
      { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        G
tactic: change (show Paths U ⥤ _ from _) = _
state_before: U x✝¹ x✝ : Quiv
F : U ⟶ x✝¹
G : x✝¹ ⟶ x✝
⊢ (let_fun this :=
      { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        (F ≫ G);
    this) =
    { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        F ≫
      { obj := fun V => of (Paths ↑V),
            map := fun {X Y} F =>
              { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                map_comp := ⋯ } }.map
        G
state_after: case h_obj.h
U x✝² x✝¹ : Quiv
F : U ⟶ x✝²
G : x✝² ⟶ x✝¹
x✝ : Paths ↑U
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (F ≫ G);
        this).obj
      x✝ =
    ({ obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            F ≫
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            G).obj
      x✝

case h
U x✝¹ x✝ : Quiv
F : U ⟶ x✝¹
G : x✝¹ ⟶ x✝
a✝ b✝ : ↑U
e✝ : a✝ ⟶ b✝
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (F ≫ G);
        this).map
      e✝.toPath =
    eqToHom ⋯ ≫
      ({ obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.map
                F ≫
              { obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.map
                G).map
          e✝.toPath ≫
        eqToHom ⋯
tactic: ext
state_before: case h_obj.h
U x✝² x✝¹ : Quiv
F : U ⟶ x✝²
G : x✝² ⟶ x✝¹
x✝ : Paths ↑U
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (F ≫ G);
        this).obj
      x✝ =
    ({ obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            F ≫
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            G).obj
      x✝

case h
U x✝¹ x✝ : Quiv
F : U ⟶ x✝¹
G : x✝¹ ⟶ x✝
a✝ b✝ : ↑U
e✝ : a✝ ⟶ b✝
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (F ≫ G);
        this).map
      e✝.toPath =
    eqToHom ⋯ ≫
      ({ obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.map
                F ≫
              { obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.map
                G).map
          e✝.toPath ≫
        eqToHom ⋯
state_after: case h
U x✝¹ x✝ : Quiv
F : U ⟶ x✝¹
G : x✝¹ ⟶ x✝
a✝ b✝ : ↑U
e✝ : a✝ ⟶ b✝
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (F ≫ G);
        this).map
      e✝.toPath =
    eqToHom ⋯ ≫
      ({ obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.map
                F ≫
              { obj := fun V => of (Paths ↑V),
                    map := fun {X Y} F =>
                      { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                        map_comp := ⋯ } }.map
                G).map
          e✝.toPath ≫
        eqToHom ⋯

case h_obj.h
U x✝² x✝¹ : Quiv
F : U ⟶ x✝²
G : x✝² ⟶ x✝¹
x✝ : Paths ↑U
⊢ (let_fun this :=
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            (F ≫ G);
        this).obj
      x✝ =
    ({ obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            F ≫
          { obj := fun V => of (Paths ↑V),
                map := fun {X Y} F =>
                  { obj := fun X_1 => F.obj X_1, map := fun {X_1 Y_1} f => Prefunctor.mapPath F f, map_id := ⋯,
                    map_comp := ⋯ } }.map
            G).obj
      x✝
tactic: swap