Skip to content

chore(Algebra/QuadraticAlgebra): define natCast and intCast without C - #43583

Open
xroblot wants to merge 1 commit into
leanprover-community:masterfrom
xroblot:quadratic-algebra-c-reducible
Open

chore(Algebra/QuadraticAlgebra): define natCast and intCast without C#43583
xroblot wants to merge 1 commit into
leanprover-community:masterfrom
xroblot:quadratic-algebra-c-reducible

Conversation

@xroblot

@xroblot xroblot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

The natCast and intCast fields go through QuadraticAlgebra.C, which is opaque at implicit transparency, so Ring.toIntAlgebra and instAlgebra are not defeq for rw. Writing them as ⟨n, 0⟩ fixes it, as #43242 did for algebraMap.

Prepared with Claude Code 🤖


@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

PR summary 40e78fbe18

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

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 40e78fb).

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


No changes to strong technical debt.
No changes to weak technical debt.

Current commit 40e78fbe18
Reference commit 9b46e33ce0

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.py 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 Sep 8, 2026
@xroblot xroblot added the WIP Work in progress label Sep 8, 2026
@xroblot

xroblot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

!radar

@jcommelin jcommelin left a comment

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.

Thanks 🎉

bors merge

@mathlib-bors

mathlib-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

👎 Rejected by label

@jcommelin

Copy link
Copy Markdown
Member

Whhops, too fast. But I do like the look of this.

@xroblot

xroblot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

@jcommelin I still want to do some testing before merging this PR

@leanprover-radar

leanprover-radar commented Sep 8, 2026

Copy link
Copy Markdown

Benchmark results for 40e78fb against 9b46e33 are in. No significant results found. @xroblot

  • build//instructions: -1.4G (-0.00%)

No significant changes detected.

@xroblot xroblot removed the WIP Work in progress label Sep 8, 2026
@xroblot

xroblot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

@jcommelin Timings are fine so this PR is ready to be merged if you want to

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

Labels

t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants