English
If a ring has a unique nonzero prime ideal, it is local.
Русский
Если кольцо имеет единственный ненулевой простой идеал, оно локально.
LaTeX
$$$$\exists! P \; (P \neq 0 \land P \text{ prime}) \Rightarrow \text{IsLocalRing } R.$$$$
Lean4
theorem of_unique_nonzero_prime (h : ∃! P : Ideal R, P ≠ ⊥ ∧ Ideal.IsPrime P) : IsLocalRing R :=
of_unique_max_ideal
(by
rcases h with ⟨P, ⟨hPnonzero, hPnot_top, _⟩, hPunique⟩
refine ⟨P, ⟨⟨hPnot_top, ?_⟩⟩, fun M hM => hPunique _ ⟨?_, Ideal.IsMaximal.isPrime hM⟩⟩
· refine Ideal.maximal_of_no_maximal fun M hPM hM => ne_of_lt hPM ?_
exact (hPunique _ ⟨ne_bot_of_gt hPM, Ideal.IsMaximal.isPrime hM⟩).symm
· rintro rfl
exact hPnot_top (hM.1.2 P (bot_lt_iff_ne_bot.2 hPnonzero)))