Skip to content

[Merged by Bors] - feat: port Mathlib 3's Nat.factors norm_num extension to a simproc - #15420

Closed
eric-wieser wants to merge 18 commits into
masterfrom
eric-wieser/factors-norm_num
Closed

eric-wieser wants to merge 18 commits into
masterfrom
eric-wieser/factors-norm_num

Conversation

@eric-wieser

@eric-wieser eric-wieser commented Aug 1, 2024 •

Copy link
Copy Markdown
Member

This is a partial attempt at #15410, porting #8009


Open in Gitpod

@eric-wieser
eric-wieser force-pushed the eric-wieser/factors-norm_num branch from ccce0b1 to 3ad9f80 Compare August 1, 2024 22:26
@github-actions

github-actions Bot commented Aug 1, 2024 •

Copy link
Copy Markdown

please_merge_master.md

@grunweg grunweg added the t-meta Tactics, attributes or user commands label Aug 15, 2024
@eric-wieser eric-wieser changed the title feat: port the Nat.factors norm_num extension from Mathlib 3 feat: port Mathlib 3's Nat.factors norm_num extension to a simproc Jan 3, 2025
@leanprover-community-bot-assistant leanprover-community-bot-assistant added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Jan 3, 2025
@eric-wieser
eric-wieser force-pushed the eric-wieser/factors-norm_num branch 2 times, most recently from 8a9e35c to 5ebced1 Compare January 3, 2025 16:12
@eric-wieser
eric-wieser marked this pull request as ready for review January 3, 2025 16:15
@eric-wieser
eric-wieser requested a review from digama0 January 3, 2025 16:15
@eric-wieser
eric-wieser force-pushed the eric-wieser/factors-norm_num branch from 8343d39 to 16ed74f Compare January 3, 2025 16:27

@YaelDillies YaelDillies left a comment

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.

Could you add more inline comments in the meta code? It would help maintainability

Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
@Ruben-VandeVelde

Copy link
Copy Markdown
Contributor

@YaelDillies do you want to take another look?

Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
@YaelDillies YaelDillies added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Jan 15, 2025
@eric-wieser
eric-wieser requested a review from kmill February 14, 2025 10:26
@github-actions

Copy link
Copy Markdown

please_merge_master.md

1 similar comment
@github-actions

Copy link
Copy Markdown

please_merge_master.md

@eric-wieser eric-wieser removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Feb 14, 2025
@YaelDillies

YaelDillies commented Feb 15, 2025 •

Copy link
Copy Markdown
Contributor

I still maintain that this shouldn't be in the NormNum folder. I am writing the simproc from https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/Compute.20pairs.20of.20divisors and thinking of putting it in a new Mathlib.Tactic.Simp folder.

Comment thread Mathlib/Tactic/NormNum/Factors.lean Resolved
@eric-wieser eric-wieser removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Apr 13, 2025
@github-actions github-actions Bot added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Jun 12, 2025

@YaelDillies YaelDillies left a comment

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.

Thanks! 🚀

maintainer merge

@github-actions

Copy link
Copy Markdown

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

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jun 12, 2025
@fpvandoorn

Copy link
Copy Markdown
Member

reviewing it right now

Comment thread Mathlib/Tactic/Simproc/Factors.lean Outdated
-- Otherwise when we recurse, we should use `b` as the new minimum factor. Note that
-- we must use `evalMinFac.core` to get a proof that `b` is what we computed it as.
have eb : Q(ℕ) := mkRawNatLit b
have ehb : Q(IsNat $eb $eb) := q(⟨rfl⟩)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add ofNat here (and quickly check whether it needs to be added elsewhere)?

Otherwise, LGTM

bors d+

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, there was one more.

@mathlib-bors

mathlib-bors Bot commented Jun 12, 2025

Copy link
Copy Markdown
Contributor

✌️ eric-wieser 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 maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Jun 12, 2025
@eric-wieser eric-wieser added the auto-merge-after-CI Please do not add manually. Requests for a bot to merge automatically once CI is done. label Jun 13, 2025
@ghost

ghost commented Jun 13, 2025

Copy link
Copy Markdown

As this PR is labelled auto-merge-after-CI, we are now sending it to bors:

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Jun 13, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Jun 13, 2025
@mathlib-bors

mathlib-bors Bot commented Jun 13, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat: port Mathlib 3's Nat.factors norm_num extension to a simproc [Merged by Bors] - feat: port Mathlib 3's Nat.factors norm_num extension to a simproc Jun 13, 2025
@mathlib-bors mathlib-bors Bot closed this Jun 13, 2025
@mathlib-bors
mathlib-bors Bot deleted the eric-wieser/factors-norm_num branch June 13, 2025 10:15
pfaffelh pushed a commit to pfaffelh/mathlib4 that referenced this pull request Jun 15, 2025
pfaffelh pushed a commit to pfaffelh/mathlib4 that referenced this pull request Jun 15, 2025
Rida-Hamadani pushed a commit to Rida-Hamadani/mathlib4 that referenced this pull request Jun 24, 2025
callesonne pushed a commit to callesonne/mathlib4 that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-after-CI Please do not add manually. Requests for a bot to merge automatically once CI is done. delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants