Theorem: PrimeSpectrum.t1Space_iff_isField
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: refine ⟨?_, fun h => ?_⟩
state_before: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
⊢ T1Space (PrimeSpectrum R) ↔ IsField R
state_after: case refine_1
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
⊢ T1Space (PrimeSpectrum R) → IsField R

case refine_2
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
⊢ T1Space (PrimeSpectrum R)

tactic: intro h
state_before: case refine_1
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
⊢ T1Space (PrimeSpectrum R) → IsField R
state_after: case refine_1
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : T1Space (PrimeSpectrum R)
⊢ IsField R

tactic: have hbot : Ideal.IsPrime (⊥ : Ideal R) := Ideal.bot_prime
state_before: case refine_1
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : T1Space (PrimeSpectrum R)
⊢ IsField R
state_after: case refine_1
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : T1Space (PrimeSpectrum R)
hbot : ⊥.IsPrime
⊢ IsField R

tactic: exact
  Classical.not_not.1
    (mt
      (Ring.ne_bot_of_isMaximal_of_not_isField <|
        (isClosed_singleton_iff_isMaximal _).1 (T1Space.t1 ⟨⊥, hbot⟩))
      (by aesop))
state_before: case refine_1
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : T1Space (PrimeSpectrum R)
hbot : ⊥.IsPrime
⊢ IsField R
state_after: no goals

tactic: aesop
state_before: R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : T1Space (PrimeSpectrum R)
hbot : ⊥.IsPrime
⊢ ¬{ asIdeal := ⊥, isPrime := hbot }.asIdeal ≠ ⊥
state_after: no goals

tactic: refine ⟨fun x => (isClosed_singleton_iff_isMaximal x).2 ?_⟩
state_before: case refine_2
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
⊢ T1Space (PrimeSpectrum R)
state_after: case refine_2
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
⊢ x.asIdeal.IsMaximal

tactic: by_cases hx : x.asIdeal = ⊥
state_before: case refine_2
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
⊢ x.asIdeal.IsMaximal
state_after: case pos
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : x.asIdeal = ⊥
⊢ x.asIdeal.IsMaximal

case neg
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : ¬x.asIdeal = ⊥
⊢ x.asIdeal.IsMaximal

tactic: letI := h.toSemifield
state_before: case pos
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : x.asIdeal = ⊥
⊢ x.asIdeal.IsMaximal
state_after: case pos
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : x.asIdeal = ⊥
this : Semifield R := h.toSemifield
⊢ x.asIdeal.IsMaximal

tactic: exact hx.symm ▸ Ideal.bot_isMaximal
state_before: case pos
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : x.asIdeal = ⊥
this : Semifield R := h.toSemifield
⊢ x.asIdeal.IsMaximal
state_after: no goals

tactic: exact absurd h (Ring.not_isField_iff_exists_prime.2 ⟨x.asIdeal, ⟨hx, x.2⟩⟩)
state_before: case neg
R : Type u
S : Type v
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : IsDomain R
h : IsField R
x : PrimeSpectrum R
hx : ¬x.asIdeal = ⊥
⊢ x.asIdeal.IsMaximal
state_after: no goals