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

Commit 10a3faa

Browse files
committed
feat(algebra/order/monoid_lemmas_zero_lt): add lemmas assuming mul_zero_class preorder (#13297)
1 parent fe1c78a commit 10a3faa

File tree

1 file changed

+39
-3
lines changed

1 file changed

+39
-3
lines changed

src/algebra/order/monoid_lemmas_zero_lt.lean

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,42 @@ end preorder
204204

205205
end has_mul_zero
206206

207-
section mul_zero_class_partial_order
208-
variables [mul_zero_class α] [partial_order α]
207+
section mul_zero_class
208+
variables [mul_zero_class α]
209+
210+
section preorder
211+
variables [preorder α]
212+
213+
/-- Assumes left covariance. -/
214+
lemma left.mul_pos [pos_mul_strict_mono α]
215+
(ha : 0 < a) (hb : 0 < b) :
216+
0 < a * b :=
217+
have h : a * 0 < a * b, from mul_lt_mul_left' hb ha,
218+
by rwa [mul_zero] at h
219+
220+
lemma mul_neg_of_pos_of_neg [pos_mul_strict_mono α]
221+
(ha : 0 < a) (hb : b < 0) :
222+
a * b < 0 :=
223+
have h : a * b < a * 0, from mul_lt_mul_left' hb ha,
224+
by rwa [mul_zero] at h
225+
226+
/-- Assumes right covariance. -/
227+
lemma right.mul_pos [mul_pos_strict_mono α]
228+
(ha : 0 < a) (hb : 0 < b) :
229+
0 < a * b :=
230+
have h : 0 * b < a * b, from mul_lt_mul_right' ha hb,
231+
by rwa [zero_mul] at h
232+
233+
lemma mul_neg_of_neg_of_pos [mul_pos_strict_mono α]
234+
(ha : a < 0) (hb : 0 < b) :
235+
a * b < 0 :=
236+
have h : a * b < 0 * b, from mul_lt_mul_right' ha hb,
237+
by rwa [zero_mul] at h
238+
239+
end preorder
240+
241+
section partial_order
242+
variables [partial_order α]
209243

210244
lemma lt_of_mul_lt_mul_left'' [pos_mul_reflect_lt α]
211245
(bc : a * b < a * c) (a0 : 0 ≤ a) :
@@ -225,7 +259,9 @@ begin
225259
{ exact lt_of_mul_lt_mul_right' bc ((ne.symm a₀).le_iff_lt.mp a0) }
226260
end
227261

228-
end mul_zero_class_partial_order
262+
end partial_order
263+
264+
end mul_zero_class
229265

230266
section mul_one_class
231267
variables [mul_one_class α] [has_zero α]

0 commit comments

Comments
 (0)