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

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

Tactic:
ext f

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

Proof state:
case w.h.w.e_a.h.h.a.h
X : LightProfiniteᵒᵖ ⥤ Type u
inst✝ : PreservesFiniteProducts X
hX : (S : LightProfinite) → IsColimit (X.mapCocone (coconeRightOpOfCone S.asLimitCone))
S : LightProfiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toLightProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toLightProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toLightProfinite.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 (LightProfinite.of PUnit.{u + 1}) y ≫ sigmaIncl f x).op
      ((isoFinYonedaComponents X (toLightProfinite.obj (Opposite.unop Y))).inv ⇑f) =
    X.map (CompHausLike.const (LightProfinite.of PUnit.{u + 1}) y ≫ CompHausLike.isTerminalPUnit.from (fiber f x)).op
      (Function.Fiber.image (⇑f) x)

Tactic:
rw [show (LightProfinite.of PUnit.{u+1}).const y ≫ IsTerminal.from _ (fiber f x) = 𝟙 _ from rfl]

Result:
case w.h.w.e_a.h.h.a.h
X : LightProfiniteᵒᵖ ⥤ Type u
inst✝ : PreservesFiniteProducts X
hX : (S : LightProfinite) → IsColimit (X.mapCocone (coconeRightOpOfCone S.asLimitCone))
S : LightProfiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toLightProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toLightProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toLightProfinite.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 (LightProfinite.of PUnit.{u + 1}) y ≫ sigmaIncl f x).op
      ((isoFinYonedaComponents X (toLightProfinite.obj (Opposite.unop Y))).inv ⇑f) =
    X.map (𝟙 (LightProfinite.of PUnit.{u + 1})).op (Function.Fiber.image (⇑f) x)

Proof state:
case w.h.w.e_a.h.h
X : LightProfiniteᵒᵖ ⥤ Type u
inst✝ : PreservesFiniteProducts X
hX : (S : LightProfinite) → IsColimit (X.mapCocone (coconeRightOpOfCone S.asLimitCone))
S : LightProfiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toLightProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
f :
  LocallyConstant (↑(toLightProfinite.obj (Opposite.unop Y)).toTop)
    (X.obj (Opposite.op (toLightProfinite.obj (of PUnit.{u + 1}))))
x : Function.Fiber ⇑f
⊢ X.map (sigmaIncl f x).op ((isoFinYonedaComponents X (toLightProfinite.obj (Opposite.unop Y))).inv ⇑f) =
    counitAppAppImage f x

Tactic:
simp only [counitAppAppImage, CompHausLike.coe_of]

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

Proof state:
case w.h.w
X : LightProfiniteᵒᵖ ⥤ Type u
inst✝ : PreservesFiniteProducts X
hX : (S : LightProfinite) → IsColimit (X.mapCocone (coconeRightOpOfCone S.asLimitCone))
S : LightProfiniteᵒᵖ
Y : FintypeCatᵒᵖ
right✝ : Discrete PUnit.{1}
g : toLightProfinite.op.obj Y ⟶ (fromPUnit S).obj right✝
⊢ colimit.ι
        (CostructuredArrow.proj toLightProfinite.op S ⋙
          toLightProfinite.op ⋙ locallyConstantPresheaf (X.obj (Opposite.op (toLightProfinite.obj (of PUnit.{u + 1})))))
        { left := Y, right := right✝, hom := g } ≫
      ((lanPresheafExt (isoFinYoneda X ≪≫ (locallyConstantIsoFinYoneda X).symm)).inv ≫ (lanPresheafNatIso hX).hom).app
        S =
    colimit.ι
        (CostructuredArrow.proj toLightProfinite.op S ⋙
          toLightProfinite.op ⋙ locallyConstantPresheaf (X.obj (Opposite.op (toLightProfinite.obj (of PUnit.{u + 1})))))
        { left := Y, right := right✝, hom := g } ≫
      ((lanPresheafNatIso fun x =>
                isColimitLocallyConstantPresheafDiagram (X.obj (Opposite.op (toLightProfinite.obj (of PUnit.{u + 1}))))
                  x).hom ≫
            counitApp X).app
        S

Tactic:
simp? [locallyConstantIsoFinYoneda, isoFinYoneda, counitApp] says
  simp only [comp_obj, CostructuredArrow.proj_obj, op_obj, functorToPresheaves_obj_obj,
    isoFinYoneda, locallyConstantIsoFinYoneda, finYoneda_obj, LocallyConstant.toFun_eq_coe,
    NatTrans.comp_app, pointwiseLeftKanExtension_obj, lanPresheafExt_inv, Iso.trans_inv,
    Iso.symm_inv, whiskerLeft_comp, lanPresheafNatIso_hom_app, Opposite.op_unop, colimit.map_desc,
    id_eq, Functor.comp_map, op_map, colimit.ι_desc, Cocones.precompose_obj_pt,
    LightProfinite.Extend.cocone_pt, Cocones.precompose_obj_ι, Category.assoc, const_obj_obj,
    whiskerLeft_app, NatIso.ofComponents_hom_app, NatIso.ofComponents_inv_app,
    LightProfinite.Extend.cocone_ι_app, counitApp, colimit.ι_desc_assoc]

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