l3lab/ntp-mathlib huggingface dataset:
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  

Proof state:
case mk.associator_inv
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ c✝ d✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
g✝ : b✝ ⟶ c✝
h✝ : c✝ ⟶ d✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.associator_inv f✝ g✝ h✝) ≫
      (normalizeIso p ((f✝ ≫ g✝) ≫ h✝)).hom =
    (normalizeIso p (f✝ ≫ g✝ ≫ h✝)).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p (f✝ ≫ g✝ ≫ h✝) } = { as := normalizeAux p ((f✝ ≫ g✝) ≫ h✝) }))

Next tactic:
| _ => simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  | _ => 

Proof state:
case mk.associator_inv
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ c✝ d✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
g✝ : b✝ ⟶ c✝
h✝ : c✝ ⟶ d✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.associator_inv f✝ g✝ h✝) ≫
      (normalizeIso p ((f✝ ≫ g✝) ≫ h✝)).hom =
    (normalizeIso p (f✝ ≫ g✝ ≫ h✝)).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p (f✝ ≫ g✝ ≫ h✝) } = { as := normalizeAux p ((f✝ ≫ g✝) ≫ h✝) }))

Next tactic:
simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  

Proof state:
case mk.right_unitor
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.right_unitor f✝) ≫ (normalizeIso p f✝).hom =
    (normalizeIso p (f✝ ≫ 𝟙 b✝)).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p (f✝ ≫ 𝟙 b✝) } = { as := normalizeAux p f✝ }))

Next tactic:
| _ => simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  | _ => 

Proof state:
case mk.right_unitor
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.right_unitor f✝) ≫ (normalizeIso p f✝).hom =
    (normalizeIso p (f✝ ≫ 𝟙 b✝)).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p (f✝ ≫ 𝟙 b✝) } = { as := normalizeAux p f✝ }))

Next tactic:
simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  

Proof state:
case mk.right_unitor_inv
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.right_unitor_inv f✝) ≫ (normalizeIso p (f✝ ≫ 𝟙 b✝)).hom =
    (normalizeIso p f✝).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p (f✝ ≫ 𝟙 b✝) }))

Next tactic:
| _ => simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  | _ => 

Proof state:
case mk.right_unitor_inv
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.right_unitor_inv f✝) ≫ (normalizeIso p (f✝ ≫ 𝟙 b✝)).hom =
    (normalizeIso p f✝).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p (f✝ ≫ 𝟙 b✝) }))

Next tactic:
simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  

Proof state:
case mk.left_unitor
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.left_unitor f✝) ≫ (normalizeIso p f✝).hom =
    (normalizeIso p (𝟙 a✝ ≫ f✝)).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p (𝟙 a✝ ≫ f✝) } = { as := normalizeAux p f✝ }))

Next tactic:
| _ => simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  | _ => 

Proof state:
case mk.left_unitor
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.left_unitor f✝) ≫ (normalizeIso p f✝).hom =
    (normalizeIso p (𝟙 a✝ ≫ f✝)).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p (𝟙 a✝ ≫ f✝) } = { as := normalizeAux p f✝ }))

Next tactic:
simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  

Proof state:
case mk.left_unitor_inv
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.left_unitor_inv f✝) ≫ (normalizeIso p (𝟙 a✝ ≫ f✝)).hom =
    (normalizeIso p f✝).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p (𝟙 a✝ ≫ f✝) }))

