l3lab/ntp-mathlib huggingface dataset:
theorem partialSections.directed :
    Directed Superset fun G : FiniteDiagram J => partialSections F G.2 := by
  classical
  intro A B
  let ιA : FiniteDiagramArrow A.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f =>
    ⟨f.1, f.2.1, Finset.mem_union_left _ f.2.2.1, Finset.mem_union_left _ f.2.2.2.1, f.2.2.2.2⟩
  let ιB : FiniteDiagramArrow B.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f =>
    ⟨f.1, f.2.1, Finset.mem_union_right _ f.2.2.1, Finset.mem_union_right _ f.2.2.2.1, f.2.2.2.2⟩
  refine' ⟨⟨A.1 ⊔ B.1, A.2.image ιA ⊔ B.2.image ιB⟩, _, _⟩
  · rintro u hu f hf
    have : ιA f ∈ A.2.image ιA ⊔ B.2.image ιB := by
      apply Finset.mem_union_left
      rw [Finset.mem_image]
      refine' ⟨f, hf, rfl⟩
    exact hu this
  · rintro u hu f hf
    have : ιB f ∈ A.2.image ιA ⊔ B.2.image ιB := by
      

Proof state:
J : Type u
inst✝ : SmallCategory J
F : J ⥤ TopCat
A B : TopCat.FiniteDiagram J
ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) :=
  fun f =>
    { fst := f.fst,
      snd :=
        { fst := f.snd.fst,
          snd :=
            { fst := (_ : f.fst ∈ A.fst ∪ B.fst),
              snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } }
ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) :=
  fun f =>
    { fst := f.fst,
      snd :=
        { fst := f.snd.fst,
          snd :=
            { fst := (_ : f.fst ∈ A.fst ∪ B.fst),
              snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } }
u : (j : J) → ↑(F.obj j)
hu :
  u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd }
f : TopCat.FiniteDiagramArrow B.fst
hf : f ∈ B.snd
⊢ ιB f ∈ Finset.image ιA A.snd ⊔ Finset.image ιB B.snd

Next tactic:
apply Finset.mem_union_right
theorem partialSections.directed :
    Directed Superset fun G : FiniteDiagram J => partialSections F G.2 := by
  classical
  intro A B
  let ιA : FiniteDiagramArrow A.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f =>
    ⟨f.1, f.2.1, Finset.mem_union_left _ f.2.2.1, Finset.mem_union_left _ f.2.2.2.1, f.2.2.2.2⟩
  let ιB : FiniteDiagramArrow B.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f =>
    ⟨f.1, f.2.1, Finset.mem_union_right _ f.2.2.1, Finset.mem_union_right _ f.2.2.2.1, f.2.2.2.2⟩
  refine' ⟨⟨A.1 ⊔ B.1, A.2.image ιA ⊔ B.2.image ιB⟩, _, _⟩
  · rintro u hu f hf
    have : ιA f ∈ A.2.image ιA ⊔ B.2.image ιB := by
      apply Finset.mem_union_left
      rw [Finset.mem_image]
      refine' ⟨f, hf, rfl⟩
    exact hu this
  · rintro u hu f hf
    have : ιB f ∈ A.2.image ιA ⊔ B.2.image ιB := by
      apply Finset.mem_union_right
      

Proof state:
case h
J : Type u
inst✝ : SmallCategory J
F : J ⥤ TopCat
A B : TopCat.FiniteDiagram J
ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) :=
  fun f =>
    { fst := f.fst,
      snd :=
        { fst := f.snd.fst,
          snd :=
            { fst := (_ : f.fst ∈ A.fst ∪ B.fst),
              snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } }
ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) :=
  fun f =>
    { fst := f.fst,
      snd :=
        { fst := f.snd.fst,
          snd :=
            { fst := (_ : f.fst ∈ A.fst ∪ B.fst),
              snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } }
u : (j : J) → ↑(F.obj j)
hu :
  u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd }
f : TopCat.FiniteDiagramArrow B.fst
hf : f ∈ B.snd
⊢ ιB f ∈ Finset.image ιB B.snd

Next tactic:
rw [Finset.mem_image]
theorem partialSections.directed :
    Directed Superset fun G : FiniteDiagram J => partialSections F G.2 := by
  classical
  intro A B
  let ιA : FiniteDiagramArrow A.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f =>
    ⟨f.1, f.2.1, Finset.mem_union_left _ f.2.2.1, Finset.mem_union_left _ f.2.2.2.1, f.2.2.2.2⟩
  let ιB : FiniteDiagramArrow B.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f =>
    ⟨f.1, f.2.1, Finset.mem_union_right _ f.2.2.1, Finset.mem_union_right _ f.2.2.2.1, f.2.2.2.2⟩
  refine' ⟨⟨A.1 ⊔ B.1, A.2.image ιA ⊔ B.2.image ιB⟩, _, _⟩
  · rintro u hu f hf
    have : ιA f ∈ A.2.image ιA ⊔ B.2.image ιB := by
      apply Finset.mem_union_left
      rw [Finset.mem_image]
      refine' ⟨f, hf, rfl⟩
    exact hu this
  · rintro u hu f hf
    have : ιB f ∈ A.2.image ιA ⊔ B.2.image ιB := by
      apply Finset.mem_union_right
      rw [Finset.mem_image]
      

Proof state:
case h
J : Type u
inst✝ : SmallCategory J
F : J ⥤ TopCat
A B : TopCat.FiniteDiagram J
ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) :=
  fun f =>
    { fst := f.fst,
      snd :=
        { fst := f.snd.fst,
          snd :=
            { fst := (_ : f.fst ∈ A.fst ∪ B.fst),
              snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } }
ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) :=
  fun f =>
    { fst := f.fst,
      snd :=
        { fst := f.snd.fst,
          snd :=
            { fst := (_ : f.fst ∈ A.fst ∪ B.fst),
              snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } }
u : (j : J) → ↑(F.obj j)
hu :
  u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd }
f : TopCat.FiniteDiagramArrow B.fst
hf : f ∈ B.snd
⊢ ∃ a ∈ B.snd, ιB a = ιB f

Next tactic:
refine' ⟨f, hf, rfl⟩
theorem partialSections.directed :
    Directed Superset fun G : FiniteDiagram J => partialSections F G.2 := by
  classical
  intro A B
  let ιA : FiniteDiagramArrow A.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f =>
    ⟨f.1, f.2.1, Finset.mem_union_left _ f.2.2.1, Finset.mem_union_left _ f.2.2.2.1, f.2.2.2.2⟩
  let ιB : FiniteDiagramArrow B.1 → FiniteDiagramArrow (A.1 ⊔ B.1) := fun f =>
    ⟨f.1, f.2.1, Finset.mem_union_right _ f.2.2.1, Finset.mem_union_right _ f.2.2.2.1, f.2.2.2.2⟩
  refine' ⟨⟨A.1 ⊔ B.1, A.2.image ιA ⊔ B.2.image ιB⟩, _, _⟩
  · rintro u hu f hf
    have : ιA f ∈ A.2.image ιA ⊔ B.2.image ιB := by
      apply Finset.mem_union_left
      rw [Finset.mem_image]
      refine' ⟨f, hf, rfl⟩
    exact hu this
  · rintro u hu f hf
    have : ιB f ∈ A.2.image ιA ⊔ B.2.image ιB := by
      apply Finset.mem_union_right
      rw [Finset.mem_image]
      refine' ⟨f, hf, rfl⟩
    

Proof state:
case refine'_2
J : Type u
inst✝ : SmallCategory J
F : J ⥤ TopCat
A B : TopCat.FiniteDiagram J
ιA : TopCat.FiniteDiagramArrow A.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) :=
  fun f =>
    { fst := f.fst,
      snd :=
        { fst := f.snd.fst,
          snd :=
            { fst := (_ : f.fst ∈ A.fst ∪ B.fst),
              snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } }
ιB : TopCat.FiniteDiagramArrow B.fst → TopCat.FiniteDiagramArrow (A.fst ⊔ B.fst) :=
  fun f =>
    { fst := f.fst,
      snd :=
        { fst := f.snd.fst,
          snd :=
            { fst := (_ : f.fst ∈ A.fst ∪ B.fst),
              snd := { fst := (_ : f.snd.fst ∈ A.fst ∪ B.fst), snd := f.snd.snd.snd.snd } } } }
u : (j : J) → ↑(F.obj j)
hu :
  u ∈ (fun G => partialSections F G.snd) { fst := A.fst ⊔ B.fst, snd := Finset.image ιA A.snd ⊔ Finset.image ιB B.snd }
f : TopCat.FiniteDiagramArrow B.fst
hf : f ∈ B.snd
this : ιB f ∈ Finset.image ιA A.snd ⊔ Finset.image ιB B.snd
⊢ (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst

Next tactic:
exact hu this
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  

Proof state:
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
⊢ IsClosed (partialSections F H)

Next tactic:
have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    rfl
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    

Proof state:
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
⊢ partialSections F H = ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}

Next tactic:
ext1
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    

Proof state:
case h
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
x✝ : (j : J) → ↑(F.obj j)
⊢ x✝ ∈ partialSections F H ↔ x✝ ∈ ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}

Next tactic:
simp only [Set.mem_iInter, Set.mem_setOf_eq]
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    

Proof state:
case h
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
x✝ : (j : J) → ↑(F.obj j)
⊢ x✝ ∈ partialSections F H ↔ ∀ i ∈ H, (F.map i.snd.snd.snd.snd) (x✝ i.fst) = x✝ i.snd.fst

Next tactic:
rfl
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    rfl
  

Proof state:
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
this : partialSections F H = ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}
⊢ IsClosed (partialSections F H)

Next tactic:
rw [this]
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    rfl
  rw [this]
  

Proof state:
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
this : partialSections F H = ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}
⊢ IsClosed (⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst})

Next tactic:
apply isClosed_biInter
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    rfl
  rw [this]
  apply isClosed_biInter
  

Proof state:
case h
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
this : partialSections F H = ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}
⊢ ∀ i ∈ fun i => i ∈ H.val, IsClosed {u | (F.map i.snd.snd.snd.snd) (u i.fst) = u i.snd.fst}

Next tactic:
intro f _
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    rfl
  rw [this]
  apply isClosed_biInter
  intro f _
  -- Porting note: can't see through forget
  

Proof state:
case h
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
this : partialSections F H = ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}
f : TopCat.FiniteDiagramArrow G
a✝ : f ∈ fun i => i ∈ H.val
⊢ IsClosed {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}

Next tactic:
have : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) :=
    inferInstanceAs (T2Space (F.obj f.snd.fst))
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    rfl
  rw [this]
  apply isClosed_biInter
  intro f _
  -- Porting note: can't see through forget
  have : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) :=
    inferInstanceAs (T2Space (F.obj f.snd.fst))
  

Proof state:
case h
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
this✝ : partialSections F H = ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}
f : TopCat.FiniteDiagramArrow G
a✝ : f ∈ fun i => i ∈ H.val
this : T2Space ((forget TopCat).obj (F.obj f.snd.fst))
⊢ IsClosed {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}

Next tactic:
apply isClosed_eq
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    rfl
  rw [this]
  apply isClosed_biInter
  intro f _
  -- Porting note: can't see through forget
  have : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) :=
    inferInstanceAs (T2Space (F.obj f.snd.fst))
  apply isClosed_eq
  -- Porting note: used to be a single `continuity` that closed both goals
  · 

Proof state:
case h.hf
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
this✝ : partialSections F H = ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}
f : TopCat.FiniteDiagramArrow G
a✝ : f ∈ fun i => i ∈ H.val
this : T2Space ((forget TopCat).obj (F.obj f.snd.fst))
⊢ Continuous fun y => (F.map f.snd.snd.snd.snd) (y f.fst)

Next tactic:
exact (F.map f.snd.snd.snd.snd).continuous.comp (continuous_apply f.fst)
theorem partialSections.closed [∀ j : J, T2Space (F.obj j)] {G : Finset J}
    (H : Finset (FiniteDiagramArrow G)) : IsClosed (partialSections F H) := by
  have :
    partialSections F H =
      ⋂ (f : FiniteDiagramArrow G) (_ : f ∈ H), {u | F.map f.2.2.2.2 (u f.1) = u f.2.1} := by
    ext1
    simp only [Set.mem_iInter, Set.mem_setOf_eq]
    rfl
  rw [this]
  apply isClosed_biInter
  intro f _
  -- Porting note: can't see through forget
  have : T2Space ((forget TopCat).obj (F.obj f.snd.fst)) :=
    inferInstanceAs (T2Space (F.obj f.snd.fst))
  apply isClosed_eq
  -- Porting note: used to be a single `continuity` that closed both goals
  · exact (F.map f.snd.snd.snd.snd).continuous.comp (continuous_apply f.fst)
  · 

Proof state:
case h.hg
J : Type u
inst✝¹ : SmallCategory J
F : J ⥤ TopCat
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
G : Finset J
H : Finset (TopCat.FiniteDiagramArrow G)
this✝ : partialSections F H = ⋂ f ∈ H, {u | (F.map f.snd.snd.snd.snd) (u f.fst) = u f.snd.fst}
f : TopCat.FiniteDiagramArrow G
a✝ : f ∈ fun i => i ∈ H.val
this : T2Space ((forget TopCat).obj (F.obj f.snd.fst))
⊢ Continuous fun y => y f.snd.fst

Next tactic:
continuity
/-- Cofiltered limits of nonempty compact Hausdorff spaces are nonempty topological spaces.
-/
-- porting note: generalized from `TopCat.{u}` to `TopCatMax.{u,v}`
theorem nonempty_limitCone_of_compact_t2_cofiltered_system (F : J ⥤ TopCatMax.{u,v})
    [IsCofilteredOrEmpty J]
    [∀ j : J, Nonempty (F.obj j)] [∀ j : J, CompactSpace (F.obj j)] [∀ j : J, T2Space (F.obj j)] :
    Nonempty (TopCat.limitCone F).pt := by
  

Proof state:
J : Type u
inst✝⁴ : SmallCategory J
F✝ : J ⥤ TopCat
F : J ⥤ TopCatMax
inst✝³ : IsCofilteredOrEmpty J
inst✝² : ∀ (j : J), Nonempty ↑(F.obj j)
inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j)
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
⊢ Nonempty ↑(limitCone F).pt

Next tactic:
classical
  obtain ⟨u, hu⟩ :=
    IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed (fun G => partialSections F _)
      (partialSections.directed F) (fun G => partialSections.nonempty F _)
      (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G =>
      partialSections.closed F _
  use u
  intro X Y f
  let G : FiniteDiagram J :=
    ⟨{X, Y},
      {⟨X, Y, by simp only [true_or_iff, eq_self_iff_true, Finset.mem_insert], by
          simp only [eq_self_iff_true, or_true_iff, Finset.mem_insert, Finset.mem_singleton], f⟩}⟩
  exact hu _ ⟨G, rfl⟩ (Finset.mem_singleton_self _)
/-- Cofiltered limits of nonempty compact Hausdorff spaces are nonempty topological spaces.
-/
-- porting note: generalized from `TopCat.{u}` to `TopCatMax.{u,v}`
theorem nonempty_limitCone_of_compact_t2_cofiltered_system (F : J ⥤ TopCatMax.{u,v})
    [IsCofilteredOrEmpty J]
    [∀ j : J, Nonempty (F.obj j)] [∀ j : J, CompactSpace (F.obj j)] [∀ j : J, T2Space (F.obj j)] :
    Nonempty (TopCat.limitCone F).pt := by
  classical
  

Proof state:
J : Type u
inst✝⁴ : SmallCategory J
F✝ : J ⥤ TopCat
F : J ⥤ TopCatMax
inst✝³ : IsCofilteredOrEmpty J
inst✝² : ∀ (j : J), Nonempty ↑(F.obj j)
inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j)
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
⊢ Nonempty ↑(limitCone F).pt

Next tactic:
obtain ⟨u, hu⟩ :=
    IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed (fun G => partialSections F _)
      (partialSections.directed F) (fun G => partialSections.nonempty F _)
      (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G =>
      partialSections.closed F _
/-- Cofiltered limits of nonempty compact Hausdorff spaces are nonempty topological spaces.
-/
-- porting note: generalized from `TopCat.{u}` to `TopCatMax.{u,v}`
theorem nonempty_limitCone_of_compact_t2_cofiltered_system (F : J ⥤ TopCatMax.{u,v})
    [IsCofilteredOrEmpty J]
    [∀ j : J, Nonempty (F.obj j)] [∀ j : J, CompactSpace (F.obj j)] [∀ j : J, T2Space (F.obj j)] :
    Nonempty (TopCat.limitCone F).pt := by
  classical
  obtain ⟨u, hu⟩ :=
    IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed (fun G => partialSections F _)
      (partialSections.directed F) (fun G => partialSections.nonempty F _)
      (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G =>
      partialSections.closed F _
  

Proof state:
case intro
J : Type u
inst✝⁴ : SmallCategory J
F✝ : J ⥤ TopCat
F : J ⥤ TopCatMax
inst✝³ : IsCofilteredOrEmpty J
inst✝² : ∀ (j : J), Nonempty ↑(F.obj j)
inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j)
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
u : (j : J) → ↑(F.obj j)
hu : u ∈ ⋂ i, partialSections F i.snd
⊢ Nonempty ↑(limitCone F).pt

Next tactic:
use u
/-- Cofiltered limits of nonempty compact Hausdorff spaces are nonempty topological spaces.
-/
-- porting note: generalized from `TopCat.{u}` to `TopCatMax.{u,v}`
theorem nonempty_limitCone_of_compact_t2_cofiltered_system (F : J ⥤ TopCatMax.{u,v})
    [IsCofilteredOrEmpty J]
    [∀ j : J, Nonempty (F.obj j)] [∀ j : J, CompactSpace (F.obj j)] [∀ j : J, T2Space (F.obj j)] :
    Nonempty (TopCat.limitCone F).pt := by
  classical
  obtain ⟨u, hu⟩ :=
    IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed (fun G => partialSections F _)
      (partialSections.directed F) (fun G => partialSections.nonempty F _)
      (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G =>
      partialSections.closed F _
  use u
  

Proof state:
case property
J : Type u
inst✝⁴ : SmallCategory J
F✝ : J ⥤ TopCat
F : J ⥤ TopCatMax
inst✝³ : IsCofilteredOrEmpty J
inst✝² : ∀ (j : J), Nonempty ↑(F.obj j)
inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j)
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
u : (j : J) → ↑(F.obj j)
hu : u ∈ ⋂ i, partialSections F i.snd
⊢ u ∈ {u | ∀ {i j : J} (f : i ⟶ j), (F.map f) (u i) = u j}

Next tactic:
intro X Y f
/-- Cofiltered limits of nonempty compact Hausdorff spaces are nonempty topological spaces.
-/
-- porting note: generalized from `TopCat.{u}` to `TopCatMax.{u,v}`
theorem nonempty_limitCone_of_compact_t2_cofiltered_system (F : J ⥤ TopCatMax.{u,v})
    [IsCofilteredOrEmpty J]
    [∀ j : J, Nonempty (F.obj j)] [∀ j : J, CompactSpace (F.obj j)] [∀ j : J, T2Space (F.obj j)] :
    Nonempty (TopCat.limitCone F).pt := by
  classical
  obtain ⟨u, hu⟩ :=
    IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed (fun G => partialSections F _)
      (partialSections.directed F) (fun G => partialSections.nonempty F _)
      (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G =>
      partialSections.closed F _
  use u
  intro X Y f
  

Proof state:
case property
J : Type u
inst✝⁴ : SmallCategory J
F✝ : J ⥤ TopCat
F : J ⥤ TopCatMax
inst✝³ : IsCofilteredOrEmpty J
inst✝² : ∀ (j : J), Nonempty ↑(F.obj j)
inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j)
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
u : (j : J) → ↑(F.obj j)
hu : u ∈ ⋂ i, partialSections F i.snd
X Y : J
f : X ⟶ Y
⊢ (F.map f) (u X) = u Y

Next tactic:
let G : FiniteDiagram J :=
    ⟨{X, Y},
      {⟨X, Y, by simp only [true_or_iff, eq_self_iff_true, Finset.mem_insert], by
          simp only [eq_self_iff_true, or_true_iff, Finset.mem_insert, Finset.mem_singleton], f⟩}⟩
/-- Cofiltered limits of nonempty compact Hausdorff spaces are nonempty topological spaces.
-/
-- porting note: generalized from `TopCat.{u}` to `TopCatMax.{u,v}`
theorem nonempty_limitCone_of_compact_t2_cofiltered_system (F : J ⥤ TopCatMax.{u,v})
    [IsCofilteredOrEmpty J]
    [∀ j : J, Nonempty (F.obj j)] [∀ j : J, CompactSpace (F.obj j)] [∀ j : J, T2Space (F.obj j)] :
    Nonempty (TopCat.limitCone F).pt := by
  classical
  obtain ⟨u, hu⟩ :=
    IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed (fun G => partialSections F _)
      (partialSections.directed F) (fun G => partialSections.nonempty F _)
      (fun G => IsClosed.isCompact (partialSections.closed F _)) fun G =>
      partialSections.closed F _
  use u
  intro X Y f
  let G : FiniteDiagram J :=
    ⟨{X, Y},
      {⟨X, Y, by 

Proof state:
J : Type u
inst✝⁴ : SmallCategory J
F✝ : J ⥤ TopCat
F : J ⥤ TopCatMax
inst✝³ : IsCofilteredOrEmpty J
inst✝² : ∀ (j : J), Nonempty ↑(F.obj j)
inst✝¹ : ∀ (j : J), CompactSpace ↑(F.obj j)
inst✝ : ∀ (j : J), T2Space ↑(F.obj j)
u : (j : J) → ↑(F.obj j)
hu : u ∈ ⋂ i, partialSections F i.snd
X Y : J
f : X ⟶ Y
⊢ X ∈ {X, Y}

Next tactic:
simp only [true_or_iff, eq_self_iff_true, Finset.mem_insert]