Skip to content

[Merged by Bors] - chore(Algebra/Group/Even): Clean up file#20558

Closed
artie2000 wants to merge 37 commits intomasterfrom
artie2000-automate-even
Closed

[Merged by Bors] - chore(Algebra/Group/Even): Clean up file#20558
artie2000 wants to merge 37 commits intomasterfrom
artie2000-automate-even

Conversation

@artie2000
Copy link
Copy Markdown
Collaborator

@artie2000 artie2000 commented Jan 7, 2025

  • Rename some theorems to remove primed variants
  • Move simp attribute from IsSquare.sq to Even.isSquare_pow for consistency
  • Remove unhelpful alias
  • Golf some proofs
  • Make notation consistent throughout proofs

Moves:
Even.nsmul -> Even.nsmul_right
Even.nsmul' -> Even.nsmul_left
Even.zsmul -> Even.zsmul_right
Even.zsmul' -> Even.zsmul_left
isSquare_zero -> IsSquare.zero

Deletions:
isSquare_of_exists_sq (prefer IsSquare.sq)


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 7, 2025

PR summary b5a3e9dde1

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Even.nsmul
+ Even.nsmul'
+ Even.zsmul
+ Even.zsmul'
+ IsSquare.zero
+ even_zero
+ ⟨_,
- IsSquare.inv
- isSquare_of_exists_sq

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 Jan 7, 2025
@artie2000 artie2000 requested a review from YaelDillies January 7, 2025 21:33
@artie2000 artie2000 marked this pull request as ready for review January 7, 2025 23:08
@artie2000 artie2000 marked this pull request as draft January 8, 2025 19:57
@artie2000 artie2000 marked this pull request as ready for review January 13, 2025 03:18
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Sorry to be this person once again, but tweaking aesop priorities is so experimental that I would rather it be a standalone PR. Can you make it a separate PR depending on this one?

@artie2000
Copy link
Copy Markdown
Collaborator Author

artie2000 commented Jan 13, 2025

To clarify, no aesop attributes are changed here -- only added. One simp lemma is removed due to having an inappropriate form. Would you like me to move my additions of aesop attributes to a separate PR?

@artie2000 artie2000 changed the title feat(Algebra/Group/Even): Clean up file, add Aesop automation feat(Algebra/Group/Even): Clean up file Jan 15, 2025
@YaelDillies YaelDillies changed the title feat(Algebra/Group/Even): Clean up file chore(Algebra/Group/Even): Clean up file Jan 15, 2025
@artie2000
Copy link
Copy Markdown
Collaborator Author

artie2000 commented Jan 16, 2025

I'm not sure it's right to call this chore
I did add some new (easy) lemmas

@YaelDillies
Copy link
Copy Markdown
Contributor

If none of feat, refactor, chore fits for all of a PR, then that probably means it should be split up into its feat, refactor, chore parts.

@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Jan 22, 2025
artie2000 and others added 6 commits January 22, 2025 23:39
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies 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

@github-actions
Copy link
Copy Markdown

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

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jan 23, 2025
@riccardobrasca
Copy link
Copy Markdown
Member

This PR is marked "awaiting author". Should the label be removed?

Copy link
Copy Markdown
Contributor

@adomani adomani left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good!

Please, update the comment, if you want, add a sentence to the doc-string and then merge!

bors d+

def IsSquare (a : α) : Prop := ∃ r, a = r * r

@[to_additive (attr := simp)] lemma IsSquare.mul_self (m : α) : IsSquare (m * m) := ⟨m, rfl⟩
@[to_additive (attr := simp)] lemma IsSquare.mul_self (r : α) : IsSquare (r * r) := ⟨r, rfl⟩
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.

It looks like the undocumented convention is that r is a "square root" of a, where possible.

I don't think that it is too important to enforce this, but you can, if you want, add a sentence to the doc-string.

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 23, 2025

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

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Jan 23, 2025
@adomani
Copy link
Copy Markdown
Contributor

adomani commented Jan 23, 2025

This PR is marked "awaiting author". Should the label be removed?

Ah, I had missed that!

bors d-

@artie2000
Copy link
Copy Markdown
Collaborator Author

@adomani I'm confused about the status of this PR. Should I go ahead with the merge?

@YaelDillies
Copy link
Copy Markdown
Contributor

I think the confusion is simply that you forgot to remove awaiting-author. I would say you can merge, yes.

@artie2000
Copy link
Copy Markdown
Collaborator Author

Oh sorry! I'll merge once it passes CI

@artie2000
Copy link
Copy Markdown
Collaborator Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Jan 23, 2025
* Rename some theorems to remove primed variants
* Move `simp` attribute from `IsSquare.sq` to `Even.isSquare_pow` for consistency
* Remove unhelpful alias
* Golf some proofs
* Make notation consistent throughout proofs

Moves:
`Even.nsmul` -> `Even.nsmul_right`
`Even.nsmul'` -> `Even.nsmul_left`
`Even.zsmul` -> `Even.zsmul_right`
`Even.zsmul'` -> `Even.zsmul_left`
`isSquare_zero` -> `IsSquare.zero`

Deletions:
`isSquare_of_exists_sq` (prefer `IsSquare.sq`)
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 23, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore(Algebra/Group/Even): Clean up file [Merged by Bors] - chore(Algebra/Group/Even): Clean up file Jan 23, 2025
@mathlib-bors mathlib-bors bot closed this Jan 23, 2025
@mathlib-bors mathlib-bors bot deleted the artie2000-automate-even branch January 23, 2025 12:19
@adomani
Copy link
Copy Markdown
Contributor

adomani commented Jan 23, 2025

Yes, I had overlooked the awaiting-author label, but I was happy with the form that the PR had anyway!

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

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants