l3lab/ntp-mathlib huggingface dataset:
@[field_simps]
theorem divp_sub_divp [CommRing α] (a b : α) (u₁ u₂ : αˣ) :
    a /ₚ u₁ - b /ₚ u₂ = (a * u₂ - u₁ * b) /ₚ (u₁ * u₂) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : CommRing α
a b : α
u₁ u₂ : αˣ
⊢ a /ₚ u₁ - b /ₚ u₂ = (a * ↑u₂ - ↑u₁ * b) /ₚ (u₁ * u₂)

Next tactic:
simp only [sub_eq_add_neg, neg_divp, divp_add_divp, mul_neg]
theorem add_eq_mul_one_add_div [Semiring R] {a : Rˣ} {b : R} : ↑a + b = a * (1 + ↑a⁻¹ * b) := by
  

Proof state:
α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : Semiring R
a : Rˣ
b : R
⊢ ↑a + b = ↑a * (1 + ↑a⁻¹ * b)

Next tactic:
rw [mul_add, mul_one, ← mul_assoc, Units.mul_inv, one_mul]
@[simp]
theorem Prefunctor.IsCovering.map_injective (hφ : φ.IsCovering) {u v : U} :
    Injective fun f : u ⟶ v => φ.map f := by
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.2230
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u v : U
⊢ Injective fun f => φ.map f

Next tactic:
rintro f g he
@[simp]
theorem Prefunctor.IsCovering.map_injective (hφ : φ.IsCovering) {u v : U} :
    Injective fun f : u ⟶ v => φ.map f := by
  rintro f g he
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.2230
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u v : U
f g : u ⟶ v
he : (fun f => φ.map f) f = (fun f => φ.map f) g
⊢ f = g

Next tactic:
have : φ.star u (Quiver.Star.mk f) = φ.star u (Quiver.Star.mk g) := by simpa using he
@[simp]
theorem Prefunctor.IsCovering.map_injective (hφ : φ.IsCovering) {u v : U} :
    Injective fun f : u ⟶ v => φ.map f := by
  rintro f g he
  have : φ.star u (Quiver.Star.mk f) = φ.star u (Quiver.Star.mk g) := by 

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.2230
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u v : U
f g : u ⟶ v
he : (fun f => φ.map f) f = (fun f => φ.map f) g
⊢ star φ u (Star.mk f) = star φ u (Star.mk g)

Next tactic:
simpa using he
@[simp]
theorem Prefunctor.IsCovering.map_injective (hφ : φ.IsCovering) {u v : U} :
    Injective fun f : u ⟶ v => φ.map f := by
  rintro f g he
  have : φ.star u (Quiver.Star.mk f) = φ.star u (Quiver.Star.mk g) := by simpa using he
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.2230
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u v : U
f g : u ⟶ v
he : (fun f => φ.map f) f = (fun f => φ.map f) g
this : star φ u (Star.mk f) = star φ u (Star.mk g)
⊢ f = g

Next tactic:
simpa using (hφ.star_bijective u).left this
theorem Prefunctor.IsCovering.of_comp_left (hφ : φ.IsCovering) (hφψ : (φ ⋙q ψ).IsCovering)
    (φsur : Surjective φ.obj) : ψ.IsCovering := by
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type u_3
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
hφψ : Prefunctor.IsCovering (φ ⋙q ψ)
φsur : Surjective φ.obj
⊢ Prefunctor.IsCovering ψ

Next tactic:
refine' ⟨fun v => _, fun v => _⟩
theorem Prefunctor.IsCovering.of_comp_left (hφ : φ.IsCovering) (hφψ : (φ ⋙q ψ).IsCovering)
    (φsur : Surjective φ.obj) : ψ.IsCovering := by
  refine' ⟨fun v => _, fun v => _⟩ <;> 

Proof state:
case refine'_1
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type u_3
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
hφψ : Prefunctor.IsCovering (φ ⋙q ψ)
φsur : Surjective φ.obj
v : V
⊢ Bijective (star ψ v)

Next tactic:
obtain ⟨u, rfl⟩ := φsur v
theorem Prefunctor.IsCovering.of_comp_left (hφ : φ.IsCovering) (hφψ : (φ ⋙q ψ).IsCovering)
    (φsur : Surjective φ.obj) : ψ.IsCovering := by
  refine' ⟨fun v => _, fun v => _⟩ <;> 

Proof state:
case refine'_2
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type u_3
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
hφψ : Prefunctor.IsCovering (φ ⋙q ψ)
φsur : Surjective φ.obj
v : V
⊢ Bijective (costar ψ v)

Next tactic:
obtain ⟨u, rfl⟩ := φsur v
theorem Prefunctor.IsCovering.of_comp_left (hφ : φ.IsCovering) (hφψ : (φ ⋙q ψ).IsCovering)
    (φsur : Surjective φ.obj) : ψ.IsCovering := by
  refine' ⟨fun v => _, fun v => _⟩ <;> obtain ⟨u, rfl⟩ := φsur v
  

Proof state:
case refine'_1.intro
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type u_3
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
hφψ : Prefunctor.IsCovering (φ ⋙q ψ)
φsur : Surjective φ.obj
u : U
⊢ Bijective (star ψ (φ.obj u))
case refine'_2.intro
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type u_3
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
hφψ : Prefunctor.IsCovering (φ ⋙q ψ)
φsur : Surjective φ.obj
u : U
⊢ Bijective (costar ψ (φ.obj u))

Next tactic:
exacts [(Bijective.of_comp_iff _ (hφ.star_bijective u)).mp (hφψ.star_bijective u),
    (Bijective.of_comp_iff _ (hφ.costar_bijective u)).mp (hφψ.costar_bijective u)]
theorem Prefunctor.symmetrifyStar (u : U) :
    φ.symmetrify.star u =
      (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
        Quiver.symmetrifyStar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.4677
inst✝ : Quiver W
ψ : V ⥤q W
u : U
⊢ star (symmetrify φ) u =
    ⇑(Quiver.symmetrifyStar (φ.obj u)).symm ∘ Sum.map (star φ u) (costar φ u) ∘ ⇑(Quiver.symmetrifyStar u)

Next tactic:
erw [Equiv.eq_symm_comp]
theorem Prefunctor.symmetrifyStar (u : U) :
    φ.symmetrify.star u =
      (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
        Quiver.symmetrifyStar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.4677
inst✝ : Quiver W
ψ : V ⥤q W
u : U
⊢ ⇑(Quiver.symmetrifyStar (φ.obj u)) ∘ star (symmetrify φ) u =
    Sum.map (star φ u) (costar φ u) ∘ ⇑(Quiver.symmetrifyStar u)

Next tactic:
ext ⟨v, f | g⟩
theorem Prefunctor.symmetrifyStar (u : U) :
    φ.symmetrify.star u =
      (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
        Quiver.symmetrifyStar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyStar]`
    

Proof state:
case h.mk.inl
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.4677
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
f : u ⟶ v
⊢ (⇑(Quiver.symmetrifyStar (φ.obj u)) ∘ star (symmetrify φ) u) { fst := v, snd := Sum.inl f } =
    (Sum.map (star φ u) (costar φ u) ∘ ⇑(Quiver.symmetrifyStar u)) { fst := v, snd := Sum.inl f }

Next tactic:
simp only [Quiver.symmetrifyStar, Function.comp_apply]
theorem Prefunctor.symmetrifyStar (u : U) :
    φ.symmetrify.star u =
      (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
        Quiver.symmetrifyStar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyStar]`
    

Proof state:
case h.mk.inr
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.4677
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
g : v ⟶ u
⊢ (⇑(Quiver.symmetrifyStar (φ.obj u)) ∘ star (symmetrify φ) u) { fst := v, snd := Sum.inr g } =
    (Sum.map (star φ u) (costar φ u) ∘ ⇑(Quiver.symmetrifyStar u)) { fst := v, snd := Sum.inr g }

Next tactic:
simp only [Quiver.symmetrifyStar, Function.comp_apply]
theorem Prefunctor.symmetrifyStar (u : U) :
    φ.symmetrify.star u =
      (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
        Quiver.symmetrifyStar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyStar]`
    simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
    

Proof state:
case h.mk.inl
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.4677
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
f : u ⟶ v
⊢ (Equiv.sigmaSumDistrib (fun v => Symmetrify.of.obj (φ.obj u) ⟶ v) fun v => v ⟶ Symmetrify.of.obj (φ.obj u))
      (star (symmetrify φ) u { fst := v, snd := Sum.inl f }) =
    Sum.map (star φ u) (costar φ u)
      ((Equiv.sigmaSumDistrib (fun v => Symmetrify.of.obj u ⟶ v) fun v => v ⟶ Symmetrify.of.obj u)
        { fst := v, snd := Sum.inl f })

Next tactic:
erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply]
theorem Prefunctor.symmetrifyStar (u : U) :
    φ.symmetrify.star u =
      (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
        Quiver.symmetrifyStar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyStar]`
    simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
    

Proof state:
case h.mk.inr
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.4677
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
g : v ⟶ u
⊢ (Equiv.sigmaSumDistrib (fun v => Symmetrify.of.obj (φ.obj u) ⟶ v) fun v => v ⟶ Symmetrify.of.obj (φ.obj u))
      (star (symmetrify φ) u { fst := v, snd := Sum.inr g }) =
    Sum.map (star φ u) (costar φ u)
      ((Equiv.sigmaSumDistrib (fun v => Symmetrify.of.obj u ⟶ v) fun v => v ⟶ Symmetrify.of.obj u)
        { fst := v, snd := Sum.inr g })

Next tactic:
erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply]
theorem Prefunctor.symmetrifyStar (u : U) :
    φ.symmetrify.star u =
      (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
        Quiver.symmetrifyStar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyStar]`
    simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
    erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply] <;>
    

Proof state:
case h.mk.inl
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.4677
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
f : u ⟶ v
⊢ Sum.map (Sigma.mk (star (symmetrify φ) u { fst := v, snd := Sum.inl f }).fst)
      (Sigma.mk (star (symmetrify φ) u { fst := v, snd := Sum.inl f }).fst)
      (star (symmetrify φ) u { fst := v, snd := Sum.inl f }).snd =
    Sum.map (star φ u) (costar φ u)
      (Sum.map (Sigma.mk { fst := v, snd := Sum.inl f }.fst) (Sigma.mk { fst := v, snd := Sum.inl f }.fst)
        { fst := v, snd := Sum.inl f }.snd)

Next tactic:
simp
theorem Prefunctor.symmetrifyStar (u : U) :
    φ.symmetrify.star u =
      (Quiver.symmetrifyStar _).symm ∘ Sum.map (φ.star u) (φ.costar u) ∘
        Quiver.symmetrifyStar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyStar]`
    simp only [Quiver.symmetrifyStar, Function.comp_apply] <;>
    erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply] <;>
    

Proof state:
case h.mk.inr
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.4677
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
g : v ⟶ u
⊢ Sum.map (Sigma.mk (star (symmetrify φ) u { fst := v, snd := Sum.inr g }).fst)
      (Sigma.mk (star (symmetrify φ) u { fst := v, snd := Sum.inr g }).fst)
      (star (symmetrify φ) u { fst := v, snd := Sum.inr g }).snd =
    Sum.map (star φ u) (costar φ u)
      (Sum.map (Sigma.mk { fst := v, snd := Sum.inr g }.fst) (Sigma.mk { fst := v, snd := Sum.inr g }.fst)
        { fst := v, snd := Sum.inr g }.snd)

Next tactic:
simp
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.7953
inst✝ : Quiver W
ψ : V ⥤q W
u : U
⊢ costar (symmetrify φ) u = ⇑(symmetrifyCostar (φ.obj u)).symm ∘ Sum.map (costar φ u) (star φ u) ∘ ⇑(symmetrifyCostar u)

Next tactic:
erw [Equiv.eq_symm_comp]
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.7953
inst✝ : Quiver W
ψ : V ⥤q W
u : U
⊢ ⇑(symmetrifyCostar (φ.obj u)) ∘ costar (symmetrify φ) u = Sum.map (costar φ u) (star φ u) ∘ ⇑(symmetrifyCostar u)

Next tactic:
ext ⟨v, f | g⟩
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyCostar]`
    

Proof state:
case h.mk.inl
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.7953
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
f : v ⟶ u
⊢ (⇑(symmetrifyCostar (φ.obj u)) ∘ costar (symmetrify φ) u) { fst := v, snd := Sum.inl f } =
    (Sum.map (costar φ u) (star φ u) ∘ ⇑(symmetrifyCostar u)) { fst := v, snd := Sum.inl f }

Next tactic:
simp only [Quiver.symmetrifyCostar, Function.comp_apply]
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyCostar]`
    

Proof state:
case h.mk.inr
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.7953
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
g : u ⟶ v
⊢ (⇑(symmetrifyCostar (φ.obj u)) ∘ costar (symmetrify φ) u) { fst := v, snd := Sum.inr g } =
    (Sum.map (costar φ u) (star φ u) ∘ ⇑(symmetrifyCostar u)) { fst := v, snd := Sum.inr g }

Next tactic:
simp only [Quiver.symmetrifyCostar, Function.comp_apply]
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyCostar]`
    simp only [Quiver.symmetrifyCostar, Function.comp_apply] <;>
    

Proof state:
case h.mk.inl
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.7953
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
f : v ⟶ u
⊢ (Equiv.sigmaSumDistrib (fun u_1 => u_1 ⟶ Symmetrify.of.obj (φ.obj u)) fun u_1 => Symmetrify.of.obj (φ.obj u) ⟶ u_1)
      (costar (symmetrify φ) u { fst := v, snd := Sum.inl f }) =
    Sum.map (costar φ u) (star φ u)
      ((Equiv.sigmaSumDistrib (fun u_1 => u_1 ⟶ Symmetrify.of.obj u) fun u_1 => Symmetrify.of.obj u ⟶ u_1)
        { fst := v, snd := Sum.inl f })

Next tactic:
erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply]
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyCostar]`
    simp only [Quiver.symmetrifyCostar, Function.comp_apply] <;>
    

Proof state:
case h.mk.inr
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.7953
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
g : u ⟶ v
⊢ (Equiv.sigmaSumDistrib (fun u_1 => u_1 ⟶ Symmetrify.of.obj (φ.obj u)) fun u_1 => Symmetrify.of.obj (φ.obj u) ⟶ u_1)
      (costar (symmetrify φ) u { fst := v, snd := Sum.inr g }) =
    Sum.map (costar φ u) (star φ u)
      ((Equiv.sigmaSumDistrib (fun u_1 => u_1 ⟶ Symmetrify.of.obj u) fun u_1 => Symmetrify.of.obj u ⟶ u_1)
        { fst := v, snd := Sum.inr g })

Next tactic:
erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply]
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyCostar]`
    simp only [Quiver.symmetrifyCostar, Function.comp_apply] <;>
    erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply] <;>
    

Proof state:
case h.mk.inl
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.7953
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
f : v ⟶ u
⊢ Sum.map (Sigma.mk (costar (symmetrify φ) u { fst := v, snd := Sum.inl f }).fst)
      (Sigma.mk (costar (symmetrify φ) u { fst := v, snd := Sum.inl f }).fst)
      (costar (symmetrify φ) u { fst := v, snd := Sum.inl f }).snd =
    Sum.map (costar φ u) (star φ u)
      (Sum.map (Sigma.mk { fst := v, snd := Sum.inl f }.fst) (Sigma.mk { fst := v, snd := Sum.inl f }.fst)
        { fst := v, snd := Sum.inl f }.snd)

Next tactic:
simp
protected theorem Prefunctor.symmetrifyCostar (u : U) :
    φ.symmetrify.costar u =
      (Quiver.symmetrifyCostar _).symm ∘
        Sum.map (φ.costar u) (φ.star u) ∘ Quiver.symmetrifyCostar u := by
  -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
  erw [Equiv.eq_symm_comp]
  ext ⟨v, f | g⟩ <;>
    -- Porting note: was `simp [Quiver.symmetrifyCostar]`
    simp only [Quiver.symmetrifyCostar, Function.comp_apply] <;>
    erw [Equiv.sigmaSumDistrib_apply, Equiv.sigmaSumDistrib_apply] <;>
    

Proof state:
case h.mk.inr
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.7953
inst✝ : Quiver W
ψ : V ⥤q W
u : U
v : Symmetrify U
g : u ⟶ v
⊢ Sum.map (Sigma.mk (costar (symmetrify φ) u { fst := v, snd := Sum.inr g }).fst)
      (Sigma.mk (costar (symmetrify φ) u { fst := v, snd := Sum.inr g }).fst)
      (costar (symmetrify φ) u { fst := v, snd := Sum.inr g }).snd =
    Sum.map (costar φ u) (star φ u)
      (Sum.map (Sigma.mk { fst := v, snd := Sum.inr g }.fst) (Sigma.mk { fst := v, snd := Sum.inr g }.fst)
        { fst := v, snd := Sum.inr g }.snd)

Next tactic:
simp
protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
    φ.symmetrify.IsCovering := by
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.11229
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
⊢ Prefunctor.IsCovering (symmetrify φ)

Next tactic:
refine' ⟨fun u => _, fun u => _⟩
protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
    φ.symmetrify.IsCovering := by
  refine' ⟨fun u => _, fun u => _⟩ <;>
    -- Porting note: was
    -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
    

Proof state:
case refine'_1
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.11229
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u : Symmetrify U
⊢ Bijective (star (symmetrify φ) u)

Next tactic:
simp only [φ.symmetrifyStar, φ.symmetrifyCostar]
protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
    φ.symmetrify.IsCovering := by
  refine' ⟨fun u => _, fun u => _⟩ <;>
    -- Porting note: was
    -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
    

Proof state:
case refine'_2
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.11229
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u : Symmetrify U
⊢ Bijective (costar (symmetrify φ) u)

Next tactic:
simp only [φ.symmetrifyStar, φ.symmetrifyCostar]
protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
    φ.symmetrify.IsCovering := by
  refine' ⟨fun u => _, fun u => _⟩ <;>
    -- Porting note: was
    -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
    simp only [φ.symmetrifyStar, φ.symmetrifyCostar] <;>
    

Proof state:
case refine'_1
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.11229
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u : Symmetrify U
⊢ Bijective (⇑(Quiver.symmetrifyStar (φ.obj u)).symm ∘ Sum.map (star φ u) (costar φ u) ∘ ⇑(Quiver.symmetrifyStar u))

Next tactic:
erw [EquivLike.comp_bijective, EquivLike.bijective_comp]
protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
    φ.symmetrify.IsCovering := by
  refine' ⟨fun u => _, fun u => _⟩ <;>
    -- Porting note: was
    -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
    simp only [φ.symmetrifyStar, φ.symmetrifyCostar] <;>
    

Proof state:
case refine'_2
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.11229
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u : Symmetrify U
⊢ Bijective (⇑(symmetrifyCostar (φ.obj u)).symm ∘ Sum.map (costar φ u) (star φ u) ∘ ⇑(symmetrifyCostar u))

Next tactic:
erw [EquivLike.comp_bijective, EquivLike.bijective_comp]
protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
    φ.symmetrify.IsCovering := by
  refine' ⟨fun u => _, fun u => _⟩ <;>
    -- Porting note: was
    -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
    simp only [φ.symmetrifyStar, φ.symmetrifyCostar] <;>
    erw [EquivLike.comp_bijective, EquivLike.bijective_comp] <;>
    

Proof state:
case refine'_1
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.11229
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u : Symmetrify U
⊢ Bijective (Sum.map (star φ u) (costar φ u))

Next tactic:
simp [hφ.star_bijective u, hφ.costar_bijective u]
protected theorem Prefunctor.IsCovering.symmetrify (hφ : φ.IsCovering) :
    φ.symmetrify.IsCovering := by
  refine' ⟨fun u => _, fun u => _⟩ <;>
    -- Porting note: was
    -- simp [φ.symmetrifyStar, φ.symmetrifyCostar, hφ.star_bijective u, hφ.costar_bijective u]
    simp only [φ.symmetrifyStar, φ.symmetrifyCostar] <;>
    erw [EquivLike.comp_bijective, EquivLike.bijective_comp] <;>
    

Proof state:
case refine'_2
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.11229
inst✝ : Quiver W
ψ : V ⥤q W
hφ : Prefunctor.IsCovering φ
u : Symmetrify U
⊢ Bijective (Sum.map (costar φ u) (star φ u))

Next tactic:
simp [hφ.star_bijective u, hφ.costar_bijective u]
theorem Prefunctor.pathStar_injective (hφ : ∀ u, Injective (φ.star u)) (u : U) :
    Injective (φ.pathStar u) := by
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.13176
inst✝ : Quiver W
ψ : V ⥤q W
hφ : ∀ (u : U), Injective (star φ u)
u : U
⊢ Injective (pathStar φ u)

Next tactic:
dsimp (config := { unfoldPartialApp := true }) [Prefunctor.pathStar, Quiver.PathStar.mk]
theorem Prefunctor.pathStar_injective (hφ : ∀ u, Injective (φ.star u)) (u : U) :
    Injective (φ.pathStar u) := by
  dsimp (config := { unfoldPartialApp := true }) [Prefunctor.pathStar, Quiver.PathStar.mk]
  

Proof state:
U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.13176
inst✝ : Quiver W
ψ : V ⥤q W
hφ : ∀ (u : U), Injective (star φ u)
u : U
⊢ Injective fun p => { fst := φ.obj p.fst, snd := mapPath φ p.snd }

Next tactic:
rintro ⟨v₁, p₁⟩