The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V12. Number theory

Mathlib.NumberTheory.FundamentalDiscriminant

8 declarations. Mathlib docs · Source

def Int.IsFundamentalDiscr E1 #

ℤ → Prop

D is a fundamental discriminant: it is a discriminant (D ≡ 0, 1 mod 4) and primitive, i.e. D / 4 ≢ 0, 1 mod 4 when 4 ∣ D, and no odd prime square divides D.

theorem Int.isFundamentalDiscr_def E0 #

∀ {D : ℤ},
  D.IsFundamentalDiscr ↔
    (D % 4 = 0 ∨ D % 4 = 1) ∧ (∀ (x : ℤ), D = 4 * x → ¬4 ∣ x ∧ x % 4 ≠ 1) ∧ ∀ (p : ℕ), Nat.Prime p → Odd p → ¬↑p ^ 2 ∣ D

theorem Int.IsFundamentalDiscr.ne_zero E1 #

∀ {D : ℤ}, D.IsFundamentalDiscr → D ≠ 0

theorem Int.IsFundamentalDiscr.emod_four_eq_zero_or_one E1 #

∀ {D : ℤ}, D.IsFundamentalDiscr → D % 4 = 0 ∨ D % 4 = 1

theorem Int.isFundamentalDiscr_iff_squarefree E1 #

∀ {D : ℤ},
  D.IsFundamentalDiscr ↔ D % 4 = 1 ∧ Squarefree D ∨ D % 4 = 0 ∧ Squarefree (D / 4) ∧ (D / 4 % 4 = 2 ∨ D / 4 % 4 = 3)

D is a fundamental discriminant if and only if either D ≡ 1 mod 4 and D is squarefree, or D = 4 * d with d squarefree and d ≡ 2, 3 mod 4.

theorem Int.isFundamentalDiscr_iff_forall_prime E1 #

∀ {D : ℤ},
  D.IsFundamentalDiscr ↔
    (D % 4 = 0 ∨ D % 4 = 1) ∧ ∀ (p : ℕ), Nat.Prime p → ¬∃ e, D = ↑p ^ 2 * e ∧ (e % 4 = 0 ∨ e % 4 = 1)

Prime-by-prime characterisation of fundamental discriminants, uniform in p. Unlike the definition, which singles out p = 2, the second clause is the same for every prime.

theorem Int.isFundamentalDiscr_four_mul_add_one E1 #

∀ {m : ℤ}, (4 * m + 1).IsFundamentalDiscr ↔ Squarefree (4 * m + 1)

theorem Int.isFundamentalDiscr_four_mul E1 #

∀ {m : ℤ}, (4 * m).IsFundamentalDiscr ↔ Squarefree m ∧ (m % 4 = 2 ∨ m % 4 = 3)