/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/modulepublicimportMathlib.Algebra.Squarefree.BasicpublicimportMathlib.Data.Int.ModEq@[expose]publicsection
Fundamental discriminants
A fundamental discriminant is an integer that occurs as the discriminant of a quadratic field.
Fundamental discriminants are those integers D that appear as discriminants of quadratic
fields.
D is a fundamental discriminant if it is either of the form 4m for m congruent to 2 or 3
mod 4 squarefree, or if it congruent to 1 mod 4 and squarefree.
Unfolding of IsFundamentalDiscr in terms of %: a fundamental discriminant is either
4 times a squarefree integer congruent to 2 or 3 mod 4, or a squarefree integer
congruent to 1 mod 4 other than 1 itself.