l3lab/ntp-mathlib huggingface dataset:
/-- Exactness of `S.X₁.homology i ⟶ S.X₂.homology i ⟶ S.X₃.homology i`. -/
lemma homology_exact₂ : (ShortComplex.mk (HomologicalComplex.homologyMap S.f i)
    (HomologicalComplex.homologyMap S.g i) (by rw [← HomologicalComplex.homologyMap_comp,
      S.zero, HomologicalComplex.homologyMap_zero])).Exact := by
  by_cases h : c.Rel i (c.next i)
  · exact (snakeInput hS i _ h).L₀_exact
  · 

Proof state:
case neg
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
h : ¬ComplexShape.Rel c i (ComplexShape.next c i)
⊢ Exact
    (ShortComplex.mk (HomologicalComplex.homologyMap S.f i) (HomologicalComplex.homologyMap S.g i)
      (_ : HomologicalComplex.homologyMap S.f i ≫ HomologicalComplex.homologyMap S.g i = 0))

Next tactic:
have := hS.epi_g
/-- Exactness of `S.X₁.homology i ⟶ S.X₂.homology i ⟶ S.X₃.homology i`. -/
lemma homology_exact₂ : (ShortComplex.mk (HomologicalComplex.homologyMap S.f i)
    (HomologicalComplex.homologyMap S.g i) (by rw [← HomologicalComplex.homologyMap_comp,
      S.zero, HomologicalComplex.homologyMap_zero])).Exact := by
  by_cases h : c.Rel i (c.next i)
  · exact (snakeInput hS i _ h).L₀_exact
  · have := hS.epi_g
    

Proof state:
case neg
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
h : ¬ComplexShape.Rel c i (ComplexShape.next c i)
this : Epi S.g
⊢ Exact
    (ShortComplex.mk (HomologicalComplex.homologyMap S.f i) (HomologicalComplex.homologyMap S.g i)
      (_ : HomologicalComplex.homologyMap S.f i ≫ HomologicalComplex.homologyMap S.g i = 0))

Next tactic:
have : ∀ (K : HomologicalComplex C c), IsIso (K.homologyι i) :=
      fun K => ShortComplex.isIso_homologyι (K.sc i) (K.shape _ _ h)
/-- Exactness of `S.X₁.homology i ⟶ S.X₂.homology i ⟶ S.X₃.homology i`. -/
lemma homology_exact₂ : (ShortComplex.mk (HomologicalComplex.homologyMap S.f i)
    (HomologicalComplex.homologyMap S.g i) (by rw [← HomologicalComplex.homologyMap_comp,
      S.zero, HomologicalComplex.homologyMap_zero])).Exact := by
  by_cases h : c.Rel i (c.next i)
  · exact (snakeInput hS i _ h).L₀_exact
  · have := hS.epi_g
    have : ∀ (K : HomologicalComplex C c), IsIso (K.homologyι i) :=
      fun K => ShortComplex.isIso_homologyι (K.sc i) (K.shape _ _ h)
    

Proof state:
case neg
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
h : ¬ComplexShape.Rel c i (ComplexShape.next c i)
this✝ : Epi S.g
this : ∀ (K : HomologicalComplex C c), IsIso (HomologicalComplex.homologyι K i)
⊢ Exact
    (ShortComplex.mk (HomologicalComplex.homologyMap S.f i) (HomologicalComplex.homologyMap S.g i)
      (_ : HomologicalComplex.homologyMap S.f i ≫ HomologicalComplex.homologyMap S.g i = 0))

Next tactic:
have e : S.map (HomologicalComplex.homologyFunctor C c i) ≅
        S.map (HomologicalComplex.opcyclesFunctor C c i) :=
      ShortComplex.isoMk (asIso (S.X₁.homologyι i))
        (asIso (S.X₂.homologyι i)) (asIso (S.X₃.homologyι i)) (by aesop_cat) (by aesop_cat)
