l3lab/ntp-mathlib huggingface dataset:
instance : SMul α (HomogeneousLocalization 𝒜 x) where
  smul m := Quotient.map' (m • ·) fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
    change Localization.mk _ _ = Localization.mk _ _
    simp only [num_smul, den_smul]
    

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁹ : AddCommMonoid ι
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
𝒜 : ι → Submodule R A
inst✝⁴ : GradedAlgebra 𝒜
x : Submonoid A
α : Type u_4
inst✝³ : SMul α R
inst✝² : SMul α A
inst✝¹ : IsScalarTower α R A
inst✝ : IsScalarTower α A A
m : α
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
⊢ Localization.mk (m • ↑c1.num) { val := ↑c1.den, property := (_ : (fun x_1 => x_1 ∈ x) ↑c1.den) } =
    Localization.mk (m • ↑c2.num) { val := ↑c2.den, property := (_ : (fun x_1 => x_1 ∈ x) ↑c2.den) }

Next tactic:
convert congr_arg (fun z : at x => m • z) h
instance : SMul α (HomogeneousLocalization 𝒜 x) where
  smul m := Quotient.map' (m • ·) fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
    change Localization.mk _ _ = Localization.mk _ _
    simp only [num_smul, den_smul]
    convert congr_arg (fun z : at x => m • z) h <;> 

Proof state:
case h.e'_2
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁹ : AddCommMonoid ι
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
𝒜 : ι → Submodule R A
inst✝⁴ : GradedAlgebra 𝒜
x : Submonoid A
α : Type u_4
inst✝³ : SMul α R
inst✝² : SMul α A
inst✝¹ : IsScalarTower α R A
inst✝ : IsScalarTower α A A
m : α
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
⊢ Localization.mk (m • ↑c1.num) { val := ↑c1.den, property := (_ : (fun x_1 => x_1 ∈ x) ↑c1.den) } =
    m • Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) }

Next tactic:
rw [Localization.smul_mk]
instance : SMul α (HomogeneousLocalization 𝒜 x) where
  smul m := Quotient.map' (m • ·) fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
    change Localization.mk _ _ = Localization.mk _ _
    simp only [num_smul, den_smul]
    convert congr_arg (fun z : at x => m • z) h <;> 

Proof state:
case h.e'_3
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁹ : AddCommMonoid ι
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
𝒜 : ι → Submodule R A
inst✝⁴ : GradedAlgebra 𝒜
x : Submonoid A
α : Type u_4
inst✝³ : SMul α R
inst✝² : SMul α A
inst✝¹ : IsScalarTower α R A
inst✝ : IsScalarTower α A A
m : α
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
⊢ Localization.mk (m • ↑c2.num) { val := ↑c2.den, property := (_ : (fun x_1 => x_1 ∈ x) ↑c2.den) } =
    m • Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }

Next tactic:
rw [Localization.smul_mk]
@[simp]
theorem smul_val (y : HomogeneousLocalization 𝒜 x) (n : α) : (n • y).val = n • y.val := by
  

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁹ : AddCommMonoid ι
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
𝒜 : ι → Submodule R A
inst✝⁴ : GradedAlgebra 𝒜
x : Submonoid A
α : Type u_4
inst✝³ : SMul α R
inst✝² : SMul α A
inst✝¹ : IsScalarTower α R A
inst✝ : IsScalarTower α A A
y : HomogeneousLocalization 𝒜 x
n : α
⊢ val (n • y) = n • val y

Next tactic:
induction y using Quotient.inductionOn
@[simp]
theorem smul_val (y : HomogeneousLocalization 𝒜 x) (n : α) : (n • y).val = n • y.val := by
  induction y using Quotient.inductionOn
  

Proof state:
case h
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁹ : AddCommMonoid ι
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
𝒜 : ι → Submodule R A
inst✝⁴ : GradedAlgebra 𝒜
x : Submonoid A
α : Type u_4
inst✝³ : SMul α R
inst✝² : SMul α A
inst✝¹ : IsScalarTower α R A
inst✝ : IsScalarTower α A A
n : α
a✝ : NumDenSameDeg 𝒜 x
⊢ val (n • ⟦a✝⟧) = n • val ⟦a✝⟧

Next tactic:
change Localization.mk _ _ = n • Localization.mk _ _
@[simp]
theorem smul_val (y : HomogeneousLocalization 𝒜 x) (n : α) : (n • y).val = n • y.val := by
  induction y using Quotient.inductionOn
  change Localization.mk _ _ = n • Localization.mk _ _
  

Proof state:
case h
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁹ : AddCommMonoid ι
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
𝒜 : ι → Submodule R A
inst✝⁴ : GradedAlgebra 𝒜
x : Submonoid A
α : Type u_4
inst✝³ : SMul α R
inst✝² : SMul α A
inst✝¹ : IsScalarTower α R A
inst✝ : IsScalarTower α A A
n : α
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑((fun x_1 => n • x_1) a✝).num
      { val := ↑((fun x_1 => n • x_1) a✝).den, property := (_ : ↑((fun x_1 => n • x_1) a✝).den ∈ x) } =
    n • Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
dsimp only
@[simp]
theorem smul_val (y : HomogeneousLocalization 𝒜 x) (n : α) : (n • y).val = n • y.val := by
  induction y using Quotient.inductionOn
  change Localization.mk _ _ = n • Localization.mk _ _
  dsimp only
  

Proof state:
case h
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁹ : AddCommMonoid ι
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
𝒜 : ι → Submodule R A
inst✝⁴ : GradedAlgebra 𝒜
x : Submonoid A
α : Type u_4
inst✝³ : SMul α R
inst✝² : SMul α A
inst✝¹ : IsScalarTower α R A
inst✝ : IsScalarTower α A A
n : α
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(n • a✝).num { val := ↑(n • a✝).den, property := (_ : ↑(n • a✝).den ∈ x) } =
    n • Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
rw [Localization.smul_mk]
@[simp]
theorem smul_val (y : HomogeneousLocalization 𝒜 x) (n : α) : (n • y).val = n • y.val := by
  induction y using Quotient.inductionOn
  change Localization.mk _ _ = n • Localization.mk _ _
  dsimp only
  rw [Localization.smul_mk]
  

Proof state:
case h
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁹ : AddCommMonoid ι
inst✝⁸ : DecidableEq ι
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : Algebra R A
𝒜 : ι → Submodule R A
inst✝⁴ : GradedAlgebra 𝒜
x : Submonoid A
α : Type u_4
inst✝³ : SMul α R
inst✝² : SMul α A
inst✝¹ : IsScalarTower α R A
inst✝ : IsScalarTower α A A
n : α
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(n • a✝).num { val := ↑(n • a✝).den, property := (_ : ↑(n • a✝).den ∈ x) } =
    Localization.mk (n • ↑a✝.num) { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
congr 1
instance : Neg (HomogeneousLocalization 𝒜 x) where
  neg := Quotient.map' Neg.neg fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
    

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
⊢ Setoid.r (-c1) (-c2)

Next tactic:
change Localization.mk _ _ = Localization.mk _ _
instance : Neg (HomogeneousLocalization 𝒜 x) where
  neg := Quotient.map' Neg.neg fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
    change Localization.mk _ _ = Localization.mk _ _
    

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
⊢ Localization.mk ↑(-c1).num { val := ↑(-c1).den, property := (_ : ↑(-c1).den ∈ x) } =
    Localization.mk ↑(-c2).num { val := ↑(-c2).den, property := (_ : ↑(-c2).den ∈ x) }

Next tactic:
simp only [num_neg, den_neg, ← Localization.neg_mk]
instance : Neg (HomogeneousLocalization 𝒜 x) where
  neg := Quotient.map' Neg.neg fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
    change Localization.mk _ _ = Localization.mk _ _
    simp only [num_neg, den_neg, ← Localization.neg_mk]
    

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
⊢ -Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : (fun x_1 => x_1 ∈ x) ↑c1.den) } =
    -Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : (fun x_1 => x_1 ∈ x) ↑c2.den) }

Next tactic:
exact congr_arg Neg.neg h
instance : Add (HomogeneousLocalization 𝒜 x) where
  add :=
    Quotient.map₂' (· + ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Setoid.r ((fun x_1 x_2 => x_1 + x_2) c1 c3) ((fun x_1 x_2 => x_1 + x_2) c2 c4)

Next tactic:
change Localization.mk _ _ = Localization.mk _ _
instance : Add (HomogeneousLocalization 𝒜 x) where
  add :=
    Quotient.map₂' (· + ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk ↑((fun x_1 x_2 => x_1 + x_2) c1 c3).num
      { val := ↑((fun x_1 x_2 => x_1 + x_2) c1 c3).den,
        property := (_ : ↑((fun x_1 x_2 => x_1 + x_2) c1 c3).den ∈ x) } =
    Localization.mk ↑((fun x_1 x_2 => x_1 + x_2) c2 c4).num
      { val := ↑((fun x_1 x_2 => x_1 + x_2) c2 c4).den, property := (_ : ↑((fun x_1 x_2 => x_1 + x_2) c2 c4).den ∈ x) }

Next tactic:
simp only [num_add, den_add, ← Localization.add_mk]
instance : Add (HomogeneousLocalization 𝒜 x) where
  add :=
    Quotient.map₂' (· + ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_add, den_add, ← Localization.add_mk]
      

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk (↑c1.den * ↑c3.num + ↑c3.den * ↑c1.num)
      { val := ↑c1.den * ↑c3.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c1.den * ↑c3.den)) } =
    Localization.mk (↑c2.den * ↑c4.num + ↑c4.den * ↑c2.num)
      { val := ↑c2.den * ↑c4.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c2.den * ↑c4.den)) }

Next tactic:
convert congr_arg₂ (· + ·) h h'
instance : Add (HomogeneousLocalization 𝒜 x) where
  add :=
    Quotient.map₂' (· + ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_add, den_add, ← Localization.add_mk]
      convert congr_arg₂ (· + ·) h h' <;> 

Proof state:
case h.e'_2
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk (↑c1.den * ↑c3.num + ↑c3.den * ↑c1.num)
      { val := ↑c1.den * ↑c3.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c1.den * ↑c3.den)) } =
    Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } +
      Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) }

Next tactic:
erw [Localization.add_mk]
instance : Add (HomogeneousLocalization 𝒜 x) where
  add :=
    Quotient.map₂' (· + ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_add, den_add, ← Localization.add_mk]
      convert congr_arg₂ (· + ·) h h' <;> 

Proof state:
case h.e'_3
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk (↑c2.den * ↑c4.num + ↑c4.den * ↑c2.num)
      { val := ↑c2.den * ↑c4.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c2.den * ↑c4.den)) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) } +
      Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }

Next tactic:
erw [Localization.add_mk]
instance : Add (HomogeneousLocalization 𝒜 x) where
  add :=
    Quotient.map₂' (· + ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_add, den_add, ← Localization.add_mk]
      convert congr_arg₂ (· + ·) h h' <;> erw [Localization.add_mk] <;> 

Proof state:
case h.e'_2
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk (↑c1.den * ↑c3.num + ↑c3.den * ↑c1.num)
      { val := ↑c1.den * ↑c3.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c1.den * ↑c3.den)) } =
    Localization.mk
      (↑{ val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } * ↑c3.num +
        ↑{ val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } * ↑c1.num)
      ({ val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } * { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) })

Next tactic:
rfl
instance : Add (HomogeneousLocalization 𝒜 x) where
  add :=
    Quotient.map₂' (· + ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_add, den_add, ← Localization.add_mk]
      convert congr_arg₂ (· + ·) h h' <;> erw [Localization.add_mk] <;> 

Proof state:
case h.e'_3
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk (↑c2.den * ↑c4.num + ↑c4.den * ↑c2.num)
      { val := ↑c2.den * ↑c4.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c2.den * ↑c4.den)) } =
    Localization.mk
      (↑{ val := ↑c2.den, property := (_ : ↑c2.den ∈ x) } * ↑c4.num +
        ↑{ val := ↑c4.den, property := (_ : ↑c4.den ∈ x) } * ↑c2.num)
      ({ val := ↑c2.den, property := (_ : ↑c2.den ∈ x) } * { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) })

Next tactic:
rfl
instance : Mul (HomogeneousLocalization 𝒜 x) where
  mul :=
    Quotient.map₂' (· * ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Setoid.r ((fun x_1 x_2 => x_1 * x_2) c1 c3) ((fun x_1 x_2 => x_1 * x_2) c2 c4)

Next tactic:
change Localization.mk _ _ = Localization.mk _ _
instance : Mul (HomogeneousLocalization 𝒜 x) where
  mul :=
    Quotient.map₂' (· * ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk ↑((fun x_1 x_2 => x_1 * x_2) c1 c3).num
      { val := ↑((fun x_1 x_2 => x_1 * x_2) c1 c3).den,
        property := (_ : ↑((fun x_1 x_2 => x_1 * x_2) c1 c3).den ∈ x) } =
    Localization.mk ↑((fun x_1 x_2 => x_1 * x_2) c2 c4).num
      { val := ↑((fun x_1 x_2 => x_1 * x_2) c2 c4).den, property := (_ : ↑((fun x_1 x_2 => x_1 * x_2) c2 c4).den ∈ x) }

Next tactic:
simp only [num_mul, den_mul]
instance : Mul (HomogeneousLocalization 𝒜 x) where
  mul :=
    Quotient.map₂' (· * ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_mul, den_mul]
      

Proof state:
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk (↑c1.num * ↑c3.num)
      { val := ↑c1.den * ↑c3.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c1.den * ↑c3.den)) } =
    Localization.mk (↑c2.num * ↑c4.num)
      { val := ↑c2.den * ↑c4.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c2.den * ↑c4.den)) }

Next tactic:
convert congr_arg₂ (· * ·) h h'
instance : Mul (HomogeneousLocalization 𝒜 x) where
  mul :=
    Quotient.map₂' (· * ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_mul, den_mul]
      convert congr_arg₂ (· * ·) h h' <;> 

Proof state:
case h.e'_2
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk (↑c1.num * ↑c3.num)
      { val := ↑c1.den * ↑c3.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c1.den * ↑c3.den)) } =
    Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } *
      Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) }

Next tactic:
erw [Localization.mk_mul]
instance : Mul (HomogeneousLocalization 𝒜 x) where
  mul :=
    Quotient.map₂' (· * ·)
      fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) c3 c4
        (h' : Localization.mk _ _ = Localization.mk _ _) => by
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_mul, den_mul]
      convert congr_arg₂ (· * ·) h h' <;> 

Proof state:
case h.e'_3
ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
c1 c2 : NumDenSameDeg 𝒜 x
h :
  Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) }
c3 c4 : NumDenSameDeg 𝒜 x
h' :
  Localization.mk ↑c3.num { val := ↑c3.den, property := (_ : ↑c3.den ∈ x) } =
    Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }
⊢ Localization.mk (↑c2.num * ↑c4.num)
      { val := ↑c2.den * ↑c4.den, property := (_ : (fun x_1 => x_1 ∈ x) (↑c2.den * ↑c4.den)) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) } *
      Localization.mk ↑c4.num { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) }

Next tactic:
erw [Localization.mk_mul]