Commit 2024-01-01 07:00 0c9d4118

View on Github →

chore: Generalise monotonicity of multiplication lemmas to semirings (#9369) Many lemmas about BlahOrderedRing α did not mention negation. I could generalise almost all those lemmas to BlahOrderedSemiring α + ExistsAddOfLE α except for a series of five lemmas (left a TODO about them). Now those lemmas apply to things like the naturals. This is not very useful on its own, because those lemmas are trivially true on canonically ordered semirings (they are about multiplication by negative elements, of which there are none, or nonnegativity of squares, but we already know everything is nonnegative), except that I will soon add more complicated inequalities that are based on those, and it would be a shame having to write two versions of each: one for ordered rings, one for canonically ordered semirings. A similar refactor could be made for scalar multiplication, but this PR is big enough already. From LeanAPAP

Estimated changes

deleted theorem dvd_pow
deleted theorem dvd_pow_self
deleted def powMonoidHom
deleted theorem pow_dvd_pow
deleted def zpowGroupHom
added theorem add_sq_le
modified theorem le_iff_exists_nonneg_add
modified theorem max_mul_mul_le_max_mul_max
modified theorem mul_neg_iff
modified theorem mul_nonpos_iff
modified theorem mul_self_nonneg
modified theorem neg_one_lt_zero
added theorem sq_nonneg
modified theorem sub_one_lt
added theorem two_mul_le_add_sq