l3lab/ntp-mathlib huggingface dataset:
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' <;> erw [Localization.mk_mul] <;> 

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 * ↑c3.num)
      ({ val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } * { val := ↑c3.den, property := (_ : ↑c3.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
      change Localization.mk _ _ = Localization.mk _ _
      simp only [num_mul, den_mul]
      convert congr_arg₂ (· * ·) h h' <;> erw [Localization.mk_mul] <;> 

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 * ↑c4.num)
      ({ val := ↑c2.den, property := (_ : ↑c2.den ∈ x) } * { val := ↑c4.den, property := (_ : ↑c4.den ∈ x) })

Next tactic:
rfl
@[simp]
theorem add_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 + y2).val = y1.val + y2.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
y1 y2 : HomogeneousLocalization 𝒜 x
⊢ val (y1 + y2) = val y1 + val y2

Next tactic:
induction y1 using Quotient.inductionOn
@[simp]
theorem add_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 + y2).val = y1.val + y2.val := by
  induction y1 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
y2 : HomogeneousLocalization 𝒜 x
a✝ : NumDenSameDeg 𝒜 x
⊢ val (⟦a✝⟧ + y2) = val ⟦a✝⟧ + val y2

Next tactic:
induction y2 using Quotient.inductionOn
@[simp]
theorem add_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 + y2).val = y1.val + y2.val := by
  induction y1 using Quotient.inductionOn
  induction y2 using Quotient.inductionOn
  

Proof state:
case h.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
a✝¹ a✝ : NumDenSameDeg 𝒜 x
⊢ val (⟦a✝¹⟧ + ⟦a✝⟧) = val ⟦a✝¹⟧ + val ⟦a✝⟧

Next tactic:
change Localization.mk _ _ = Localization.mk _ _ + Localization.mk _ _
@[simp]
theorem add_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 + y2).val = y1.val + y2.val := by
  induction y1 using Quotient.inductionOn
  induction y2 using Quotient.inductionOn
  change Localization.mk _ _ = Localization.mk _ _ + Localization.mk _ _
  

Proof state:
case h.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
a✝¹ a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑((fun x_1 x_2 => x_1 + x_2) a✝¹ a✝).num
      { val := ↑((fun x_1 x_2 => x_1 + x_2) a✝¹ a✝).den,
        property := (_ : ↑((fun x_1 x_2 => x_1 + x_2) a✝¹ a✝).den ∈ x) } =
    Localization.mk ↑a✝¹.num { val := ↑a✝¹.den, property := (_ : ↑a✝¹.den ∈ x) } +
      Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
dsimp only
@[simp]
theorem add_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 + y2).val = y1.val + y2.val := by
  induction y1 using Quotient.inductionOn
  induction y2 using Quotient.inductionOn
  change Localization.mk _ _ = Localization.mk _ _ + Localization.mk _ _
  dsimp only
  

Proof state:
case h.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
a✝¹ a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(a✝¹ + a✝).num { val := ↑(a✝¹ + a✝).den, property := (_ : ↑(a✝¹ + a✝).den ∈ x) } =
    Localization.mk ↑a✝¹.num { val := ↑a✝¹.den, property := (_ : ↑a✝¹.den ∈ x) } +
      Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
rw [Localization.add_mk]
@[simp]
theorem add_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 + y2).val = y1.val + y2.val := by
  induction y1 using Quotient.inductionOn
  induction y2 using Quotient.inductionOn
  change Localization.mk _ _ = Localization.mk _ _ + Localization.mk _ _
  dsimp only
  rw [Localization.add_mk]
  

Proof state:
case h.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
a✝¹ a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(a✝¹ + a✝).num { val := ↑(a✝¹ + a✝).den, property := (_ : ↑(a✝¹ + a✝).den ∈ x) } =
    Localization.mk
      (↑{ val := ↑a✝¹.den, property := (_ : ↑a✝¹.den ∈ x) } * ↑a✝.num +
        ↑{ val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) } * ↑a✝¹.num)
      ({ val := ↑a✝¹.den, property := (_ : ↑a✝¹.den ∈ x) } * { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) })

Next tactic:
rfl
@[simp]
theorem mul_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 * y2).val = y1.val * y2.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
y1 y2 : HomogeneousLocalization 𝒜 x
⊢ val (y1 * y2) = val y1 * val y2

