Documentation

RamanujanNagell.QuadraticIntegers.QuadraticIntegerROI

instance QuadraticInteger.field {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] :
Fact (∀ (r : ), r ^ 2 d + 0 * r)
@[simp]
theorem QuadraticInteger.re_ratCast {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] (q : ) :
(↑q).re = q
@[simp]
theorem QuadraticInteger.im_ratCast {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] (q : ) :
(↑q).im = 0
theorem QuadraticInteger.ratCast_eq_coe {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] (q : ) :
q = q
@[simp]
theorem QuadraticInteger.re_intCast_K {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] (n : ) :
(↑n).re = n
@[simp]
theorem QuadraticInteger.im_intCast_K {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] (n : ) :
(↑n).im = 0
theorem QuadraticInteger.adjoin_z_eq_top {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (h : b 0) :
theorem QuadraticInteger.trace {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } :
theorem QuadraticInteger.norm {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } :
(Algebra.norm ) (a + b QuadraticAlgebra.omega) = a ^ 2 - d * b ^ 2
theorem QuadraticInteger.trace_int {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) :
∃ (t : ), t = 2 * a
theorem QuadraticInteger.a_half_int {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) (ha : ¬∃ (A : ), A = a) :
∃ (A : ), A = a - 2⁻¹
theorem QuadraticInteger.norm_int {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) :
∃ (n : ), n = a ^ 2 - d * b ^ 2
noncomputable def QuadraticInteger.n {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) :
Equations
Instances For
    theorem QuadraticInteger.n_spec {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) :
    (n hz) = a ^ 2 - d * b ^ 2
    theorem QuadraticInteger.four_n {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) :
    4 * (n hz) = (2 * a) ^ 2 - d * (2 * b) ^ 2
    theorem QuadraticInteger.squarefree_mul {n : } {r : } (hn : Squarefree n) (hnr : ∃ (m : ), n * r ^ 2 = m) :
    ∃ (t : ), t = r
    theorem QuadraticInteger.two_b_int {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) :
    ∃ (B₂ : ), B₂ = 2 * b
    theorem QuadraticInteger.b_int_of_a_int {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) (ha : ∃ (A : ), A = a) :
    ∃ (B : ), B = b
    theorem QuadraticInteger.e_spec {d : } [h : Fact (d 1 [ZMOD 4])] :
    4 * ((d - 1) / 4) = d - 1
    theorem QuadraticInteger.algebra_S_K {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] [h : Fact (d 1 [ZMOD 4])] :
    theorem QuadraticInteger.d_1_int {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] [h : Fact (d 1 [ZMOD 4])] {a b : } (hz : IsIntegral (a + b QuadraticAlgebra.omega)) (ha : ∃ (A : ), A = a) :
    theorem QuadraticInteger.d_1 {d : } [sf : Fact (Squarefree d)] [alt : d.natAbs.AtLeastTwo] [h : Fact (d 1 [ZMOD 4])] :