Next tactic:
| _ => simp
/-- The 2-isomorphism `normalizeIso p f` is natural in `f`. -/
theorem normalize_naturality {a b c : B} (p : Path a b) {f g : Hom b c} (η : f ⟶ g) :
    (preinclusion B).map ⟨p⟩ ◁ η ≫ (normalizeIso p g).hom =
      (normalizeIso p f).hom ≫
        (preinclusion B).map₂ (eqToHom (Discrete.ext _ _ (normalizeAux_congr p η))) := by
  rcases η with ⟨η'⟩; clear η;
  induction η' with
  | id => simp
  | vcomp η θ ihf ihg =>
    simp only [mk_vcomp, Bicategory.whiskerLeft_comp]
    slice_lhs 2 3 => rw [ihg]
    slice_lhs 1 2 => rw [ihf]
    simp
  -- p ≠ nil required! See the docstring of `normalizeAux`.
  | whisker_left _ _ ih =>
    dsimp
    rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
    simp
  | whisker_right h η' ih =>
    dsimp
    rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih, comp_whiskerRight]
    have := dcongr_arg (fun x => (normalizeIso x h).hom) (normalizeAux_congr p (Quot.mk _ η'))
    dsimp at this; simp [this]
  | _ => 

Proof state:
case mk.left_unitor_inv
B : Type u
inst✝ : Quiver B
a b c : B
f g : Hom b c
a✝ b✝ : FreeBicategory B
f✝ : a✝ ⟶ b✝
p : Path a a✝
⊢ (↑(preinclusion B)).map { as := p } ◁ Quot.mk Rel (Hom₂.left_unitor_inv f✝) ≫ (normalizeIso p (𝟙 a✝ ≫ f✝)).hom =
    (normalizeIso p f✝).hom ≫
      PrelaxFunctor.map₂ (preinclusion B)
        (eqToHom (_ : { as := normalizeAux p f✝ } = { as := normalizeAux p (𝟙 a✝ ≫ f✝) }))

Next tactic:
simp
theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
    normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) := by
  

Proof state:
B : Type u
inst✝ : Quiver B
a b c : B
f : Hom a b
g : Hom b c
⊢ normalizeAux nil (Hom.comp f g) = comp (normalizeAux nil f) (normalizeAux nil g)

Next tactic:
induction g generalizing a with
  | id => rfl
  | of => rfl
  | comp g _ ihf ihg => erw [ihg (f.comp g), ihf f, ihg g, comp_assoc]
theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
    normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) := by
  induction g generalizing a with
  

Proof state:
case id
B : Type u
inst✝ : Quiver B
b c a✝ a : B
f : Hom a a✝
⊢ normalizeAux nil (Hom.comp f (Hom.id a✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.id a✝))

Next tactic:
| id => rfl
theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
    normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) := by
  induction g generalizing a with
  | id => 

Proof state:
case id
B : Type u
inst✝ : Quiver B
b c a✝ a : B
f : Hom a a✝
⊢ normalizeAux nil (Hom.comp f (Hom.id a✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.id a✝))

Next tactic:
rfl
theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
    normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) := by
  induction g generalizing a with
  | id => rfl
  

Proof state:
case of
B : Type u
inst✝ : Quiver B
b c a✝ b✝ : B
f✝ : a✝ ⟶ b✝
a : B
f : Hom a a✝
⊢ normalizeAux nil (Hom.comp f (Hom.of f✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.of f✝))

Next tactic:
| of => rfl
theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
    normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) := by
  induction g generalizing a with
  | id => rfl
  | of => 

Proof state:
case of
B : Type u
inst✝ : Quiver B
b c a✝ b✝ : B
f✝ : a✝ ⟶ b✝
a : B
f : Hom a a✝
⊢ normalizeAux nil (Hom.comp f (Hom.of f✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.of f✝))

Next tactic:
rfl
theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
    normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) := by
  induction g generalizing a with
  | id => rfl
  | of => rfl
  

Proof state:
case comp
B : Type u
inst✝ : Quiver B
b c a✝ b✝ c✝ : B
g : Hom a✝ b✝
g✝ : Hom b✝ c✝
ihf : ∀ {a : B} (f : Hom a a✝), normalizeAux nil (Hom.comp f g) = comp (normalizeAux nil f) (normalizeAux nil g)
ihg : ∀ {a : B} (f : Hom a b✝), normalizeAux nil (Hom.comp f g✝) = comp (normalizeAux nil f) (normalizeAux nil g✝)
a : B
f : Hom a a✝
⊢ normalizeAux nil (Hom.comp f (Hom.comp g g✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.comp g g✝))

Next tactic:
| comp g _ ihf ihg => erw [ihg (f.comp g), ihf f, ihg g, comp_assoc]
theorem normalizeAux_nil_comp {a b c : B} (f : Hom a b) (g : Hom b c) :
    normalizeAux nil (f.comp g) = (normalizeAux nil f).comp (normalizeAux nil g) := by
  induction g generalizing a with
  | id => rfl
  | of => rfl
  | comp g _ ihf ihg => 

Proof state:
case comp
B : Type u
inst✝ : Quiver B
b c a✝ b✝ c✝ : B
g : Hom a✝ b✝
g✝ : Hom b✝ c✝
ihf : ∀ {a : B} (f : Hom a a✝), normalizeAux nil (Hom.comp f g) = comp (normalizeAux nil f) (normalizeAux nil g)
ihg : ∀ {a : B} (f : Hom a b✝), normalizeAux nil (Hom.comp f g✝) = comp (normalizeAux nil f) (normalizeAux nil g✝)
a : B
f : Hom a a✝
⊢ normalizeAux nil (Hom.comp f (Hom.comp g g✝)) = comp (normalizeAux nil f) (normalizeAux nil (Hom.comp g g✝))

