theorem addMem' (U : (Opens (ProjectiveSpectrum.top 𝒜))ᵒᵖ) (a b : ∀ x : U.unop, at x.1)
    (ha : (isLocallyFraction 𝒜).pred a) (hb : (isLocallyFraction 𝒜).pred b) :
    (isLocallyFraction 𝒜).pred (a + b) := fun x => by
  rcases ha x with ⟨Va, ma, ia, ja, ⟨ra, ra_mem⟩, ⟨sa, sa_mem⟩, wa⟩
  rcases hb x with ⟨Vb, mb, ib, jb, ⟨rb, rb_mem⟩, ⟨sb, sb_mem⟩, wb⟩
  refine'
    ⟨Va ⊓ Vb, ⟨ma, mb⟩, Opens.infLELeft _ _ ≫ ia, ja + jb,
      ⟨sb * ra + sa * rb,
        add_mem (add_comm jb ja ▸ mul_mem_graded sb_mem ra_mem : sb * ra ∈ 𝒜 (ja + jb))
          (mul_mem_graded sa_mem rb_mem)⟩,
      ⟨sa * sb, mul_mem_graded sa_mem sb_mem⟩, fun y => ⟨fun h => _, _⟩⟩
  · cases' (y : ProjectiveSpectrum.top 𝒜).isPrime.mem_or_mem h with h h
    · obtain ⟨nin, -⟩ := wa ⟨y, (Opens.infLELeft Va Vb y).2⟩; exact nin h
    · obtain ⟨nin, -⟩ := wb ⟨y, (Opens.infLERight Va Vb y).2⟩; exact nin h
  · simp only [add_mul, map_add, Pi.add_apply, RingHom.map_mul, ext_iff_val, add_val]
    obtain ⟨nin1, hy1⟩ := wa (Opens.infLELeft Va Vb y)
    obtain ⟨nin2, hy2⟩ := wb (Opens.infLERight Va Vb y)
    dsimp only at hy1 hy2
    erw [hy1, hy2]
    

Proof state:
case intro.intro.intro.intro.intro.mk.intro.mk.intro.intro.intro.intro.intro.mk.intro.mk.refine'_2.intro.intro
R : Type u_1
A : Type u_2
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
U : (Opens ↑(ProjectiveSpectrum.top 𝒜))ᵒᵖ
a b : (x : ↥U.unop) → at ↑x
ha : PrelocalPredicate.pred (isLocallyFraction 𝒜).toPrelocalPredicate a
hb : PrelocalPredicate.pred (isLocallyFraction 𝒜).toPrelocalPredicate b
x : ↥U.unop
Va : Opens ↑(ProjectiveSpectrum.top 𝒜)
ma : ↑x ∈ Va
ia : Va ⟶ U.unop
ja : ℕ
ra : A
ra_mem : ra ∈ 𝒜 ja
sa : A
sa_mem : sa ∈ 𝒜 ja
wa :
  ∀ (x : ↥Va),
    ∃ (s_nin : ↑{ val := sa, property := sa_mem } ∉ (↑x).asHomogeneousIdeal),
      (fun x => a ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x =
        Quotient.mk''
          { deg := ja, num := { val := ra, property := ra_mem }, den := { val := sa, property := sa_mem },
            den_mem := s_nin }
Vb : Opens ↑(ProjectiveSpectrum.top 𝒜)
mb : ↑x ∈ Vb
ib : Vb ⟶ U.unop
jb : ℕ
rb : A
rb_mem : rb ∈ 𝒜 jb
sb : A
sb_mem : sb ∈ 𝒜 jb
wb :
  ∀ (x : ↥Vb),
    ∃ (s_nin : ↑{ val := sb, property := sb_mem } ∉ (↑x).asHomogeneousIdeal),
      (fun x => b ((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑U.unop) }) x)) x =
        Quotient.mk''
          { deg := jb, num := { val := rb, property := rb_mem }, den := { val := sb, property := sb_mem },
            den_mem := s_nin }
y : ↥(Va ⊓ Vb)
nin1 :
  ↑{ val := sa, property := sa_mem } ∉ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Va) }) y)).asHomogeneousIdeal
hy1 :
  a { val := ↑y, property := (_ : ↑{ val := ↑y, property := (_ : ↑y ∈ ↑Va) } ∈ ↑U.unop) } =
    Quotient.mk''
      { deg := ja, num := { val := ra, property := ra_mem }, den := { val := sa, property := sa_mem }, den_mem := nin1 }
nin2 :
  ↑{ val := sb, property := sb_mem } ∉ (↑((fun x => { val := ↑x, property := (_ : ↑x ∈ ↑Vb) }) y)).asHomogeneousIdeal
hy2 :
  b { val := ↑y, property := (_ : ↑{ val := ↑y, property := (_ : ↑y ∈ ↑Vb) } ∈ ↑U.unop) } =
    Quotient.mk''
      { deg := jb, num := { val := rb, property := rb_mem }, den := { val := sb, property := sb_mem }, den_mem := nin2 }
⊢ val
        (Quotient.mk''
          { deg := ja, num := { val := ra, property := ra_mem }, den := { val := sa, property := sa_mem },
            den_mem := nin1 }) +
      val
        (Quotient.mk''
          { deg := jb, num := { val := rb, property := rb_mem }, den := { val := sb, property := sb_mem },
            den_mem := nin2 }) =
    val
      (Quotient.mk''
        { deg := ja + jb, num := { val := sb * ra + sa * rb, property := (_ : sb * ra + sa * rb ∈ 𝒜 (ja + jb)) },
          den := { val := sa * sb, property := (_ : sa * sb ∈ 𝒜 (ja + jb)) },
          den_mem :=
            (_ : ↑{ val := sa * sb, property := (_ : sa * sb ∈ 𝒜 (ja + jb)) } ∈ (↑y).asHomogeneousIdeal → False) })

Next tactic:
simp only [val_mk'', add_mk, add_comm (sa * rb)]