Skip to content

[Merged by Bors] - chore(Algebra/QuadraticAlgebra): rename Discr to Discriminant - #42975

Closed
xroblot wants to merge 2 commits into
leanprover-community:masterfrom
xroblot:rename-discr-file
Closed

xroblot wants to merge 2 commits into
leanprover-community:masterfrom
xroblot:rename-discr-file

Conversation

@xroblot

@xroblot xroblot commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Every discriminant file in mathlib spells the word out, RingTheory/Discriminant.lean, Algebra/QuadraticDiscriminant.lean, Algebra/CubicDiscriminant.lean, etc., so QuadraticAlgebra/Discr.lean is renamed to match. The declaration QuadraticAlgebra.discr is unchanged, following Algebra.discr.

Prepared with Claude Code 🤖

@xroblot xroblot added t-algebra Algebra (groups, rings, fields, etc) easy < 20s of review time. See the lifecycle page for guidelines. labels Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

PR summary 405e37b9a2

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Algebra.QuadraticAlgebra.Discr -1372
Mathlib.Algebra.QuadraticAlgebra.Discriminant 1372

Declarations diff (regex)

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

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

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

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit 405e37b).

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


No changes to strong technical debt.

No changes to weak technical debt.

Current commit 405e37b9a2
Reference commit ffbfefaec6

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/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).

note: file Mathlib/Algebra/QuadraticAlgebra/Discr.lean` was renamed to `Mathlib/Algebra/QuadraticAlgebra/Discriminant.lean without a module deprecation
Please create a follow-up pull request adding one. Thanks!

@grunweg

grunweg commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Thanks! Can you split this PR in two - one doing the rename, the other adding the module deprecation? This makes for a much cleaner git diff.

@grunweg grunweg added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 20, 2026
@github-actions github-actions Bot added the file-removed A Lean module was (re)moved without a `deprecated_module` annotation label Aug 20, 2026
@xroblot

xroblot commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator Author

Done, Sorry about that. This PR is now just the rename, a pure git mv, and the deprecated_module shim is split out into #42976, which depends on this one.

@grunweg grunweg removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Aug 20, 2026
@grunweg

grunweg commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Thanks!
bors stack #42976

@mathlib-bors

mathlib-bors Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

👎 Cannot stack: #42976 contains this pull request's head, so the stack appears to go the other way. Comment bors stack #42975 on #42976 instead.

@mathlib-bors

mathlib-bors Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

#42976 is now stacked on #42975: both are in a linked bundle and merge in the same batch, or not at all. The batch applies #42975's changes first (#42976's own changes). Each pull request still needs its own bors r+; bors unlink removes the link.

View this bundle in bors (sign in with GitHub to view).

1 similar comment
@mathlib-bors

mathlib-bors Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

#42976 is now stacked on #42975: both are in a linked bundle and merge in the same batch, or not at all. The batch applies #42975's changes first (#42976's own changes). Each pull request still needs its own bors r+; bors unlink removes the link.

View this bundle in bors (sign in with GitHub to view).

@grunweg

grunweg commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Thanks! Now, bors should merge both PRs in the same batch.
bors merge

@mathlib-bors

mathlib-bors Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🕐 Waiting for approval (bors r+) of: #42976. The bundle enters the queue once every linked pull request is approved.

View this bundle in bors (sign in with GitHub to view).

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Aug 22, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Aug 22, 2026
Every discriminant file in mathlib spells the word out, `RingTheory/Discriminant.lean`, `Algebra/QuadraticDiscriminant.lean`, `Algebra/CubicDiscriminant.lean`, etc., so `QuadraticAlgebra/Discr.lean` is renamed to match. The declaration `QuadraticAlgebra.discr` is unchanged, following `Algebra.discr`.

Prepared with Claude Code 🤖
mathlib-bors Bot pushed a commit that referenced this pull request Aug 22, 2026
Re-adds `Mathlib/Algebra/QuadraticAlgebra/Discr.lean` as a `deprecated_module` shim redirecting to the renamed `Discriminant` module (see #42975). 

Prepared with Claude Code 🤖
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Aug 22, 2026
@mathlib-bors

mathlib-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title chore(Algebra/QuadraticAlgebra): rename Discr to Discriminant [Merged by Bors] - chore(Algebra/QuadraticAlgebra): rename Discr to Discriminant Aug 22, 2026
@mathlib-bors mathlib-bors Bot closed this Aug 22, 2026
attilavjda pushed a commit to attilavjda/mathlib4 that referenced this pull request Sep 5, 2026
…over-community#42975)

Every discriminant file in mathlib spells the word out, `RingTheory/Discriminant.lean`, `Algebra/QuadraticDiscriminant.lean`, `Algebra/CubicDiscriminant.lean`, etc., so `QuadraticAlgebra/Discr.lean` is renamed to match. The declaration `QuadraticAlgebra.discr` is unchanged, following `Algebra.discr`.

Prepared with Claude Code 🤖
attilavjda pushed a commit to attilavjda/mathlib4 that referenced this pull request Sep 5, 2026
…prover-community#42976)

Re-adds `Mathlib/Algebra/QuadraticAlgebra/Discr.lean` as a `deprecated_module` shim redirecting to the renamed `Discriminant` module (see leanprover-community#42975). 

Prepared with Claude Code 🤖
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Sep 5, 2026
…over-community#42975)

Every discriminant file in mathlib spells the word out, `RingTheory/Discriminant.lean`, `Algebra/QuadraticDiscriminant.lean`, `Algebra/CubicDiscriminant.lean`, etc., so `QuadraticAlgebra/Discr.lean` is renamed to match. The declaration `QuadraticAlgebra.discr` is unchanged, following `Algebra.discr`.

Prepared with Claude Code 🤖
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Sep 5, 2026
…prover-community#42976)

Re-adds `Mathlib/Algebra/QuadraticAlgebra/Discr.lean` as a `deprecated_module` shim redirecting to the renamed `Discriminant` module (see leanprover-community#42975). 

Prepared with Claude Code 🤖
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. easy < 20s of review time. See the lifecycle page for guidelines. file-removed A Lean module was (re)moved without a `deprecated_module` annotation 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.

2 participants