Skip to content

Commit 1eb507b

Browse files
committed
feat: add a LE version Rat.lt_one_iff_num_le_denom theorem
The following is more useful due to the partial order application of LE in comparison to LT. Signed-off-by: Plamen Dimitrov <[email protected]>
1 parent ff79675 commit 1eb507b

File tree

1 file changed

+2
-0
lines changed
  • Mathlib/Algebra/Order/Ring/Unbundled

1 file changed

+2
-0
lines changed

Mathlib/Algebra/Order/Ring/Unbundled/Rat.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ theorem div_lt_div_iff_mul_lt_mul {a b c d : ℤ} (b_pos : 0 < b) (d_pos : 0 < d
134134
· simp [div_def', Rat.divInt_le_divInt b_pos d_pos]
135135
· simp [div_def', Rat.divInt_le_divInt d_pos b_pos]
136136

137+
theorem le_one_iff_num_le_denom {q : ℚ} : q ≤ 1 ↔ q.num ≤ q.den := by simp [Rat.le_iff]
138+
137139
theorem lt_one_iff_num_lt_denom {q : ℚ} : q < 1 ↔ q.num < q.den := by simp [Rat.lt_iff]
138140

139141
theorem abs_def (q : ℚ) : |q| = q.num.natAbs /. q.den := by

0 commit comments

Comments
 (0)