l3lab/ntp-mathlib huggingface dataset:
/-- p-groups with different p are disjoint -/
theorem disjoint_of_ne (p₁ p₂ : ℕ) [hp₁ : Fact p₁.Prime] [hp₂ : Fact p₂.Prime] (hne : p₁ ≠ p₂)
    (H₁ H₂ : Subgroup G) (hH₁ : IsPGroup p₁ H₁) (hH₂ : IsPGroup p₂ H₂) : Disjoint H₁ H₂ := by
  rw [Subgroup.disjoint_def]
  intro x hx₁ hx₂
  obtain ⟨n₁, hn₁⟩ := iff_orderOf.mp hH₁ ⟨x, hx₁⟩
  obtain ⟨n₂, hn₂⟩ := iff_orderOf.mp hH₂ ⟨x, hx₂⟩
  rw [Subgroup.orderOf_mk] at hn₁ hn₂
  have : p₁ ^ n₁ = p₂ ^ n₂ := by rw [← hn₁, ← hn₂]
  rcases n₁.eq_zero_or_pos with (rfl | hn₁)
  · simpa using hn₁
  · 

Proof state:
case intro.intro.inr
p : ℕ
G : Type u_1
inst✝ : Group G
p₁ p₂ : ℕ
hp₁ : Fact (Nat.Prime p₁)
hp₂ : Fact (Nat.Prime p₂)
hne : p₁ ≠ p₂
H₁ H₂ : Subgroup G
hH₁ : IsPGroup p₁ ↥H₁
hH₂ : IsPGroup p₂ ↥H₂
x : G
hx₁ : x ∈ H₁
hx₂ : x ∈ H₂
n₁ : ℕ
hn₁✝ : orderOf x = p₁ ^ n₁
n₂ : ℕ
hn₂ : orderOf x = p₂ ^ n₂
this : p₁ ^ n₁ = p₂ ^ n₂
hn₁ : n₁ > 0
⊢ x = 1

Next tactic:
exact absurd (eq_of_prime_pow_eq hp₁.out.prime hp₂.out.prime hn₁ this) hne
/-- The cardinality of the `center` of a `p`-group is `p ^ k` where `k` is positive. -/
theorem card_center_eq_prime_pow (hn : 0 < n) [Fintype (center G)] :
    ∃ k > 0, card (center G) = p ^ k := by
  

Proof state:
p : ℕ
G : Type u_1
inst✝³ : Group G
inst✝² : Fintype G
inst✝¹ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
hn : 0 < n
inst✝ : Fintype ↥(center G)
⊢ ∃ k > 0, card ↥(center G) = p ^ k

Next tactic:
have hcG := to_subgroup (of_card hGpn) (center G)
/-- The cardinality of the `center` of a `p`-group is `p ^ k` where `k` is positive. -/
theorem card_center_eq_prime_pow (hn : 0 < n) [Fintype (center G)] :
    ∃ k > 0, card (center G) = p ^ k := by
  have hcG := to_subgroup (of_card hGpn) (center G)
  

Proof state:
p : ℕ
G : Type u_1
inst✝³ : Group G
inst✝² : Fintype G
inst✝¹ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
hn : 0 < n
inst✝ : Fintype ↥(center G)
hcG : IsPGroup p ↥(center G)
⊢ ∃ k > 0, card ↥(center G) = p ^ k

Next tactic:
rcases iff_card.1 hcG with _
/-- The cardinality of the `center` of a `p`-group is `p ^ k` where `k` is positive. -/
theorem card_center_eq_prime_pow (hn : 0 < n) [Fintype (center G)] :
    ∃ k > 0, card (center G) = p ^ k := by
  have hcG := to_subgroup (of_card hGpn) (center G)
  rcases iff_card.1 hcG with _
  

Proof state:
p : ℕ
G : Type u_1
inst✝³ : Group G
inst✝² : Fintype G
inst✝¹ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
hn : 0 < n
inst✝ : Fintype ↥(center G)
hcG : IsPGroup p ↥(center G)
x✝ : ∃ n, card ↥(center G) = p ^ n
⊢ ∃ k > 0, card ↥(center G) = p ^ k

Next tactic:
haveI : Nontrivial G := (nontrivial_iff_card <| of_card hGpn).2 ⟨n, hn, hGpn⟩
/-- The cardinality of the `center` of a `p`-group is `p ^ k` where `k` is positive. -/
theorem card_center_eq_prime_pow (hn : 0 < n) [Fintype (center G)] :
    ∃ k > 0, card (center G) = p ^ k := by
  have hcG := to_subgroup (of_card hGpn) (center G)
  rcases iff_card.1 hcG with _
  haveI : Nontrivial G := (nontrivial_iff_card <| of_card hGpn).2 ⟨n, hn, hGpn⟩
  

Proof state:
p : ℕ
G : Type u_1
inst✝³ : Group G
inst✝² : Fintype G
inst✝¹ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
hn : 0 < n
inst✝ : Fintype ↥(center G)
hcG : IsPGroup p ↥(center G)
x✝ : ∃ n, card ↥(center G) = p ^ n
this : Nontrivial G
⊢ ∃ k > 0, card ↥(center G) = p ^ k

Next tactic:
exact (nontrivial_iff_card hcG).mp (center_nontrivial (of_card hGpn))
/-- The quotient by the center of a group of cardinality `p ^ 2` is cyclic. -/
theorem cyclic_center_quotient_of_card_eq_prime_sq (hG : card G = p ^ 2) :
    IsCyclic (G ⧸ center G) := by
  

Proof state:
p : ℕ
G : Type u_1
inst✝² : Group G
inst✝¹ : Fintype G
inst✝ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
hG : card G = p ^ 2
⊢ IsCyclic (G ⧸ center G)

Next tactic:
classical
    rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩
    rw [card_eq_card_quotient_mul_card_subgroup (center G), mul_comm, hk] at hG
    have hk2 := (Nat.pow_dvd_pow_iff_le_right (Fact.out (p := p.Prime)).one_lt).1 ⟨_, hG.symm⟩
    interval_cases k
    · rw [sq, pow_one, mul_right_inj' (Fact.out (p := p.Prime)).ne_zero] at hG
      exact isCyclic_of_prime_card hG
    · exact
        @isCyclic_of_subsingleton _ _
          ⟨Fintype.card_le_one_iff.1
              (mul_right_injective₀ (pow_ne_zero 2 (NeZero.ne p))
                  (hG.trans (mul_one (p ^ 2)).symm)).le⟩
/-- The quotient by the center of a group of cardinality `p ^ 2` is cyclic. -/
theorem cyclic_center_quotient_of_card_eq_prime_sq (hG : card G = p ^ 2) :
    IsCyclic (G ⧸ center G) := by
  classical
    

Proof state:
p : ℕ
G : Type u_1
inst✝² : Group G
inst✝¹ : Fintype G
inst✝ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
hG : card G = p ^ 2
⊢ IsCyclic (G ⧸ center G)

Next tactic:
rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩
/-- The quotient by the center of a group of cardinality `p ^ 2` is cyclic. -/
theorem cyclic_center_quotient_of_card_eq_prime_sq (hG : card G = p ^ 2) :
    IsCyclic (G ⧸ center G) := by
  classical
    rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩
    

Proof state:
case intro.intro
p : ℕ
G : Type u_1
inst✝² : Group G
inst✝¹ : Fintype G
inst✝ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
hG : card G = p ^ 2
k : ℕ
hk0 : k > 0
hk : card ↥(center G) = p ^ k
⊢ IsCyclic (G ⧸ center G)

Next tactic:
rw [card_eq_card_quotient_mul_card_subgroup (center G), mul_comm, hk] at hG
/-- The quotient by the center of a group of cardinality `p ^ 2` is cyclic. -/
theorem cyclic_center_quotient_of_card_eq_prime_sq (hG : card G = p ^ 2) :
    IsCyclic (G ⧸ center G) := by
  classical
    rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩
    rw [card_eq_card_quotient_mul_card_subgroup (center G), mul_comm, hk] at hG
    

Proof state:
case intro.intro
p : ℕ
G : Type u_1
inst✝² : Group G
inst✝¹ : Fintype G
inst✝ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
k : ℕ
hG : p ^ k * card (G ⧸ center G) = p ^ 2
hk0 : k > 0
hk : card ↥(center G) = p ^ k
⊢ IsCyclic (G ⧸ center G)

Next tactic:
have hk2 := (Nat.pow_dvd_pow_iff_le_right (Fact.out (p := p.Prime)).one_lt).1 ⟨_, hG.symm⟩
/-- The quotient by the center of a group of cardinality `p ^ 2` is cyclic. -/
theorem cyclic_center_quotient_of_card_eq_prime_sq (hG : card G = p ^ 2) :
    IsCyclic (G ⧸ center G) := by
  classical
    rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩
    rw [card_eq_card_quotient_mul_card_subgroup (center G), mul_comm, hk] at hG
    have hk2 := (Nat.pow_dvd_pow_iff_le_right (Fact.out (p := p.Prime)).one_lt).1 ⟨_, hG.symm⟩
    

Proof state:
case intro.intro
p : ℕ
G : Type u_1
inst✝² : Group G
inst✝¹ : Fintype G
inst✝ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
k : ℕ
hG : p ^ k * card (G ⧸ center G) = p ^ 2
hk0 : k > 0
hk : card ↥(center G) = p ^ k
hk2 : k ≤ 2
⊢ IsCyclic (G ⧸ center G)

Next tactic:
interval_cases k
/-- The quotient by the center of a group of cardinality `p ^ 2` is cyclic. -/
theorem cyclic_center_quotient_of_card_eq_prime_sq (hG : card G = p ^ 2) :
    IsCyclic (G ⧸ center G) := by
  classical
    rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩
    rw [card_eq_card_quotient_mul_card_subgroup (center G), mul_comm, hk] at hG
    have hk2 := (Nat.pow_dvd_pow_iff_le_right (Fact.out (p := p.Prime)).one_lt).1 ⟨_, hG.symm⟩
    interval_cases k
    · 

Proof state:
case intro.intro.«1»
p : ℕ
G : Type u_1
inst✝² : Group G
inst✝¹ : Fintype G
inst✝ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
k : ℕ
hG : p ^ 1 * card (G ⧸ center G) = p ^ 2
hk0 : 1 > 0
hk : card ↥(center G) = p ^ 1
hk2 : 1 ≤ 2
⊢ IsCyclic (G ⧸ center G)

Next tactic:
rw [sq, pow_one, mul_right_inj' (Fact.out (p := p.Prime)).ne_zero] at hG
/-- The quotient by the center of a group of cardinality `p ^ 2` is cyclic. -/
theorem cyclic_center_quotient_of_card_eq_prime_sq (hG : card G = p ^ 2) :
    IsCyclic (G ⧸ center G) := by
  classical
    rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩
    rw [card_eq_card_quotient_mul_card_subgroup (center G), mul_comm, hk] at hG
    have hk2 := (Nat.pow_dvd_pow_iff_le_right (Fact.out (p := p.Prime)).one_lt).1 ⟨_, hG.symm⟩
    interval_cases k
    · rw [sq, pow_one, mul_right_inj' (Fact.out (p := p.Prime)).ne_zero] at hG
      

Proof state:
case intro.intro.«1»
p : ℕ
G : Type u_1
inst✝² : Group G
inst✝¹ : Fintype G
inst✝ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
k : ℕ
hG : card (G ⧸ center G) = p
hk0 : 1 > 0
hk : card ↥(center G) = p ^ 1
hk2 : 1 ≤ 2
⊢ IsCyclic (G ⧸ center G)

Next tactic:
exact isCyclic_of_prime_card hG
/-- The quotient by the center of a group of cardinality `p ^ 2` is cyclic. -/
theorem cyclic_center_quotient_of_card_eq_prime_sq (hG : card G = p ^ 2) :
    IsCyclic (G ⧸ center G) := by
  classical
    rcases card_center_eq_prime_pow hG zero_lt_two with ⟨k, hk0, hk⟩
    rw [card_eq_card_quotient_mul_card_subgroup (center G), mul_comm, hk] at hG
    have hk2 := (Nat.pow_dvd_pow_iff_le_right (Fact.out (p := p.Prime)).one_lt).1 ⟨_, hG.symm⟩
    interval_cases k
    · rw [sq, pow_one, mul_right_inj' (Fact.out (p := p.Prime)).ne_zero] at hG
      exact isCyclic_of_prime_card hG
    · 

Proof state:
case intro.intro.«2»
p : ℕ
G : Type u_1
inst✝² : Group G
inst✝¹ : Fintype G
inst✝ : Fact (Nat.Prime p)
n : ℕ
hGpn : card G = p ^ n
k : ℕ
hG : p ^ 2 * card (G ⧸ center G) = p ^ 2
hk0 : 2 > 0
hk : card ↥(center G) = p ^ 2
hk2 : 2 ≤ 2
⊢ IsCyclic (G ⧸ center G)

Next tactic:
exact
        @isCyclic_of_subsingleton _ _
          ⟨Fintype.card_le_one_iff.1
              (mul_right_injective₀ (pow_ne_zero 2 (NeZero.ne p))
                  (hG.trans (mul_one (p ^ 2)).symm)).le⟩
instance : SetLike (Closeds α) α where
  coe := Closeds.carrier
  coe_injective' s t h := by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Closeds α
h : s.carrier = t.carrier
⊢ s = t

Next tactic:
cases s
instance : SetLike (Closeds α) α where
  coe := Closeds.carrier
  coe_injective' s t h := by cases s; 

Proof state:
case mk
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
t : Closeds α
carrier✝ : Set α
closed'✝ : IsClosed carrier✝
h : { carrier := carrier✝, closed' := closed'✝ }.carrier = t.carrier
⊢ { carrier := carrier✝, closed' := closed'✝ } = t

Next tactic:
cases t
instance : SetLike (Closeds α) α where
  coe := Closeds.carrier
  coe_injective' s t h := by cases s; cases t; 

Proof state:
case mk.mk
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
carrier✝¹ : Set α
closed'✝¹ : IsClosed carrier✝¹
carrier✝ : Set α
closed'✝ : IsClosed carrier✝
h : { carrier := carrier✝¹, closed' := closed'✝¹ }.carrier = { carrier := carrier✝, closed' := closed'✝ }.carrier
⊢ { carrier := carrier✝¹, closed' := closed'✝¹ } = { carrier := carrier✝, closed' := closed'✝ }

Next tactic:
congr
@[simp]
theorem mem_iInf {ι} {x : α} {s : ι → Closeds α} : x ∈ iInf s ↔ ∀ i, x ∈ s i := by 

Proof state:
ι✝ : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
ι : Sort u_4
x : α
s : ι → Closeds α
⊢ x ∈ iInf s ↔ ∀ (i : ι), x ∈ s i

Next tactic:
simp [iInf]
@[simp, norm_cast]
theorem coe_iInf {ι} (s : ι → Closeds α) : ((⨅ i, s i : Closeds α) : Set α) = ⋂ i, s i := by
  

Proof state:
ι✝ : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
ι : Sort u_4
s : ι → Closeds α
⊢ ↑(⨅ i, s i) = ⋂ i, ↑(s i)

Next tactic:
ext
@[simp, norm_cast]
theorem coe_iInf {ι} (s : ι → Closeds α) : ((⨅ i, s i : Closeds α) : Set α) = ⋂ i, s i := by
  ext; 

Proof state:
case h
ι✝ : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
ι : Sort u_4
s : ι → Closeds α
x✝ : α
⊢ x✝ ∈ ↑(⨅ i, s i) ↔ x✝ ∈ ⋂ i, ↑(s i)

Next tactic:
simp
theorem iInf_def {ι} (s : ι → Closeds α) :
    ⨅ i, s i = ⟨⋂ i, s i, isClosed_iInter fun i => (s i).2⟩ := by 

Proof state:
ι✝ : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
ι : Sort u_4
s : ι → Closeds α
⊢ ⨅ i, s i = { carrier := ⋂ i, ↑(s i), closed' := (_ : IsClosed (⋂ i, ↑(s i))) }

Next tactic:
ext1
theorem iInf_def {ι} (s : ι → Closeds α) :
    ⨅ i, s i = ⟨⋂ i, s i, isClosed_iInter fun i => (s i).2⟩ := by ext1; 

Proof state:
case h
ι✝ : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
ι : Sort u_4
s : ι → Closeds α
⊢ ↑(⨅ i, s i) = ↑{ carrier := ⋂ i, ↑(s i), closed' := (_ : IsClosed (⋂ i, ↑(s i))) }

Next tactic:
simp
instance : Coframe (Closeds α) :=
  { inferInstanceAs (CompleteLattice (Closeds α)) with
    sInf := sInf
    iInf_sup_le_sup_sInf := fun a s =>
      (SetLike.coe_injective <| by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
src✝ : CompleteLattice (Closeds α) := inferInstanceAs (CompleteLattice (Closeds α))
a : Closeds α
s : Set (Closeds α)
⊢ ↑(⨅ b ∈ s, a ⊔ b) = ↑(a ⊔ sInf s)

Next tactic:
simp only [coe_sup, coe_iInf, coe_sInf, Set.union_iInter₂]
/-- `TopologicalSpace.Closeds.compl` as an `OrderIso` to the order dual of
`TopologicalSpace.Opens α`. -/
@[simps]
def Closeds.complOrderIso : Closeds α ≃o (Opens α)ᵒᵈ where
  toFun := OrderDual.toDual ∘ Closeds.compl
  invFun := Opens.compl ∘ OrderDual.ofDual
  left_inv s := by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s : Closeds α
⊢ (Opens.compl ∘ ⇑ofDual) ((⇑toDual ∘ compl) s) = s

Next tactic:
simp [Closeds.compl_compl]
/-- `TopologicalSpace.Closeds.compl` as an `OrderIso` to the order dual of
`TopologicalSpace.Opens α`. -/
@[simps]
def Closeds.complOrderIso : Closeds α ≃o (Opens α)ᵒᵈ where
  toFun := OrderDual.toDual ∘ Closeds.compl
  invFun := Opens.compl ∘ OrderDual.ofDual
  left_inv s := by simp [Closeds.compl_compl]
  right_inv s := by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s : (Opens α)ᵒᵈ
⊢ (⇑toDual ∘ compl) ((Opens.compl ∘ ⇑ofDual) s) = s

Next tactic:
simp [Opens.compl_compl]
/-- `TopologicalSpace.Opens.compl` as an `OrderIso` to the order dual of
`TopologicalSpace.Closeds α`. -/
@[simps]
def Opens.complOrderIso : Opens α ≃o (Closeds α)ᵒᵈ where
  toFun := OrderDual.toDual ∘ Opens.compl
  invFun := Closeds.compl ∘ OrderDual.ofDual
  left_inv s := by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s : Opens α
⊢ (Closeds.compl ∘ ⇑ofDual) ((⇑toDual ∘ compl) s) = s

Next tactic:
simp [Opens.compl_compl]
/-- `TopologicalSpace.Opens.compl` as an `OrderIso` to the order dual of
`TopologicalSpace.Closeds α`. -/
@[simps]
def Opens.complOrderIso : Opens α ≃o (Closeds α)ᵒᵈ where
  toFun := OrderDual.toDual ∘ Opens.compl
  invFun := Closeds.compl ∘ OrderDual.ofDual
  left_inv s := by simp [Opens.compl_compl]
  right_inv s := by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s : (Closeds α)ᵒᵈ
⊢ (⇑toDual ∘ compl) ((Closeds.compl ∘ ⇑ofDual) s) = s

Next tactic:
simp [Closeds.compl_compl]
lemma Closeds.coe_eq_singleton_of_isAtom [T0Space α] {s : Closeds α} (hs : IsAtom s) :
    ∃ a, (s : Set α) = {a} := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T0Space α
s : Closeds α
hs : IsAtom s
⊢ ∃ a, ↑s = {a}

Next tactic:
refine minimal_nonempty_closed_eq_singleton s.2 (coe_nonempty.2 hs.1) fun t hts ht ht' ↦ ?_
lemma Closeds.coe_eq_singleton_of_isAtom [T0Space α] {s : Closeds α} (hs : IsAtom s) :
    ∃ a, (s : Set α) = {a} := by
  refine minimal_nonempty_closed_eq_singleton s.2 (coe_nonempty.2 hs.1) fun t hts ht ht' ↦ ?_
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T0Space α
s : Closeds α
hs : IsAtom s
t : Set α
hts : t ⊆ ↑s
ht : Set.Nonempty t
ht' : IsClosed t
⊢ t = ↑s

Next tactic:
lift t to Closeds α using ht'
lemma Closeds.coe_eq_singleton_of_isAtom [T0Space α] {s : Closeds α} (hs : IsAtom s) :
    ∃ a, (s : Set α) = {a} := by
  refine minimal_nonempty_closed_eq_singleton s.2 (coe_nonempty.2 hs.1) fun t hts ht ht' ↦ ?_
  lift t to Closeds α using ht'
  

Proof state:
case intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T0Space α
s : Closeds α
hs : IsAtom s
t : Closeds α
hts : ↑t ⊆ ↑s
ht : Set.Nonempty ↑t
⊢ ↑t = ↑s

Next tactic:
exact SetLike.coe_injective.eq_iff.2 $ (hs.le_iff_eq $ coe_nonempty.1 ht).1 hts
@[simp, norm_cast] lemma Closeds.isAtom_coe [T1Space α] {s : Closeds α} :
    IsAtom (s : Set α) ↔ IsAtom s :=
  Closeds.gi.isAtom_iff' rfl
    (fun t ht ↦ by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T1Space α
s : Closeds α
t : Set α
ht : IsAtom t
⊢ ↑(Closeds.closure t) = t

Next tactic:
obtain ⟨x, rfl⟩ := Set.isAtom_iff.1 ht
@[simp, norm_cast] lemma Closeds.isAtom_coe [T1Space α] {s : Closeds α} :
    IsAtom (s : Set α) ↔ IsAtom s :=
  Closeds.gi.isAtom_iff' rfl
    (fun t ht ↦ by obtain ⟨x, rfl⟩ := Set.isAtom_iff.1 ht; 

Proof state:
case intro
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T1Space α
s : Closeds α
x : α
ht : IsAtom {x}
⊢ ↑(Closeds.closure {x}) = {x}

Next tactic:
exact closure_singleton
/-- in a `T1Space`, atoms of `TopologicalSpace.Closeds α` are precisely the
`TopologicalSpace.Closeds.singleton`s. -/
theorem Closeds.isAtom_iff [T1Space α] {s : Closeds α} :
    IsAtom s ↔ ∃ x, s = Closeds.singleton x := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T1Space α
s : Closeds α
⊢ IsAtom s ↔ ∃ x, s = singleton x

Next tactic:
simp [← Closeds.isAtom_coe, Set.isAtom_iff, SetLike.ext_iff, Set.ext_iff]
/-- in a `T1Space`, coatoms of `TopologicalSpace.Opens α` are precisely complements of singletons:
`(TopologicalSpace.Closeds.singleton x).compl`. -/
theorem Opens.isCoatom_iff [T1Space α] {s : Opens α} :
    IsCoatom s ↔ ∃ x, s = (Closeds.singleton x).compl := by
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T1Space α
s : Opens α
⊢ IsCoatom s ↔ ∃ x, s = Closeds.compl (Closeds.singleton x)

Next tactic:
rw [← s.compl_compl, ← isAtom_dual_iff_isCoatom]
/-- in a `T1Space`, coatoms of `TopologicalSpace.Opens α` are precisely complements of singletons:
`(TopologicalSpace.Closeds.singleton x).compl`. -/
theorem Opens.isCoatom_iff [T1Space α] {s : Opens α} :
    IsCoatom s ↔ ∃ x, s = (Closeds.singleton x).compl := by
  rw [← s.compl_compl, ← isAtom_dual_iff_isCoatom]
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T1Space α
s : Opens α
⊢ IsAtom (toDual (Closeds.compl (compl s))) ↔ ∃ x, Closeds.compl (compl s) = Closeds.compl (Closeds.singleton x)

Next tactic:
change IsAtom (Closeds.complOrderIso α s.compl) ↔ _
/-- in a `T1Space`, coatoms of `TopologicalSpace.Opens α` are precisely complements of singletons:
`(TopologicalSpace.Closeds.singleton x).compl`. -/
theorem Opens.isCoatom_iff [T1Space α] {s : Opens α} :
    IsCoatom s ↔ ∃ x, s = (Closeds.singleton x).compl := by
  rw [← s.compl_compl, ← isAtom_dual_iff_isCoatom]
  change IsAtom (Closeds.complOrderIso α s.compl) ↔ _
  

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : T1Space α
s : Opens α
⊢ IsAtom ((Closeds.complOrderIso α) (compl s)) ↔ ∃ x, Closeds.compl (compl s) = Closeds.compl (Closeds.singleton x)

Next tactic:
simp only [(Closeds.complOrderIso α).isAtom_iff, Closeds.isAtom_iff,
    Closeds.compl_bijective.injective.eq_iff]
instance : SetLike (Clopens α) α where
  coe s := s.carrier
  coe_injective' s t h := by 

Proof state:
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Clopens α
h : (fun s => s.carrier) s = (fun s => s.carrier) t
⊢ s = t

Next tactic:
cases s
instance : SetLike (Clopens α) α where
  coe s := s.carrier
  coe_injective' s t h := by cases s; 

Proof state:
case mk
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
t : Clopens α
carrier✝ : Set α
isClopen'✝ : IsClopen carrier✝
h : (fun s => s.carrier) { carrier := carrier✝, isClopen' := isClopen'✝ } = (fun s => s.carrier) t
⊢ { carrier := carrier✝, isClopen' := isClopen'✝ } = t

Next tactic:
cases t
instance : SetLike (Clopens α) α where
  coe s := s.carrier
  coe_injective' s t h := by cases s; cases t; 

Proof state:
case mk.mk
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
carrier✝¹ : Set α
isClopen'✝¹ : IsClopen carrier✝¹
carrier✝ : Set α
isClopen'✝ : IsClopen carrier✝
h :
  (fun s => s.carrier) { carrier := carrier✝¹, isClopen' := isClopen'✝¹ } =
    (fun s => s.carrier) { carrier := carrier✝, isClopen' := isClopen'✝ }
⊢ { carrier := carrier✝¹, isClopen' := isClopen'✝¹ } = { carrier := carrier✝, isClopen' := isClopen'✝ }

Next tactic:
congr
theorem homEquiv_id (X : C) : adj.homEquiv X _ (𝟙 _) = adj.unit.app X := by 

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X✝ : C
Y Y' : D
X : C
⊢ (homEquiv adj X (F.obj X)) (𝟙 (F.obj X)) = adj.unit.app X

Next tactic:
simp
theorem homEquiv_symm_id (X : D) : (adj.homEquiv _ X).symm (𝟙 _) = adj.counit.app X := by 

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X✝ : C
Y Y' X : D
⊢ (homEquiv adj (G.obj X) X).symm (𝟙 (G.obj X)) = adj.counit.app X

Next tactic:
simp
@[simp, nolint simpNF]
theorem homEquiv_naturality_left_symm (f : X' ⟶ X) (g : X ⟶ G.obj Y) :
    (adj.homEquiv X' Y).symm (f ≫ g) = F.map f ≫ (adj.homEquiv X Y).symm g := by
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
f : X' ⟶ X
g : X ⟶ G.obj Y
⊢ (homEquiv adj X' Y).symm (f ≫ g) = F.map f ≫ (homEquiv adj X Y).symm g

Next tactic:
rw [homEquiv_counit, F.map_comp, assoc, adj.homEquiv_counit.symm]
@[simp, nolint simpNF]
theorem homEquiv_naturality_left (f : X' ⟶ X) (g : F.obj X ⟶ Y) :
    (adj.homEquiv X' Y) (F.map f ≫ g) = f ≫ (adj.homEquiv X Y) g := by
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
f : X' ⟶ X
g : F.obj X ⟶ Y
⊢ (homEquiv adj X' Y) (F.map f ≫ g) = f ≫ (homEquiv adj X Y) g

Next tactic:
rw [← Equiv.eq_symm_apply]
@[simp, nolint simpNF]
theorem homEquiv_naturality_left (f : X' ⟶ X) (g : F.obj X ⟶ Y) :
    (adj.homEquiv X' Y) (F.map f ≫ g) = f ≫ (adj.homEquiv X Y) g := by
  rw [← Equiv.eq_symm_apply]
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
f : X' ⟶ X
g : F.obj X ⟶ Y
⊢ F.map f ≫ g = (homEquiv adj X' Y).symm (f ≫ (homEquiv adj X Y) g)

Next tactic:
simp only [Equiv.symm_apply_apply,eq_self_iff_true,homEquiv_naturality_left_symm]
@[simp, nolint simpNF]
theorem homEquiv_naturality_right (f : F.obj X ⟶ Y) (g : Y ⟶ Y') :
    (adj.homEquiv X Y') (f ≫ g) = (adj.homEquiv X Y) f ≫ G.map g := by
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
f : F.obj X ⟶ Y
g : Y ⟶ Y'
⊢ (homEquiv adj X Y') (f ≫ g) = (homEquiv adj X Y) f ≫ G.map g

Next tactic:
rw [homEquiv_unit, G.map_comp, ← assoc, ← homEquiv_unit]
@[simp, nolint simpNF]
theorem homEquiv_naturality_right_symm (f : X ⟶ G.obj Y) (g : Y ⟶ Y') :
    (adj.homEquiv X Y').symm (f ≫ G.map g) = (adj.homEquiv X Y).symm f ≫ g := by
  

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
G : D ⥤ C
adj : F ⊣ G
X' X : C
Y Y' : D
f : X ⟶ G.obj Y
g : Y ⟶ Y'
⊢ (homEquiv adj X Y').symm (f ≫ G.map g) = (homEquiv adj X Y).symm f ≫ g

Next tactic:
rw [Equiv.symm_apply_eq]