Skip to content

[Merged by Bors] - chore: Rename pow monotonicity lemmas#9095

Closed
YaelDillies wants to merge 13 commits intomasterfrom
pow_mono
Closed

[Merged by Bors] - chore: Rename pow monotonicity lemmas#9095
YaelDillies wants to merge 13 commits intomasterfrom
pow_mono

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies commented Dec 16, 2023

The names for lemmas about monotonicity of (a ^ ·) and (· ^ n) were a mess. This PR tidies up everything related by following the naming convention for (a * ·) and (· * b). Namely, (a ^ ·) is pow_right and (· ^ n) is pow_left in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.

Renames

Algebra.GroupPower.Order

  • pow_monopow_right_mono
  • pow_le_powpow_le_pow_right
  • pow_le_pow_of_le_leftpow_le_pow_left
  • pow_lt_pow_of_lt_leftpow_lt_pow_left
  • strictMonoOn_powpow_left_strictMonoOn
  • pow_strictMono_rightpow_right_strictMono
  • pow_lt_powpow_lt_pow_right
  • pow_lt_pow_iffpow_lt_pow_iff_right
  • pow_le_pow_iffpow_le_pow_iff_right
  • self_lt_powlt_self_pow
  • strictAnti_powpow_right_strictAnti
  • pow_lt_pow_iff_of_lt_onepow_lt_pow_iff_right_of_lt_one
  • pow_lt_pow_of_lt_onepow_lt_pow_right_of_lt_one
  • lt_of_pow_lt_powlt_of_pow_lt_pow_left
  • le_of_pow_le_powle_of_pow_le_pow_left
  • pow_lt_pow₀pow_lt_pow_right₀

Algebra.GroupPower.CovariantClass

  • pow_le_pow_of_le_left'pow_le_pow_left'
  • nsmul_le_nsmul_of_le_rightnsmul_le_nsmul_right
  • pow_lt_pow'pow_lt_pow_right'
  • nsmul_lt_nsmulnsmul_lt_nsmul_left
  • pow_strictMono_leftpow_right_strictMono'
  • nsmul_strictMono_rightnsmul_left_strictMono
  • StrictMono.pow_right'StrictMono.pow_const
  • StrictMono.nsmul_leftStrictMono.const_nsmul
  • pow_strictMono_right'pow_left_strictMono
  • nsmul_strictMono_leftnsmul_right_strictMono
  • Monotone.pow_rightMonotone.pow_const
  • Monotone.nsmul_leftMonotone.const_nsmul
  • lt_of_pow_lt_pow'lt_of_pow_lt_pow_left'
  • lt_of_nsmul_lt_nsmullt_of_nsmul_lt_nsmul_right
  • pow_le_pow'pow_le_pow_right'
  • nsmul_le_nsmulnsmul_le_nsmul_left
  • pow_le_pow_of_le_one'pow_le_pow_right_of_le_one'
  • nsmul_le_nsmul_of_nonposnsmul_le_nsmul_left_of_nonpos
  • le_of_pow_le_pow'le_of_pow_le_pow_left'
  • le_of_nsmul_le_nsmul'le_of_nsmul_le_nsmul_right'
  • pow_le_pow_iff'pow_le_pow_iff_right'
  • nsmul_le_nsmul_iffnsmul_le_nsmul_iff_left
  • pow_lt_pow_iff'pow_lt_pow_iff_right'
  • nsmul_lt_nsmul_iffnsmul_lt_nsmul_iff_left

Data.Nat.Pow

  • Nat.pow_lt_pow_of_lt_leftNat.pow_lt_pow_left
  • Nat.pow_le_iff_le_leftNat.pow_le_pow_iff_left
  • Nat.pow_lt_iff_lt_leftNat.pow_lt_pow_iff_left

Lemmas added

  • pow_le_pow_iff_left
  • pow_lt_pow_iff_left
  • pow_right_injective
  • pow_right_inj
  • Nat.pow_le_pow_left to have the correct name since Nat.pow_le_pow_of_le_left is in Std.
  • Nat.pow_le_pow_right to have the correct name since Nat.pow_le_pow_of_le_right is in Std.

Lemmas removed

  • self_le_pow was a duplicate of le_self_pow.
  • Nat.pow_lt_pow_of_lt_right is defeq to pow_lt_pow_right.
  • Nat.pow_right_strictMono is defeq to pow_right_strictMono.
  • Nat.pow_le_iff_le_right is defeq to pow_le_pow_iff_right.
  • Nat.pow_lt_iff_lt_right is defeq to pow_lt_pow_iff_right.

Other changes

  • A bunch of proofs have been golfed.
  • Some lemma assumptions have been turned from 0 < n or 1 ≤ n to n ≠ 0.
  • A few Nat lemmas have been protected.
  • One docstring has been fixed.

Open in Gitpod

The names for lemmas about monotonicity of `(a ^ ·)` and `(· ^ n)` were a mess. This PR tidies up everything related by following the naming convention for `(a * ·)` and `(· * b)`. Namely,
`(a ^ ·)` is `pow_right` and `(· ^ n)` is `pow_left` in lemma names. All lemma renames follow the
corresponding multiplication lemma names closely.

## Renames

### `Algebra.GroupPower.Order`

* `pow_mono` → `pow_right_mono`
* `pow_le_pow` → `pow_le_pow_right`
* `pow_le_pow_of_le_left` → `pow_le_pow_left`
* `pow_lt_pow_of_lt_left` → `pow_lt_pow_left`
* `strictMonoOn_pow` → `pow_left_strictMonoOn`
* `pow_strictMono_right` → `pow_right_strictMono`
* `pow_lt_pow` → `pow_lt_pow_right`
* `pow_lt_pow_iff` → `pow_lt_pow_iff_right`
* `pow_le_pow_iff` → `pow_le_pow_iff_right`
* `self_lt_pow` → `lt_self_pow`
* `strictAnti_pow` → `pow_right_strictAnti`
* `pow_lt_pow_iff_of_lt_one` → `pow_lt_pow_iff_right_of_lt_one`
* `pow_lt_pow_of_lt_one` → `pow_lt_pow_right_of_lt_one`
* `lt_of_pow_lt_pow` → `lt_of_pow_lt_pow_left`
* `le_of_pow_le_pow` → `le_of_pow_le_pow_left`

### `Algebra.GroupPower.CovariantClass`

* `pow_lt_pow'` → `pow_lt_pow_right'`
* `pow_strictMono_left` → `pow_right_strictMono'`
* `nsmul_strictMono_right` → `nsmul_left_strictMono`
* `StrictMono.pow_right'` → `StrictMono.pow_const`
* `StrictMono.nsmul_left` → `StrictMono.const_nsmul`
* `pow_strictMono_right'` → `pow_left_strictMono`
* `nsmul_strictMono_left` → `nsmul_right_strictMono`
* `Monotone.pow_right` → `Monotone.const_nsmul`

### `Data.Nat.Pow`

* `Nat.pow_lt_pow_of_lt_left` → `Nat.pow_lt_pow_left`
* `Nat.pow_le_iff_le_left` → `Nat.pow_le_pow_iff_left`
* `Nat.pow_lt_iff_lt_left` → `Nat.pow_lt_pow_iff_left`

## Lemmas added

* `pow_le_pow_iff_left`
* `pow_lt_pow_iff_left`
* `pow_right_injective`
* `pow_right_inj`
* `Nat.pow_le_pow_left` to have the correct name since `Nat.pow_le_pow_of_le_left` is in Std.
* `Nat.pow_le_pow_right` to have the correct name since `Nat.pow_le_pow_of_le_right` is in Std.

## Lemmas removed

* `self_le_pow` was a duplicate of `le_self_pow`.
* `Nat.pow_lt_pow_of_lt_right` is defeq to `pow_lt_pow_right`.
* `Nat.pow_right_strictMono` is defeq to `pow_right_strictMono`.
* `Nat.pow_le_iff_le_right` is defeq to `pow_le_pow_iff_right`.
* `Nat.pow_lt_iff_lt_right` is defeq to `pow_lt_pow_iff_right`.

## Other changes

* A bunch of proofs have been golfed.
* Some lemma assumptions have been turned from `0 < n` or `1 ≤ n` to `n ≠ 0`.
* A few `Nat` lemmas have been `protected`.
* One docstring has been fixed.
@YaelDillies YaelDillies added awaiting-review 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 Dec 16, 2023
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 16, 2023
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Dec 16, 2023
@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 Dec 17, 2023
Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Dec 18, 2023
mathlib-bors bot pushed a commit that referenced this pull request Dec 18, 2023
The names for lemmas about monotonicity of `(a ^ ·)` and `(· ^ n)` were a mess. This PR tidies up everything related by following the naming convention for `(a * ·)` and `(· * b)`. Namely, `(a ^ ·)` is `pow_right` and `(· ^ n)` is `pow_left` in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.

## Renames

### `Algebra.GroupPower.Order`

* `pow_mono` → `pow_right_mono`
* `pow_le_pow` → `pow_le_pow_right`
* `pow_le_pow_of_le_left` → `pow_le_pow_left`
* `pow_lt_pow_of_lt_left` → `pow_lt_pow_left`
* `strictMonoOn_pow` → `pow_left_strictMonoOn`
* `pow_strictMono_right` → `pow_right_strictMono`
* `pow_lt_pow` → `pow_lt_pow_right`
* `pow_lt_pow_iff` → `pow_lt_pow_iff_right`
* `pow_le_pow_iff` → `pow_le_pow_iff_right`
* `self_lt_pow` → `lt_self_pow`
* `strictAnti_pow` → `pow_right_strictAnti`
* `pow_lt_pow_iff_of_lt_one` → `pow_lt_pow_iff_right_of_lt_one`
* `pow_lt_pow_of_lt_one` → `pow_lt_pow_right_of_lt_one`
* `lt_of_pow_lt_pow` → `lt_of_pow_lt_pow_left`
* `le_of_pow_le_pow` → `le_of_pow_le_pow_left`
* `pow_lt_pow₀` → `pow_lt_pow_right₀`

### `Algebra.GroupPower.CovariantClass`

* `pow_le_pow_of_le_left'` → `pow_le_pow_left'`
* `nsmul_le_nsmul_of_le_right` → `nsmul_le_nsmul_right`
* `pow_lt_pow'` → `pow_lt_pow_right'`
* `nsmul_lt_nsmul` → `nsmul_lt_nsmul_left`
* `pow_strictMono_left` → `pow_right_strictMono'`
* `nsmul_strictMono_right` → `nsmul_left_strictMono`
* `StrictMono.pow_right'` → `StrictMono.pow_const`
* `StrictMono.nsmul_left` → `StrictMono.const_nsmul`
* `pow_strictMono_right'` → `pow_left_strictMono`
* `nsmul_strictMono_left` → `nsmul_right_strictMono`
* `Monotone.pow_right` → `Monotone.pow_const`
* `Monotone.nsmul_left` → `Monotone.const_nsmul`
* `lt_of_pow_lt_pow'` → `lt_of_pow_lt_pow_left'`
* `lt_of_nsmul_lt_nsmul` → `lt_of_nsmul_lt_nsmul_right`
* `pow_le_pow'` → `pow_le_pow_right'`
* `nsmul_le_nsmul` → `nsmul_le_nsmul_left`
* `pow_le_pow_of_le_one'` → `pow_le_pow_right_of_le_one'`
* `nsmul_le_nsmul_of_nonpos` → `nsmul_le_nsmul_left_of_nonpos`
* `le_of_pow_le_pow'` → `le_of_pow_le_pow_left'`
* `le_of_nsmul_le_nsmul'` → `le_of_nsmul_le_nsmul_right'`
* `pow_le_pow_iff'` → `pow_le_pow_iff_right'`
* `nsmul_le_nsmul_iff` → `nsmul_le_nsmul_iff_left`
* `pow_lt_pow_iff'` → `pow_lt_pow_iff_right'`
* `nsmul_lt_nsmul_iff` → `nsmul_lt_nsmul_iff_left`

### `Data.Nat.Pow`

* `Nat.pow_lt_pow_of_lt_left` → `Nat.pow_lt_pow_left`
* `Nat.pow_le_iff_le_left` → `Nat.pow_le_pow_iff_left`
* `Nat.pow_lt_iff_lt_left` → `Nat.pow_lt_pow_iff_left`

## Lemmas added

* `pow_le_pow_iff_left`
* `pow_lt_pow_iff_left`
* `pow_right_injective`
* `pow_right_inj`
* `Nat.pow_le_pow_left` to have the correct name since `Nat.pow_le_pow_of_le_left` is in Std.
* `Nat.pow_le_pow_right` to have the correct name since `Nat.pow_le_pow_of_le_right` is in Std.

## Lemmas removed

* `self_le_pow` was a duplicate of `le_self_pow`.
* `Nat.pow_lt_pow_of_lt_right` is defeq to `pow_lt_pow_right`.
* `Nat.pow_right_strictMono` is defeq to `pow_right_strictMono`.
* `Nat.pow_le_iff_le_right` is defeq to `pow_le_pow_iff_right`.
* `Nat.pow_lt_iff_lt_right` is defeq to `pow_lt_pow_iff_right`.

## Other changes

* A bunch of proofs have been golfed.
* Some lemma assumptions have been turned from `0 < n` or `1 ≤ n` to `n ≠ 0`.
* A few `Nat` lemmas have been `protected`.
* One docstring has been fixed.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 18, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: Rename pow monotonicity lemmas [Merged by Bors] - chore: Rename pow monotonicity lemmas Dec 18, 2023
@mathlib-bors mathlib-bors bot closed this Dec 18, 2023
@mathlib-bors mathlib-bors bot deleted the pow_mono branch December 18, 2023 08:20
awueth pushed a commit that referenced this pull request Dec 19, 2023
The names for lemmas about monotonicity of `(a ^ ·)` and `(· ^ n)` were a mess. This PR tidies up everything related by following the naming convention for `(a * ·)` and `(· * b)`. Namely, `(a ^ ·)` is `pow_right` and `(· ^ n)` is `pow_left` in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.

## Renames

### `Algebra.GroupPower.Order`

* `pow_mono` → `pow_right_mono`
* `pow_le_pow` → `pow_le_pow_right`
* `pow_le_pow_of_le_left` → `pow_le_pow_left`
* `pow_lt_pow_of_lt_left` → `pow_lt_pow_left`
* `strictMonoOn_pow` → `pow_left_strictMonoOn`
* `pow_strictMono_right` → `pow_right_strictMono`
* `pow_lt_pow` → `pow_lt_pow_right`
* `pow_lt_pow_iff` → `pow_lt_pow_iff_right`
* `pow_le_pow_iff` → `pow_le_pow_iff_right`
* `self_lt_pow` → `lt_self_pow`
* `strictAnti_pow` → `pow_right_strictAnti`
* `pow_lt_pow_iff_of_lt_one` → `pow_lt_pow_iff_right_of_lt_one`
* `pow_lt_pow_of_lt_one` → `pow_lt_pow_right_of_lt_one`
* `lt_of_pow_lt_pow` → `lt_of_pow_lt_pow_left`
* `le_of_pow_le_pow` → `le_of_pow_le_pow_left`
* `pow_lt_pow₀` → `pow_lt_pow_right₀`

### `Algebra.GroupPower.CovariantClass`

* `pow_le_pow_of_le_left'` → `pow_le_pow_left'`
* `nsmul_le_nsmul_of_le_right` → `nsmul_le_nsmul_right`
* `pow_lt_pow'` → `pow_lt_pow_right'`
* `nsmul_lt_nsmul` → `nsmul_lt_nsmul_left`
* `pow_strictMono_left` → `pow_right_strictMono'`
* `nsmul_strictMono_right` → `nsmul_left_strictMono`
* `StrictMono.pow_right'` → `StrictMono.pow_const`
* `StrictMono.nsmul_left` → `StrictMono.const_nsmul`
* `pow_strictMono_right'` → `pow_left_strictMono`
* `nsmul_strictMono_left` → `nsmul_right_strictMono`
* `Monotone.pow_right` → `Monotone.pow_const`
* `Monotone.nsmul_left` → `Monotone.const_nsmul`
* `lt_of_pow_lt_pow'` → `lt_of_pow_lt_pow_left'`
* `lt_of_nsmul_lt_nsmul` → `lt_of_nsmul_lt_nsmul_right`
* `pow_le_pow'` → `pow_le_pow_right'`
* `nsmul_le_nsmul` → `nsmul_le_nsmul_left`
* `pow_le_pow_of_le_one'` → `pow_le_pow_right_of_le_one'`
* `nsmul_le_nsmul_of_nonpos` → `nsmul_le_nsmul_left_of_nonpos`
* `le_of_pow_le_pow'` → `le_of_pow_le_pow_left'`
* `le_of_nsmul_le_nsmul'` → `le_of_nsmul_le_nsmul_right'`
* `pow_le_pow_iff'` → `pow_le_pow_iff_right'`
* `nsmul_le_nsmul_iff` → `nsmul_le_nsmul_iff_left`
* `pow_lt_pow_iff'` → `pow_lt_pow_iff_right'`
* `nsmul_lt_nsmul_iff` → `nsmul_lt_nsmul_iff_left`

### `Data.Nat.Pow`

* `Nat.pow_lt_pow_of_lt_left` → `Nat.pow_lt_pow_left`
* `Nat.pow_le_iff_le_left` → `Nat.pow_le_pow_iff_left`
* `Nat.pow_lt_iff_lt_left` → `Nat.pow_lt_pow_iff_left`

## Lemmas added

* `pow_le_pow_iff_left`
* `pow_lt_pow_iff_left`
* `pow_right_injective`
* `pow_right_inj`
* `Nat.pow_le_pow_left` to have the correct name since `Nat.pow_le_pow_of_le_left` is in Std.
* `Nat.pow_le_pow_right` to have the correct name since `Nat.pow_le_pow_of_le_right` is in Std.

## Lemmas removed

* `self_le_pow` was a duplicate of `le_self_pow`.
* `Nat.pow_lt_pow_of_lt_right` is defeq to `pow_lt_pow_right`.
* `Nat.pow_right_strictMono` is defeq to `pow_right_strictMono`.
* `Nat.pow_le_iff_le_right` is defeq to `pow_le_pow_iff_right`.
* `Nat.pow_lt_iff_lt_right` is defeq to `pow_lt_pow_iff_right`.

## Other changes

* A bunch of proofs have been golfed.
* Some lemma assumptions have been turned from `0 < n` or `1 ≤ n` to `n ≠ 0`.
* A few `Nat` lemmas have been `protected`.
* One docstring has been fixed.
YaelDillies added a commit that referenced this pull request Dec 23, 2023
Add deprecated aliases for all the lemmas removed in #9095
mathlib-bors bot pushed a commit that referenced this pull request Dec 25, 2023
Add deprecated aliases for all the lemmas removed in #9095 and fix a few renames that were botched.
YaelDillies added a commit that referenced this pull request Nov 13, 2024
These new names match the ones introduced in the analogous PR #9095
YaelDillies added a commit that referenced this pull request Nov 13, 2024
These new names match the ones introduced in the analogous PR #9095
mathlib-bors bot pushed a commit that referenced this pull request Nov 13, 2024
These new names match the ones introduced in the analogous PR #9095
mathlib-bors bot pushed a commit that referenced this pull request Nov 13, 2024
These new names match the ones introduced in the analogous PR #9095
mathlib-bors bot pushed a commit that referenced this pull request Nov 13, 2024
These new names match the ones introduced in the analogous PR #9095
TobiasLeichtfried pushed a commit that referenced this pull request Nov 21, 2024
These new names match the ones introduced in the analogous PR #9095
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc) t-order Order theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants