Skip to content

Commit aeddc0d

Browse files
b-mehtaTwoFX
andauthored
feat: add lemmas for a / c < b / c on Int (#11327)
This PR adds two lemmas to prove `a / c < b / c`. --------- Co-authored-by: Markus Himmel <[email protected]>
1 parent debafca commit aeddc0d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Init/Data/Int/DivMod/Lemmas.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,6 +1781,16 @@ theorem ediv_lt_ediv_iff_of_dvd_of_neg_of_neg {a b c d : Int} (hb : b < 0) (hd :
17811781
obtain ⟨⟨x, rfl⟩, y, rfl⟩ := hba, hdc
17821782
simp [*, Int.ne_of_lt, d.mul_assoc, b.mul_comm]
17831783

1784+
theorem ediv_lt_ediv_of_lt {a b c : Int} (h : a < b) (hcb : c ∣ b) (hc : 0 < c) :
1785+
a / c < b / c :=
1786+
Int.lt_ediv_of_mul_lt (Int.le_of_lt hc) hcb
1787+
(Int.lt_of_le_of_lt (Int.ediv_mul_le _ (Int.ne_of_gt hc)) h)
1788+
1789+
theorem ediv_lt_ediv_of_lt_of_neg {a b c : Int} (h : b < a) (hca : c ∣ a) (hc : c < 0) :
1790+
a / c < b / c :=
1791+
(Int.ediv_lt_iff_of_dvd_of_neg hc hca).2
1792+
(Int.lt_of_le_of_lt (Int.mul_ediv_self_le (Int.ne_of_lt hc)) h)
1793+
17841794
/-! ### `tdiv` and ordering -/
17851795

17861796
-- Theorems about `tdiv` and ordering, whose `ediv` analogues are in `Bootstrap.lean`.

0 commit comments

Comments
 (0)