Documentation

Mathlib.Algebra.QuadraticAlgebra.Int

Quadratic algebras over ℤ #

For a b : ℤ, QuadraticAlgebra ℤ a b is an order in QuadraticAlgebra ℚ a b.

Main results #

Maximality of the order #

theorem QuadraticAlgebra.Int.isIntegral_inv_smul_of_dvd {a b d t : ℤ} (ht₁ : d ∣ 2 * t + b) (ht₂ : 4 * d ^ 2 ∣ (2 * t + b) ^ 2 - discr a b) :
IsIntegral ℤ ((↑d)⁻¹ • (t • 1 + omega))

If d ∣ 2 * t + b and 4 * d ^ 2 ∣ (2 * t + b) ^ 2 - discr a b, then (t + ω) / d is integral over ℤ.

An integral element z of QuadraticAlgebra ℚ a b lies in QuadraticAlgebra ℤ a b iff its imaginary part is an integer.

If z is an integral element of QuadraticAlgebra ℚ a b, then the denominator of z.im times z lies in QuadraticAlgebra ℤ a b.

theorem QuadraticAlgebra.Int.exists_isIntegral_notMem_of_sq_mul {a b d e : ℤ} (hd : 1 < d.natAbs) (he : discr a b = d ^ 2 * e) (he' : e % 4 = 0 ∨ e % 4 = 1) :

If discr a b = d ^ 2 * e with e congruent to 0 or 1 modulo 4 and 1 < |d|, then there is an integral element z of QuadraticAlgebra ℚ a b such that d • z lies in QuadraticAlgebra ℤ a b but z does not.

theorem QuadraticAlgebra.Int.exists_mul_im_sq_eq {a b : ℤ} {z : QuadraticAlgebra ℚ ↑a ↑b} {x : QuadraticAlgebra ℤ a b} {d : ℤ} (hz : IsIntegral ℤ z) (hx : (algebraMap (QuadraticAlgebra ℤ a b) (QuadraticAlgebra ℚ ↑a ↑b)) x = d • z) :
∃ (t : ℤ) (n : ℤ), discr a b * x.im ^ 2 = d ^ 2 * (t ^ 2 - 4 * n)

If z is integral and d • z is the image of an element x of QuadraticAlgebra ℤ a b, then discr a b * x.im ^ 2 is d ^ 2 times t ^ 2 - 4 * n (here t and n are the trace and the norm of z).

theorem QuadraticAlgebra.Int.exists_sq_mul_of_isCoprime {a b : ℤ} {z : QuadraticAlgebra ℚ ↑a ↑b} {x : QuadraticAlgebra ℤ a b} {d : ℤ} (hz : IsIntegral ℤ z) (hd : IsCoprime d x.im) (hx : (algebraMap (QuadraticAlgebra ℤ a b) (QuadraticAlgebra ℚ ↑a ↑b)) x = d • z) :
∃ (e : ℤ), discr a b = d ^ 2 * e ∧ (e % 4 = 0 ∨ e % 4 = 1)

Let z be an integral element such that d • z is the image of an element x of QuadraticAlgebra ℤ a b, with d coprime to x.im. Then discr a b is d ^ 2 times an integer congruent to 0 or 1 modulo 4.

theorem QuadraticAlgebra.Int.exists_im_den_sq_mul {a b : ℤ} {z : QuadraticAlgebra ℚ ↑a ↑b} (hz : IsIntegral ℤ z) :
∃ (e : ℤ), discr a b = ↑z.im.den ^ 2 * e ∧ (e % 4 = 0 ∨ e % 4 = 1)

If z is an integral element of QuadraticAlgebra ℚ a b, then discr a b is the square of the denominator of z.im times an integer congruent to 0 or 1 modulo 4.