Skip to content

feat(Algebra/QuadraticAlgebra): classify quadratic algebras by their discriminant - #42708

Open
xroblot wants to merge 11 commits into
leanprover-community:masterfrom
xroblot:quadratic-algebra-disc2
Open

feat(Algebra/QuadraticAlgebra): classify quadratic algebras by their discriminant#42708
xroblot wants to merge 11 commits into
leanprover-community:masterfrom
xroblot:quadratic-algebra-disc2

Conversation

@xroblot

@xroblot xroblot commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Classify QuadraticAlgebra R a b up to R-algebra isomorphism by the discriminant: when 2
is invertible they are isomorphic iff the discriminants agree up to a square unit, and over
the discriminant is a complete invariant. Also adds the standard-form isomorphism
QuadraticAlgebra R a b ≃ₐ[R] QuadraticAlgebra R (discr a b) 0.

Prepared with Claude Code 🤖


Open in Gitpod

xroblot and others added 10 commits July 27, 2026 20:07
…-map

# Conflicts:
#	Mathlib/Algebra/QuadraticAlgebra/Basic.lean
…ratic-algebra-discr

# Conflicts:
#	Mathlib/Algebra/QuadraticAlgebra/Basic.lean
…-discr

# Conflicts:
#	Mathlib/Algebra/QuadraticAlgebra/Basic.lean
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pxa1HLgwZQg6sssxyFg2o1
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

PR summary 383452c168

Import changes exceeding 2%

% File
+22.64% Mathlib.Algebra.QuadraticAlgebra.Discr

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.QuadraticAlgebra.Discr 1365 1674 +309 (+22.64%)
Import changes for all files
Files Import difference
Mathlib.Algebra.QuadraticAlgebra.Discr 309

Declarations diff (regex)

+ algEquivDiscrZero
+ basis_apply_one
+ basis_apply_zero
+ discr_eq_im_sq_mul_discr
+ discr_eq_im_sq_mul_discr'
+ im_sq_mul_discr
+ isUnit_im_omega_of_algEquiv
+ map_star
+ nonempty_algEquiv_iff
+ nonempty_algEquiv_iff_of_invertible_two
+ nonempty_algEquiv_int_iff
+ norm_map_omega
+ smul_omega_sub_eq
+ trace_map
+ trace_map_omega

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

  • +14 new declarations
  • −0 removed declarations
+QuadraticAlgebra.algEquivDiscrZero
+QuadraticAlgebra.basis_apply_one
+QuadraticAlgebra.basis_apply_zero
+QuadraticAlgebra.discr_eq_im_sq_mul_discr
+QuadraticAlgebra.discr_eq_im_sq_mul_discr'
+QuadraticAlgebra.im_sq_mul_discr
+QuadraticAlgebra.isUnit_im_omega_of_algEquiv
+QuadraticAlgebra.map_star
+QuadraticAlgebra.nonempty_algEquiv_iff
+QuadraticAlgebra.nonempty_algEquiv_iff_of_invertible_two
+QuadraticAlgebra.nonempty_algEquiv_int_iff
+QuadraticAlgebra.norm_map_omega
+QuadraticAlgebra.trace_map
+QuadraticAlgebra.trace_map_omega

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 383452c168
Reference commit caa4dbde35

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

@mathlib-dependent-issues

mathlib-dependent-issues Bot commented Aug 13, 2026

Copy link
Copy Markdown

…-disc2

# Conflicts:
#	Mathlib/Algebra/QuadraticAlgebra/Discr.lean
@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Aug 13, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) large-import Automatically added label for PRs with a significant increase in transitive imports t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant