Skip to content

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

Closed
seewoo5 wants to merge 3 commits intomasterfrom
feature/iscoprime_mul_units
Closed

[Merged by Bors] - feat: isCoprime_mul_units_left, isCoprime_mul_units_right#19133
seewoo5 wants to merge 3 commits intomasterfrom
feature/iscoprime_mul_units

Conversation

@seewoo5
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor

@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 and others added 2 commits November 17, 2024 10:29
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 2, 2024

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

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Dec 2, 2024
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 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
Co-authored-by: Seewoo Lee <49933279+seewoo5@users.noreply.github.com>
@mathlib-bors
Copy link
Copy Markdown
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 A reviewer has approved the changed; awaiting maintainer approval. 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.

4 participants