Repository navigation
Conversation
…-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 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pxa1HLgwZQg6sssxyFg2o1
Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pxa1HLgwZQg6sssxyFg2o1
…-disc2 # Conflicts: # Mathlib/Algebra/QuadraticAlgebra/Discr.lean
…tic-algebra-fraction-ring # Conflicts: # Mathlib.lean # Mathlib/Algebra/QuadraticAlgebra/Discr.lean
…-fraction-ring # Conflicts: # Mathlib.lean # Mathlib/Algebra/QuadraticAlgebra/Discriminant.lean
… into quadratic-algebra-integral-closure # Conflicts: # Mathlib/Algebra/QuadraticAlgebra/Discriminant.lean
…re' into quadratic-field-basic # Conflicts: # Mathlib/Algebra/QuadraticAlgebra/Discriminant.lean # Mathlib/Algebra/QuadraticAlgebra/Int.lean # Mathlib/Algebra/QuadraticAlgebra/IsQuadraticExtension.lean # Mathlib/LinearAlgebra/Matrix/Charpoly/Minpoly.lean # Mathlib/LinearAlgebra/Unimodular.lean # Mathlib/RingTheory/Trace/Basic.lean
…asic # Conflicts: # Mathlib.lean # Mathlib/Algebra/QuadraticAlgebra/Basic.lean # Mathlib/Algebra/QuadraticAlgebra/Discriminant.lean # Mathlib/Algebra/QuadraticAlgebra/Int.lean # Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Basic.lean # Mathlib/RingTheory/Localization/FractionRing.lean # Mathlib/RingTheory/QuadraticAlgebra.lean
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ratic-field-sqrtd
|
This pull request has conflicts, please merge |
artie2000
left a comment
There was a problem hiding this comment.
just reviewing the docs for now
| @@ -21,6 +21,7 @@ This file gathers results about squarefreeness and rational numbers. | |||
| ## Main results | |||
|
|
|||
| * `Rat.sq_mul_squarefree_unique`: the squarefree integer `d` in such a decomposition is unique. | |||
There was a problem hiding this comment.
incidental but this docstring makes no sense
| /-- A squarefree integer `d` other than `1` is not a square in `ℚ`. In particular, | ||
| `QuadraticAlgebra ℚ d 0`, that is `ℚ(√d)`, is then a field; see the implementation notes of | ||
| `Mathlib.NumberTheory.NumberField.QuadraticField.Basic`. -/ |
There was a problem hiding this comment.
We don't need most of this - arguably we don't need a docstring here at all.
Was this docstring written by AI?
| The quadratic algebra `QuadraticAlgebra ℚ a b` is a field, hence a number field, exactly when | ||
| `QuadraticAlgebra.discr a b` is not a rational square. The results of this file on these | ||
| quadratic algebras therefore take a `[Fact (¬ IsSquare (QuadraticAlgebra.discr a b))]` | ||
| assumption, or `[Fact (¬ IsSquare (d : ℚ))]` for `QuadraticAlgebra ℚ d 0`, from which instance | ||
| search gets the `Field`, hence the `NumberField`, instance needed to state them. This assumption | ||
| holds when `d` is squarefree and different from `1`, see `Squarefree.not_isSquare_intCast`. |
There was a problem hiding this comment.
Please could you rewrite this in a more human-oriented style? I find this note difficult to parse.
There was a problem hiding this comment.
I think this is rather insightful and clear to be honest?
There was a problem hiding this comment.
guess it's a matter of taste 🤷 I won't insist
| /-- If `QuadraticAlgebra.discr a b` is a fundamental discriminant, then the discriminant of the | ||
| number field `QuadraticAlgebra ℚ a b` is `QuadraticAlgebra.discr a b`. |
There was a problem hiding this comment.
Is there a mathematical way to refer to QuadraticAlgebra.discr a b? I guess it's the "discriminant of
| discr_eq_quadraticAlgebra_discr (Int.algEquivIntegralClosure h).toRingEquiv.symm | ||
|
|
||
| /-- If `d` is a fundamental discriminant, then the discriminant of `ℚ(√d)` is `d`. | ||
| See the implementation notes in the module docstring for the `Fact` assumption. -/ |
There was a problem hiding this comment.
| See the implementation notes in the module docstring for the `Fact` assumption. -/ | |
| See the module docstring for an explanation of the `Fact` assumption. -/ |
is possibly clearer?
This PR computes the discriminant of the concrete quadratic fields
ℚ(√d), realized asQuadraticAlgebra ℚ (d : ℚ) 0. Ifdis squarefree, this discriminant is4 * dwhend ≡ 2, 3 mod 4, anddwhend ≡ 1 mod 4. More generally, the discriminant ofℚ(√D)isDfor every fundamental discriminantD, which completes the classification of quadratic fields by their discriminant: every fundamental discriminant other than1is the discriminant of a quadratic field.The statements take a
[Fact (¬ IsSquare _)]assumption to get theNumberFieldinstance onQuadraticAlgebra ℚ a b, as explained in the implementation notes of the module docstring. The PR also adds the lemmaSquarefree.not_isSquare_intCast, which says that a squarefree integer other than1is not a square inℚ, so that this assumption is easy to provide in the squarefree case.The mathematics and design are mine. Claude Code was used as a coding assistant and for the housekeeping around this PR. 🤖
Algebrainvariants #42297