Skip to content

[Merged by Bors] - chore: rename mul_le_mul_right' to mul_le_mul_left#30242

Closed
YaelDillies wants to merge 8 commits intoleanprover-community:masterfrom
YaelDillies:mul_le_mul_left
Closed

[Merged by Bors] - chore: rename mul_le_mul_right' to mul_le_mul_left#30242
YaelDillies wants to merge 8 commits intoleanprover-community:masterfrom
YaelDillies:mul_le_mul_left

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies commented Oct 5, 2025

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 5, 2025

PR summary cf85478f35

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ LinearOrderedCommGroup.mul_lt_mul_right'
+ OrderedAddCommGroup.add_lt_add_left'
+ add_lt_add_left
+ mul_le_mul_iff_left
+ mul_le_mul_iff_right
+ mul_lt_mul_iff_left
+ mul_lt_mul_iff_right
+ nmul_le_nmul
+-+ add_le_add_left
+-- mul_lt_mul_left'
+-- mul_lt_mul_right'
+--+ mul_le_mul_left
+--+ mul_le_mul_right
- add_le_add_right
- add_lt_add_right
- mul_le_mul_left'
- mul_le_mul_right'
-+-+ mul_lt_mul_right
-+-+-+ isOrderedAddMonoid
--++ mul_lt_mul_left

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@YaelDillies YaelDillies added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-algebra Algebra (groups, rings, fields, etc) t-order Order theory labels Oct 5, 2025
@JovanGerb
Copy link
Copy Markdown
Contributor

Why don't you use grw to clean up the proofs?

@YaelDillies
Copy link
Copy Markdown
Contributor Author

YaelDillies commented Oct 10, 2025

I like using calc + gcongr, because it makes the proofs more readable and maintainable, but I am indeed on the lookout for places where grw would be more readable.

@github-actions github-actions bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 12, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 12, 2025
@mathlib4-merge-conflict-bot mathlib4-merge-conflict-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 13, 2025
@mathlib4-merge-conflict-bot
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 13, 2025
YaelDillies added a commit to YaelDillies/mathlib4 that referenced this pull request Oct 13, 2025
Golf many proofs using `grw`, `gcongr`, `cutsat`, `linarith`... For this, tag a few more lemmas with `gcongr`, and make some existing ones stronger.

The goal here is not necessarily to golf (although it usually is the case), but instead to reduce the number of explicit mentions of lemmas, as these are a maintainability concern.

The precise golfs that are performed are motivated by leanprover-community#30242, where four pairs of very basic and widespread lemmas get swapped.
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Oct 13, 2025
@mathlib4-merge-conflict-bot mathlib4-merge-conflict-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 15, 2025
@mathlib4-merge-conflict-bot
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

mathlib-bors bot pushed a commit that referenced this pull request Oct 17, 2025
Golf many proofs using `grw`, `gcongr`, `cutsat`, `linarith`... For this, tag a few more lemmas with `gcongr`, and make some existing ones stronger.

The goal here is not necessarily to golf (although it usually is the case), but instead to reduce the number of explicit mentions of lemmas, as these are a maintainability concern.

The precise golfs that are performed are motivated by #30242, where four pairs of very basic and widespread lemmas get swapped. The best way to reduce the number of swaps needed is to simply not mention the lemmas explicitly.
mathlib-bors bot pushed a commit that referenced this pull request Oct 17, 2025
Golf many proofs using `grw`, `gcongr`, `cutsat`, `linarith`... For this, tag a few more lemmas with `gcongr`, and make some existing ones stronger.

The goal here is not necessarily to golf (although it usually is the case), but instead to reduce the number of explicit mentions of lemmas, as these are a maintainability concern.

The precise golfs that are performed are motivated by #30242, where four pairs of very basic and widespread lemmas get swapped. The best way to reduce the number of swaps needed is to simply not mention the lemmas explicitly.
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 17, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Oct 17, 2025
@github-actions github-actions bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 19, 2025
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 19, 2025
@Vierkantor Vierkantor added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 14, 2025
@YaelDillies YaelDillies added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Nov 15, 2025
@YaelDillies YaelDillies force-pushed the mul_le_mul_left branch 2 times, most recently from 903c787 to 96ab2ad Compare November 18, 2025 09:13
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Nov 18, 2025
Copy link
Copy Markdown
Contributor

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors d=@JovanGerb

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 20, 2025

✌️ JovanGerb can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Nov 20, 2025
Copy link
Copy Markdown
Contributor

@JovanGerb JovanGerb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a ton of these proofs can be golfed with grw, but that need not be done by this PR.

LGTM, just a few comments

Comment on lines +507 to +509
IsOrderedAddMonoid (WithZero α) := by
have := WithZero.addLeftMono zero_le
exact ⟨fun _ _ ↦ add_le_add_left, by simpa [add_comm] using fun _ _ ↦ add_le_add_left⟩
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this get longer?

Copy link
Copy Markdown
Contributor Author

@YaelDillies YaelDillies Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because IsOrderedAddMonoid.mk automatically proves one field from the other, but WithZero.addLeftMono zero_le now proves the other (instead of previously the one)


instance : SMulPosMono ℝ≥0 ℝ≥0∞ where
smul_le_smul_of_nonneg_right _r _ _a _b hab := mul_le_mul_right' (coe_le_coe.2 hab) _
smul_le_smul_of_nonneg_right _r _ _a _b hab := _root_.mul_le_mul_left (coe_le_coe.2 hab) _
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this become _root_.? (same below)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because ENNReal.mul_le_mul_left isn't protected

@YaelDillies
Copy link
Copy Markdown
Contributor Author

I think a ton of these proofs can be golfed with grw, but that need not be done by this PR.

cf the two preliminary PRs. The changes that are left (almost, because I had to do some more changes after merging master several times) all can't be done with grw (because of defeq abuse or similar).

@JovanGerb
Copy link
Copy Markdown
Contributor

(There's a merge conflict now)

@JovanGerb
Copy link
Copy Markdown
Contributor

I would prefer it if you did a git merge master to fix the merge conflict, because then I can verify that nothing major has changed in the meantime. If you force push something, for all I know it could be something completely different.

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Nov 22, 2025
@YaelDillies
Copy link
Copy Markdown
Contributor Author

Sorry but rebasing is useful to me for many other reasons. It's not going away from my workflow. You can use the "Viewed" buttons in the diff view to restrict your attention to the changes that occurred since you last looked at the PR.

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 22, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: rename mul_le_mul_right' to mul_le_mul_left [Merged by Bors] - chore: rename mul_le_mul_right' to mul_le_mul_left Nov 22, 2025
@mathlib-bors mathlib-bors bot closed this Nov 22, 2025
@YaelDillies YaelDillies deleted the mul_le_mul_left branch November 22, 2025 21:39
mathlib-bors bot pushed a commit that referenced this pull request Nov 27, 2025
alok added a commit to alok/mathlib4 that referenced this pull request Mar 17, 2026
…lib4

* 'master' of https://github.com/leanprover-community/mathlib4: (3130 commits)
  feat(SetTheory/ZFC): add `ZFSet.card` (leanprover-community#29365)
  feat: grind annotations for `choose_spec` (leanprover-community#31927)
  chore(scripts): update nolints.json (leanprover-community#31975)
  feat(Analysis): cos (n * π) = (-1) ^ n (leanprover-community#31971)
  chore: rename `mul_le_mul_right'` to `mul_le_mul_left` (leanprover-community#30242)
  chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31955)
  feat(MeasureTheory): ae-measurability notation wrt non-standard sigma-algebra (leanprover-community#31910)
  doc: add missing spaces around doc code blocks (leanprover-community#31917)
  chore: update Mathlib dependencies 2025-11-22 (leanprover-community#31945)
  chore: shortcut instance for `Nat` to be mul-torsion-free (leanprover-community#31027)
  doc(Topology/Algebra/Algebra): outdated TODO (leanprover-community#31944)
  feat(EqHaar): add `addHaar_nnreal_smul` (leanprover-community#31922)
  chore(Algebra): make invertibleInv an instance (leanprover-community#31916)
  chore(Algebra): change two statements in CubicDiscriminant (leanprover-community#31912)
  chore(MeasureTheory): mark `map_dirac`  as simp (leanprover-community#31909)
  feat: `LinearOrder` instance for `Empty` (leanprover-community#31889)
  chore: deprecate all remaining modules in `Analysis/NormedSpace` (leanprover-community#31913)
  feat(SimpleGraph): weaker condition for paths in acyclic graphs (leanprover-community#25814)
  chore: do not set `group` when declaring option (leanprover-community#31888)
  chore: clean up more unused `Decidable*` instances in types (leanprover-community#31934)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-algebra Algebra (groups, rings, fields, etc) t-order Order theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants