Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 44e29db

Browse files
committed
feat(algebra/order/ring/defs): negative versions of order lemmas (#18831)
For each of a handful of lemmas with a `0 <` or `0 ≤` assumption, this adds a variant with a `< 0` or `≤ 0` assumption.
1 parent f784cc6 commit 44e29db

3 files changed

Lines changed: 39 additions & 1 deletion

File tree

src/algebra/order/field/basic.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,9 @@ lt_iff_lt_of_le_iff_le $ div_le_iff_of_neg hc
595595
lemma lt_div_iff_of_neg' (hc : c < 0) : a < b / c ↔ b < c * a :=
596596
by rw [mul_comm, lt_div_iff_of_neg hc]
597597

598+
lemma div_le_one_of_ge (h : b ≤ a) (hb : b ≤ 0) : a / b ≤ 1 :=
599+
by simpa only [neg_div_neg_eq] using div_le_one_of_le (neg_le_neg h) (neg_nonneg_of_nonpos hb)
600+
598601
/-! ### Bi-implications of inequalities using inversions -/
599602

600603
lemma inv_le_inv_of_neg (ha : a < 0) (hb : b < 0) : a⁻¹ ≤ b⁻¹ ↔ b ≤ a :=

src/algebra/order/ring/defs.lean

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,22 @@ lemma mul_le_mul_of_nonpos_of_nonpos' (hca : c ≤ a) (hdb : d ≤ b) (ha : a
327327
a * b ≤ c * d :=
328328
(mul_le_mul_of_nonpos_left hdb ha).trans $ mul_le_mul_of_nonpos_right hca hd
329329

330+
/-- Variant of `mul_le_of_le_one_left` for `b` non-positive instead of non-negative. -/
331+
lemma le_mul_of_le_one_left (hb : b ≤ 0) (h : a ≤ 1) : b ≤ a * b :=
332+
by simpa only [one_mul] using mul_le_mul_of_nonpos_right h hb
333+
334+
/-- Variant of `le_mul_of_one_le_left` for `b` non-positive instead of non-negative. -/
335+
lemma mul_le_of_one_le_left (hb : b ≤ 0) (h : 1 ≤ a) : a * b ≤ b :=
336+
by simpa only [one_mul] using mul_le_mul_of_nonpos_right h hb
337+
338+
/-- Variant of `mul_le_of_le_one_right` for `a` non-positive instead of non-negative. -/
339+
lemma le_mul_of_le_one_right (ha : a ≤ 0) (h : b ≤ 1) : a ≤ a * b :=
340+
by simpa only [mul_one] using mul_le_mul_of_nonpos_left h ha
341+
342+
/-- Variant of `le_mul_of_one_le_right` for `a` non-positive instead of non-negative. -/
343+
lemma mul_le_of_one_le_right (ha : a ≤ 0) (h : 1 ≤ b) : a * b ≤ a :=
344+
by simpa only [mul_one] using mul_le_mul_of_nonpos_left h ha
345+
330346
section monotone
331347
variables [preorder β] {f g : β → α}
332348

@@ -568,6 +584,22 @@ by simpa only [mul_neg, neg_lt_neg_iff] using mul_lt_mul_of_pos_right h (neg_pos
568584
lemma mul_pos_of_neg_of_neg {a b : α} (ha : a < 0) (hb : b < 0) : 0 < a * b :=
569585
by simpa only [zero_mul] using mul_lt_mul_of_neg_right ha hb
570586

587+
/-- Variant of `mul_lt_of_lt_one_left` for `b` negative instead of positive. -/
588+
lemma lt_mul_of_lt_one_left (hb : b < 0) (h : a < 1) : b < a * b :=
589+
by simpa only [one_mul] using mul_lt_mul_of_neg_right h hb
590+
591+
/-- Variant of `lt_mul_of_one_lt_left` for `b` negative instead of positive. -/
592+
lemma mul_lt_of_one_lt_left (hb : b < 0) (h : 1 < a) : a * b < b :=
593+
by simpa only [one_mul] using mul_lt_mul_of_neg_right h hb
594+
595+
/-- Variant of `mul_lt_of_lt_one_right` for `a` negative instead of positive. -/
596+
lemma lt_mul_of_lt_one_right (ha : a < 0) (h : b < 1) : a < a * b :=
597+
by simpa only [mul_one] using mul_lt_mul_of_neg_left h ha
598+
599+
/-- Variant of `lt_mul_of_lt_one_right` for `a` negative instead of positive. -/
600+
lemma mul_lt_of_one_lt_right (ha : a < 0) (h : 1 < b) : a * b < a :=
601+
by simpa only [mul_one] using mul_lt_mul_of_neg_left h ha
602+
571603
section monotone
572604
variables [preorder β] {f g : β → α}
573605

src/algebra/order/ring/lemmas.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,10 @@ lemma mul_lt_iff_lt_one_left
548548
a * b < b ↔ a < 1 :=
549549
iff.trans (by rw [one_mul]) (mul_lt_mul_right b0)
550550

551-
/-! Lemmas of the form `1 ≤ b → a ≤ a * b`. -/
551+
/-! Lemmas of the form `1 ≤ b → a ≤ a * b`.
552+
553+
Variants with `< 0` and `≤ 0` instead of `0 <` and `0 ≤` appear in `algebra/order/ring/defs` (which
554+
imports this file) as they need additional results which are not yet available here. -/
552555

553556
lemma mul_le_of_le_one_left [mul_pos_mono α] (hb : 0 ≤ b) (h : a ≤ 1) : a * b ≤ b :=
554557
by simpa only [one_mul] using mul_le_mul_of_nonneg_right h hb

0 commit comments

Comments
 (0)