l3lab/ntp-mathlib huggingface dataset:
protected theorem zero_mul (x : R[S⁻¹]) : 0 * x = 0 := by
  induction' x using OreLocalization.ind with r s
  

Proof state:
case c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r : R
s : ↥S
⊢ 0 * (r /ₒ s) = 0

Next tactic:
rw [OreLocalization.zero_def, oreDiv_mul_char 0 r 1 s r 1 (by simp)]
protected theorem zero_mul (x : R[S⁻¹]) : 0 * x = 0 := by
  induction' x using OreLocalization.ind with r s
  rw [OreLocalization.zero_def, oreDiv_mul_char 0 r 1 s r 1 (by 

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r : R
s : ↥S
⊢ r * ↑1 = ↑1 * r

Next tactic:
simp
protected theorem zero_mul (x : R[S⁻¹]) : 0 * x = 0 := by
  induction' x using OreLocalization.ind with r s
  rw [OreLocalization.zero_def, oreDiv_mul_char 0 r 1 s r 1 (by simp)]; 

Proof state:
case c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r : R
s : ↥S
⊢ 0 * r /ₒ (s * 1) = 0 /ₒ 1

Next tactic:
simp
protected theorem mul_zero (x : R[S⁻¹]) : x * 0 = 0 := by
  

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
x : OreLocalization R S
⊢ x * 0 = 0

Next tactic:
induction' x using OreLocalization.ind with r s
protected theorem mul_zero (x : R[S⁻¹]) : x * 0 = 0 := by
  induction' x using OreLocalization.ind with r s
  

Proof state:
case c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r : R
s : ↥S
⊢ r /ₒ s * 0 = 0

Next tactic:
rw [OreLocalization.zero_def, oreDiv_mul_char r 0 s 1 0 1 (by simp)]
protected theorem mul_zero (x : R[S⁻¹]) : x * 0 = 0 := by
  induction' x using OreLocalization.ind with r s
  rw [OreLocalization.zero_def, oreDiv_mul_char r 0 s 1 0 1 (by 

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r : R
s : ↥S
⊢ 0 * ↑1 = ↑s * 0

Next tactic:
simp
protected theorem mul_zero (x : R[S⁻¹]) : x * 0 = 0 := by
  induction' x using OreLocalization.ind with r s
  rw [OreLocalization.zero_def, oreDiv_mul_char r 0 s 1 0 1 (by simp)]; 

Proof state:
case c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r : R
s : ↥S
⊢ r * 0 /ₒ (1 * 1) = 0 /ₒ 1

Next tactic:
simp
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
x y z : OreLocalization R S
⊢ x * (y + z) = x * y + x * z

Next tactic:
induction' x using OreLocalization.ind with r₁ s₁
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  

Proof state:
case c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
y z : OreLocalization R S
r₁ : R
s₁ : ↥S
⊢ r₁ /ₒ s₁ * (y + z) = r₁ /ₒ s₁ * y + r₁ /ₒ s₁ * z

Next tactic:
induction' y using OreLocalization.ind with r₂ s₂
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  

Proof state:
case c.c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
z : OreLocalization R S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
⊢ r₁ /ₒ s₁ * (r₂ /ₒ s₂ + z) = r₁ /ₒ s₁ * (r₂ /ₒ s₂) + r₁ /ₒ s₁ * z

Next tactic:
induction' z using OreLocalization.ind with r₃ s₃
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  

Proof state:
case c.c.c
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
⊢ r₁ /ₒ s₁ * (r₂ /ₒ s₂ + r₃ /ₒ s₃) = r₁ /ₒ s₁ * (r₂ /ₒ s₂) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  

Proof state:
case c.c.c.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
q : r₂ /ₒ s₂ + r₃ /ₒ s₃ = (r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)
⊢ r₁ /ₒ s₁ * (r₂ /ₒ s₂ + r₃ /ₒ s₃) = r₁ /ₒ s₁ * (r₂ /ₒ s₂) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
rw [q]
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  

Proof state:
case c.c.c.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
q : r₂ /ₒ s₂ + r₃ /ₒ s₃ = (r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = r₁ /ₒ s₁ * (r₂ /ₒ s₂) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
clear q
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  

Proof state:
case c.c.c.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = r₁ /ₒ s₁ * (r₂ /ₒ s₂) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
rw [OreLocalization.expand' r₂ s₂ sa]
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  

Proof state:
case c.c.c.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = r₁ /ₒ s₁ * (r₂ * ↑sa /ₒ (s₂ * sa)) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
q : r₁ /ₒ s₁ * (r₂ * ↑sa /ₒ (s₂ * sa)) = r₁ * rb /ₒ (s₂ * sa * sb)
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = r₁ /ₒ s₁ * (r₂ * ↑sa /ₒ (s₂ * sa)) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
rw [q]
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
q : r₁ /ₒ s₁ * (r₂ * ↑sa /ₒ (s₂ * sa)) = r₁ * rb /ₒ (s₂ * sa * sb)
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = r₁ * rb /ₒ (s₂ * sa * sb) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
clear q
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = r₁ * rb /ₒ (s₂ * sa * sb) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
⊢ ↑s₃ * (ra * ↑sb) ∈ S

Next tactic:
rw [← mul_assoc, ← ha]
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
⊢ ↑s₂ * ↑sa * ↑sb ∈ S

Next tactic:
norm_cast
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
⊢ ↑(s₂ * sa * sb) ∈ S

Next tactic:
apply SetLike.coe_mem
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = r₁ * rb /ₒ (s₂ * sa * sb) + r₁ /ₒ s₁ * (r₃ /ₒ s₃)

Next tactic:
rw [OreLocalization.expand _ _ _ hs₃rasb]
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  rw [OreLocalization.expand _ _ _ hs₃rasb]
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) =
    r₁ * rb /ₒ (s₂ * sa * sb) + r₁ /ₒ s₁ * (r₃ * (ra * ↑sb) /ₒ { val := ↑s₃ * (ra * ↑sb), property := hs₃rasb })

Next tactic:
have ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * sb) := by simp [ha, ← mul_assoc]
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  rw [OreLocalization.expand _ _ _ hs₃rasb]
  have ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * sb) := by 

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
⊢ ↑(s₂ * sa * sb) = ↑s₃ * (ra * ↑sb)

Next tactic:
simp [ha, ← mul_assoc]
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  rw [OreLocalization.expand _ _ _ hs₃rasb]
  have ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * sb) := by simp [ha, ← mul_assoc]
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * ↑sb)
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) =
    r₁ * rb /ₒ (s₂ * sa * sb) + r₁ /ₒ s₁ * (r₃ * (ra * ↑sb) /ₒ { val := ↑s₃ * (ra * ↑sb), property := hs₃rasb })

Next tactic:
rw [← Subtype.coe_eq_of_eq_mk ha']
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  rw [OreLocalization.expand _ _ _ hs₃rasb]
  have ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * sb) := by simp [ha, ← mul_assoc]
  rw [← Subtype.coe_eq_of_eq_mk ha']
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * ↑sb)
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) =
    r₁ * rb /ₒ (s₂ * sa * sb) + r₁ /ₒ s₁ * (r₃ * (ra * ↑sb) /ₒ (s₂ * sa * sb))

Next tactic:
rcases oreDivMulChar' r₁ (r₃ * (ra * sb)) s₁ (s₂ * sa * sb) with ⟨rc, sc, hc, hc'⟩
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  rw [OreLocalization.expand _ _ _ hs₃rasb]
  have ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * sb) := by simp [ha, ← mul_assoc]
  rw [← Subtype.coe_eq_of_eq_mk ha']
  rcases oreDivMulChar' r₁ (r₃ * (ra * sb)) s₁ (s₂ * sa * sb) with ⟨rc, sc, hc, hc'⟩
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * ↑sb)
rc : R
sc : ↥S
hc : r₃ * (ra * ↑sb) * ↑sc = ↑s₁ * rc
hc' : r₁ /ₒ s₁ * (r₃ * (ra * ↑sb) /ₒ (s₂ * sa * sb)) = r₁ * rc /ₒ (s₂ * sa * sb * sc)
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) =
    r₁ * rb /ₒ (s₂ * sa * sb) + r₁ /ₒ s₁ * (r₃ * (ra * ↑sb) /ₒ (s₂ * sa * sb))

Next tactic:
rw [hc']
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  rw [OreLocalization.expand _ _ _ hs₃rasb]
  have ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * sb) := by simp [ha, ← mul_assoc]
  rw [← Subtype.coe_eq_of_eq_mk ha']
  rcases oreDivMulChar' r₁ (r₃ * (ra * sb)) s₁ (s₂ * sa * sb) with ⟨rc, sc, hc, hc'⟩
  rw [hc']
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * ↑sb)
rc : R
sc : ↥S
hc : r₃ * (ra * ↑sb) * ↑sc = ↑s₁ * rc
hc' : r₁ /ₒ s₁ * (r₃ * (ra * ↑sb) /ₒ (s₂ * sa * sb)) = r₁ * rc /ₒ (s₂ * sa * sb * sc)
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = r₁ * rb /ₒ (s₂ * sa * sb) + r₁ * rc /ₒ (s₂ * sa * sb * sc)

Next tactic:
rw [oreDiv_add_char (s₂ * sa * sb) (s₂ * sa * sb * sc) 1 sc (by simp)]
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  rw [OreLocalization.expand _ _ _ hs₃rasb]
  have ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * sb) := by simp [ha, ← mul_assoc]
  rw [← Subtype.coe_eq_of_eq_mk ha']
  rcases oreDivMulChar' r₁ (r₃ * (ra * sb)) s₁ (s₂ * sa * sb) with ⟨rc, sc, hc, hc'⟩
  rw [hc']
  rw [oreDiv_add_char (s₂ * sa * sb) (s₂ * sa * sb * sc) 1 sc (by 

Proof state:
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * ↑sb)
rc : R
sc : ↥S
hc : r₃ * (ra * ↑sb) * ↑sc = ↑s₁ * rc
hc' : r₁ /ₒ s₁ * (r₃ * (ra * ↑sb) /ₒ (s₂ * sa * sb)) = r₁ * rc /ₒ (s₂ * sa * sb * sc)
⊢ ↑(s₂ * sa * sb) * ↑sc = ↑(s₂ * sa * sb * sc) * 1

Next tactic:
simp
protected theorem left_distrib (x y z : R[S⁻¹]) : x * (y + z) = x * y + x * z := by
  induction' x using OreLocalization.ind with r₁ s₁
  induction' y using OreLocalization.ind with r₂ s₂
  induction' z using OreLocalization.ind with r₃ s₃
  rcases oreDivAddChar' r₂ r₃ s₂ s₃ with ⟨ra, sa, ha, q⟩
  rw [q]
  clear q
  rw [OreLocalization.expand' r₂ s₂ sa]
  rcases oreDivMulChar' r₁ (r₂ * sa) s₁ (s₂ * sa) with ⟨rb, sb, hb, q⟩
  rw [q]
  clear q
  have hs₃rasb : ↑s₃ * (ra * sb) ∈ S := by
    rw [← mul_assoc, ← ha]
    norm_cast
    apply SetLike.coe_mem
  rw [OreLocalization.expand _ _ _ hs₃rasb]
  have ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * sb) := by simp [ha, ← mul_assoc]
  rw [← Subtype.coe_eq_of_eq_mk ha']
  rcases oreDivMulChar' r₁ (r₃ * (ra * sb)) s₁ (s₂ * sa * sb) with ⟨rc, sc, hc, hc'⟩
  rw [hc']
  rw [oreDiv_add_char (s₂ * sa * sb) (s₂ * sa * sb * sc) 1 sc (by simp)]
  

Proof state:
case c.c.c.mk.mk.intro.mk.mk.intro.mk.mk.intro
R : Type u_1
inst✝¹ : Semiring R
S : Submonoid R
inst✝ : OreSet S
r₁ : R
s₁ : ↥S
r₂ : R
s₂ : ↥S
r₃ : R
s₃ : ↥S
ra : R
sa : ↥S
ha : ↑s₂ * ↑sa = ↑s₃ * ra
rb : R
sb : ↥S
hb : r₂ * ↑sa * ↑sb = ↑s₁ * rb
hs₃rasb : ↑s₃ * (ra * ↑sb) ∈ S
ha' : ↑(s₂ * sa * sb) = ↑s₃ * (ra * ↑sb)
rc : R
sc : ↥S
hc : r₃ * (ra * ↑sb) * ↑sc = ↑s₁ * rc
hc' : r₁ /ₒ s₁ * (r₃ * (ra * ↑sb) /ₒ (s₂ * sa * sb)) = r₁ * rc /ₒ (s₂ * sa * sb * sc)
⊢ r₁ /ₒ s₁ * ((r₂ * ↑sa + r₃ * ra) /ₒ (s₂ * sa)) = (r₁ * rb * ↑sc + r₁ * rc * 1) /ₒ (s₂ * sa * sb * sc)

Next tactic:
rw [OreLocalization.expand' (r₂ * ↑sa + r₃ * ra) (s₂ * sa) (sb * sc)]