|
| 1 | +/- |
| 2 | +Copyright (c) 2021 Yury G. Kudryashov. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Yury G. Kudryashov |
| 5 | +-/ |
| 6 | +import Mathlib.Algebra.Order.Ring.Defs |
| 7 | +import Mathlib.Algebra.Invertible |
| 8 | + |
| 9 | +/-! |
| 10 | +# Lemmas about `inv_of` in ordered (semi)rings. |
| 11 | +-/ |
| 12 | + |
| 13 | +variable [LinearOrderedSemiring α] {a : α} |
| 14 | + |
| 15 | +@[simp] |
| 16 | +theorem invOf_pos [Invertible a] : 0 < ⅟ a ↔ 0 < a := |
| 17 | + haveI : 0 < a * ⅟ a := by simp only [mul_invOf_self, zero_lt_one] |
| 18 | + ⟨fun h => pos_of_mul_pos_left this h.le, fun h => pos_of_mul_pos_right this h.le⟩ |
| 19 | +#align inv_of_pos invOf_pos |
| 20 | + |
| 21 | +@[simp] |
| 22 | +theorem invOf_nonpos [Invertible a] : ⅟ a ≤ 0 ↔ a ≤ 0 := by simp only [← not_lt, invOf_pos]; rfl |
| 23 | +#align inv_of_nonpos invOf_nonpos |
| 24 | + |
| 25 | +@[simp] |
| 26 | +theorem invOf_nonneg [Invertible a] : 0 ≤ ⅟ a ↔ 0 ≤ a := |
| 27 | + haveI : 0 < a * ⅟ a := by simp only [mul_invOf_self, zero_lt_one] |
| 28 | + ⟨fun h => (pos_of_mul_pos_left this h).le, fun h => (pos_of_mul_pos_right this h).le⟩ |
| 29 | +#align inv_of_nonneg invOf_nonneg |
| 30 | + |
| 31 | +@[simp] |
| 32 | +theorem invOf_lt_zero [Invertible a] : ⅟ a < 0 ↔ a < 0 := by simp only [← not_le, invOf_nonneg]; rfl |
| 33 | +#align inv_of_lt_zero invOf_lt_zero |
| 34 | + |
| 35 | +@[simp] |
| 36 | +theorem invOf_le_one [Invertible a] (h : 1 ≤ a) : ⅟ a ≤ 1 := |
| 37 | + mul_invOf_self a ▸ le_mul_of_one_le_left (invOf_nonneg.2 <| zero_le_one.trans h) h |
| 38 | +#align inv_of_le_one invOf_le_one |
0 commit comments