/-- Exactness of `S.X₁.homology i ⟶ S.X₂.homology i ⟶ S.X₃.homology i`. -/
lemma homology_exact₂ : (ShortComplex.mk (HomologicalComplex.homologyMap S.f i)
    (HomologicalComplex.homologyMap S.g i) (by rw [← HomologicalComplex.homologyMap_comp,
      S.zero, HomologicalComplex.homologyMap_zero])).Exact := by
  by_cases h : c.Rel i (c.next i)
  · exact (snakeInput hS i _ h).L₀_exact
  · have := hS.epi_g
    have : ∀ (K : HomologicalComplex C c), IsIso (K.homologyι i) :=
      fun K => ShortComplex.isIso_homologyι (K.sc i) (K.shape _ _ h)
    have e : S.map (HomologicalComplex.homologyFunctor C c i) ≅
        S.map (HomologicalComplex.opcyclesFunctor C c i) :=
      ShortComplex.isoMk (asIso (S.X₁.homologyι i))
        (asIso (S.X₂.homologyι i)) (asIso (S.X₃.homologyι i)) (by 

Proof state:
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
h : ¬ComplexShape.Rel c i (ComplexShape.next c i)
this✝ : Epi S.g
this : ∀ (K : HomologicalComplex C c), IsIso (HomologicalComplex.homologyι K i)
⊢ (asIso (HomologicalComplex.homologyι S.X₁ i)).hom ≫
      (ShortComplex.map S (HomologicalComplex.opcyclesFunctor C c i)).f =
    (ShortComplex.map S (HomologicalComplex.homologyFunctor C c i)).f ≫
      (asIso (HomologicalComplex.homologyι S.X₂ i)).hom

Next tactic:
aesop_cat
/-- Exactness of `S.X₁.homology i ⟶ S.X₂.homology i ⟶ S.X₃.homology i`. -/
lemma homology_exact₂ : (ShortComplex.mk (HomologicalComplex.homologyMap S.f i)
    (HomologicalComplex.homologyMap S.g i) (by rw [← HomologicalComplex.homologyMap_comp,
      S.zero, HomologicalComplex.homologyMap_zero])).Exact := by
  by_cases h : c.Rel i (c.next i)
  · exact (snakeInput hS i _ h).L₀_exact
  · have := hS.epi_g
    have : ∀ (K : HomologicalComplex C c), IsIso (K.homologyι i) :=
      fun K => ShortComplex.isIso_homologyι (K.sc i) (K.shape _ _ h)
    have e : S.map (HomologicalComplex.homologyFunctor C c i) ≅
        S.map (HomologicalComplex.opcyclesFunctor C c i) :=
      ShortComplex.isoMk (asIso (S.X₁.homologyι i))
        (asIso (S.X₂.homologyι i)) (asIso (S.X₃.homologyι i)) (by aesop_cat) (by 

Proof state:
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
h : ¬ComplexShape.Rel c i (ComplexShape.next c i)
this✝ : Epi S.g
this : ∀ (K : HomologicalComplex C c), IsIso (HomologicalComplex.homologyι K i)
⊢ (asIso (HomologicalComplex.homologyι S.X₂ i)).hom ≫
      (ShortComplex.map S (HomologicalComplex.opcyclesFunctor C c i)).g =
    (ShortComplex.map S (HomologicalComplex.homologyFunctor C c i)).g ≫
      (asIso (HomologicalComplex.homologyι S.X₃ i)).hom

Next tactic:
aesop_cat
/-- Exactness of `S.X₁.homology i ⟶ S.X₂.homology i ⟶ S.X₃.homology i`. -/
lemma homology_exact₂ : (ShortComplex.mk (HomologicalComplex.homologyMap S.f i)
    (HomologicalComplex.homologyMap S.g i) (by rw [← HomologicalComplex.homologyMap_comp,
      S.zero, HomologicalComplex.homologyMap_zero])).Exact := by
  by_cases h : c.Rel i (c.next i)
  · exact (snakeInput hS i _ h).L₀_exact
  · have := hS.epi_g
    have : ∀ (K : HomologicalComplex C c), IsIso (K.homologyι i) :=
      fun K => ShortComplex.isIso_homologyι (K.sc i) (K.shape _ _ h)
    have e : S.map (HomologicalComplex.homologyFunctor C c i) ≅
        S.map (HomologicalComplex.opcyclesFunctor C c i) :=
      ShortComplex.isoMk (asIso (S.X₁.homologyι i))
        (asIso (S.X₂.homologyι i)) (asIso (S.X₃.homologyι i)) (by aesop_cat) (by aesop_cat)
    

Proof state:
case neg
C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
S : ShortComplex (HomologicalComplex C c)
hS : ShortExact S
i j : ι
hij : ComplexShape.Rel c i j
h : ¬ComplexShape.Rel c i (ComplexShape.next c i)
this✝ : Epi S.g
this : ∀ (K : HomologicalComplex C c), IsIso (HomologicalComplex.homologyι K i)
e :
  ShortComplex.map S (HomologicalComplex.homologyFunctor C c i) ≅
    ShortComplex.map S (HomologicalComplex.opcyclesFunctor C c i)
⊢ Exact
    (ShortComplex.mk (HomologicalComplex.homologyMap S.f i) (HomologicalComplex.homologyMap S.g i)
      (_ : HomologicalComplex.homologyMap S.f i ≫ HomologicalComplex.homologyMap S.g i = 0))

Next tactic:
exact ShortComplex.exact_of_iso e.symm (opcycles_right_exact S hS.exact i)
@[ext]
theorem ext {c1 c2 : NumDenSameDeg 𝒜 x} (hdeg : c1.deg = c2.deg) (hnum : (c1.num : A) = c2.num)
    (hden : (c1.den : A) = c2.den) : c1 = c2 := 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
hdeg : c1.deg = c2.deg
hnum : ↑c1.num = ↑c2.num
hden : ↑c1.den = ↑c2.den
⊢ c1 = c2

Next tactic:
rcases c1 with ⟨i1, ⟨n1, hn1⟩, ⟨d1, hd1⟩, h1⟩
@[ext]
theorem ext {c1 c2 : NumDenSameDeg 𝒜 x} (hdeg : c1.deg = c2.deg) (hnum : (c1.num : A) = c2.num)
    (hden : (c1.den : A) = c2.den) : c1 = c2 := by
  rcases c1 with ⟨i1, ⟨n1, hn1⟩, ⟨d1, hd1⟩, h1⟩
  

Proof state:
case mk.mk.mk
ι : 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
c2 : NumDenSameDeg 𝒜 x
i1 : ι
n1 : A
hn1 : n1 ∈ 𝒜 i1
d1 : A
hd1 : d1 ∈ 𝒜 i1
h1 : ↑{ val := d1, property := hd1 } ∈ x
hdeg :
  { deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 }.deg =
    c2.deg
hnum :
  ↑{ deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 }.num =
    ↑c2.num
hden :
  ↑{ deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 }.den =
    ↑c2.den
⊢ { deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 } = c2

Next tactic:
rcases c2 with ⟨i2, ⟨n2, hn2⟩, ⟨d2, hd2⟩, h2⟩
@[ext]
theorem ext {c1 c2 : NumDenSameDeg 𝒜 x} (hdeg : c1.deg = c2.deg) (hnum : (c1.num : A) = c2.num)
    (hden : (c1.den : A) = c2.den) : c1 = c2 := by
  rcases c1 with ⟨i1, ⟨n1, hn1⟩, ⟨d1, hd1⟩, h1⟩
  rcases c2 with ⟨i2, ⟨n2, hn2⟩, ⟨d2, hd2⟩, h2⟩
  

Proof state:
case mk.mk.mk.mk.mk.mk
ι : 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
i1 : ι
n1 : A
hn1 : n1 ∈ 𝒜 i1
d1 : A
hd1 : d1 ∈ 𝒜 i1
h1 : ↑{ val := d1, property := hd1 } ∈ x
i2 : ι
n2 : A
hn2 : n2 ∈ 𝒜 i2
d2 : A
hd2 : d2 ∈ 𝒜 i2
h2 : ↑{ val := d2, property := hd2 } ∈ x
hdeg :
  { deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 }.deg =
    { deg := i2, num := { val := n2, property := hn2 }, den := { val := d2, property := hd2 }, den_mem := h2 }.deg
hnum :
  ↑{ deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 }.num =
    ↑{ deg := i2, num := { val := n2, property := hn2 }, den := { val := d2, property := hd2 }, den_mem := h2 }.num
hden :
  ↑{ deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 }.den =
    ↑{ deg := i2, num := { val := n2, property := hn2 }, den := { val := d2, property := hd2 }, den_mem := h2 }.den
⊢ { deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 } =
    { deg := i2, num := { val := n2, property := hn2 }, den := { val := d2, property := hd2 }, den_mem := h2 }

Next tactic:
dsimp only [Subtype.coe_mk] at *
@[ext]
theorem ext {c1 c2 : NumDenSameDeg 𝒜 x} (hdeg : c1.deg = c2.deg) (hnum : (c1.num : A) = c2.num)
    (hden : (c1.den : A) = c2.den) : c1 = c2 := by
  rcases c1 with ⟨i1, ⟨n1, hn1⟩, ⟨d1, hd1⟩, h1⟩
  rcases c2 with ⟨i2, ⟨n2, hn2⟩, ⟨d2, hd2⟩, h2⟩
  dsimp only [Subtype.coe_mk] at *
  

Proof state:
case mk.mk.mk.mk.mk.mk
ι : 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
i1 : ι
n1 : A
hn1 : n1 ∈ 𝒜 i1
d1 : A
hd1 : d1 ∈ 𝒜 i1
h1 : ↑{ val := d1, property := hd1 } ∈ x
i2 : ι
n2 : A
hn2 : n2 ∈ 𝒜 i2
d2 : A
hd2 : d2 ∈ 𝒜 i2
h2 : ↑{ val := d2, property := hd2 } ∈ x
hdeg : i1 = i2
hnum : n1 = n2
hden : d1 = d2
⊢ { deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 } =
    { deg := i2, num := { val := n2, property := hn2 }, den := { val := d2, property := hd2 }, den_mem := h2 }

Next tactic:
subst hdeg hnum hden
@[ext]
theorem ext {c1 c2 : NumDenSameDeg 𝒜 x} (hdeg : c1.deg = c2.deg) (hnum : (c1.num : A) = c2.num)
    (hden : (c1.den : A) = c2.den) : c1 = c2 := by
  rcases c1 with ⟨i1, ⟨n1, hn1⟩, ⟨d1, hd1⟩, h1⟩
  rcases c2 with ⟨i2, ⟨n2, hn2⟩, ⟨d2, hd2⟩, h2⟩
  dsimp only [Subtype.coe_mk] at *
  subst hdeg hnum hden
  

Proof state:
case mk.mk.mk.mk.mk.mk
ι : 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
i1 : ι
n1 : A
hn1 : n1 ∈ 𝒜 i1
d1 : A
hd1 : d1 ∈ 𝒜 i1
h1 : ↑{ val := d1, property := hd1 } ∈ x
hn2 : n1 ∈ 𝒜 i1
hd2 : d1 ∈ 𝒜 i1
h2 : ↑{ val := d1, property := hd2 } ∈ x
⊢ { deg := i1, num := { val := n1, property := hn1 }, den := { val := d1, property := hd1 }, den_mem := h1 } =
    { deg := i1, num := { val := n1, property := hn2 }, den := { val := d1, property := hd2 }, den_mem := h2 }

Next tactic:
congr
instance : Pow (NumDenSameDeg 𝒜 x) ℕ where
  pow c n :=
    ⟨n • c.deg, @GradedMonoid.GMonoid.gnpow _ (fun i => ↥(𝒜 i)) _ _ n _ c.num,
      @GradedMonoid.GMonoid.gnpow _ (fun i => ↥(𝒜 i)) _ _ n _ c.den, 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
c : NumDenSameDeg 𝒜 x
n : ℕ
⊢ ↑(GradedMonoid.GMonoid.gnpow n c.den) ∈ x

Next tactic:
induction' n with n ih
instance : Pow (NumDenSameDeg 𝒜 x) ℕ where
  pow c n :=
    ⟨n • c.deg, @GradedMonoid.GMonoid.gnpow _ (fun i => ↥(𝒜 i)) _ _ n _ c.num,
      @GradedMonoid.GMonoid.gnpow _ (fun i => ↥(𝒜 i)) _ _ n _ c.den, by
        induction' n with n ih
        · 

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
c : NumDenSameDeg 𝒜 x
⊢ ↑(GradedMonoid.GMonoid.gnpow Nat.zero c.den) ∈ x

Next tactic:
simpa only [Nat.zero_eq, coe_gnpow, pow_zero] using Submonoid.one_mem _
instance : Pow (NumDenSameDeg 𝒜 x) ℕ where
  pow c n :=
    ⟨n • c.deg, @GradedMonoid.GMonoid.gnpow _ (fun i => ↥(𝒜 i)) _ _ n _ c.num,
      @GradedMonoid.GMonoid.gnpow _ (fun i => ↥(𝒜 i)) _ _ n _ c.den, by
        induction' n with n ih
        · simpa only [Nat.zero_eq, coe_gnpow, pow_zero] using Submonoid.one_mem _
        · 

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
c : NumDenSameDeg 𝒜 x
n : ℕ
ih : ↑(GradedMonoid.GMonoid.gnpow n c.den) ∈ x
⊢ ↑(GradedMonoid.GMonoid.gnpow (Nat.succ n) c.den) ∈ x

Next tactic:
simpa only [pow_succ', coe_gnpow] using x.mul_mem ih c.den_mem
instance hasPow : Pow (HomogeneousLocalization 𝒜 x) ℕ where
  pow z n :=
    (Quotient.map' (· ^ n) 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
z : HomogeneousLocalization 𝒜 x
n : ℕ
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 ((fun x_1 => x_1 ^ n) c1) ((fun x_1 => x_1 ^ n) c2)

Next tactic:
change Localization.mk _ _ = Localization.mk _ _
instance hasPow : Pow (HomogeneousLocalization 𝒜 x) ℕ where
  pow z n :=
    (Quotient.map' (· ^ n) 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
z : HomogeneousLocalization 𝒜 x
n : ℕ
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 ↑((fun x_1 => x_1 ^ n) c1).num
      { val := ↑((fun x_1 => x_1 ^ n) c1).den, property := (_ : ↑((fun x_1 => x_1 ^ n) c1).den ∈ x) } =
    Localization.mk ↑((fun x_1 => x_1 ^ n) c2).num
      { val := ↑((fun x_1 => x_1 ^ n) c2).den, property := (_ : ↑((fun x_1 => x_1 ^ n) c2).den ∈ x) }

Next tactic:
simp only [num_pow, den_pow]
instance hasPow : Pow (HomogeneousLocalization 𝒜 x) ℕ where
  pow z n :=
    (Quotient.map' (· ^ n) fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
          change Localization.mk _ _ = Localization.mk _ _
          simp only [num_pow, den_pow]
          

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

Next tactic:
convert congr_arg (fun z : at x => z ^ n) h
instance hasPow : Pow (HomogeneousLocalization 𝒜 x) ℕ where
  pow z n :=
    (Quotient.map' (· ^ n) fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
          change Localization.mk _ _ = Localization.mk _ _
          simp only [num_pow, den_pow]
          convert congr_arg (fun z : at x => z ^ n) 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
z : HomogeneousLocalization 𝒜 x
n : ℕ
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 ^ n) { val := ↑c1.den ^ n, property := (_ : (fun x_1 => x_1 ∈ x) (↑c1.den ^ n)) } =
    Localization.mk ↑c1.num { val := ↑c1.den, property := (_ : ↑c1.den ∈ x) } ^ n

Next tactic:
erw [Localization.mk_pow]
instance hasPow : Pow (HomogeneousLocalization 𝒜 x) ℕ where
  pow z n :=
    (Quotient.map' (· ^ n) fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
          change Localization.mk _ _ = Localization.mk _ _
          simp only [num_pow, den_pow]
          convert congr_arg (fun z : at x => z ^ n) 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
z : HomogeneousLocalization 𝒜 x
n : ℕ
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 (↑c2.num ^ n) { val := ↑c2.den ^ n, property := (_ : (fun x_1 => x_1 ∈ x) (↑c2.den ^ n)) } =
    Localization.mk ↑c2.num { val := ↑c2.den, property := (_ : ↑c2.den ∈ x) } ^ n

Next tactic:
erw [Localization.mk_pow]
instance hasPow : Pow (HomogeneousLocalization 𝒜 x) ℕ where
  pow z n :=
    (Quotient.map' (· ^ n) fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
          change Localization.mk _ _ = Localization.mk _ _
          simp only [num_pow, den_pow]
          convert congr_arg (fun z : at x => z ^ n) h <;> erw [Localization.mk_pow] <;> 

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

Next tactic:
rfl
instance hasPow : Pow (HomogeneousLocalization 𝒜 x) ℕ where
  pow z n :=
    (Quotient.map' (· ^ n) fun c1 c2 (h : Localization.mk _ _ = Localization.mk _ _) => by
          change Localization.mk _ _ = Localization.mk _ _
          simp only [num_pow, den_pow]
          convert congr_arg (fun z : at x => z ^ n) h <;> erw [Localization.mk_pow] <;> 

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

Next tactic:
rfl
instance : SMul α (HomogeneousLocalization 𝒜 x) where
  smul m := Quotient.map' (m • ·) 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
α : 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) }
⊢ Setoid.r ((fun x_1 => m • x_1) c1) ((fun x_1 => m • x_1) c2)

Next tactic:
change Localization.mk _ _ = Localization.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 _ _
    

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 ↑((fun x_1 => m • x_1) c1).num
      { val := ↑((fun x_1 => m • x_1) c1).den, property := (_ : ↑((fun x_1 => m • x_1) c1).den ∈ x) } =
    Localization.mk ↑((fun x_1 => m • x_1) c2).num
      { val := ↑((fun x_1 => m • x_1) c2).den, property := (_ : ↑((fun x_1 => m • x_1) c2).den ∈ x) }

Next tactic:
simp only [num_smul, den_smul]