Skip to content

chore: rename rpow monotonicity lemmas - #46318

Open
doge-th wants to merge 3 commits into
leanprover-community:masterfrom
doge-th:rename-rpow-monotonicity-lemmas
Open

doge-th wants to merge 3 commits into
leanprover-community:masterfrom
doge-th:rename-rpow-monotonicity-lemmas

Conversation

@doge-th

@doge-th doge-th commented Nov 21, 2026 •

Copy link
Copy Markdown

Following #9095, #9235 and #18956, this renames the ambiguous rpow monotonicity lemma names in Real, NNReal and ENNReal, as requested in #13544.

The convention is the one established for pow/zpow: lemmas monotone in the base (the left argument of ^) gain _left, lemmas monotone in the exponent gain _right, and iff-variants use the _iff_left/_iff_right infixes.

Rename summary:

  • rpow_le_rpow → rpow_le_rpow_left, rpow_lt_rpow → rpow_lt_rpow_left (base varies)
  • rpow_le_rpow_of_nonpos → rpow_le_rpow_left_of_nonpos, rpow_lt_rpow_of_neg → rpow_lt_rpow_left_of_neg (antitone in base)
  • rpow_le_rpow_iff → rpow_le_rpow_iff_left, rpow_lt_rpow_iff → rpow_lt_rpow_iff_left (and the _of_neg variants likewise)
  • rpow_le_rpow_of_exponent_le → rpow_le_rpow_right, rpow_lt_rpow_of_exponent_lt → rpow_lt_rpow_right
  • rpow_le_rpow_of_exponent_ge → rpow_le_rpow_right_of_le_one, rpow_lt_rpow_of_exponent_gt → rpow_lt_rpow_right_of_lt_one (and the '/of_imp variants), matching pow_le_pow_right_of_le_one' and pow_lt_pow_right_of_lt_one₀
  • rpow_le_rpow_left_iff → rpow_le_rpow_iff_right, rpow_lt_rpow_left_iff → rpow_lt_rpow_iff_right, rpow_le_rpow_left_iff_of_base_lt_one → rpow_le_rpow_iff_right_of_base_lt_one, rpow_lt_rpow_left_iff_of_base_lt_one → rpow_lt_rpow_iff_right_of_base_lt_one — these varied the exponent, so keeping them under _left_iff would clash semantically with the new _left names

All uses are updated (50 files, 225 occurrences) and @[deprecated (since := "2026-11-22")] alias entries are added for every old name in the three namespaces.

Closes #13544

Following leanprover-community#9095, leanprover-community#9235 and leanprover-community#18956, this renames the ambiguous rpow
monotonicity lemma names in Real, NNReal and ENNReal. Lemmas monotone in
the base (the left argument of ^) gain the suffix _left, lemmas monotone
in the exponent gain _right, and iff-variants use the _iff_left /
_iff_right infixes. The of_exponent_* spellings become the _right names
matching pow_le_pow_right and friends; the existing rpow_*_left_iff
names, which vary the exponent, become *_iff_right so they no longer
clash with the new *_left names. All uses are updated and deprecated
aliases are added.

Closes leanprover-community#13544
@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Nov 21, 2026
@github-actions

Copy link
Copy Markdown

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to Zulip and join the Lean community.
Thank you again for joining our community.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR summary 10247e41a0

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ rpow_le_rpow_iff_right
+ rpow_le_rpow_iff_right_lt_one
+ rpow_le_rpow_right_of_le_one'
+ rpow_le_rpow_right_of_le_one_of_imp
+ rpow_lt_rpow_iff_right
+ rpow_lt_rpow_iff_right_lt_one
++ rpow_le_rpow_iff_left_of_neg
++ rpow_le_rpow_left_of_nonpos
++ rpow_lt_rpow_iff_left_of_neg
++ rpow_lt_rpow_left_of_neg
+++ rpow_le_rpow_iff_left
+++ rpow_le_rpow_right
+++ rpow_le_rpow_right_of_le_one
+++ rpow_lt_rpow_iff_left
+++ rpow_lt_rpow_left
+++ rpow_lt_rpow_right
+++ rpow_lt_rpow_right_of_lt_one
++++ rpow_le_rpow_left
+++--- rpow_le_rpow_iff
+++--- rpow_le_rpow_of_exponent_le
+++--- rpow_lt_rpow
+++--- rpow_lt_rpow_iff
+++--- rpow_lt_rpow_of_exponent_lt
+++---- rpow_le_rpow
++-- rpow_le_rpow_iff_of_neg
++-- rpow_le_rpow_of_nonpos
++-- rpow_lt_rpow_iff_of_neg
++-- rpow_lt_rpow_of_neg
- rpow_le_rpow_left_iff_of_base_lt_one
- rpow_le_rpow_of_exponent_ge'
- rpow_le_rpow_of_exponent_ge_of_imp
- rpow_lt_rpow_left_iff_of_base_lt_one
--- rpow_le_rpow_of_exponent_ge
--- rpow_lt_rpow_of_exponent_gt

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit 10247e4).

  • +39 new declarations
  • −1 removed declarations
-CFC.rpow_le_rpow
+CFC.rpow_le_rpow_left
+ENNReal.rpow_le_rpow_iff_left
+ENNReal.rpow_le_rpow_left
+ENNReal.rpow_le_rpow_right
+ENNReal.rpow_le_rpow_right_of_le_one
+ENNReal.rpow_lt_rpow_iff_left
+ENNReal.rpow_lt_rpow_left
+ENNReal.rpow_lt_rpow_right
+ENNReal.rpow_lt_rpow_right_of_lt_one
+NNReal.rpow_le_rpow_iff_left
+NNReal.rpow_le_rpow_iff_left_of_neg
+NNReal.rpow_le_rpow_left
+NNReal.rpow_le_rpow_left_of_nonpos
+NNReal.rpow_le_rpow_right
+NNReal.rpow_le_rpow_right_of_le_one
+NNReal.rpow_lt_rpow_iff_left
+NNReal.rpow_lt_rpow_iff_left_of_neg
+NNReal.rpow_lt_rpow_left
+NNReal.rpow_lt_rpow_left_of_neg
+NNReal.rpow_lt_rpow_right
+NNReal.rpow_lt_rpow_right_of_lt_one
+Real.rpow_le_rpow_iff_left
+Real.rpow_le_rpow_iff_left_of_neg
+Real.rpow_le_rpow_iff_right
+Real.rpow_le_rpow_iff_right_lt_one
+Real.rpow_le_rpow_left
+Real.rpow_le_rpow_left_of_nonpos
+Real.rpow_le_rpow_right
+Real.rpow_le_rpow_right_of_le_one
+Real.rpow_le_rpow_right_of_le_one'
+Real.rpow_le_rpow_right_of_le_one_of_imp
+Real.rpow_lt_rpow_iff_left
+Real.rpow_lt_rpow_iff_left_of_neg
+Real.rpow_lt_rpow_iff_right
+Real.rpow_lt_rpow_iff_right_lt_one
+Real.rpow_lt_rpow_left
+Real.rpow_lt_rpow_left_of_neg
+Real.rpow_lt_rpow_right
+Real.rpow_lt_rpow_right_of_lt_one

No changes to strong technical debt.
No changes to weak technical debt.

Current commit 10247e41a0
Reference commit c47f9ad906

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).

These commands made the changes in this commit.
To make the same fixes yourself, run them in your mathlib4 checkout.
@YaelDillies YaelDillies added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 22, 2026
@YaelDillies YaelDillies self-assigned this Nov 22, 2026
Review follow-up: since the exponent mention was dropped from these
names, the base mention goes too.

@YaelDillies YaelDillies left a comment

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.

Thanks! 🚀

maintainer merge

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Nov 23, 2026
@YaelDillies YaelDillies removed their assignment Nov 23, 2026
@YaelDillies YaelDillies removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename rpow_le_rpow

3 participants