Next tactic:
induction y1 using Quotient.inductionOn
@[simp]
theorem mul_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 * y2).val = y1.val * y2.val := by
  induction y1 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
y2 : HomogeneousLocalization 𝒜 x
a✝ : NumDenSameDeg 𝒜 x
⊢ val (⟦a✝⟧ * y2) = val ⟦a✝⟧ * val y2

Next tactic:
induction y2 using Quotient.inductionOn
@[simp]
theorem mul_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 * y2).val = y1.val * y2.val := by
  induction y1 using Quotient.inductionOn
  induction y2 using Quotient.inductionOn
  

Proof state:
case h.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
a✝¹ a✝ : NumDenSameDeg 𝒜 x
⊢ val (⟦a✝¹⟧ * ⟦a✝⟧) = val ⟦a✝¹⟧ * val ⟦a✝⟧

Next tactic:
change Localization.mk _ _ = Localization.mk _ _ * Localization.mk _ _
@[simp]
theorem mul_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 * y2).val = y1.val * y2.val := by
  induction y1 using Quotient.inductionOn
  induction y2 using Quotient.inductionOn
  change Localization.mk _ _ = Localization.mk _ _ * Localization.mk _ _
  

Proof state:
case h.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
a✝¹ a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑((fun x_1 x_2 => x_1 * x_2) a✝¹ a✝).num
      { val := ↑((fun x_1 x_2 => x_1 * x_2) a✝¹ a✝).den,
        property := (_ : ↑((fun x_1 x_2 => x_1 * x_2) a✝¹ a✝).den ∈ x) } =
    Localization.mk ↑a✝¹.num { val := ↑a✝¹.den, property := (_ : ↑a✝¹.den ∈ x) } *
      Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
dsimp only
@[simp]
theorem mul_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 * y2).val = y1.val * y2.val := by
  induction y1 using Quotient.inductionOn
  induction y2 using Quotient.inductionOn
  change Localization.mk _ _ = Localization.mk _ _ * Localization.mk _ _
  dsimp only
  

Proof state:
case h.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
a✝¹ a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(a✝¹ * a✝).num { val := ↑(a✝¹ * a✝).den, property := (_ : ↑(a✝¹ * a✝).den ∈ x) } =
    Localization.mk ↑a✝¹.num { val := ↑a✝¹.den, property := (_ : ↑a✝¹.den ∈ x) } *
      Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
rw [Localization.mk_mul]
@[simp]
theorem mul_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 * y2).val = y1.val * y2.val := by
  induction y1 using Quotient.inductionOn
  induction y2 using Quotient.inductionOn
  change Localization.mk _ _ = Localization.mk _ _ * Localization.mk _ _
  dsimp only
  rw [Localization.mk_mul]
  

Proof state:
case h.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
a✝¹ a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(a✝¹ * a✝).num { val := ↑(a✝¹ * a✝).den, property := (_ : ↑(a✝¹ * a✝).den ∈ x) } =
    Localization.mk (↑a✝¹.num * ↑a✝.num)
      ({ val := ↑a✝¹.den, property := (_ : ↑a✝¹.den ∈ x) } * { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) })

Next tactic:
rfl
@[simp]
theorem neg_val (y : HomogeneousLocalization 𝒜 x) : (-y).val = -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
y : HomogeneousLocalization 𝒜 x
⊢ val (-y) = -val y

Next tactic:
induction y using Quotient.inductionOn
@[simp]
theorem neg_val (y : HomogeneousLocalization 𝒜 x) : (-y).val = -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
a✝ : NumDenSameDeg 𝒜 x
⊢ val (-⟦a✝⟧) = -val ⟦a✝⟧

Next tactic:
change Localization.mk _ _ = -Localization.mk _ _
@[simp]
theorem neg_val (y : HomogeneousLocalization 𝒜 x) : (-y).val = -y.val := by
  induction y using Quotient.inductionOn
  change Localization.mk _ _ = -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
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(-a✝).num { val := ↑(-a✝).den, property := (_ : ↑(-a✝).den ∈ x) } =
    -Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
dsimp only
@[simp]
theorem neg_val (y : HomogeneousLocalization 𝒜 x) : (-y).val = -y.val := by
  induction y using Quotient.inductionOn
  change Localization.mk _ _ = -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
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(-a✝).num { val := ↑(-a✝).den, property := (_ : ↑(-a✝).den ∈ x) } =
    -Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
rw [Localization.neg_mk]
@[simp]
theorem neg_val (y : HomogeneousLocalization 𝒜 x) : (-y).val = -y.val := by
  induction y using Quotient.inductionOn
  change Localization.mk _ _ = -Localization.mk _ _
  dsimp only
  rw [Localization.neg_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
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(-a✝).num { val := ↑(-a✝).den, property := (_ : ↑(-a✝).den ∈ x) } =
    Localization.mk (-↑a✝.num) { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) }

Next tactic:
rfl
@[simp]
theorem sub_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 - y2).val = y1.val - y2.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
y1 y2 : HomogeneousLocalization 𝒜 x
⊢ val (y1 - y2) = val y1 - val y2

Next tactic:
rw [show y1 - y2 = y1 + -y2 from rfl, add_val, neg_val]
@[simp]
theorem sub_val (y1 y2 : HomogeneousLocalization 𝒜 x) : (y1 - y2).val = y1.val - y2.val := by
  rw [show y1 - y2 = y1 + -y2 from rfl, add_val, neg_val]; 

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
y1 y2 : HomogeneousLocalization 𝒜 x
⊢ val y1 + -val y2 = val y1 - val y2

Next tactic:
rfl
@[simp]
theorem pow_val (y : HomogeneousLocalization 𝒜 x) (n : ℕ) : (y ^ n).val = y.val ^ n := 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
y : HomogeneousLocalization 𝒜 x
n : ℕ
⊢ val (y ^ n) = val y ^ n

Next tactic:
induction y using Quotient.inductionOn
@[simp]
theorem pow_val (y : HomogeneousLocalization 𝒜 x) (n : ℕ) : (y ^ n).val = y.val ^ n := 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
n : ℕ
a✝ : NumDenSameDeg 𝒜 x
⊢ val (⟦a✝⟧ ^ n) = val ⟦a✝⟧ ^ n

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

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
n : ℕ
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑((fun x_1 => x_1 ^ n) a✝).num
      { val := ↑((fun x_1 => x_1 ^ n) a✝).den, property := (_ : ↑((fun x_1 => x_1 ^ n) a✝).den ∈ x) } =
    Localization.mk ↑a✝.num { val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) } ^ n

Next tactic:
rw [Localization.mk_pow]
@[simp]
theorem pow_val (y : HomogeneousLocalization 𝒜 x) (n : ℕ) : (y ^ n).val = y.val ^ n := by
  induction y using Quotient.inductionOn
  change Localization.mk _ _ = Localization.mk _ _ ^ n
  rw [Localization.mk_pow]
  

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
n : ℕ
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑((fun x_1 => x_1 ^ n) a✝).num
      { val := ↑((fun x_1 => x_1 ^ n) a✝).den, property := (_ : ↑((fun x_1 => x_1 ^ n) a✝).den ∈ x) } =
    Localization.mk (↑a✝.num ^ n) ({ val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) } ^ n)

Next tactic:
dsimp only
@[simp]
theorem pow_val (y : HomogeneousLocalization 𝒜 x) (n : ℕ) : (y ^ n).val = y.val ^ n := by
  induction y using Quotient.inductionOn
  change Localization.mk _ _ = Localization.mk _ _ ^ n
  rw [Localization.mk_pow]
  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
n : ℕ
a✝ : NumDenSameDeg 𝒜 x
⊢ Localization.mk ↑(a✝ ^ n).num { val := ↑(a✝ ^ n).den, property := (_ : ↑(a✝ ^ n).den ∈ x) } =
    Localization.mk (↑a✝.num ^ n) ({ val := ↑a✝.den, property := (_ : ↑a✝.den ∈ x) } ^ n)

Next tactic:
congr 1
@[simp]
theorem natCast_val (n : ℕ) : (n : HomogeneousLocalization 𝒜 x).val = n :=
  show val (Nat.unaryCast n) = _ 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
n : ℕ
⊢ val (Nat.unaryCast n) = ↑n

Next tactic:
induction n
@[simp]
theorem natCast_val (n : ℕ) : (n : HomogeneousLocalization 𝒜 x).val = n :=
  show val (Nat.unaryCast n) = _ by induction n <;> 

Proof state:
case zero
ι : 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
⊢ val (Nat.unaryCast Nat.zero) = ↑Nat.zero

Next tactic:
simp [Nat.unaryCast, zero_val, one_val, *]
@[simp]
theorem natCast_val (n : ℕ) : (n : HomogeneousLocalization 𝒜 x).val = n :=
  show val (Nat.unaryCast n) = _ by induction n <;> 

