internlm/Lean-Github huggingface dataset:
Theorem: eq_ratio_of_proportion
Proof state before:
case this.intro
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
⊢ t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
have : (n : ℝ) / m = q := by
  have : (nn : ℝ) / m = q := by exact_mod_cast (q.num_den)
  convert this using 2
  exact_mod_cast Int.toNat_of_nonneg (le_of_lt nn_gt)
Proof state after:
case this.intro
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑n / ↑m = ↑q
⊢ t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Theorem: eq_ratio_of_proportion
Proof state before:
case this.intro
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑n / ↑m = ↑q
⊢ t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
rw [this]
Proof state after:
case this.intro
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑n / ↑m = ↑q
⊢ t / u < ↑q ∧ ↑q < r / s ∧ n ≠ 0 ∧ m ≠ 0
Theorem: eq_ratio_of_proportion
Proof state before:
case this.intro
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑n / ↑m = ↑q
⊢ t / u < ↑q ∧ ↑q < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
exact ⟨hq.1, hq.2, by linarith, m_ne⟩
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
⊢ 0 < q
Tactic:
exact_mod_cast
calc (0 : ℝ) ≤ t / u := by positivity
t / u < q := hq.1
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
⊢ 0 ≤ t / u
Tactic:
positivity
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
⊢ ↑n / ↑m = ↑q
Tactic:
have : (nn : ℝ) / m = q := by exact_mod_cast (q.num_den)
Proof state after:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑nn / ↑m = ↑q
⊢ ↑n / ↑m = ↑q
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑nn / ↑m = ↑q
⊢ ↑n / ↑m = ↑q
Tactic:
convert this using 2
Proof state after:
case h.e'_2.h.e'_5
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑nn / ↑m = ↑q
⊢ ↑n = ↑nn
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_2.h.e'_5
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑nn / ↑m = ↑q
⊢ ↑n = ↑nn
Tactic:
exact_mod_cast Int.toNat_of_nonneg (le_of_lt nn_gt)
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
⊢ ↑nn / ↑m = ↑q
Tactic:
exact_mod_cast (q.num_den)
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
q : ℚ
hq : t / u < ↑q ∧ ↑q < r / s
q_gt : 0 < q
m : ℕ := q.den
m_ne : m ≠ 0
nn : ℤ := q.num
nn_gt : 0 < nn
n : ℕ := Int.toNat nn
n_nn : ↑n = nn
this : ↑n / ↑m = ↑q
⊢ n ≠ 0
Tactic:
linarith
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
⊢ ↑m ≠ 0
Tactic:
exact_mod_cast m_ne
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
⊢ ↑n * s < ↑m * r → ↑n * u < ↑m * t
Tactic:
exact_mod_cast (h m n).2.2
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑n * s < ↑m * r
Tactic:
convert mul_lt_mul hnm_le_tu (by simp : s * m ≤ s * m) (by positivity) (by positivity) using 1
Proof state after:
case h.e'_3
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑n * s = ↑n / ↑m * (s * ↑m)

case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑m * r = r / s * (s * ↑m)
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_3
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑n * s = ↑n / ↑m * (s * ↑m)

case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑m * r = r / s * (s * ↑m)
Tactic:
all_goals (field_simp; ring)
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ s * ↑m ≤ s * ↑m
Tactic:
simp
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ 0 < s * ↑m
Tactic:
positivity
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ 0 ≤ r / s
Tactic:
positivity
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑m * r = r / s * (s * ↑m)
Tactic:
(field_simp; ring)
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑m * r = r / s * (s * ↑m)
Tactic:
field_simp
Proof state after:
case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑m * r * s = r * (s * ↑m)
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
⊢ ↑m * r * s = r * (s * ↑m)
Tactic:
ring
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ t * ↑m < ↑n * u
Tactic:
convert mul_lt_mul hrs_le_nm (by simp : u * m ≤ u * m) (by positivity) (by positivity) using 1
Proof state after:
case h.e'_3
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ t * ↑m = t / u * (u * ↑m)

case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ ↑n * u = ↑n / ↑m * (u * ↑m)
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_3
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ t * ↑m = t / u * (u * ↑m)

case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ ↑n * u = ↑n / ↑m * (u * ↑m)
Tactic:
all_goals (field_simp; ring)
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ u * ↑m ≤ u * ↑m
Tactic:
simp
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ 0 < u * ↑m
Tactic:
positivity
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ 0 ≤ ↑n / ↑m
Tactic:
positivity
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ ↑n * u = ↑n / ↑m * (u * ↑m)
Tactic:
(field_simp; ring)
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ ↑n * u = ↑n / ↑m * (u * ↑m)
Tactic:
field_simp
Proof state after:
case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ ↑n * u * ↑m = ↑n * (u * ↑m)
Theorem: eq_ratio_of_proportion
Proof state before:
case h.e'_4
r s t u : ℝ
s_ne : s ≠ 0
u_ne : u ≠ 0
hr : 0 ≤ r
hs : 0 ≤ s
ht : 0 ≤ t
hu : 0 ≤ u
h :
  ∀ (n m : ℕ),
    (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧ (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
hh : r / s ≠ t / u
rstu : ¬r / s < t / u
turs : t / u < r / s
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑n * s < ↑m * r → ↑n * u < ↑m * t
this✝ : ↑n * s < ↑m * r
this : ↑n * u < ↑m * t
⊢ ↑n * u * ↑m = ↑n * (u * ↑m)
Tactic:
ring
Proof state after:
no goals
Theorem: proportion_inv
Proof state before:
r s t u : ℝ
h : proportion r s t u
⊢ proportion s r u t
Tactic:
dsimp [proportion] at *
Proof state after:
r s t u : ℝ
h :
  0 ≤ r ∧
    0 ≤ s ∧
      0 ≤ t ∧
        0 ≤ u ∧
          ∀ (n m : ℕ),
            (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧
              (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
⊢ 0 ≤ s ∧
    0 ≤ r ∧
      0 ≤ u ∧
        0 ≤ t ∧
          ∀ (n m : ℕ),
            (↑n * s = ↑m * r → ↑n * u = ↑m * t) ∧
              (↑n * s < ↑m * r → ↑n * u < ↑m * t) ∧ (↑m * r < ↑n * s → ↑m * t < ↑n * u)
Theorem: proportion_inv
Proof state before:
r s t u : ℝ
h :
  0 ≤ r ∧
    0 ≤ s ∧
      0 ≤ t ∧
        0 ≤ u ∧
          ∀ (n m : ℕ),
            (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧
              (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
⊢ 0 ≤ s ∧
    0 ≤ r ∧
      0 ≤ u ∧
        0 ≤ t ∧
          ∀ (n m : ℕ),
            (↑n * s = ↑m * r → ↑n * u = ↑m * t) ∧
              (↑n * s < ↑m * r → ↑n * u < ↑m * t) ∧ (↑m * r < ↑n * s → ↑m * t < ↑n * u)
Tactic:
refine ⟨h.2.1, h.1, h.2.2.2.1, h.2.2.1, ?_⟩
Proof state after:
r s t u : ℝ
h :
  0 ≤ r ∧
    0 ≤ s ∧
      0 ≤ t ∧
        0 ≤ u ∧
          ∀ (n m : ℕ),
            (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧
              (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
⊢ ∀ (n m : ℕ),
    (↑n * s = ↑m * r → ↑n * u = ↑m * t) ∧ (↑n * s < ↑m * r → ↑n * u < ↑m * t) ∧ (↑m * r < ↑n * s → ↑m * t < ↑n * u)
Theorem: proportion_inv
Proof state before:
r s t u : ℝ
h :
  0 ≤ r ∧
    0 ≤ s ∧
      0 ≤ t ∧
        0 ≤ u ∧
          ∀ (n m : ℕ),
            (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧
              (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
⊢ ∀ (n m : ℕ),
    (↑n * s = ↑m * r → ↑n * u = ↑m * t) ∧ (↑n * s < ↑m * r → ↑n * u < ↑m * t) ∧ (↑m * r < ↑n * s → ↑m * t < ↑n * u)
Tactic:
intro n m
Proof state after:
r s t u : ℝ
h :
  0 ≤ r ∧
    0 ≤ s ∧
      0 ≤ t ∧
        0 ≤ u ∧
          ∀ (n m : ℕ),
            (↑n * r = ↑m * s → ↑n * t = ↑m * u) ∧
              (↑n * r < ↑m * s → ↑n * t < ↑m * u) ∧ (↑m * s < ↑n * r → ↑m * u < ↑n * t)
n m : ℕ
⊢ (↑n * s = ↑m * r → ↑n * u = ↑m * t) ∧ (↑n * s < ↑m * r → ↑n * u < ↑m * t) ∧ (↑m * r < ↑n * s → ↑m * t < ↑n * u)