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

Commit 2c919b0

Browse files
committed
chore(algebra/{ordered_group, linear_ordered_comm_group_with_zero.lean}): rename one lemma, remove more @s (#7895)
The more substantial part of this PR is changing the name of a lemma from `div_lt_div_iff'` to `mul_inv_lt_mul_inv_iff'`: the lemma proves `a * b⁻¹ ≤ c * d⁻¹ ↔ a * d ≤ c * b`. Furthermore, in the same spirit as a couple of my recent short PRs, I am removing a few more `@`, in order to sweep under the rug, later on, a change in typeclass assumptions. This PR only changes a name, which was used only once, and a few proofs, but no statement. On the path towards PR #7645.
1 parent add577d commit 2c919b0

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/algebra/linear_ordered_comm_group_with_zero.lean

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ le_of_le_mul_right h (by simpa [h] using hab)
170170

171171
lemma div_le_div' (a b c d : α) (hb : b ≠ 0) (hd : d ≠ 0) :
172172
a * b⁻¹ ≤ c * d⁻¹ ↔ a * d ≤ c * b :=
173-
begin
174-
by_cases ha : a = 0, { simp [ha] },
175-
by_cases hc : c = 0, { simp [inv_ne_zero hb, hc, hd], },
176-
exact @div_le_div_iff' _ _ (units.mk0 a ha) (units.mk0 b hb) (units.mk0 c hc) (units.mk0 d hd)
177-
end
173+
if ha : a = 0 then by simp [ha] else
174+
if hc : c = 0 then by simp [inv_ne_zero hb, hc, hd] else
175+
show (units.mk0 a ha) * (units.mk0 b hb)⁻¹ ≤ (units.mk0 c hc) * (units.mk0 d hd)⁻¹ ↔
176+
(units.mk0 a ha) * (units.mk0 d hd) ≤ (units.mk0 c hc) * (units.mk0 b hb),
177+
from mul_inv_le_mul_inv_iff'
178178

179179
@[simp] lemma units.zero_lt (u : units α) : (0 : α) < u :=
180180
zero_lt_iff.2 $ u.ne_zero
@@ -184,9 +184,8 @@ have hb : b ≠ 0 := ne_zero_of_lt hab,
184184
have hd : d ≠ 0 := ne_zero_of_lt hcd,
185185
if ha : a = 0 then by { rw [ha, zero_mul, zero_lt_iff], exact mul_ne_zero hb hd } else
186186
if hc : c = 0 then by { rw [hc, mul_zero, zero_lt_iff], exact mul_ne_zero hb hd } else
187-
have hab0 : (units.mk0 a ha) < (units.mk0 b hb) := hab,
188-
have hcd0 : (units.mk0 c hc) < (units.mk0 d hd) := hcd,
189-
by apply mul_lt_mul''' hab0 hcd0
187+
show (units.mk0 a ha) * (units.mk0 c hc) < (units.mk0 b hb) * (units.mk0 d hd),
188+
from mul_lt_mul''' hab hcd
190189

191190
lemma mul_inv_lt_of_lt_mul' (h : x < y * z) : x * z⁻¹ < y :=
192191
have hz : z ≠ 0 := (mul_ne_zero_iff.1 $ ne_zero_of_lt h).2,
@@ -203,10 +202,12 @@ lemma pow_lt_pow' {x : α} {m n : ℕ} (hx : 1 < x) (hmn : m < n) : x ^ m < x ^
203202
by { induction hmn with n hmn ih, exacts [pow_lt_pow_succ hx, lt_trans ih (pow_lt_pow_succ hx)] }
204203

205204
lemma inv_lt_inv'' (ha : a ≠ 0) (hb : b ≠ 0) : a⁻¹ < b⁻¹ ↔ b < a :=
206-
@inv_lt_inv_iff _ _ (units.mk0 a ha) (units.mk0 b hb)
205+
show (units.mk0 a ha)⁻¹ < (units.mk0 b hb)⁻¹ ↔ (units.mk0 b hb) < (units.mk0 a ha),
206+
from inv_lt_inv_iff
207207

208208
lemma inv_le_inv'' (ha : a ≠ 0) (hb : b ≠ 0) : a⁻¹ ≤ b⁻¹ ↔ b ≤ a :=
209-
@inv_le_inv_iff _ _ (units.mk0 a ha) (units.mk0 b hb)
209+
show (units.mk0 a ha)⁻¹ ≤ (units.mk0 b hb)⁻¹ ↔ (units.mk0 b hb) ≤ (units.mk0 a ha),
210+
from inv_le_inv_iff
210211

211212
instance : linear_ordered_add_comm_group_with_top (additive (order_dual α)) :=
212213
{ neg_top := inv_zero,

src/algebra/ordered_group.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ lemma inv_mul_lt_iff_lt_mul_right : c⁻¹ * a < b ↔ a < b * c :=
406406
by rw [inv_mul_lt_iff_lt_mul, mul_comm]
407407

408408
@[to_additive add_neg_le_add_neg_iff]
409-
lemma div_le_div_iff' : a * b⁻¹ ≤ c * d⁻¹ ↔ a * d ≤ c * b :=
409+
lemma mul_inv_le_mul_inv_iff' : a * b⁻¹ ≤ c * d⁻¹ ↔ a * d ≤ c * b :=
410410
begin
411411
split ; intro h,
412412
have := mul_le_mul_right' (mul_le_mul_right' h b) d,

0 commit comments

Comments
 (0)