Skip to content
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

[Merged by Bors] - feat: isCoprime_mul_units_left, isCoprime_mul_units_right #19133

Closed
wants to merge 3 commits into from

Conversation

seewoo5
Copy link
Collaborator

@seewoo5 seewoo5 commented Nov 16, 2024


Add isCoprime_mul_units_left and isCoprime_mul_units_right. These are slight generalizations of same unit version isCoprime_mul_unit_left and isCoprime_mul_unit_right. Currently exists as a lemma in #18882.

Open in Gitpod

@seewoo5 seewoo5 added the t-algebra Algebra (groups, rings, fields, etc) label Nov 16, 2024
@seewoo5 seewoo5 self-assigned this Nov 16, 2024
Copy link

github-actions bot commented Nov 16, 2024

PR summary 57594724f1

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ isCoprime_mul_units_left
+ isCoprime_mul_units_right

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

@seewoo5
Copy link
Collaborator Author

seewoo5 commented Nov 16, 2024

There are two things that I can do further (but not sure if it worths to do):

  • I can replace the existing proofs of isCoprime_mul_unit_left and isCoprime_mul_unit_right with units version
  • There are two other possible combinations: u * y, z * v and y * u, v * z. I'm not sure if it is necessary to add these.

Copy link
Collaborator

@Ruben-VandeVelde Ruben-VandeVelde left a comment

Choose a reason for hiding this comment

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

I probably would suggest reproving isCoprime_mul_unit_left/right, yes

@Ruben-VandeVelde Ruben-VandeVelde added the awaiting-author A reviewer has asked the author a question or requested changes label Nov 17, 2024
@seewoo5 seewoo5 removed the awaiting-author A reviewer has asked the author a question or requested changes label Nov 17, 2024
Comment on lines +279 to +285
theorem isCoprime_mul_unit_left (hu : IsUnit x) (y z : R) :
IsCoprime (x * y) (x * z) ↔ IsCoprime y z :=
isCoprime_mul_units_left hu hu _ _

theorem isCoprime_mul_unit_right (hu : IsUnit x) (y z : R) :
IsCoprime (y * x) (z * x) ↔ IsCoprime y z :=
(isCoprime_mul_unit_right_left hu y (z * x)).trans (isCoprime_mul_unit_right_right hu y z)
isCoprime_mul_units_right hu hu _ _
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be better to remove these two lemmas and add deprecated aliases pointing to your lemmas?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, I don't think so

Copy link
Collaborator

@Ruben-VandeVelde Ruben-VandeVelde left a comment

Choose a reason for hiding this comment

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

Thanks!

maintainer merge

Comment on lines +279 to +285
theorem isCoprime_mul_unit_left (hu : IsUnit x) (y z : R) :
IsCoprime (x * y) (x * z) ↔ IsCoprime y z :=
isCoprime_mul_units_left hu hu _ _

theorem isCoprime_mul_unit_right (hu : IsUnit x) (y z : R) :
IsCoprime (y * x) (z * x) ↔ IsCoprime y z :=
(isCoprime_mul_unit_right_left hu y (z * x)).trans (isCoprime_mul_unit_right_right hu y z)
isCoprime_mul_units_right hu hu _ _
Copy link
Collaborator

Choose a reason for hiding this comment

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

No, I don't think so

Copy link

github-actions bot commented Dec 2, 2024

🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde.

Copy link
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

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the ready-to-merge This PR has been sent to bors. label Dec 2, 2024
mathlib-bors bot pushed a commit that referenced this pull request Dec 2, 2024
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Dec 2, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: isCoprime_mul_units_left, isCoprime_mul_units_right [Merged by Bors] - feat: isCoprime_mul_units_left, isCoprime_mul_units_right Dec 2, 2024
@mathlib-bors mathlib-bors bot closed this Dec 2, 2024
@mathlib-bors mathlib-bors bot deleted the feature/iscoprime_mul_units branch December 2, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer-merge ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants