-- Mathlib/Condensed/Discrete/Colimit.lean
lemma isoLocallyConstantOfIsColimit_inv (X : Profinite.{u}ᵒᵖ ⥤ Type (u+1))
    [PreservesFiniteProducts X]
    (hX : ∀ S : Profinite.{u}, (IsColimit <| X.mapCocone S.asLimitCone.op)) :
    (isoLocallyConstantOfIsColimit X hX).inv =
      (CompHausLike.LocallyConstant.counitApp.{u, u+1} X)

Proof state:
case w.h.w
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
S : Profiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
⊢ ((fun f => ⇑f) ≫ (isoFinYonedaComponents X (toProfinite.obj (Opposite.unop Y))).inv) ≫ X.map g =
    (counitApp X).app (Opposite.op (toProfinite.obj (Opposite.unop Y))) ≫ X.map g

Tactic:
congr

Result:
case w.h.w.e_a
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
S : Profiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
⊢ (fun f => ⇑f) ≫ (isoFinYonedaComponents X (toProfinite.obj (Opposite.unop Y))).inv =
    (counitApp X).app (Opposite.op (toProfinite.obj (Opposite.unop Y)))

Proof state:
case w.h.w.e_a.h.h.a
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
S : Profiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toProfinite.obj (of PUnit.{u + 1}))))
x : Function.Fiber ⇑f
this : Fintype ↑(fiber f x).toTop := Fintype.ofInjective ⇑(sigmaIncl f x).hom' ⋯
⊢ (isoFinYonedaComponents X (fiber f x)).hom
      (X.map (sigmaIncl f x).op ((isoFinYonedaComponents X (toProfinite.obj (Opposite.unop Y))).inv ⇑f)) =
    (isoFinYonedaComponents X (fiber f x)).hom
      (X.map (CompHausLike.isTerminalPUnit.from (fiber f x)).op (Function.Fiber.image (⇑f) x))

Tactic:
ext y

Result:
case w.h.w.e_a.h.h.a.h
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
S : Profiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toProfinite.obj (of PUnit.{u + 1}))))
x : Function.Fiber ⇑f
this : Fintype ↑(fiber f x).toTop := Fintype.ofInjective ⇑(sigmaIncl f x).hom' ⋯
y : ↑(fiber f x).toTop
⊢ (isoFinYonedaComponents X (fiber f x)).hom
      (X.map (sigmaIncl f x).op ((isoFinYonedaComponents X (toProfinite.obj (Opposite.unop Y))).inv ⇑f)) y =
    (isoFinYonedaComponents X (fiber f x)).hom
      (X.map (CompHausLike.isTerminalPUnit.from (fiber f x)).op (Function.Fiber.image (⇑f) x)) y

Proof state:
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
⊢ ((lanPresheafNatIso fun x =>
            isColimitLocallyConstantPresheafDiagram (X.obj (Opposite.op (toProfinite.obj (of PUnit.{u + 1})))) x).inv ≫
        (lanPresheafExt (isoFinYoneda X ≪≫ (locallyConstantIsoFinYoneda X).symm)).inv) ≫
      (lanPresheafNatIso hX).hom =
    counitApp X

Tactic:
simp only [Category.assoc]

Result:
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
⊢ (lanPresheafNatIso fun x =>
          isColimitLocallyConstantPresheafDiagram (X.obj (Opposite.op (toProfinite.obj (of PUnit.{u + 1})))) x).inv ≫
      (lanPresheafExt (isoFinYoneda X ≪≫ (locallyConstantIsoFinYoneda X).symm)).inv ≫ (lanPresheafNatIso hX).hom =
    counitApp X

Proof state:
case w.h.w.e_a.h.h.a.h
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
S : Profiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toProfinite.obj (of PUnit.{u + 1}))))
x : Function.Fiber ⇑f
this : Fintype ↑(fiber f x).toTop := Fintype.ofInjective ⇑(sigmaIncl f x).hom' ⋯
y : ↑(fiber f x).toTop
⊢ X.map (CompHausLike.const (Profinite.of PUnit.{u + 1}) y).op
      (X.map (sigmaIncl f x).op ((isoFinYonedaComponents X (toProfinite.obj (Opposite.unop Y))).inv ⇑f)) =
    Function.Fiber.image (⇑f) x

Tactic:
rw [← isoFinYonedaComponents_inv_comp X _ (sigmaIncl.{u, u+1} f x)]

Result:
case w.h.w.e_a.h.h.a.h
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
S : Profiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toProfinite.obj (of PUnit.{u + 1}))))
x : Function.Fiber ⇑f
this : Fintype ↑(fiber f x).toTop := Fintype.ofInjective ⇑(sigmaIncl f x).hom' ⋯
y : ↑(fiber f x).toTop
⊢ X.map (CompHausLike.const (Profinite.of PUnit.{u + 1}) y).op
      ((isoFinYonedaComponents X (fiber f x)).inv (⇑f ∘ ⇑(ConcreteCategory.hom (sigmaIncl f x)))) =
    Function.Fiber.image (⇑f) x

Proof state:
case w.h.w.e_a.h.h.a.h
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
S : Profiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toProfinite.obj (of PUnit.{u + 1}))))
x : Function.Fiber ⇑f
this : Fintype ↑(fiber f x).toTop := Fintype.ofInjective ⇑(sigmaIncl f x).hom' ⋯
y : ↑(fiber f x).toTop
⊢ (isoFinYonedaComponents X (fiber f x)).hom
      (X.map (sigmaIncl f x).op ((isoFinYonedaComponents X (toProfinite.obj (Opposite.unop Y))).inv ⇑f)) y =
    (isoFinYonedaComponents X (fiber f x)).hom
      (X.map (CompHausLike.isTerminalPUnit.from (fiber f x)).op (Function.Fiber.image (⇑f) x)) y

Tactic:
simp only [isoFinYonedaComponents_hom_apply, ← FunctorToTypes.map_comp_apply, ← op_comp]

Result:
case w.h.w.e_a.h.h.a.h
X : Profiniteᵒᵖ ⥤ Type (u + 1)
inst✝ : PreservesFiniteProducts X
hX : (S : Profinite) → IsColimit (X.mapCocone S.asLimitCone.op)
S : Profiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toProfinite.obj (of PUnit.{u + 1}))))
x : Function.Fiber ⇑f
this : Fintype ↑(fiber f x).toTop := Fintype.ofInjective ⇑(sigmaIncl f x).hom' ⋯
y : ↑(fiber f x).toTop
⊢ X.map (CompHausLike.const (Profinite.of PUnit.{u + 1}) y ≫ sigmaIncl f x).op
      ((isoFinYonedaComponents X (toProfinite.obj (Opposite.unop Y))).inv ⇑f) =
    X.map (CompHausLike.const (Profinite.of PUnit.{u + 1}) y ≫ CompHausLike.isTerminalPUnit.from (fiber f x)).op
      (Function.Fiber.image (⇑f) x)