Skip to content

[Merged by Bors] - feat (RingTheory/PowerSeries/Order) : compute order of power and generalize #23993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from

Conversation

AntoineChambert-Loir
Copy link
Collaborator

@AntoineChambert-Loir AntoineChambert-Loir commented Apr 13, 2025

  • compute order of power of power series
  • generalize order_mul
  • generalize lemmas at the end to [Semiring R] [NoZeroDivisors R] by proving (PowerSeries.X_pow_mul_cancel) that one can divide out by powers on X on both sides
    of an equality.

Open in Gitpod

Copy link

github-actions bot commented Apr 13, 2025

PR summary a61bad53f5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ X_mul_cancel
+ X_mul_inj
+ X_mul_pow_inj
+ X_pow_mul_cancel
+ commute_X_pow
+ instance [Ring R] [IsDomain R] : IsDomain R⟦X⟧
+ le_order_pow
+ mul_X_cancel
+ mul_X_inj
+ mul_X_pow_cancel
+ mul_X_pow_inj
+ order_pow
+ trichotomy_of_mul_eq_mul
- eq_zero_or_eq_zero_of_mul_eq_zero
- instance [IsDomain R] : IsDomain R⟦X⟧

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).

@github-actions github-actions bot added the t-algebra Algebra (groups, rings, fields, etc) label Apr 13, 2025
@AntoineChambert-Loir
Copy link
Collaborator Author

Since I'm here, I'll also prove that X is not a zero divisor and make the last lemma work for Semiring

@faenuccio
Copy link
Collaborator

LGTM, thanks!

Comment on lines +315 to +316
theorem divided_by_X_pow_order_of_X_eq_one :
divided_by_X_pow_order X_ne_zero = (1 : R⟦X⟧) := by
Copy link
Collaborator

Choose a reason for hiding this comment

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

Followup: divided_by_X_pow_order should be using camelCase

@@ -303,30 +311,58 @@ theorem order_X_pow (n : ℕ) : order ((X : R⟦X⟧) ^ n) = n := by
rw [X_pow_eq, order_monomial_of_ne_zero]
exact one_ne_zero

@[simp]
theorem divided_by_X_pow_order_of_X_eq_one :
Copy link
Collaborator

Choose a reason for hiding this comment

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

The name suggests the theorem says X = 1 → divided_by_X_pow_order ...something.... Probably you should just drop the of_. Oh, but you're only moving it. Followup, then.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, I was just moving this from one section to another with less assumptions.
Also, @ADedecker is now rewriting part of it, so I'll wait a little bit for that.

@Ruben-VandeVelde Ruben-VandeVelde added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 16, 2025
@ADedecker
Copy link
Member

@Ruben-VandeVelde you might be interested in #24072 which does a preliminary cleanup of these files.

@riccardobrasca
Copy link
Member

@Ruben-VandeVelde you might be interested in #24072 which does a preliminary cleanup of these files.

Which one should be reviewed first? Or they're independent?

@AntoineChambert-Loir
Copy link
Collaborator Author

We don't mind. We can coordinate.

@ADedecker
Copy link
Member

ADedecker commented Apr 16, 2025

@Ruben-VandeVelde you might be interested in #24072 which does a preliminary cleanup of these files.

Which one should be reviewed first? Or they're independent?

Sorry this wasn't very clear. As I said in our DM on Zulip (sorry for the lack of transparency) my ultimate plan was to nuke the direct proof of NoZeroDivisors and instead make it use the fact that the order of a product is the sum of the orders (as it's done in the multivariate setup). I have no preference between:

  • merging this and then I go behind to cleanup
  • I open the series of cleanup PR incorporating the changes made here

But indeed a choice needs to be made.

@AntoineChambert-Loir AntoineChambert-Loir removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 16, 2025
@riccardobrasca
Copy link
Member

Thanks!

bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Apr 16, 2025

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

@AntoineChambert-Loir
Copy link
Collaborator Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Apr 16, 2025
…ralize (#23993)

* compute order of power of power series
* generalize `order_mul`
* generalize lemmas at the end to `[Semiring R] [NoZeroDivisors R]` by proving (`PowerSeries.X_pow_mul_cancel`) that one can divide out by powers on `X` on both sides
of an equality.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Apr 16, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat (RingTheory/PowerSeries/Order) : compute order of power and generalize [Merged by Bors] - feat (RingTheory/PowerSeries/Order) : compute order of power and generalize Apr 16, 2025
@mathlib-bors mathlib-bors bot closed this Apr 16, 2025
@mathlib-bors mathlib-bors bot deleted the ACL/PowerSeriesOrder branch April 16, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated t-algebra Algebra (groups, rings, fields, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants