[GOAL]
α : Type u_1
inst✝ : CommRing α
n1 n2 k e1 e2 t1 t2 : α
h1 : n1 * e1 = t1
h2 : n2 * e2 = t2
h3 : n1 * n2 = k
⊢ k * (e1 * e2) = t1 * t2
[PROOFSTEP]
rw [← h3, mul_comm n1, mul_assoc n2, ← mul_assoc n1, h1, ← mul_assoc n2, mul_comm n2, mul_assoc, h2]
[GOAL]
α : Type u_1
inst✝ : Field α
n1 n2 k e1 e2 t1 : α
h1 : n1 * e1 = t1
h2 : n2 / e2 = 1
h3 : n1 * n2 = k
⊢ k * (e1 / e2) = t1
[PROOFSTEP]
rw [← h3, mul_assoc, mul_div_left_comm, h2, ← mul_assoc, h1, mul_comm, one_mul]
[GOAL]
α : Type u_1
inst✝ : Field α
n e e' : α
h : n * e = e'
h2 : n ≠ 0
⊢ e * n = e'
[PROOFSTEP]
rwa [mul_comm] at h 
[GOAL]
α : Type u_1
inst✝ : Ring α
n e1 e2 t1 t2 : α
h1 : n * e1 = t1
h2 : n * e2 = t2
⊢ n * (e1 + e2) = t1 + t2
[PROOFSTEP]
simp [left_distrib, *]
[GOAL]
α : Type u_1
inst✝ : Ring α
n e1 e2 t1 t2 : α
h1 : n * e1 = t1
h2 : n * e2 = t2
⊢ n * (e1 - e2) = t1 - t2
[PROOFSTEP]
simp [left_distrib, *, sub_eq_add_neg]
[GOAL]
α : Type u_1
inst✝ : Ring α
n e t : α
h1 : n * e = t
⊢ n * -e = -t
[PROOFSTEP]
simp [*]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedField α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : 0 < ad
hbd : 0 < bd
hgcd : 0 < gcd
⊢ (a < b) = (1 / gcd * (bd * a') < 1 / gcd * (ad * b'))
[PROOFSTEP]
rw [mul_lt_mul_left, ← ha, ← hb, ← mul_assoc, ← mul_assoc, mul_comm bd, mul_lt_mul_left]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedField α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : 0 < ad
hbd : 0 < bd
hgcd : 0 < gcd
⊢ 0 < ad * bd
[PROOFSTEP]
exact mul_pos had hbd
[GOAL]
α : Type u_1
inst✝ : LinearOrderedField α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : 0 < ad
hbd : 0 < bd
hgcd : 0 < gcd
⊢ 0 < 1 / gcd
[PROOFSTEP]
exact one_div_pos.2 hgcd
[GOAL]
α : Type u_1
inst✝ : LinearOrderedField α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : 0 < ad
hbd : 0 < bd
hgcd : 0 < gcd
⊢ (a ≤ b) = (1 / gcd * (bd * a') ≤ 1 / gcd * (ad * b'))
[PROOFSTEP]
rw [mul_le_mul_left, ← ha, ← hb, ← mul_assoc, ← mul_assoc, mul_comm bd, mul_le_mul_left]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedField α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : 0 < ad
hbd : 0 < bd
hgcd : 0 < gcd
⊢ 0 < ad * bd
[PROOFSTEP]
exact mul_pos had hbd
[GOAL]
α : Type u_1
inst✝ : LinearOrderedField α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : 0 < ad
hbd : 0 < bd
hgcd : 0 < gcd
⊢ 0 < 1 / gcd
[PROOFSTEP]
exact one_div_pos.2 hgcd
[GOAL]
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
⊢ (a = b) = (1 / gcd * (bd * a') = 1 / gcd * (ad * b'))
[PROOFSTEP]
rw [← ha, ← hb, ← mul_assoc bd, ← mul_assoc ad, mul_comm bd]
[GOAL]
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
⊢ (a = b) = (1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b))
[PROOFSTEP]
ext
[GOAL]
case a
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
⊢ a = b ↔ 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b)
[PROOFSTEP]
constructor
[GOAL]
case a.mp
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
⊢ a = b → 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b)
[PROOFSTEP]
rintro rfl
[GOAL]
case a.mp
α : Type u_1
inst✝ : Field α
a ad bd a' b' gcd : α
ha : ad * a = a'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
hb : bd * a = b'
⊢ 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * a)
[PROOFSTEP]
rfl
[GOAL]
case a.mpr
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
⊢ 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b) → a = b
[PROOFSTEP]
intro h
[GOAL]
case a.mpr
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * (ad * bd * a) = 1 / gcd * (ad * bd * b)
⊢ a = b
[PROOFSTEP]
simp only [← mul_assoc] at h 
[GOAL]
case a.mpr
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ a = b
[PROOFSTEP]
refine' mul_left_cancel₀ (mul_ne_zero _ _) h
[GOAL]
case a.mpr.refine'_1
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ 1 / gcd * ad ≠ 0
case a.mpr.refine'_2
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ bd ≠ 0
[PROOFSTEP]
apply mul_ne_zero
[GOAL]
case a.mpr.refine'_1.ha
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ 1 / gcd ≠ 0
case a.mpr.refine'_1.hb
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ ad ≠ 0
case a.mpr.refine'_2
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ bd ≠ 0
[PROOFSTEP]
apply div_ne_zero
[GOAL]
case a.mpr.refine'_1.ha.ha
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ 1 ≠ 0
case a.mpr.refine'_1.ha.hb
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ gcd ≠ 0
case a.mpr.refine'_1.hb
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ ad ≠ 0
case a.mpr.refine'_2
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ bd ≠ 0
[PROOFSTEP]
exact one_ne_zero
[GOAL]
case a.mpr.refine'_1.ha.hb
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ gcd ≠ 0
case a.mpr.refine'_1.hb
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ ad ≠ 0
case a.mpr.refine'_2
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ bd ≠ 0
[PROOFSTEP]
all_goals assumption
[GOAL]
case a.mpr.refine'_1.ha.hb
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ gcd ≠ 0
[PROOFSTEP]
assumption
[GOAL]
case a.mpr.refine'_1.hb
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ ad ≠ 0
[PROOFSTEP]
assumption
[GOAL]
case a.mpr.refine'_2
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
h : 1 / gcd * ad * bd * a = 1 / gcd * ad * bd * b
⊢ bd ≠ 0
[PROOFSTEP]
assumption
[GOAL]
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
⊢ (a ≠ b) = (1 / gcd * (bd * a') ≠ 1 / gcd * (ad * b'))
[PROOFSTEP]
classical rw [eq_iff_iff, not_iff_not, cancel_factors_eq ha hb had hbd hgcd]
[GOAL]
α : Type u_1
inst✝ : Field α
a b ad bd a' b' gcd : α
ha : ad * a = a'
hb : bd * b = b'
had : ad ≠ 0
hbd : bd ≠ 0
hgcd : gcd ≠ 0
⊢ (a ≠ b) = (1 / gcd * (bd * a') ≠ 1 / gcd * (ad * b'))
[PROOFSTEP]
rw [eq_iff_iff, not_iff_not, cancel_factors_eq ha hb had hbd hgcd]
