Skip to content

[Merged by Bors] - refactor(NumberTheory): golf Mathlib/NumberTheory/Cyclotomic/Basic#38280

Closed
yuanyi-350 wants to merge 2 commits intoleanprover-community:masterfrom
yuanyi-350:N_4
Closed

[Merged by Bors] - refactor(NumberTheory): golf Mathlib/NumberTheory/Cyclotomic/Basic#38280
yuanyi-350 wants to merge 2 commits intoleanprover-community:masterfrom
yuanyi-350:N_4

Conversation

@yuanyi-350
Copy link
Copy Markdown
Collaborator

@yuanyi-350 yuanyi-350 commented Apr 20, 2026

  • refactors Cyclotomic/Basic by rewriting nonempty_algEquiv_adjoin_of_isSepClosed around AlgHom.fieldRange_eq_map and IntermediateField.adjoin_map
  • replaces the manual adjoin induction with direct adjoin_le_iff inclusions for the cyclotomic roots

Extracted from #38144 , migrate from #38202

Open in Gitpod

@yuanyi-350 yuanyi-350 added codex OpenAI Codex wrote (parts of) this PR. LLM-generated PRs with substantial input from LLMs - review accordingly labels Apr 20, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

PR summary 4fceb4697e

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/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-number-theory Number theory (also use t-algebra or t-analysis to specialize) label Apr 20, 2026
@yuanyi-350
Copy link
Copy Markdown
Collaborator Author

I ran a profiler comparison for the changed declarations in this PR.

Results (seconds):

  • IsCyclotomicExtension.nonempty_algEquiv_adjoin_of_isSepClosed: 1.708 -> 0.664 (-61.1%)

Overall:

  • The refactor speeds up the changed proof substantially.

@yuanyi-350 yuanyi-350 requested a review from acmepjz April 20, 2026 09:42
Copy link
Copy Markdown
Collaborator

@acmepjz acmepjz left a comment

Choose a reason for hiding this comment

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

Thank you! Looks like a great simplicifation.

Copy link
Copy Markdown
Contributor

@tb65536 tb65536 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 tb65536.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 21, 2026
Copy link
Copy Markdown
Member

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

mathlib-bors Bot pushed a commit that referenced this pull request Apr 21, 2026
…38280)

- refactors `Cyclotomic/Basic` by rewriting `nonempty_algEquiv_adjoin_of_isSepClosed` around `AlgHom.fieldRange_eq_map` and `IntermediateField.adjoin_map`
- replaces the manual adjoin induction with direct `adjoin_le_iff` inclusions for the cyclotomic roots

Extracted from #38144 , migrate from #38202

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
@mathlib-triage mathlib-triage Bot added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Apr 21, 2026
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Apr 21, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title refactor(NumberTheory): golf Mathlib/NumberTheory/Cyclotomic/Basic [Merged by Bors] - refactor(NumberTheory): golf Mathlib/NumberTheory/Cyclotomic/Basic Apr 21, 2026
@mathlib-bors mathlib-bors Bot closed this Apr 21, 2026
@yuanyi-350 yuanyi-350 deleted the N_4 branch April 24, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex OpenAI Codex wrote (parts of) this PR. LLM-generated PRs with substantial input from LLMs - review accordingly ready-to-merge This PR has been sent to bors. t-number-theory Number theory (also use t-algebra or t-analysis to specialize)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants