l3lab/ntp-mathlib huggingface dataset:
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
⊢ ∃ o, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z

Next tactic:
let ι : Set (Set α) := irreducibleComponents α \ {Z}
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
⊢ ∃ o, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z

Next tactic:
have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
⊢ ∃ o, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z

Next tactic:
have hι' : Finite ι := by rwa [Set.finite_coe_iff]
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
⊢ Finite ↑ι

Next tactic:
rwa [Set.finite_coe_iff]
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
⊢ ∃ o, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z

Next tactic:
let U := Z \ ⋃ (x : ι), x
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
⊢ ∃ o, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z

Next tactic:
have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
    exact hZ'.1.2 $ le_antisymm (H.2 hZ'.1.1.1 hZ'.2) hZ'.2
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
r : U = ∅
⊢ False

Next tactic:
obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
r : U = ∅
z : Set α
hz : z ∈ Set.Finite.toFinset hι
⊢ IsClosed z

Next tactic:
simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
r : U = ∅
z : Set α
hz : z ∈ irreducibleComponents α ∧ ¬z = Z
⊢ IsClosed z

Next tactic:
exact isClosed_of_mem_irreducibleComponents _ hz.1
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
r : U = ∅
⊢ Z ⊆ ⋃₀ ↑(Set.Finite.toFinset hι)

Next tactic:
rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
r : U = ∅
⊢ Z ⊆ ⋃ i, ↑i

Next tactic:
rw [Set.diff_eq_empty] at r
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
r : Z ⊆ ⋃ x, ↑x
⊢ Z ⊆ ⋃ i, ↑i

Next tactic:
exact r
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    

Proof state:
case intro
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
r : U = ∅
Z' : Set α
hZ' : Z' ∈ Set.Finite.toFinset hι ∧ Z ⊆ Z'
⊢ False

Next tactic:
simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
    

Proof state:
case intro
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
r : U = ∅
Z' : Set α
hZ' : (Z' ∈ irreducibleComponents α ∧ ¬Z' = Z) ∧ Z ⊆ Z'
⊢ False

Next tactic:
exact hZ'.1.2 $ le_antisymm (H.2 hZ'.1.1.1 hZ'.2) hZ'.2
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
    exact hZ'.1.2 $ le_antisymm (H.2 hZ'.1.1.1 hZ'.2) hZ'.2

  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
hU0 : U ≠ ∅
⊢ ∃ o, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z

Next tactic:
have hU1 : U = (⋃ (x : ι), x.1) ᶜ
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
    exact hZ'.1.2 $ le_antisymm (H.2 hZ'.1.1.1 hZ'.2) hZ'.2

  have hU1 : U = (⋃ (x : ι), x.1) ᶜ
  · 

Proof state:
case hU1
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
hU0 : U ≠ ∅
⊢ U = (⋃ x, ↑x)ᶜ

Next tactic:
rw [Set.compl_eq_univ_diff]
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
    exact hZ'.1.2 $ le_antisymm (H.2 hZ'.1.1.1 hZ'.2) hZ'.2

  have hU1 : U = (⋃ (x : ι), x.1) ᶜ
  · rw [Set.compl_eq_univ_diff]
    

Proof state:
case hU1
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
hU0 : U ≠ ∅
⊢ U = Set.univ \ ⋃ x, ↑x

Next tactic:
refine le_antisymm (Set.diff_subset_diff le_top $ subset_refl _) ?_
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
    exact hZ'.1.2 $ le_antisymm (H.2 hZ'.1.1.1 hZ'.2) hZ'.2

  have hU1 : U = (⋃ (x : ι), x.1) ᶜ
  · rw [Set.compl_eq_univ_diff]
    refine le_antisymm (Set.diff_subset_diff le_top $ subset_refl _) ?_
    

Proof state:
case hU1
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
hU0 : U ≠ ∅
⊢ Set.univ \ ⋃ x, ↑x ≤ U

Next tactic:
rw [← Set.compl_eq_univ_diff]
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
    exact hZ'.1.2 $ le_antisymm (H.2 hZ'.1.1.1 hZ'.2) hZ'.2

  have hU1 : U = (⋃ (x : ι), x.1) ᶜ
  · rw [Set.compl_eq_univ_diff]
    refine le_antisymm (Set.diff_subset_diff le_top $ subset_refl _) ?_
    rw [← Set.compl_eq_univ_diff]
    

Proof state:
case hU1
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
hU0 : U ≠ ∅
⊢ (⋃ x, ↑x)ᶜ ≤ U

Next tactic:
refine Set.compl_subset_iff_union.mpr (le_antisymm le_top ?_)
/-- [Stacks: Lemma 0052 (3)](https://stacks.math.columbia.edu/tag/0052) -/
theorem NoetherianSpace.exists_open_ne_empty_le_irreducibleComponent [NoetherianSpace α]
    (Z : Set α) (H : Z ∈ irreducibleComponents α) :
    ∃ o : Set α, IsOpen o ∧ o ≠ ∅ ∧ o ≤ Z := by
  classical

  let ι : Set (Set α) := irreducibleComponents α \ {Z}
  have hι : ι.Finite := (NoetherianSpace.finite_irreducibleComponents (α := α)).subset
    (Set.diff_subset _ _)
  have hι' : Finite ι := by rwa [Set.finite_coe_iff]

  let U := Z \ ⋃ (x : ι), x
  have hU0 : U ≠ ∅ := λ r ↦ by
    obtain ⟨Z', hZ'⟩ := isIrreducible_iff_sUnion_closed.mp H.1 hι.toFinset
      (λ z hz ↦ by
        simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hz
        exact isClosed_of_mem_irreducibleComponents _ hz.1)
      (by
        rw [Set.Finite.coe_toFinset, Set.sUnion_eq_iUnion]
        rw [Set.diff_eq_empty] at r
        exact r)
    simp only [Set.Finite.mem_toFinset, Set.mem_diff, Set.mem_singleton_iff] at hZ'
    exact hZ'.1.2 $ le_antisymm (H.2 hZ'.1.1.1 hZ'.2) hZ'.2

  have hU1 : U = (⋃ (x : ι), x.1) ᶜ
  · rw [Set.compl_eq_univ_diff]
    refine le_antisymm (Set.diff_subset_diff le_top $ subset_refl _) ?_
    rw [← Set.compl_eq_univ_diff]
    refine Set.compl_subset_iff_union.mpr (le_antisymm le_top ?_)
    

Proof state:
case hU1
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
Z : Set α
H : Z ∈ irreducibleComponents α
ι : Set (Set α) := irreducibleComponents α \ {Z}
hι : Set.Finite ι
hι' : Finite ↑ι
U : Set α := Z \ ⋃ x, ↑x
hU0 : U ≠ ∅
⊢ Set.univ ≤ (⋃ x, ↑x) ∪ U

Next tactic:
rw [Set.union_comm, ← Set.sUnion_eq_iUnion, ← Set.sUnion_insert]