theorem preimage_eq (a b : A) (k : ℕ) (a_mem : a ∈ 𝒜 k) (b_mem1 : b ∈ 𝒜 k)
    (b_mem2 : b ∈ Submonoid.powers f) :
    toFun f ⁻¹'
        (@PrimeSpectrum.basicOpen (A⁰_ f) _ (Quotient.mk'' ⟨k, ⟨a, a_mem⟩, ⟨b, b_mem1⟩, b_mem2⟩) :
          Set (PrimeSpectrum (HomogeneousLocalization.Away 𝒜 f))) =
      {x | x.1 ∈ (pbo f) ⊓ pbo a} := by
  classical
  ext1 y
  constructor <;> intro hy
  · refine' ⟨y.2, _⟩
    rw [Set.mem_preimage, SetLike.mem_coe, PrimeSpectrum.mem_basicOpen] at hy
    rw [ProjectiveSpectrum.mem_coe_basicOpen]
    intro a_mem_y
    apply hy
    rw [toFun, mem_carrier_iff, HomogeneousLocalization.val_mk'', Subtype.coe_mk]
    dsimp; rcases b_mem2 with ⟨k, hk⟩
    dsimp at hk
    simp only [show (mk a ⟨b, ⟨k, hk⟩⟩ : Away f) =
      Localization.mk 1 (⟨f ^ k, ⟨_, rfl⟩⟩ : Submonoid.powers f) * mk a 1 by
        rw [mk_mul, one_mul, mul_one]; congr; rw [hk]]
    exact Ideal.mul_mem_left _ _ (Ideal.subset_span ⟨_, a_mem_y, rfl⟩)
  · change y.1 ∈ ProjectiveSpectrum.basicOpen 𝒜 f ⊓ ProjectiveSpectrum.basicOpen 𝒜 a at hy
    rcases hy with ⟨hy1, hy2⟩
    rw [ProjectiveSpectrum.mem_coe_basicOpen] at hy1 hy2
    rw [Set.mem_preimage, toFun, SetLike.mem_coe, PrimeSpectrum.mem_basicOpen]
    intro rid; dsimp at rid
    rcases MemCarrier.clear_denominator _ rid with ⟨c, N, acd, eq1⟩
    rw [Algebra.smul_def] at eq1
    change Localization.mk (f ^ N) 1 * Localization.mk _ _ = Localization.mk _ _ at eq1
    rw [mk_mul, one_mul, mk_eq_mk', IsLocalization.eq] at eq1
    rcases eq1 with ⟨⟨_, ⟨M, rfl⟩⟩, eq1⟩
    

Proof state:
case h.mpr.intro.intro.intro.intro.intro.mk.intro
R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
f : A
m : ℕ
f_deg : f ∈ 𝒜 m
x : ↑(LocallyRingedSpace.toTopCat (LocallyRingedSpace.restrict Proj (_ : OpenEmbedding ⇑(Opens.inclusion (pbo f)))))
a b : A
k : ℕ
a_mem : a ∈ 𝒜 k
b_mem1 : b ∈ 𝒜 k
b_mem2 : b ∈ Submonoid.powers f
y : ↑↑(LocallyRingedSpace.restrict Proj (_ : OpenEmbedding ⇑(Opens.inclusion (pbo f)))).toSheafedSpace.toPresheafedSpace
hy1 : f ∉ (↑y).asHomogeneousIdeal
hy2 : a ∉ (↑y).asHomogeneousIdeal
rid :
  Quotient.mk''
      { deg := k, num := { val := a, property := a_mem }, den := { val := b, property := b_mem1 }, den_mem := b_mem2 } ∈
    carrier y
c : ↑(⇑(algebraMap A (Away f)) '' ↑(↑y).asHomogeneousIdeal) →₀ Away f
N : ℕ
acd : (y_1 : Away f) → y_1 ∈ image (⇑c) c.support → A
M : ℕ
eq1 :
  ↑{ val := (fun x => f ^ x) M, property := (_ : ∃ y, (fun x => f ^ x) y = (fun x => f ^ x) M) } *
      (↑1 *
        (f ^ N *
          ↑{ deg := k, num := { val := a, property := a_mem }, den := { val := b, property := b_mem1 },
                den_mem := b_mem2 }.num)) =
    ↑{ val := (fun x => f ^ x) M, property := (_ : ∃ y, (fun x => f ^ x) y = (fun x => f ^ x) M) } *
      (↑{
            val :=
              ↑{ deg := k, num := { val := a, property := a_mem }, den := { val := b, property := b_mem1 },
                    den_mem := b_mem2 }.den,
            property :=
              (_ :
                ↑{ deg := k, num := { val := a, property := a_mem }, den := { val := b, property := b_mem1 },
                        den_mem := b_mem2 }.den ∈
                  Submonoid.powers f) } *
        (algebraMap A A)
          (∑ i in attach c.support,
            acd (c ↑i) (_ : c ↑i ∈ image (⇑c) c.support) *
              Exists.choose (_ : ↑↑i ∈ ⇑(algebraMap A (Away f)) '' ↑(↑y).asHomogeneousIdeal)))
⊢ False

Next tactic:
rw [Submonoid.coe_one, one_mul] at eq1