Serre's normality criterion in Lean without depth: R = ⋂ R_p via associated primes
For a Noetherian domain, phrase S2 as 'every associated prime of R/(x), x ≠ 0, has height 1' and avoid depth of localizations entirely. Sufficiency: use IsIntegrallyClosed.of_localization with S = {p | ht p = 1}; membership in Localization.subalgebra K p.primeCompl _ is definitionally ∃ a s (hs : s ∈ S), z = mk' K a ⟨s, _⟩ (destructure with obtain directly). If z = y/x with x ∤ y, take an associated prime of the cyclic submodule R ∙ mk y (associatedPrimes.nonempty, then associatedPrimes.subset_of_injective N.injective_subtype); it is {t | x ∣ t*r*y}, so z ∉ R_p. Necessity: for p = ((x):y), either y/x preserves p (integral by isIntegral_of_smul_mem_submodule, contradiction) or ry = xc with c ∉ p, and then p ∈ (span {r}).minimalPrimes (any prime q between kills a via a*c = r*d), so height_le_one_of_isPrincipal_of_mem_minimalPrimes.