Next tactic:
erw [ihg (f.comp g), ihf f, ihg g, comp_assoc]
/-- Auxiliary definition for `normalizeEquiv`. -/
def normalizeUnitIso (a b : FreeBicategory B) :
    𝟭 (a ⟶ b) ≅ (normalize B).mapFunctor a b ⋙ @inclusionPath B _ a b :=
  NatIso.ofComponents (fun f => (λ_ f).symm ≪≫ normalizeIso nil f)
    (by
      

Proof state:
B : Type u
inst✝ : Quiver B
a b : FreeBicategory B
⊢ ∀ {X Y : a ⟶ b} (f : X ⟶ Y),
    (𝟭 (a ⟶ b)).map f ≫ ((fun f => (λ_ f).symm ≪≫ normalizeIso nil f) Y).hom =
      ((fun f => (λ_ f).symm ≪≫ normalizeIso nil f) X).hom ≫
        (Pseudofunctor.mapFunctor (normalize B) a b ⋙ inclusionPath a b).map f

Next tactic:
intro f g η
/-- Auxiliary definition for `normalizeEquiv`. -/
def normalizeUnitIso (a b : FreeBicategory B) :
    𝟭 (a ⟶ b) ≅ (normalize B).mapFunctor a b ⋙ @inclusionPath B _ a b :=
  NatIso.ofComponents (fun f => (λ_ f).symm ≪≫ normalizeIso nil f)
    (by
      intro f g η
      

Proof state:
B : Type u
inst✝ : Quiver B
a b : FreeBicategory B
f g : a ⟶ b
η : f ⟶ g
⊢ (𝟭 (a ⟶ b)).map η ≫ ((fun f => (λ_ f).symm ≪≫ normalizeIso nil f) g).hom =
    ((fun f => (λ_ f).symm ≪≫ normalizeIso nil f) f).hom ≫
      (Pseudofunctor.mapFunctor (normalize B) a b ⋙ inclusionPath a b).map η

Next tactic:
erw [leftUnitor_inv_naturality_assoc, assoc]
/-- Auxiliary definition for `normalizeEquiv`. -/
def normalizeUnitIso (a b : FreeBicategory B) :
    𝟭 (a ⟶ b) ≅ (normalize B).mapFunctor a b ⋙ @inclusionPath B _ a b :=
  NatIso.ofComponents (fun f => (λ_ f).symm ≪≫ normalizeIso nil f)
    (by
      intro f g η
      erw [leftUnitor_inv_naturality_assoc, assoc]
      

Proof state:
B : Type u
inst✝ : Quiver B
a b : FreeBicategory B
f g : a ⟶ b
η : f ⟶ g
⊢ (λ_ ((𝟭 (a ⟶ b)).obj f)).inv ≫ 𝟙 a ◁ (𝟭 (a ⟶ b)).map η ≫ (normalizeIso nil g).hom =
    (λ_ f).symm.hom ≫ (normalizeIso nil f).hom ≫ (Pseudofunctor.mapFunctor (normalize B) a b ⋙ inclusionPath a b).map η

Next tactic:
congr 1
/-- Auxiliary definition for `normalizeEquiv`. -/
def normalizeUnitIso (a b : FreeBicategory B) :
    𝟭 (a ⟶ b) ≅ (normalize B).mapFunctor a b ⋙ @inclusionPath B _ a b :=
  NatIso.ofComponents (fun f => (λ_ f).symm ≪≫ normalizeIso nil f)
    (by
      intro f g η
      erw [leftUnitor_inv_naturality_assoc, assoc]
      congr 1
      

Proof state:
case e_a
B : Type u
inst✝ : Quiver B
a b : FreeBicategory B
f g : a ⟶ b
η : f ⟶ g
⊢ 𝟙 a ◁ (𝟭 (a ⟶ b)).map η ≫ (normalizeIso nil g).hom =
    (normalizeIso nil f).hom ≫ (Pseudofunctor.mapFunctor (normalize B) a b ⋙ inclusionPath a b).map η

Next tactic:
exact normalize_naturality nil η
/-- Normalization as an equivalence of categories. -/
def normalizeEquiv (a b : B) : Hom a b ≌ Discrete (Path.{v + 1} a b) :=
  Equivalence.mk ((normalize _).mapFunctor a b) (inclusionPath a b) (normalizeUnitIso a b)
    (Discrete.natIso fun f => eqToIso (by
      

Proof state:
B : Type u
inst✝ : Quiver B
a b : B
f : Discrete (Path a b)
⊢ (inclusionPath a b ⋙ Pseudofunctor.mapFunctor (normalize B) a b).obj f = (𝟭 (Discrete (Path a b))).obj f

Next tactic:
induction' f with f
/-- Normalization as an equivalence of categories. -/
def normalizeEquiv (a b : B) : Hom a b ≌ Discrete (Path.{v + 1} a b) :=
  Equivalence.mk ((normalize _).mapFunctor a b) (inclusionPath a b) (normalizeUnitIso a b)
    (Discrete.natIso fun f => eqToIso (by
      induction' f with f
      

Proof state:
case mk
B : Type u
inst✝ : Quiver B
a b : B
f : Path a b
⊢ (inclusionPath a b ⋙ Pseudofunctor.mapFunctor (normalize B) a b).obj { as := f } =
    (𝟭 (Discrete (Path a b))).obj { as := f }

Next tactic:
induction' f with _ _ _ _ ih
/-- Normalization as an equivalence of categories. -/
def normalizeEquiv (a b : B) : Hom a b ≌ Discrete (Path.{v + 1} a b) :=
  Equivalence.mk ((normalize _).mapFunctor a b) (inclusionPath a b) (normalizeUnitIso a b)
    (Discrete.natIso fun f => eqToIso (by
      induction' f with f
      induction' f with _ _ _ _ ih
      -- Porting note: `tidy` closes the goal in mathlib3 but `aesop` doesn't here.
      · 

Proof state:
case mk.nil
B : Type u
inst✝ : Quiver B
a b : B
⊢ (inclusionPath a a ⋙ Pseudofunctor.mapFunctor (normalize B) a a).obj { as := nil } =
    (𝟭 (Discrete (Path a a))).obj { as := nil }

Next tactic:
rfl
/-- Normalization as an equivalence of categories. -/
def normalizeEquiv (a b : B) : Hom a b ≌ Discrete (Path.{v + 1} a b) :=
  Equivalence.mk ((normalize _).mapFunctor a b) (inclusionPath a b) (normalizeUnitIso a b)
    (Discrete.natIso fun f => eqToIso (by
      induction' f with f
      induction' f with _ _ _ _ ih
      -- Porting note: `tidy` closes the goal in mathlib3 but `aesop` doesn't here.
      · rfl
      · 

Proof state:
case mk.cons
B : Type u
inst✝ : Quiver B
a b b✝ c✝ : B
a✝¹ : Path a b✝
a✝ : b✝ ⟶ c✝
ih :
  (inclusionPath a b✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a b✝).obj { as := a✝¹ } =
    (𝟭 (Discrete (Path a b✝))).obj { as := a✝¹ }
⊢ (inclusionPath a c✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a c✝).obj { as := cons a✝¹ a✝ } =
    (𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }

Next tactic:
ext1
/-- Normalization as an equivalence of categories. -/
def normalizeEquiv (a b : B) : Hom a b ≌ Discrete (Path.{v + 1} a b) :=
  Equivalence.mk ((normalize _).mapFunctor a b) (inclusionPath a b) (normalizeUnitIso a b)
    (Discrete.natIso fun f => eqToIso (by
      induction' f with f
      induction' f with _ _ _ _ ih
      -- Porting note: `tidy` closes the goal in mathlib3 but `aesop` doesn't here.
      · rfl
      · ext1
        

Proof state:
case mk.cons.as
B : Type u
inst✝ : Quiver B
a b b✝ c✝ : B
a✝¹ : Path a b✝
a✝ : b✝ ⟶ c✝
ih :
  (inclusionPath a b✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a b✝).obj { as := a✝¹ } =
    (𝟭 (Discrete (Path a b✝))).obj { as := a✝¹ }
⊢ ((inclusionPath a c✝ ⋙ Pseudofunctor.mapFunctor (normalize B) a c✝).obj { as := cons a✝¹ a✝ }).as =
    ((𝟭 (Discrete (Path a c✝))).obj { as := cons a✝¹ a✝ }).as

Next tactic:
injection ih with ih