Skip to content

perf: no expose SplittingField and GaloisField - #37474

Draft
Komyyy wants to merge 13 commits into
leanprover-community:masterfrom
Komyyy:no-expose-splitting-field
Draft

Komyyy wants to merge 13 commits into
leanprover-community:masterfrom
Komyyy:no-expose-splitting-field

Conversation

@Komyyy

@Komyyy Komyyy commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Open in Gitpod

@Komyyy Komyyy added awaiting-bench This PR needs to be benchmarked before merging t-ring-theory Ring theory labels Apr 1, 2026
@github-actions

github-actions Bot commented Apr 1, 2026 •

Copy link
Copy Markdown

PR summary 84b136b1b1

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ algebraCast
+ div
+ instAlgebraAux
+ instAlgebraZModAux
+ instCommRingAux
+ instFieldAux
+ instance (f : K[X]) : CommRing (SplittingField f)
+ instance (f : K[X]) : Inhabited (SplittingField f)
+ instance (f : K[X]) : Nontrivial (SplittingField f)
+ instance (p : ℕ) [Fact p.Prime] (n : ℕ) : Algebra (ZMod p) (GaloisField p n)
+ instance (p : ℕ) [Fact p.Prime] (n : ℕ) : Field (GaloisField p n)
+ instance : CharP (GaloisField p n) p
+ instance : Finite (GaloisField p n)
+ instance : FiniteDimensional (ZMod p) (GaloisField p n)
+ instance : Inhabited (GaloisField p n)
+ instance : IsSplittingField (ZMod p) (GaloisField p n) (X ^ p ^ n - X)
+ intCast
+ natCast
+ nnqsmul
+ nnratCast
+ nsmul
+ qsmul
+ ratCast
+ smul
+ zmodCast
+ zmodsmul
+ zpow
+ zsmul
++ add
++ instance (R : Type*) (f : K[X]) [CommSemiring R] [Algebra R K] :
++ inv
++ mul
++ neg
++ npow
++ one
++ sub
++ zero
- fact_irreducible_factor
- succ

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.


Decrease in tech debt: (relative, absolute) = (1.48, 0.01)
Current number Change Type
451 -1 porting notes
631 -2 erw
6894 -3 backward.isDefEq.respectTransparency

Current commit c67b560dd6
Reference commit 84b136b1b1

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-algebra Algebra (groups, rings, fields, etc) label Apr 1, 2026
@Komyyy Komyyy added tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip WIP Work in progress and removed t-ring-theory Ring theory awaiting-bench This PR needs to be benchmarked before merging labels Apr 1, 2026
@Komyyy

Komyyy commented Apr 1, 2026

Copy link
Copy Markdown
Contributor Author

!radar

@leanprover-radar

leanprover-radar commented Apr 1, 2026 •

Copy link
Copy Markdown

Benchmark results for dc015c6 against 84b136b are in. There are no significant changes. @Komyyy

  • 🟥 build//instructions: +28.8G (+0.02%)

Small changes (1✅, 2🟥)

  • ✅ build/module/Mathlib.FieldTheory.PolynomialGaloisGroup//instructions: -1.5G (-4.85%)
  • 🟥 build/module/Mathlib.FieldTheory.SplittingField.Construction//instructions: +6.4G (+20.19%) (reduced significance based on *//lines)
  • 🟥 build/module/Mathlib.Lean.PrettyPrinter.Delaborator//instructions: +383.4M (+12.24%)

@Komyyy
Komyyy marked this pull request as draft April 1, 2026 14:05
@mathlib-bors

mathlib-bors Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

This pull request is now in draft mode. No active bors state needed cleanup.

While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like bors r+ or bors try.

@Komyyy

Komyyy commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

!radar

@leanprover-radar

leanprover-radar commented Apr 2, 2026 •

Copy link
Copy Markdown

Benchmark results for c67b560 against 84b136b are in. There are no significant changes. @Komyyy

  • 🟥 build//instructions: +15.4G (+0.01%)

Small changes (1✅, 3🟥)

  • 🟥 build/module/Mathlib.FieldTheory.Finite.GaloisField//instructions: +5.0G (+18.81%) (reduced significance based on *//lines)
  • ✅ build/module/Mathlib.FieldTheory.PolynomialGaloisGroup//instructions: -1.5G (-4.91%)
  • 🟥 build/module/Mathlib.FieldTheory.SplittingField.Construction//instructions: +11.5G (+36.18%) (reduced significance based on *//lines)
  • 🟥 build/module/Mathlib.Lean.PrettyPrinter.Delaborator//instructions: +376.4M (+12.02%)

@Komyyy Komyyy changed the title perf: no expose SplittingField perf: no expose SplittingField and GaloisField Apr 2, 2026
@Komyyy Komyyy removed the tech debt Fixes cross-cutting technical debt, see the "technical debt counters" stream on zulip label Apr 5, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 16, 2026
@plp127

plp127 commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

@Komyyy Are you still working on this?

@Komyyy

Komyyy commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

@plp127 Currently not. Feel free to adopt this.

This branch has not been deployed

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

Labels

merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-algebra Algebra (groups, rings, fields, etc) WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants