internlm/Lean-Github huggingface dataset:
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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
this : ↑m * t < ↑n * u
⊢ ↑m * t = t / u * (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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
this : ↑m * t < ↑n * u
⊢ ↑m * t = t / u * (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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
this : ↑m * t < ↑n * u
⊢ ↑m * t * u = t * (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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
this : ↑m * t < ↑n * u
⊢ ↑m * t * u = t * (u * ↑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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
⊢ 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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
⊢ 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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
⊢ 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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
⊢ ↑n * s = ↑n / ↑m * (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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
⊢ ↑n * s = ↑n / ↑m * (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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
⊢ ↑n * s * ↑m = ↑n * (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
n m : ℕ
hrs_le_nm : r / s < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < t / u
n_ne : n ≠ 0
m_ne : m ≠ 0
m_ne_ℝ : ↑m ≠ 0
mrns : ↑m * r < ↑n * s → ↑m * t < ↑n * u
⊢ ↑n * s * ↑m = ↑n * (s * ↑m)
Tactic:
ring
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
case neg
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
⊢ False
Tactic:
have turs : t / u < r / s := (or_iff_right rstu).mp (lt_or_lt_iff_ne.mpr hh)
Proof state after:
case neg
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
⊢ False
Theorem: eq_ratio_of_proportion
Proof state before:
case neg
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
⊢ False
Tactic:
have : ∃ n m : ℕ, t / u < n / m ∧ (n:ℝ) / m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Proof state after:
case this
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, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0

case neg
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
this : ∃ n m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
⊢ False
Theorem: eq_ratio_of_proportion
Proof state before:
case neg
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
this : ∃ n m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
⊢ False
Tactic:
obtain ⟨n, m, hrs_le_nm, hnm_le_tu, n_ne, m_ne⟩ := this
Proof state after:
case neg.intro.intro.intro.intro.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
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
⊢ False
Theorem: eq_ratio_of_proportion
Proof state before:
case neg.intro.intro.intro.intro.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
n m : ℕ
hrs_le_nm : t / u < ↑n / ↑m
hnm_le_tu : ↑n / ↑m < r / s
n_ne : n ≠ 0
m_ne : m ≠ 0
⊢ False
Tactic:
have m_ne_ℝ : (m : ℝ) ≠ 0 := by exact_mod_cast m_ne
Proof state after:
case neg.intro.intro.intro.intro.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
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
⊢ False
Theorem: eq_ratio_of_proportion
Proof state before:
case neg.intro.intro.intro.intro.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
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
⊢ False
Tactic:
have mrns : (n : ℝ) * s < m * r → (n : ℝ) * u < m * t := by exact_mod_cast (h m n).2.2
Proof state after:
case neg.intro.intro.intro.intro.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
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
⊢ False
Theorem: eq_ratio_of_proportion
Proof state before:
case neg.intro.intro.intro.intro.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
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
⊢ False
Tactic:
have : (n : ℝ) * s < m * r := by
  convert mul_lt_mul hnm_le_tu (by simp : s * m ≤ s * m) (by positivity) (by positivity) using 1
  all_goals (field_simp; ring)
Proof state after:
case neg.intro.intro.intro.intro.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
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
⊢ False
Theorem: eq_ratio_of_proportion
Proof state before:
case neg.intro.intro.intro.intro.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
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
⊢ False
Tactic:
have := mrns this
Proof state after:
case neg.intro.intro.intro.intro.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
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
⊢ False
Theorem: eq_ratio_of_proportion
Proof state before:
case neg.intro.intro.intro.intro.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
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
⊢ False
Tactic:
have : t * m < n * u := by
  convert mul_lt_mul hrs_le_nm (by simp : u * m ≤ u * m) (by positivity) (by positivity) using 1;
  all_goals (field_simp; ring)
Proof state after:
case neg.intro.intro.intro.intro.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
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
this : t * ↑m < ↑n * u
⊢ False
Theorem: eq_ratio_of_proportion
Proof state before:
case neg.intro.intro.intro.intro.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
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
this : t * ↑m < ↑n * u
⊢ False
Tactic:
linarith
Proof state after:
no goals
Theorem: eq_ratio_of_proportion
Proof state before:
case this
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, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
obtain ⟨q, hq⟩ := exists_rat_btwn turs
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
⊢ ∃ n m, 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
⊢ ∃ n m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
have q_gt : (0:ℚ) < q := by exact_mod_cast
  calc (0 : ℝ) ≤ t / u := by positivity
         t / u < q := hq.1
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
⊢ ∃ n m, 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
⊢ ∃ n m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
let m := q.den
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
⊢ ∃ n m, 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
⊢ ∃ n m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
have m_ne : m ≠ 0 := q.den_nz
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
⊢ ∃ n m, 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
⊢ ∃ n m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
let nn := q.num
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
⊢ ∃ n m, 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
⊢ ∃ n m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
have nn_gt : 0 < nn := Rat.num_pos_iff_pos.mpr q_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 m, 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 m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
let n := nn.toNat
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 m, 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 m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
have n_nn : (n:ℤ) = nn := 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
⊢ ∃ n m, 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
⊢ ∃ n m, t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0
Tactic:
use n, m
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
⊢ t / u < ↑n / ↑m ∧ ↑n / ↑m < r / s ∧ n ≠ 0 ∧ m ≠ 0