Proof state:
case succ
ι : 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
n✝ : ℕ
n_ih✝ : val (Nat.unaryCast n✝) = ↑n✝
⊢ val (Nat.unaryCast (Nat.succ n✝)) = ↑(Nat.succ n✝)

Next tactic:
simp [Nat.unaryCast, zero_val, one_val, *]
@[simp]
theorem intCast_val (n : ℤ) : (n : HomogeneousLocalization 𝒜 x).val = n :=
  show val (Int.castDef n) = _ 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
n : ℤ
⊢ val (Int.castDef n) = ↑n

Next tactic:
cases n
@[simp]
theorem intCast_val (n : ℤ) : (n : HomogeneousLocalization 𝒜 x).val = n :=
  show val (Int.castDef n) = _ by cases n <;> 

Proof state:
case ofNat
ι : 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
a✝ : ℕ
⊢ val (Int.castDef (Int.ofNat a✝)) = ↑(Int.ofNat a✝)

Next tactic:
simp [Int.castDef, zero_val, one_val, *]
@[simp]
theorem intCast_val (n : ℤ) : (n : HomogeneousLocalization 𝒜 x).val = n :=
  show val (Int.castDef n) = _ by cases n <;> 

Proof state:
case negSucc
ι : 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
a✝ : ℕ
⊢ val (Int.castDef (Int.negSucc a✝)) = ↑(Int.negSucc a✝)

Next tactic:
simp [Int.castDef, zero_val, one_val, *]
theorem eq_num_div_den (f : HomogeneousLocalization 𝒜 x) :
    f.val = Localization.mk f.num ⟨f.den, f.den_mem⟩ := 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
f : HomogeneousLocalization 𝒜 x
⊢ val f = Localization.mk (num f) { val := den f, property := (_ : den f ∈ x) }

Next tactic:
have := Quotient.out_eq' f
theorem eq_num_div_den (f : HomogeneousLocalization 𝒜 x) :
    f.val = Localization.mk f.num ⟨f.den, f.den_mem⟩ := by
  have := Quotient.out_eq' f
  

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
f : HomogeneousLocalization 𝒜 x
this : Quotient.mk'' (Quotient.out' f) = f
⊢ val f = Localization.mk (num f) { val := den f, property := (_ : den f ∈ x) }

Next tactic:
apply_fun HomogeneousLocalization.val at this
theorem eq_num_div_den (f : HomogeneousLocalization 𝒜 x) :
    f.val = Localization.mk f.num ⟨f.den, f.den_mem⟩ := by
  have := Quotient.out_eq' f
  apply_fun HomogeneousLocalization.val at this
  

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
f : HomogeneousLocalization 𝒜 x
this : val (Quotient.mk'' (Quotient.out' f)) = val f
⊢ val f = Localization.mk (num f) { val := den f, property := (_ : den f ∈ x) }

Next tactic:
rw [← this]
theorem eq_num_div_den (f : HomogeneousLocalization 𝒜 x) :
    f.val = Localization.mk f.num ⟨f.den, f.den_mem⟩ := by
  have := Quotient.out_eq' f
  apply_fun HomogeneousLocalization.val at this
  rw [← this]
  

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
f : HomogeneousLocalization 𝒜 x
this : val (Quotient.mk'' (Quotient.out' f)) = val f
⊢ val (Quotient.mk'' (Quotient.out' f)) = Localization.mk (num f) { val := den f, property := (_ : den f ∈ x) }

Next tactic:
rfl
theorem ext_iff_val (f g : HomogeneousLocalization 𝒜 x) : f = g ↔ f.val = g.val :=
  { mp := fun h => h ▸ rfl
    mpr := fun h => 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
f g : HomogeneousLocalization 𝒜 x
h : val f = val g
⊢ f = g

Next tactic:
induction f using Quotient.inductionOn'
theorem ext_iff_val (f g : HomogeneousLocalization 𝒜 x) : f = g ↔ f.val = g.val :=
  { mp := fun h => h ▸ rfl
    mpr := fun h => by
      induction f 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
g : HomogeneousLocalization 𝒜 x
a✝ : NumDenSameDeg 𝒜 x
h : val (Quotient.mk'' a✝) = val g
⊢ Quotient.mk'' a✝ = g

Next tactic:
induction g using Quotient.inductionOn'