Documentation

HexNumberFieldTower.FactorRaw

Convert raw flattened coefficient arrays to a runtime-indexed tower polynomial.

Equations
Instances For

    Extract flattened coefficient arrays from a runtime-indexed tower polynomial.

    Equations
    Instances For
      def Hex.NumberTower.Factor.yunAux (levels : List Level) (w repeated : DensePoly (Arithmetic.Coeff levels)) (multiplicity fuel : Nat) (out : Array (Array (Array Rat) × Nat)) :

      Fuel-bounded Yun loop. Here w is the product of the factors whose multiplicity is still at least the current index, while repeated contains their remaining copies. Dividing w by their gcd emits the squarefree component of exactly that multiplicity.

      Equations
      Instances For

        Yun squarefree decomposition over raw tower coordinates. Zero and constants have no positive-degree components.

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

          Polynomial power used by reconstruction checks, computed by repeated squaring so high multiplicities do not induce a linear multiplication chain.

          Equations
          Instances For

            Reconstruct a monic polynomial from raw Yun components.

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

              Check that the emitted multiplicities are in strictly increasing order.

              Equations
              Instances For

                Check that distinct Yun components are pairwise coprime.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Hex.NumberTower.Factor.checkYun (levels : List Level) (f : Array (Array Rat)) (components : Array (Array (Array Rat) × Nat)) :

                  Self-check a Yun decomposition: multiplicities are positive and strictly increasing, the monic squarefree components are pairwise coprime, and their powered product reconstructs the monic input. Polynomials of degree zero have the unique empty decomposition.

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

                    Recover the rational polynomial stored by base-tower raw coordinates.

                    Equations
                    Instances For

                      Convert a rational polynomial back to raw base-tower coordinates.

                      Equations
                      Instances For

                        Complete factorization of a monic squarefree rational polynomial. The Berlekamp–Zassenhaus entries are expanded by multiplicity before their monic normalizations are checked against the input. The recursive caller admits only squarefree inputs, so the companion proves that this expansion contains one copy of each irreducible factor; expanding here also makes reconstruction independent of that semantic fact.

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

                          The newest generator as a runtime-indexed element. A linear level already lies in the lower field, so its generator is the negative constant term of its monic relation.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Hex.NumberTower.Factor.shiftTop (level : Level) (lower : List Level) (f : Array (Array Rat)) (c : Int) :

                            Substitute X - c*alpha in a current-level polynomial.

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

                              Embed a lower-tail polynomial into the current level. Mixed-radix order places lower coordinates in the first top-generator block.

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

                                Start recovery division with the monic shifted component when it has smaller degree than the lifted norm factor. The remaining Euclidean chain uses exactly the reference gcd's remaining fuel and remainder representative.

                                Equations
                                Instances For
                                  def Hex.NumberTower.Factor.recover (level : Level) (lower : List Level) (shift : Int) (component : Array (Array Rat)) (lowerFactors : Array (Array (Array Rat))) :

                                  Recover current-level factors from irreducible lower factors of a squarefree Trager norm, then undo the selected generator shift.

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

                                    Recursive Trager factorization of one monic squarefree component. The recursion is structural in the tower height; every proper level performs one bounded one-level norm search and recurses only on the lower tail.

                                    Equations
                                    Instances For

                                      Runtime factorization payload before re-indexing coefficients by a public NumberTower.

                                      • scalar : Array Rat

                                        The leading scalar's raw coordinates.

                                      • factors : Array (Array (Array Rat) × Nat)

                                        Raw monic factors, canonically sorted, each with its multiplicity.

                                      Instances For

                                        Flatten polynomial coefficient coordinates for canonical sorting. Each coefficient carries its length, so the key remains injective even for malformed raw inputs whose coordinate blocks do not have the tower width.

                                        Equations
                                        Instances For

                                          Insert one factor into a canonically ordered factor list. Equal coordinate keys are combined by adding multiplicities.

                                          Equations
                                          Instances For

                                            Sort factors canonically and combine duplicate coordinate keys.

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

                                              Check that every pair of factors is in strict canonical order. Strictness ensures each irreducible occurs once, with its multiplicity stored in the paired natural number.

                                              Equations
                                              Instances For

                                                Multiply a scalar and powered raw factor list.

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

                                                  Executable recursive irreducibility checker for a monic squarefree raw tower polynomial. The rational base delegates to the integer-polynomial checker shared by rational factorization; proper towers accept exactly a singleton Trager reconstruction.

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

                                                    Append all irreducible factors of one Yun component, carrying the Yun multiplicity into the accumulated factor list.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      def Hex.NumberTower.Factor.check (levels : List Level) (f : Array (Array Rat)) (scalar : Array Rat) (factors : Array (Array (Array Rat) × Nat)) :

                                                      Full executable raw factorization certificate check. At proper tower levels, “irreducible” means a piece the recursive Trager checker cannot split; the Mathlib companion supplies the semantic irreducibility theorem. Cheap reconstruction and canonical-order checks precede recursive replay.

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

                                                        Produce a canonical factorization candidate with checked Yun multiplicities and recursive Trager recovery. The public dependent constructor performs the one full executable certificate replay.

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