case h
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ (x ∈
      ⨅ (v : MaximalSpectrum R),
        Localization.subalgebra.ofField K (Ideal.primeCompl v.asIdeal)
          (_ : Ideal.primeCompl v.asIdeal ≤ nonZeroDivisors R)) ↔
    x ∈ ⊥
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ (⨅ (v : MaximalSpectrum R),
      Localization.subalgebra.ofField K (Ideal.primeCompl v.asIdeal)
        (_ : Ideal.primeCompl v.asIdeal ≤ nonZeroDivisors R)) =
    ⊥
ext x
case h
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ (∀ (i : MaximalSpectrum R),
      x ∈
        Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
          (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)) ↔
    x ∈ range ↑(algebraMap R K)
case h
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ (x ∈
      ⨅ (v : MaximalSpectrum R),
        Localization.subalgebra.ofField K (Ideal.primeCompl v.asIdeal)
          (_ : Ideal.primeCompl v.asIdeal ≤ nonZeroDivisors R)) ↔
    x ∈ ⊥
rw [Algebra.mem_bot, Algebra.mem_iInf]
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ (∀ (i : MaximalSpectrum R),
      x ∈
        Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
          (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)) →
    x ∈ range ↑(algebraMap R K)

case h.mpr
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ x ∈ range ↑(algebraMap R K) →
    ∀ (i : MaximalSpectrum R),
      x ∈
        Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
          (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
case h
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ (∀ (i : MaximalSpectrum R),
      x ∈
        Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
          (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)) ↔
    x ∈ range ↑(algebraMap R K)
constructor
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ ¬x ∈ range ↑(algebraMap R K) →
    ¬∀ (i : MaximalSpectrum R),
        x ∈
          Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
            (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ (∀ (i : MaximalSpectrum R),
      x ∈
        Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
          (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)) →
    x ∈ range ↑(algebraMap R K)
contrapose
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
⊢ False
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ ¬x ∈ range ↑(algebraMap R K) →
    ¬∀ (i : MaximalSpectrum R),
        x ∈
          Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
            (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
intro hrange hlocal
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
⊢ False
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
⊢ False
let denom : Ideal R := (Submodule.span R {1} : Submodule R K).colon (Submodule.span R {x})
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : ¬1 ∈ denom
⊢ False
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
⊢ False
have hdenom : (1 : R) ∉ denom := by
  intro hdenom
  rcases Submodule.mem_span_singleton.mp
    (Submodule.mem_colon.mp hdenom x <| Submodule.mem_span_singleton_self x) with ⟨y, hy⟩
  exact hrange ⟨y, by rw [← mul_one <| algebraMap R K y, ← Algebra.smul_def, hy, one_smul]⟩
case h.mp.intro.intro
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : ¬1 ∈ denom
max : Ideal R
hmax : Ideal.IsMaximal max
hle : denom ≤ max
⊢ False
case h.mp
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : ¬1 ∈ denom
⊢ False
rcases denom.exists_le_maximal fun h => (h ▸ hdenom) Submodule.mem_top with ⟨max, hmax, hle⟩
case h.mp.intro.intro.intro.intro.intro
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
⊢ False
case h.mp.intro.intro
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : ¬1 ∈ denom
max : Ideal R
hmax : Ideal.IsMaximal max
hle : denom ≤ max
⊢ False
rcases hlocal ⟨max, hmax⟩ with ⟨n, d, hd, rfl⟩
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
⊢ ∀ (x : K), x ∈ Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹} → d • x ∈ Submodule.span R {1}
case h.mp.intro.intro.intro.intro.intro
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
⊢ False
apply hd (hle <| Submodule.mem_colon.mpr fun _ hy => _)
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
x✝ : K
hy : x✝ ∈ Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹}
⊢ d • x✝ ∈ Submodule.span R {1}
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
⊢ ∀ (x : K), x ∈ Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹} → d • x ∈ Submodule.span R {1}
intro _ hy
case intro
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
y : R
hy :
  y • (↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹) ∈ Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹}
⊢ d • y • (↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹) ∈ Submodule.span R {1}
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
x✝ : K
hy : x✝ ∈ Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹}
⊢ d • x✝ ∈ Submodule.span R {1}
rcases Submodule.mem_span_singleton.mp hy with ⟨y, rfl⟩
no goals
case intro
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
y : R
hy :
  y • (↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹) ∈ Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹}
⊢ d • y • (↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹) ∈ Submodule.span R {1}
exact Submodule.mem_span_singleton.mpr ⟨y * n, by
  rw [Algebra.smul_def, mul_one, map_mul, smul_comm, Algebra.smul_def, Algebra.smul_def,
    mul_comm <| algebraMap R K d,
    inv_mul_cancel_right₀ <|
      (map_ne_zero_iff _ <| NoZeroSMulDivisors.algebraMap_injective R K).mpr fun h =>
        (h ▸ hd) max.zero_mem]⟩
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : 1 ∈ denom
⊢ False
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
⊢ ¬1 ∈ denom
intro hdenom
case intro
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : 1 ∈ denom
y : R
hy : y • 1 = 1 • x
⊢ False
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : 1 ∈ denom
⊢ False
rcases Submodule.mem_span_singleton.mp
  (Submodule.mem_colon.mp hdenom x <| Submodule.mem_span_singleton_self x) with ⟨y, hy⟩
no goals
case intro
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : 1 ∈ denom
y : R
hy : y • 1 = 1 • x
⊢ False
exact hrange ⟨y, by rw [← mul_one <| algebraMap R K y, ← Algebra.smul_def, hy, one_smul]⟩
no goals
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
hrange : ¬x ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    x ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R := Submodule.colon (Submodule.span R {1}) (Submodule.span R {x})
hdenom : 1 ∈ denom
y : R
hy : y • 1 = 1 • x
⊢ ↑(algebraMap R K) y = x
rw [← mul_one <| algebraMap R K y, ← Algebra.smul_def, hy, one_smul]
no goals
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
max : Ideal R
hmax : Ideal.IsMaximal max
n d : R
hd : d ∈ Ideal.primeCompl { asIdeal := max, IsMaximal := hmax }.asIdeal
hrange : ¬↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈ range ↑(algebraMap R K)
hlocal :
  ∀ (i : MaximalSpectrum R),
    ↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹ ∈
      Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
        (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
denom : Ideal R :=
  Submodule.colon (Submodule.span R {1}) (Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹})
hdenom : ¬1 ∈ denom
hle : denom ≤ max
y : R
hy :
  y • (↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹) ∈ Submodule.span R {↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹}
⊢ (y * n) • 1 = d • y • (↑(algebraMap R K) n * (↑(algebraMap R K) d)⁻¹)
rw [Algebra.smul_def, mul_one, map_mul, smul_comm, Algebra.smul_def, Algebra.smul_def,
  mul_comm <| algebraMap R K d,
  inv_mul_cancel_right₀ <|
    (map_ne_zero_iff _ <| NoZeroSMulDivisors.algebraMap_injective R K).mpr fun h =>
      (h ▸ hd) max.zero_mem]
case h.mpr.intro.mk
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
y : R
v : Ideal R
hv : Ideal.IsMaximal v
⊢ ↑(algebraMap R K) y ∈
    Localization.subalgebra.ofField K (Ideal.primeCompl { asIdeal := v, IsMaximal := hv }.asIdeal)
      (_ : Ideal.primeCompl { asIdeal := v, IsMaximal := hv }.asIdeal ≤ nonZeroDivisors R)
case h.mpr
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
x : K
⊢ x ∈ range ↑(algebraMap R K) →
    ∀ (i : MaximalSpectrum R),
      x ∈
        Localization.subalgebra.ofField K (Ideal.primeCompl i.asIdeal)
          (_ : Ideal.primeCompl i.asIdeal ≤ nonZeroDivisors R)
rintro ⟨y, rfl⟩ ⟨v, hv⟩
no goals
case h.mpr.intro.mk
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
y : R
v : Ideal R
hv : Ideal.IsMaximal v
⊢ ↑(algebraMap R K) y ∈
    Localization.subalgebra.ofField K (Ideal.primeCompl { asIdeal := v, IsMaximal := hv }.asIdeal)
      (_ : Ideal.primeCompl { asIdeal := v, IsMaximal := hv }.asIdeal ≤ nonZeroDivisors R)
exact ⟨y, 1, v.ne_top_iff_one.mp hv.ne_top, by rw [map_one, inv_one, mul_one]⟩
no goals
R : Type u
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type v
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
y : R
v : Ideal R
hv : Ideal.IsMaximal v
⊢ ↑(algebraMap R K) y = ↑(algebraMap R K) y * (↑(algebraMap R K) 1)⁻¹
rw [map_one, inv_one, mul_one]