Skip to content

[Merged by Bors] - feat(Algebra/QuadraticAlgebra): trace and norm lemmas - #45281

Closed
xroblot wants to merge 3 commits into
leanprover-community:masterfrom
xroblot:quadratic-algebra-trace-norm
Closed

xroblot wants to merge 3 commits into
leanprover-community:masterfrom
xroblot:quadratic-algebra-trace-norm

Conversation

@xroblot

@xroblot xroblot commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Add some lemmas about the trace and the norm in QuadraticAlgebra R a b: the norm of r • z is r ^ 2 * norm z, and four times the norm of z is trace z ^ 2 - discr a b * z.im ^ 2. Also add that the discriminant of integer parameters is 0 or 1 modulo 4, and a characterisation of IsIntegralClosure A R B when A acts faithfully on B.

These are used in a later PR to determine when QuadraticAlgebra ℤ a b is the integral closure of ℤ in QuadraticAlgebra ℚ a b.

Prepared with Claude Code 🤖


@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

PR summary e11ac7b734

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ discr_emod_four_eq_zero_or_one
+ four_mul_norm_eq
+ four_mul_norm_smul_one_add_omega
+ isIntegralClosure_iff
+ norm_smul

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 e11ac7b).

  • +5 new declarations
  • −0 removed declarations
+QuadraticAlgebra.discr_emod_four_eq_zero_or_one
+QuadraticAlgebra.four_mul_norm_eq
+QuadraticAlgebra.four_mul_norm_smul_one_add_omega
+QuadraticAlgebra.norm_smul
+isIntegralClosure_iff

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

Current commit e11ac7b734
Reference commit 10dc7882b0

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

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

@mathlib-bors mathlib-bors Bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 27, 2026
@mathlib-bors

mathlib-bors Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

✌️ xroblot can now approve this pull request until 2026-11-10 14:06 UTC (in 2 weeks). To approve and merge, reply with bors r+. More detailed instructions are available here.

⚠️ This delegation only covers changes within Archive/**, Counterexamples/**, docs/**, DownstreamTest/**, Mathlib/**, MathlibTest/**, Wanted/**, widget/**, Archive.lean, Counterexamples.lean, docs.lean, Mathlib.lean, Wanted.lean; an author commit touching anything else will revoke it. Bors also revokes it if a later push changes too many files for it to check the full list — even if it stays within scope.

@xroblot

xroblot commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

bors r+

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Oct 27, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Oct 27, 2026
Add some lemmas about the trace and the norm in `QuadraticAlgebra R a b`: the norm of `r • z` is `r ^ 2 * norm z`, and four times the norm of `z` is `trace z ^ 2 - discr a b * z.im ^ 2`. Also add that the discriminant of integer parameters is `0` or `1` modulo `4`, and a characterisation of `IsIntegralClosure A R B` when `A` acts faithfully on `B`.

These are used in a later PR to determine when `QuadraticAlgebra ℤ a b` is the integral closure of `ℤ` in `QuadraticAlgebra ℚ a b`.

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 Oct 27, 2026
@mathlib-bors

mathlib-bors Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title feat(Algebra/QuadraticAlgebra): trace and norm lemmas [Merged by Bors] - feat(Algebra/QuadraticAlgebra): trace and norm lemmas Oct 27, 2026
@mathlib-bors mathlib-bors Bot closed this Oct 27, 2026
@mathlib-bors mathlib-bors Bot removed the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 27, 2026
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. ready-to-merge This PR has been sent to bors. t-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants