Theorem: Profinite.exists_locallyConstant
File: Mathlib/Topology/Category/Profinite/CofilteredLimit.lean

tactic: let S := f.discreteQuotient
state_before: J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
⊢ ∃ j g, f = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g

tactic: let ff : S → α := f.lift
state_before: J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
⊢ ∃ j g, f = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g

tactic: cases isEmpty_or_nonempty S
state_before: J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
⊢ ∃ j g, f = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g

tactic: simp only [← not_nonempty_iff, ← not_forall]
state_before: case inl
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
⊢ ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop

tactic: intro h
state_before: case inl
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
⊢ ¬∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop

tactic: haveI : ∀ j : J, Nonempty ((F ⋙ Profinite.toTopCat).obj j) := h
state_before: case inl
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
⊢ False

tactic: haveI : ∀ j : J, T2Space ((F ⋙ Profinite.toTopCat).obj j) := fun j =>
  (inferInstance : T2Space (F.obj j))
state_before: case inl
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
⊢ False

tactic: haveI : ∀ j : J, CompactSpace ((F ⋙ Profinite.toTopCat).obj j) := fun j =>
  (inferInstance : CompactSpace (F.obj j))
state_before: case inl
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝ : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
⊢ False

tactic: have cond := TopCat.nonempty_limitCone_of_compact_t2_cofiltered_system.{u, u}
  (F ⋙ Profinite.toTopCat)
state_before: case inl
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝¹ : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this✝ : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
this : ∀ (j : J), CompactSpace ↑((F ⋙ toTopCat).obj j)
⊢ False

tactic: suffices : Nonempty C.pt
state_before: case inl
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝¹ : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this✝ : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
this : ∀ (j : J), CompactSpace ↑((F ⋙ toTopCat).obj j)
cond : Nonempty ↑(TopCat.limitCone (F ⋙ toTopCat)).pt
⊢ False

tactic: exact IsEmpty.false (S.proj this.some)
state_before: case inl
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝² : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this✝¹ : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
this✝ : ∀ (j : J), CompactSpace ↑((F ⋙ toTopCat).obj j)
cond : Nonempty ↑(TopCat.limitCone (F ⋙ toTopCat)).pt
this : Nonempty ↑C.pt.toCompHaus.toTop
⊢ False

case this
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝¹ : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this✝ : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
this : ∀ (j : J), CompactSpace ↑((F ⋙ toTopCat).obj j)
cond : Nonempty ↑(TopCat.limitCone (F ⋙ toTopCat)).pt
⊢ Nonempty ↑C.pt.toCompHaus.toTop

tactic: let D := Profinite.toTopCat.mapCone C
state_before: case this
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝¹ : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this✝ : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
this : ∀ (j : J), CompactSpace ↑((F ⋙ toTopCat).obj j)
cond : Nonempty ↑(TopCat.limitCone (F ⋙ toTopCat)).pt
⊢ Nonempty ↑C.pt.toCompHaus.toTop

tactic: have hD : IsLimit D := isLimitOfPreserves Profinite.toTopCat hC
state_before: case this
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝¹ : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this✝ : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
this : ∀ (j : J), CompactSpace ↑((F ⋙ toTopCat).obj j)
cond : Nonempty ↑(TopCat.limitCone (F ⋙ toTopCat)).pt
D : Cone (F ⋙ toTopCat) := toTopCat.mapCone C
⊢ Nonempty ↑C.pt.toCompHaus.toTop

tactic: have CD := (hD.conePointUniqueUpToIso (TopCat.limitConeIsLimit.{u, u} _)).inv
state_before: case this
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝¹ : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this✝ : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
this : ∀ (j : J), CompactSpace ↑((F ⋙ toTopCat).obj j)
cond : Nonempty ↑(TopCat.limitCone (F ⋙ toTopCat)).pt
D : Cone (F ⋙ toTopCat) := toTopCat.mapCone C
hD : IsLimit D
⊢ Nonempty ↑C.pt.toCompHaus.toTop

tactic: exact cond.map CD
state_before: case this
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
h : ∀ (x : J), Nonempty ↑(F.obj x).toCompHaus.toTop
this✝¹ : ∀ (j : J), Nonempty ↑((F ⋙ toTopCat).obj j)
this✝ : ∀ (j : J), T2Space ↑((F ⋙ toTopCat).obj j)
this : ∀ (j : J), CompactSpace ↑((F ⋙ toTopCat).obj j)
cond : Nonempty ↑(TopCat.limitCone (F ⋙ toTopCat)).pt
D : Cone (F ⋙ toTopCat) := toTopCat.mapCone C
hD : IsLimit D
CD : (TopCat.limitCone (F ⋙ toTopCat)).pt ⟶ D.pt
⊢ Nonempty ↑C.pt.toCompHaus.toTop

tactic: refine' this.imp fun j hj => _
state_before: J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
this : ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop
⊢ ∃ j g, f = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g

tactic: refine' ⟨⟨hj.elim, fun A => _⟩, _⟩
state_before: J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
this : ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop
j : J
hj : IsEmpty ↑(F.obj j).toCompHaus.toTop
⊢ ∃ g, f = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g

tactic: suffices : (fun a ↦ IsEmpty.elim hj a) ⁻¹' A = ∅
state_before: case refine'_1
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
this : ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop
j : J
hj : IsEmpty ↑(F.obj j).toCompHaus.toTop
A : Set α
⊢ IsOpen ((fun a => IsEmpty.elim hj a) ⁻¹' A)

tactic: exact @Set.eq_empty_of_isEmpty _ hj _
state_before: case this
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
this : ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop
j : J
hj : IsEmpty ↑(F.obj j).toCompHaus.toTop
A : Set α
⊢ (fun a => IsEmpty.elim hj a) ⁻¹' A = ∅

tactic: rw [this]
state_before: case refine'_1
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
this✝ : ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop
j : J
hj : IsEmpty ↑(F.obj j).toCompHaus.toTop
A : Set α
this : (fun a => IsEmpty.elim hj a) ⁻¹' A = ∅
⊢ IsOpen ((fun a => IsEmpty.elim hj a) ⁻¹' A)

tactic: exact isOpen_empty
state_before: case refine'_1
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
this✝ : ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop
j : J
hj : IsEmpty ↑(F.obj j).toCompHaus.toTop
A : Set α
this : (fun a => IsEmpty.elim hj a) ⁻¹' A = ∅
⊢ IsOpen ∅

tactic: ext x
state_before: case refine'_2
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
this : ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop
j : J
hj : IsEmpty ↑(F.obj j).toCompHaus.toTop
⊢ f =
    LocallyConstant.comap ((forget Profinite).map (C.π.app j))
      { toFun := fun a => IsEmpty.elim hj a,
        isLocallyConstant := (_ : ∀ (A : Set α), IsOpen ((fun a => IsEmpty.elim hj a) ⁻¹' A)) }

tactic: exact hj.elim' (C.π.app j x)
state_before: case refine'_2.h
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : IsEmpty (Quotient S.toSetoid)
this : ∃ j, IsEmpty ↑(F.obj j).toCompHaus.toTop
j : J
hj : IsEmpty ↑(F.obj j).toCompHaus.toTop
x : ↑C.pt.toCompHaus.toTop
⊢ ↑f x =
    ↑(LocallyConstant.comap ((forget Profinite).map (C.π.app j))
          { toFun := fun a => IsEmpty.elim hj a,
            isLocallyConstant := (_ : ∀ (A : Set α), IsOpen ((fun a => IsEmpty.elim hj a) ⁻¹' A)) })
      x

tactic: let f' : LocallyConstant C.pt S := ⟨S.proj, S.proj_isLocallyConstant⟩
state_before: case inr
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
⊢ ∃ j g, f = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g

tactic: obtain ⟨j, g', hj⟩ := exists_locallyConstant_finite_nonempty _ hC f'
state_before: case inr
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
f' : LocallyConstant (↑C.pt.toCompHaus.toTop) (Quotient S.toSetoid) :=
  { toFun := DiscreteQuotient.proj S, isLocallyConstant := (_ : IsLocallyConstant (DiscreteQuotient.proj S)) }
⊢ ∃ j g, f = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g

tactic: refine' ⟨j, ⟨ff ∘ g', g'.isLocallyConstant.comp _⟩, _⟩
state_before: case inr.intro.intro
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
f' : LocallyConstant (↑C.pt.toCompHaus.toTop) (Quotient S.toSetoid) :=
  { toFun := DiscreteQuotient.proj S, isLocallyConstant := (_ : IsLocallyConstant (DiscreteQuotient.proj S)) }
j : J
g' : LocallyConstant (↑(F.obj j).toCompHaus.toTop) (Quotient S.toSetoid)
hj : f' = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g'
⊢ ∃ j g, f = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g

tactic: ext1 t
state_before: case inr.intro.intro
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
f' : LocallyConstant (↑C.pt.toCompHaus.toTop) (Quotient S.toSetoid) :=
  { toFun := DiscreteQuotient.proj S, isLocallyConstant := (_ : IsLocallyConstant (DiscreteQuotient.proj S)) }
j : J
g' : LocallyConstant (↑(F.obj j).toCompHaus.toTop) (Quotient S.toSetoid)
hj : f' = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g'
⊢ f =
    LocallyConstant.comap ((forget Profinite).map (C.π.app j))
      { toFun := ff ∘ ↑g', isLocallyConstant := (_ : IsLocallyConstant (ff ∘ g'.toFun)) }

tactic: apply_fun fun e => e t at hj
state_before: case inr.intro.intro.h
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
f' : LocallyConstant (↑C.pt.toCompHaus.toTop) (Quotient S.toSetoid) :=
  { toFun := DiscreteQuotient.proj S, isLocallyConstant := (_ : IsLocallyConstant (DiscreteQuotient.proj S)) }
j : J
g' : LocallyConstant (↑(F.obj j).toCompHaus.toTop) (Quotient S.toSetoid)
hj : f' = LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g'
t : ↑C.pt.toCompHaus.toTop
⊢ ↑f t =
    ↑(LocallyConstant.comap ((forget Profinite).map (C.π.app j))
          { toFun := ff ∘ ↑g', isLocallyConstant := (_ : IsLocallyConstant (ff ∘ g'.toFun)) })
      t

tactic: rw [LocallyConstant.coe_comap ((forget Profinite).map _) _ (C.π.app j).continuous] at hj ⊢
state_before: case inr.intro.intro.h
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
f' : LocallyConstant (↑C.pt.toCompHaus.toTop) (Quotient S.toSetoid) :=
  { toFun := DiscreteQuotient.proj S, isLocallyConstant := (_ : IsLocallyConstant (DiscreteQuotient.proj S)) }
j : J
g' : LocallyConstant (↑(F.obj j).toCompHaus.toTop) (Quotient S.toSetoid)
t : ↑C.pt.toCompHaus.toTop
hj : ↑f' t = ↑(LocallyConstant.comap ((forget Profinite).map (C.π.app j)) g') t
⊢ ↑f t =
    ↑(LocallyConstant.comap ((forget Profinite).map (C.π.app j))
          { toFun := ff ∘ ↑g', isLocallyConstant := (_ : IsLocallyConstant (ff ∘ g'.toFun)) })
      t

tactic: dsimp at hj ⊢
state_before: case inr.intro.intro.h
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
f' : LocallyConstant (↑C.pt.toCompHaus.toTop) (Quotient S.toSetoid) :=
  { toFun := DiscreteQuotient.proj S, isLocallyConstant := (_ : IsLocallyConstant (DiscreteQuotient.proj S)) }
j : J
g' : LocallyConstant (↑(F.obj j).toCompHaus.toTop) (Quotient S.toSetoid)
t : ↑C.pt.toCompHaus.toTop
hj : ↑f' t = (↑g' ∘ (forget Profinite).map (C.π.1 j)) t
⊢ ↑f t =
    (↑{ toFun := ff ∘ ↑g', isLocallyConstant := (_ : IsLocallyConstant (ff ∘ g'.toFun)) } ∘
        (forget Profinite).map (C.π.1 j))
      t

tactic: rw [← hj]
state_before: case inr.intro.intro.h
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
f' : LocallyConstant (↑C.pt.toCompHaus.toTop) (Quotient S.toSetoid) :=
  { toFun := DiscreteQuotient.proj S, isLocallyConstant := (_ : IsLocallyConstant (DiscreteQuotient.proj S)) }
j : J
g' : LocallyConstant (↑(F.obj j).toCompHaus.toTop) (Quotient S.toSetoid)
t : ↑C.pt.toCompHaus.toTop
hj : DiscreteQuotient.proj (LocallyConstant.discreteQuotient f) t = ↑g' ((forget Profinite).map (C.π.1 j) t)
⊢ ↑f t = ↑(LocallyConstant.lift f) (↑g' ((forget Profinite).map (C.π.1 j) t))

tactic: rfl
state_before: case inr.intro.intro.h
J : Type u
inst✝¹ : SmallCategory J
inst✝ : IsCofiltered J
F : J ⥤ Profinite
C : Cone F
α : Type u_1
hC : IsLimit C
f : LocallyConstant (↑C.pt.toCompHaus.toTop) α
S : DiscreteQuotient ↑C.pt.toCompHaus.toTop := LocallyConstant.discreteQuotient f
ff : Quotient S.toSetoid → α := ↑(LocallyConstant.lift f)
h✝ : Nonempty (Quotient S.toSetoid)
f' : LocallyConstant (↑C.pt.toCompHaus.toTop) (Quotient S.toSetoid) :=
  { toFun := DiscreteQuotient.proj S, isLocallyConstant := (_ : IsLocallyConstant (DiscreteQuotient.proj S)) }
j : J
g' : LocallyConstant (↑(F.obj j).toCompHaus.toTop) (Quotient S.toSetoid)
t : ↑C.pt.toCompHaus.toTop
hj : DiscreteQuotient.proj (LocallyConstant.discreteQuotient f) t = ↑g' ((forget Profinite).map (C.π.1 j) t)
⊢ ↑f t = ↑(LocallyConstant.lift f) (DiscreteQuotient.proj (LocallyConstant.discreteQuotient f) t)