l3lab/ntp-mathlib huggingface dataset:
private theorem one_smul' (m : LocalizedModule S M) : (1 : Localization S) • m = m := by
  induction' m using LocalizedModule.induction_on with m s
  

Proof state:
case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
s : ↥S
⊢ 1 • mk m s = mk m s

Next tactic:
rw [← Localization.mk_one, mk_smul_mk, one_smul, one_mul]
private theorem mul_smul' (x y : Localization S) (m : LocalizedModule S M) :
    (x * y) • m = x • y • m := by
  

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x y : Localization S
m : LocalizedModule S M
⊢ (x * y) • m = x • y • m

Next tactic:
induction' x using Localization.induction_on with data
private theorem mul_smul' (x y : Localization S) (m : LocalizedModule S M) :
    (x * y) • m = x • y • m := by
  induction' x using Localization.induction_on with data
  

Proof state:
case H
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
y : Localization S
m : LocalizedModule S M
data : R × ↥S
⊢ (Localization.mk data.1 data.2 * y) • m = Localization.mk data.1 data.2 • y • m

Next tactic:
induction' y using Localization.induction_on with data'
private theorem mul_smul' (x y : Localization S) (m : LocalizedModule S M) :
    (x * y) • m = x • y • m := by
  induction' x using Localization.induction_on with data
  induction' y using Localization.induction_on with data'
  

Proof state:
case H.H
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : LocalizedModule S M
data data' : R × ↥S
⊢ (Localization.mk data.1 data.2 * Localization.mk data'.1 data'.2) • m =
    Localization.mk data.1 data.2 • Localization.mk data'.1 data'.2 • m

Next tactic:
rcases data, data' with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
private theorem mul_smul' (x y : Localization S) (m : LocalizedModule S M) :
    (x * y) • m = x • y • m := by
  induction' x using Localization.induction_on with data
  induction' y using Localization.induction_on with data'
  rcases data, data' with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
  

Proof state:
case H.H.mk.mk
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : LocalizedModule S M
r : R
s : ↥S
r' : R
s' : ↥S
⊢ (Localization.mk (r, s).1 (r, s).2 * Localization.mk (r', s').1 (r', s').2) • m =
    Localization.mk (r, s).1 (r, s).2 • Localization.mk (r', s').1 (r', s').2 • m

Next tactic:
induction' m using LocalizedModule.induction_on with m t
private theorem mul_smul' (x y : Localization S) (m : LocalizedModule S M) :
    (x * y) • m = x • y • m := by
  induction' x using Localization.induction_on with data
  induction' y using Localization.induction_on with data'
  rcases data, data' with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
  induction' m using LocalizedModule.induction_on with m t
  

Proof state:
case H.H.mk.mk.h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r : R
s : ↥S
r' : R
s' : ↥S
m : M
t : ↥S
⊢ (Localization.mk (r, s).1 (r, s).2 * Localization.mk (r', s').1 (r', s').2) • mk m t =
    Localization.mk (r, s).1 (r, s).2 • Localization.mk (r', s').1 (r', s').2 • mk m t

Next tactic:
rw [Localization.mk_mul, mk_smul_mk, mk_smul_mk, mk_smul_mk, mul_smul, mul_assoc]
private theorem smul_add' (x : Localization S) (y z : LocalizedModule S M) :
    x • (y + z) = x • y + x • z := by
  

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : Localization S
y z : LocalizedModule S M
⊢ x • (y + z) = x • y + x • z

Next tactic:
induction' x using Localization.induction_on with data
private theorem smul_add' (x : Localization S) (y z : LocalizedModule S M) :
    x • (y + z) = x • y + x • z := by
  induction' x using Localization.induction_on with data
  

Proof state:
case H
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
y z : LocalizedModule S M
data : R × ↥S
⊢ Localization.mk data.1 data.2 • (y + z) = Localization.mk data.1 data.2 • y + Localization.mk data.1 data.2 • z

Next tactic:
rcases data with ⟨r, u⟩
private theorem smul_add' (x : Localization S) (y z : LocalizedModule S M) :
    x • (y + z) = x • y + x • z := by
  induction' x using Localization.induction_on with data
  rcases data with ⟨r, u⟩
  

Proof state:
case H.mk
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
y z : LocalizedModule S M
r : R
u : ↥S
⊢ Localization.mk (r, u).1 (r, u).2 • (y + z) =
    Localization.mk (r, u).1 (r, u).2 • y + Localization.mk (r, u).1 (r, u).2 • z

Next tactic:
induction' y using LocalizedModule.induction_on with m s
private theorem smul_add' (x : Localization S) (y z : LocalizedModule S M) :
    x • (y + z) = x • y + x • z := by
  induction' x using Localization.induction_on with data
  rcases data with ⟨r, u⟩
  induction' y using LocalizedModule.induction_on with m s
  

Proof state:
case H.mk.h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
z : LocalizedModule S M
r : R
u : ↥S
m : M
s : ↥S
⊢ Localization.mk (r, u).1 (r, u).2 • (mk m s + z) =
    Localization.mk (r, u).1 (r, u).2 • mk m s + Localization.mk (r, u).1 (r, u).2 • z

Next tactic:
induction' z using LocalizedModule.induction_on with n t
private theorem smul_add' (x : Localization S) (y z : LocalizedModule S M) :
    x • (y + z) = x • y + x • z := by
  induction' x using Localization.induction_on with data
  rcases data with ⟨r, u⟩
  induction' y using LocalizedModule.induction_on with m s
  induction' z using LocalizedModule.induction_on with n t
  

Proof state:
case H.mk.h.h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r : R
u : ↥S
m : M
s : ↥S
n : M
t : ↥S
⊢ Localization.mk (r, u).1 (r, u).2 • (mk m s + mk n t) =
    Localization.mk (r, u).1 (r, u).2 • mk m s + Localization.mk (r, u).1 (r, u).2 • mk n t

Next tactic:
rw [mk_smul_mk, mk_smul_mk, mk_add_mk, mk_smul_mk, mk_add_mk, mk_eq]
private theorem smul_add' (x : Localization S) (y z : LocalizedModule S M) :
    x • (y + z) = x • y + x • z := by
  induction' x using Localization.induction_on with data
  rcases data with ⟨r, u⟩
  induction' y using LocalizedModule.induction_on with m s
  induction' z using LocalizedModule.induction_on with n t
  rw [mk_smul_mk, mk_smul_mk, mk_add_mk, mk_smul_mk, mk_add_mk, mk_eq]
  

Proof state:
case H.mk.h.h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r : R
u : ↥S
m : M
s : ↥S
n : M
t : ↥S
⊢ ∃ u_1,
    u_1 • ((r, u).2 * s * ((r, u).2 * t)) • (r, u).1 • (t • m + s • n) =
      u_1 • ((r, u).2 * (s * t)) • (((r, u).2 * t) • (r, u).1 • m + ((r, u).2 * s) • (r, u).1 • n)

Next tactic:
use 1
private theorem smul_add' (x : Localization S) (y z : LocalizedModule S M) :
    x • (y + z) = x • y + x • z := by
  induction' x using Localization.induction_on with data
  rcases data with ⟨r, u⟩
  induction' y using LocalizedModule.induction_on with m s
  induction' z using LocalizedModule.induction_on with n t
  rw [mk_smul_mk, mk_smul_mk, mk_add_mk, mk_smul_mk, mk_add_mk, mk_eq]
  use 1
  

Proof state:
case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r : R
u : ↥S
m : M
s : ↥S
n : M
t : ↥S
⊢ 1 • ((r, u).2 * s * ((r, u).2 * t)) • (r, u).1 • (t • m + s • n) =
    1 • ((r, u).2 * (s * t)) • (((r, u).2 * t) • (r, u).1 • m + ((r, u).2 * s) • (r, u).1 • n)

Next tactic:
simp only [one_smul, smul_add, ← mul_smul, Submonoid.smul_def, Submonoid.coe_mul]
private theorem smul_add' (x : Localization S) (y z : LocalizedModule S M) :
    x • (y + z) = x • y + x • z := by
  induction' x using Localization.induction_on with data
  rcases data with ⟨r, u⟩
  induction' y using LocalizedModule.induction_on with m s
  induction' z using LocalizedModule.induction_on with n t
  rw [mk_smul_mk, mk_smul_mk, mk_add_mk, mk_smul_mk, mk_add_mk, mk_eq]
  use 1
  simp only [one_smul, smul_add, ← mul_smul, Submonoid.smul_def, Submonoid.coe_mul]
  

Proof state:
case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r : R
u : ↥S
m : M
s : ↥S
n : M
t : ↥S
⊢ (↑u * ↑s * (↑u * ↑t) * (r * ↑t)) • m + (↑u * ↑s * (↑u * ↑t) * (r * ↑s)) • n =
    (↑u * (↑s * ↑t) * (↑u * ↑t * r)) • m + (↑u * (↑s * ↑t) * (↑u * ↑s * r)) • n

Next tactic:
ring_nf
private theorem smul_zero' (x : Localization S) : x • (0 : LocalizedModule S M) = 0 := by
  

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : Localization S
⊢ x • 0 = 0

Next tactic:
induction' x using Localization.induction_on with data
private theorem smul_zero' (x : Localization S) : x • (0 : LocalizedModule S M) = 0 := by
  induction' x using Localization.induction_on with data
  

Proof state:
case H
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
data : R × ↥S
⊢ Localization.mk data.1 data.2 • 0 = 0

Next tactic:
rcases data with ⟨r, s⟩
private theorem smul_zero' (x : Localization S) : x • (0 : LocalizedModule S M) = 0 := by
  induction' x using Localization.induction_on with data
  rcases data with ⟨r, s⟩
  

Proof state:
case H.mk
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r : R
s : ↥S
⊢ Localization.mk (r, s).1 (r, s).2 • 0 = 0

Next tactic:
rw [← zero_mk s, mk_smul_mk, smul_zero, zero_mk, zero_mk]
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x y : Localization S
z : LocalizedModule S M
⊢ (x + y) • z = x • z + y • z

Next tactic:
induction' x using Localization.induction_on with datax
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  induction' x using Localization.induction_on with datax
  

Proof state:
case H
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
y : Localization S
z : LocalizedModule S M
datax : R × ↥S
⊢ (Localization.mk datax.1 datax.2 + y) • z = Localization.mk datax.1 datax.2 • z + y • z

Next tactic:
induction' y using Localization.induction_on with datay
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  induction' x using Localization.induction_on with datax
  induction' y using Localization.induction_on with datay
  

Proof state:
case H.H
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
z : LocalizedModule S M
datax datay : R × ↥S
⊢ (Localization.mk datax.1 datax.2 + Localization.mk datay.1 datay.2) • z =
    Localization.mk datax.1 datax.2 • z + Localization.mk datay.1 datay.2 • z

Next tactic:
induction' z using LocalizedModule.induction_on with m t
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  induction' x using Localization.induction_on with datax
  induction' y using Localization.induction_on with datay
  induction' z using LocalizedModule.induction_on with m t
  

Proof state:
case H.H.h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
datax datay : R × ↥S
m : M
t : ↥S
⊢ (Localization.mk datax.1 datax.2 + Localization.mk datay.1 datay.2) • mk m t =
    Localization.mk datax.1 datax.2 • mk m t + Localization.mk datay.1 datay.2 • mk m t

Next tactic:
rcases datax, datay with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  induction' x using Localization.induction_on with datax
  induction' y using Localization.induction_on with datay
  induction' z using LocalizedModule.induction_on with m t
  rcases datax, datay with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
  

Proof state:
case H.H.h.mk.mk
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
t : ↥S
r : R
s : ↥S
r' : R
s' : ↥S
⊢ (Localization.mk (r, s).1 (r, s).2 + Localization.mk (r', s').1 (r', s').2) • mk m t =
    Localization.mk (r, s).1 (r, s).2 • mk m t + Localization.mk (r', s').1 (r', s').2 • mk m t

Next tactic:
rw [Localization.add_mk, mk_smul_mk, mk_smul_mk, mk_smul_mk, mk_add_mk, mk_eq]
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  induction' x using Localization.induction_on with datax
  induction' y using Localization.induction_on with datay
  induction' z using LocalizedModule.induction_on with m t
  rcases datax, datay with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
  rw [Localization.add_mk, mk_smul_mk, mk_smul_mk, mk_smul_mk, mk_add_mk, mk_eq]
  

Proof state:
case H.H.h.mk.mk
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
t : ↥S
r : R
s : ↥S
r' : R
s' : ↥S
⊢ ∃ u,
    u • ((r, s).2 * t * ((r', s').2 * t)) • (↑(r, s).2 * (r', s').1 + ↑(r', s').2 * (r, s).1) • m =
      u • ((r, s).2 * (r', s').2 * t) • (((r', s').2 * t) • (r, s).1 • m + ((r, s).2 * t) • (r', s').1 • m)

Next tactic:
use 1
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  induction' x using Localization.induction_on with datax
  induction' y using Localization.induction_on with datay
  induction' z using LocalizedModule.induction_on with m t
  rcases datax, datay with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
  rw [Localization.add_mk, mk_smul_mk, mk_smul_mk, mk_smul_mk, mk_add_mk, mk_eq]
  use 1
  

Proof state:
case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
t : ↥S
r : R
s : ↥S
r' : R
s' : ↥S
⊢ 1 • ((r, s).2 * t * ((r', s').2 * t)) • (↑(r, s).2 * (r', s').1 + ↑(r', s').2 * (r, s).1) • m =
    1 • ((r, s).2 * (r', s').2 * t) • (((r', s').2 * t) • (r, s).1 • m + ((r, s).2 * t) • (r', s').1 • m)

Next tactic:
simp only [one_smul, add_smul, smul_add, ← mul_smul, Submonoid.smul_def, Submonoid.coe_mul,
    Submonoid.coe_one]
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  induction' x using Localization.induction_on with datax
  induction' y using Localization.induction_on with datay
  induction' z using LocalizedModule.induction_on with m t
  rcases datax, datay with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
  rw [Localization.add_mk, mk_smul_mk, mk_smul_mk, mk_smul_mk, mk_add_mk, mk_eq]
  use 1
  simp only [one_smul, add_smul, smul_add, ← mul_smul, Submonoid.smul_def, Submonoid.coe_mul,
    Submonoid.coe_one]
  

Proof state:
case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
t : ↥S
r : R
s : ↥S
r' : R
s' : ↥S
⊢ (↑s * ↑t * (↑s' * ↑t) * (↑s * r')) • m + (↑s * ↑t * (↑s' * ↑t) * (↑s' * r)) • m =
    (↑s * ↑s' * ↑t * (↑s' * ↑t * r)) • m + (↑s * ↑s' * ↑t * (↑s * ↑t * r')) • m

Next tactic:
rw [add_comm]
private theorem add_smul' (x y : Localization S) (z : LocalizedModule S M) :
    (x + y) • z = x • z + y • z := by
  induction' x using Localization.induction_on with datax
  induction' y using Localization.induction_on with datay
  induction' z using LocalizedModule.induction_on with m t
  rcases datax, datay with ⟨⟨r, s⟩, ⟨r', s'⟩⟩
  rw [Localization.add_mk, mk_smul_mk, mk_smul_mk, mk_smul_mk, mk_add_mk, mk_eq]
  use 1
  simp only [one_smul, add_smul, smul_add, ← mul_smul, Submonoid.smul_def, Submonoid.coe_mul,
    Submonoid.coe_one]
  rw [add_comm]
  -- Commutativity of addition in the module is not applied by `Ring`.
  

Proof state:
case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
t : ↥S
r : R
s : ↥S
r' : R
s' : ↥S
⊢ (↑s * ↑t * (↑s' * ↑t) * (↑s' * r)) • m + (↑s * ↑t * (↑s' * ↑t) * (↑s * r')) • m =
    (↑s * ↑s' * ↑t * (↑s' * ↑t * r)) • m + (↑s * ↑s' * ↑t * (↑s * ↑t * r')) • m

Next tactic:
ring_nf
private theorem zero_smul' (x : LocalizedModule S M) : (0 : Localization S) • x = 0 := by
  

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : LocalizedModule S M
⊢ 0 • x = 0

Next tactic:
induction' x using LocalizedModule.induction_on with m s
private theorem zero_smul' (x : LocalizedModule S M) : (0 : Localization S) • x = 0 := by
  induction' x using LocalizedModule.induction_on with m s
  

Proof state:
case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
s : ↥S
⊢ 0 • mk m s = 0

Next tactic:
rw [← Localization.mk_zero s, mk_smul_mk, zero_smul, zero_mk]
@[simp]
theorem mk_cancel_common_left (s' s : S) (m : M) : mk (s' • m) (s' * s) = mk m s :=
  mk_eq.mpr
    ⟨1, by
      

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s' s : ↥S
m : M
⊢ 1 • s • s' • m = 1 • (s' * s) • m

Next tactic:
simp only [mul_smul, one_smul]
@[simp]
theorem mk_cancel_common_left (s' s : S) (m : M) : mk (s' • m) (s' * s) = mk m s :=
  mk_eq.mpr
    ⟨1, by
      simp only [mul_smul, one_smul]
      

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s' s : ↥S
m : M
⊢ s • s' • m = s' • s • m

Next tactic:
rw [smul_comm]
@[simp]
theorem mk_cancel (s : S) (m : M) : mk (s • m) s = mk m 1 :=
  mk_eq.mpr ⟨1, by 

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : ↥S
m : M
⊢ 1 • 1 • s • m = 1 • s • m

Next tactic:
simp
@[simp]
theorem mk_cancel_common_right (s s' : S) (m : M) : mk (s' • m) (s * s') = mk m s :=
  mk_eq.mpr ⟨1, by 

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s s' : ↥S
m : M
⊢ 1 • s • s' • m = 1 • (s * s') • m

Next tactic:
simp [mul_smul]
theorem smul'_mk (r : R) (s : S) (m : M) : r • mk m s = mk (r • m) s := by
  

Proof state:
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r : R
s : ↥S
m : M
⊢ r • mk m s = mk (r • m) s

Next tactic:
erw [mk_smul_mk r m 1 s, one_mul]
instance {A : Type*} [Semiring A] [Algebra R A] :
    Algebra (Localization S) (LocalizedModule S A) :=
  Algebra.ofModule
    (by
      

Proof state:
R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
⊢ ∀ (r : Localization S) (x y : LocalizedModule S A), r • x * y = r • (x * y)

Next tactic:
intro r x₁ x₂
instance {A : Type*} [Semiring A] [Algebra R A] :
    Algebra (Localization S) (LocalizedModule S A) :=
  Algebra.ofModule
    (by
      intro r x₁ x₂
      

Proof state:
R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
r : Localization S
x₁ x₂ : LocalizedModule S A
⊢ r • x₁ * x₂ = r • (x₁ * x₂)

Next tactic:
obtain ⟨y, s, rfl : IsLocalization.mk' _ y s = r⟩ := IsLocalization.mk'_surjective S r
instance {A : Type*} [Semiring A] [Algebra R A] :
    Algebra (Localization S) (LocalizedModule S A) :=
  Algebra.ofModule
    (by
      intro r x₁ x₂
      obtain ⟨y, s, rfl : IsLocalization.mk' _ y s = r⟩ := IsLocalization.mk'_surjective S r
      

Proof state:
case intro.intro
R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
x₁ x₂ : LocalizedModule S A
y : R
s : ↥S
⊢ IsLocalization.mk' (Localization S) y s • x₁ * x₂ = IsLocalization.mk' (Localization S) y s • (x₁ * x₂)

Next tactic:
obtain ⟨⟨a₁, s₁⟩, rfl : mk a₁ s₁ = x₁⟩ := Quotient.exists_rep x₁
instance {A : Type*} [Semiring A] [Algebra R A] :
    Algebra (Localization S) (LocalizedModule S A) :=
  Algebra.ofModule
    (by
      intro r x₁ x₂
      obtain ⟨y, s, rfl : IsLocalization.mk' _ y s = r⟩ := IsLocalization.mk'_surjective S r
      obtain ⟨⟨a₁, s₁⟩, rfl : mk a₁ s₁ = x₁⟩ := Quotient.exists_rep x₁
      

Proof state:
case intro.intro.intro.mk
R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
x₂ : LocalizedModule S A
y : R
s : ↥S
a₁ : A
s₁ : ↥S
⊢ IsLocalization.mk' (Localization S) y s • mk a₁ s₁ * x₂ = IsLocalization.mk' (Localization S) y s • (mk a₁ s₁ * x₂)

Next tactic:
obtain ⟨⟨a₂, s₂⟩, rfl : mk a₂ s₂ = x₂⟩ := Quotient.exists_rep x₂
instance {A : Type*} [Semiring A] [Algebra R A] :
    Algebra (Localization S) (LocalizedModule S A) :=
  Algebra.ofModule
    (by
      intro r x₁ x₂
      obtain ⟨y, s, rfl : IsLocalization.mk' _ y s = r⟩ := IsLocalization.mk'_surjective S r
      obtain ⟨⟨a₁, s₁⟩, rfl : mk a₁ s₁ = x₁⟩ := Quotient.exists_rep x₁
      obtain ⟨⟨a₂, s₂⟩, rfl : mk a₂ s₂ = x₂⟩ := Quotient.exists_rep x₂
      

Proof state:
case intro.intro.intro.mk.intro.mk
R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
y : R
s : ↥S
a₁ : A
s₁ : ↥S
a₂ : A
s₂ : ↥S
⊢ IsLocalization.mk' (Localization S) y s • mk a₁ s₁ * mk a₂ s₂ =
    IsLocalization.mk' (Localization S) y s • (mk a₁ s₁ * mk a₂ s₂)

Next tactic:
rw [mk_mul_mk, ← Localization.mk_eq_mk', mk_smul_mk, mk_smul_mk, mk_mul_mk, mul_assoc,
        smul_mul_assoc]
instance {A : Type*} [Semiring A] [Algebra R A] :
    Algebra (Localization S) (LocalizedModule S A) :=
  Algebra.ofModule
    (by
      intro r x₁ x₂
      obtain ⟨y, s, rfl : IsLocalization.mk' _ y s = r⟩ := IsLocalization.mk'_surjective S r
      obtain ⟨⟨a₁, s₁⟩, rfl : mk a₁ s₁ = x₁⟩ := Quotient.exists_rep x₁
      obtain ⟨⟨a₂, s₂⟩, rfl : mk a₂ s₂ = x₂⟩ := Quotient.exists_rep x₂
      rw [mk_mul_mk, ← Localization.mk_eq_mk', mk_smul_mk, mk_smul_mk, mk_mul_mk, mul_assoc,
        smul_mul_assoc])
    (by
      

Proof state:
R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
⊢ ∀ (r : Localization S) (x y : LocalizedModule S A), x * r • y = r • (x * y)

Next tactic:
intro r x₁ x₂
instance {A : Type*} [Semiring A] [Algebra R A] :
    Algebra (Localization S) (LocalizedModule S A) :=
  Algebra.ofModule
    (by
      intro r x₁ x₂
      obtain ⟨y, s, rfl : IsLocalization.mk' _ y s = r⟩ := IsLocalization.mk'_surjective S r
      obtain ⟨⟨a₁, s₁⟩, rfl : mk a₁ s₁ = x₁⟩ := Quotient.exists_rep x₁
      obtain ⟨⟨a₂, s₂⟩, rfl : mk a₂ s₂ = x₂⟩ := Quotient.exists_rep x₂
      rw [mk_mul_mk, ← Localization.mk_eq_mk', mk_smul_mk, mk_smul_mk, mk_mul_mk, mul_assoc,
        smul_mul_assoc])
    (by
      intro r x₁ x₂
      

Proof state:
R : Type u
inst✝⁴ : CommSemiring R
S : Submonoid R
M : Type v
inst✝³ : AddCommMonoid M
inst✝² : Module R M
A : Type u_1
inst✝¹ : Semiring A
inst✝ : Algebra R A
r : Localization S
x₁ x₂ : LocalizedModule S A
⊢ x₁ * r • x₂ = r • (x₁ * x₂)

Next tactic:
obtain ⟨y, s, rfl : IsLocalization.mk' _ y s = r⟩ := IsLocalization.mk'_surjective S r