Documentation

HexBerlekampZassenhaus.QuadraticNorm

def Hex.quadStep (d a : Int) (h : ZPoly × ZPoly) :

One synthetic-shift step in (ℤ[t]/(t² - d))[X]: from the pair of h = p + q · t and the next coefficient a, the pair of a + (X - t) · h.

Since t² = d, (X - t) · (p + q t) = (X p - d q) + (X q - p) t, so the step reads both components of h and writes both components of the result.

Equations
Instances For
    def Hex.quadShift (d : Int) (coeffs : List Int) :

    The coefficient pair of g(X - t) in (ℤ[t]/(t² - d))[X], read off the ascending coefficient list of g: Hex.quadShift returns (p, q) with g(X - t) = p + q · t.

    This is the synthetic Taylor shift with shift constant -t, carrying the coefficient pair through Horner's rule from the top coefficient down.

    Equations
    Instances For
      def Hex.quadNorm (d : Int) (g : ZPoly) :

      N_d(g) = g(X - t) · g(X + t) with t² = d, an integer polynomial.

      Writing g(X - t) = p + q t, the conjugate is p - q t and the product is p² - d q²: the t component cancels by antisymmetry, so only the rational part is ever materialized.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Hex.quadShift_nil (d : Int) :

        The empty coefficient list is the zero polynomial.

        theorem Hex.quadShift_cons (d a : Int) (as : List Int) :
        quadShift d (a :: as) = quadStep d a (quadShift d as)

        Reading one more coefficient off the front is one Hex.quadStep.

        The norm in terms of the shifted pair, with the t component already cancelled.

        def Hex.iteratedNorm (c : Int) (ds : Array Int) :

        F(c; ds) = N_{dₖ}(⋯ N_{d₁}(X - c) ⋯), the iterated quadratic norm of the translation c along the radicands ds.

        Equations
        Instances For

          Is m the square of an integer?

          Equations
          Instances For

            The 2ⁿ - 1 products of the nonempty sublists of ds.

            The head contributes its own singleton and doubles every product from the tail, once with and once without it.

            Equations
            Instances For

              Are the radicands multiplicatively independent in ℚ*/(ℚ*)²?

              Equivalently: is no nonempty subproduct a perfect square? A zero radicand and a repeated radicand are both rejected by this, as they must be.

              Equations
              Instances For

                Translation and radicands for one iterated quadratic norm.

                • translation : Int

                  The translation: the certified polynomial is ∏_ε (X - c - ∑ εᵢ √dᵢ).

                • radicands : Array Int

                  The radicands, in the order the norms are taken.

                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Does the certificate prove f irreducible?

                    A true result asserts both halves: the radicands are independent, and f is, up to the unit -1, exactly the iterated quadratic norm they describe.

                    Every F(c; d) is monic and -1 is a unit of ℤ[X], so f and -f are irreducible together; that sign is the whole normalization the identification needs. There is no scaling and no content division, since a primitive integer polynomial with leading coefficient outside {1, -1} is never ± F(c; d).

                    Equations
                    Instances For