theorem carrier.add_mem (q : Spec.T A⁰_ f) {a b : A} (ha : a ∈ carrier f_deg q)
    (hb : b ∈ carrier f_deg q) : a + b ∈ carrier f_deg q := by
  refine' fun i => (q.2.mem_or_mem _).elim id id
  change (Quotient.mk'' ⟨_, _, _, _⟩ : A⁰_ f) ∈ q.1; dsimp only [Subtype.coe_mk]
  simp_rw [← pow_add, map_add, add_pow, mul_comm, ← nsmul_eq_mul]
  let g : ℕ → A⁰_ f := fun j => (m + m).choose j •
      if h2 : m + m < j then (0 : A⁰_ f)
      else
        -- Porting note: inlining `l`, `r` causes a "can't synth HMul A⁰_ f A⁰_ f ?" error
        if h1 : j ≤ m then
          letI l : A⁰_ f := Quotient.mk''
            ⟨m * i, ⟨proj 𝒜 i a ^ j * proj 𝒜 i b ^ (m - j), ?_⟩,
              ⟨_, by rw [mul_comm]; mem_tac⟩, ⟨i, rfl⟩⟩
          letI r : A⁰_ f := Quotient.mk''
            ⟨m * i, ⟨proj 𝒜 i b ^ m, by mem_tac⟩,
              ⟨_, by rw [mul_comm]; mem_tac⟩, ⟨i, rfl⟩⟩
          l * r
        else
          letI l : A⁰_ f := Quotient.mk''
            ⟨m * i, ⟨proj 𝒜 i a ^ m, by mem_tac⟩,
              ⟨_, by rw [mul_comm]; mem_tac⟩, ⟨i, rfl⟩⟩
          letI r : A⁰_ f := Quotient.mk''
            ⟨m * i, ⟨proj 𝒜 i a ^ (j - m) * proj 𝒜 i b ^ (m + m - j), ?_⟩,
              ⟨_, by rw [mul_comm]; mem_tac⟩, ⟨i, rfl⟩⟩
          l * r
  

Proof state:
case refine_3
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
q : ↑↑(Spec A⁰_ f).toSheafedSpace.toPresheafedSpace
a b : A
ha : a ∈ carrier f_deg q
hb : b ∈ carrier f_deg q
i : ℕ
g : ℕ → A⁰_ f :=
  fun j =>
    Nat.choose (m + m) j •
      if h2 : m + m < j then 0
      else
        if h1 : j ≤ m then
          Quotient.mk''
              { deg := m * i,
                num :=
                  { val := (proj 𝒜 i) a ^ j * (proj 𝒜 i) b ^ (m - j),
                    property := (_ : (proj 𝒜 i) a ^ j * (proj 𝒜 i) b ^ (m - j) ∈ 𝒜 (m * i)) },
                den := { val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) },
                den_mem := (_ : ∃ y, (fun x => f ^ x) y = ↑{ val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) }) } *
            Quotient.mk''
              { deg := m * i,
                num :=
                  { val := (proj 𝒜 i) b ^ m,
                    property :=
                      (_ :
                        ↑((LinearMap.comp (DFinsupp.lapply i) (AlgHom.toLinearMap ↑(decomposeAlgEquiv 𝒜))) b) ^ m ∈
                          𝒜 (m • i)) },
                den := { val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) },
                den_mem := (_ : ∃ y, (fun x => f ^ x) y = ↑{ val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) }) }
        else
          Quotient.mk''
              { deg := m * i,
                num :=
                  { val := (proj 𝒜 i) a ^ m,
                    property :=
                      (_ :
                        ↑((LinearMap.comp (DFinsupp.lapply i) (AlgHom.toLinearMap ↑(decomposeAlgEquiv 𝒜))) a) ^ m ∈
                          𝒜 (m • i)) },
                den := { val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) },
                den_mem := (_ : ∃ y, (fun x => f ^ x) y = ↑{ val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) }) } *
            Quotient.mk''
              { deg := m * i,
                num :=
                  { val := (proj 𝒜 i) a ^ (j - m) * (proj 𝒜 i) b ^ (m + m - j),
                    property :=
                      (_ :
                        let l :=
                          Quotient.mk''
                            { deg := m * i,
                              num := { val := (proj 𝒜 i) a ^ m, property := (_ : (proj 𝒜 i) a ^ m ∈ 𝒜 (m * i)) },
                              den := { val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) },
                              den_mem :=
                                (_ :
                                  ∃ y, (fun x => f ^ x) y = ↑{ val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) }) };
                        (proj 𝒜 i) a ^ (j - m) * (proj 𝒜 i) b ^ (m + m - j) ∈ 𝒜 (m * i)) },
                den := { val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) },
                den_mem := (_ : ∃ y, (fun x => f ^ x) y = ↑{ val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) }) }
⊢ Quotient.mk''
      { deg := m * i + m * i,
        num :=
          { val := ∑ x in range (m + m + 1), Nat.choose (m + m) x • ((proj 𝒜 i) a ^ x * (proj 𝒜 i) b ^ (m + m - x)),
            property :=
              (_ :
                (fun x => x ∈ 𝒜 (m * i + m * i))
                  (∑ x in range (m + m + 1), Nat.choose (m + m) x • ((proj 𝒜 i) a ^ x * (proj 𝒜 i) b ^ (m + m - x)))) },
        den := { val := f ^ (i + i), property := (_ : (fun x => x ∈ 𝒜 (m * i + m * i)) (f ^ (i + i))) },
        den_mem :=
          (_ :
            ↑{ val := f ^ (i + i), property := (_ : (fun x => x ∈ 𝒜 (m * i + m * i)) (f ^ (i + i))) } ∈
              Submonoid.powers f) } ∈
    q.asIdeal
case refine_1
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
q : ↑↑(Spec A⁰_ f).toSheafedSpace.toPresheafedSpace
a b : A
ha : a ∈ carrier f_deg q
hb : b ∈ carrier f_deg q
i j : ℕ
h2 : ¬m + m < j
h1 : j ≤ m
⊢ (proj 𝒜 i) a ^ j * (proj 𝒜 i) b ^ (m - j) ∈ 𝒜 (m * i)
case refine_2
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
q : ↑↑(Spec A⁰_ f).toSheafedSpace.toPresheafedSpace
a b : A
ha : a ∈ carrier f_deg q
hb : b ∈ carrier f_deg q
i j : ℕ
h2 : ¬m + m < j
h1 : ¬j ≤ m
l : A⁰_ f :=
  Quotient.mk''
    { deg := m * i,
      num :=
        { val := (proj 𝒜 i) a ^ m,
          property :=
            (_ :
              ↑((LinearMap.comp (DFinsupp.lapply i) (AlgHom.toLinearMap ↑(decomposeAlgEquiv 𝒜))) a) ^ m ∈ 𝒜 (m • i)) },
      den := { val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) },
      den_mem := (_ : ∃ y, (fun x => f ^ x) y = ↑{ val := f ^ i, property := (_ : f ^ i ∈ 𝒜 (m * i)) }) }
⊢ (proj 𝒜 i) a ^ (j - m) * (proj 𝒜 i) b ^ (m + m - j) ∈ 𝒜 (m * i)

Next tactic:
rotate_left