Documentation

HexNumberFieldTower.Flatten

A one-generator presentation of a tower together with checked executable coordinate conversions in both directions.

  • The canonical primitive element generating the whole tower.

  • toPrimitive : T.ElemQAdjoin self.root

    Rewrite tower coordinates in the primitive presentation.

  • fromPrimitive : QAdjoin self.rootT.Elem

    Evaluate primitive coordinates back to a tower element.

Instances For

    The finite combined bound for primitive-element and coordinate-recovery collisions in a field of dimension dimension.

    Equations
    Instances For

      One exact absolute generator and its mixed-radix coordinate in the final tower.

      • degree : Nat

        The generator's relative degree at its level.

      • The exactified canonical value of the generator.

      • value : T.Elem

        The generator's mixed-radix coordinate in the final tower.

      Instances For

        A primitive generator accumulated through the lower part of the tower.

        • dimension : Nat

          The mixed-radix dimension generated so far.

        • The canonical primitive element accumulated so far.

        • value : T.Elem

          The accumulated primitive element as a tower coordinate.

        • coordinates : Array (PolyQuot self.root.p self.root.x)

          Each combined generator's coordinate in the accumulated presentation.

        Instances For

          Standard coordinate vector of length dimension.

          Equations
          Instances For

            Exactify a top-first level suffix from the oldest level upward, returning the accumulated generators and its mixed-radix dimension.

            Equations
            Instances For

              Exactify the stored roots from the oldest level upward and pair them with their canonical mixed-radix generator coordinates in the final tower.

              Equations
              Instances For

                Try one deterministic signed shift for a candidate of the full required degree.

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

                  Lift an integer polynomial coefficientwise into a fixed primitive presentation.

                  Equations
                  Instances For

                    Evaluate a rational coordinate polynomial in another fixed presentation.

                    Equations
                    Instances For
                      def Hex.NumberTower.Flatten.tracePair? (theta alpha gamma : AlgebraicNumber) :
                      Option (PolyQuot gamma.p gamma.x × PolyQuot gamma.p gamma.x)

                      Recover both inputs through the proved-total trace-pairing coordinates of a primitive candidate.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        def Hex.NumberTower.Flatten.checkCoordinate? (target gamma : AlgebraicNumber) (coordinate : PolyQuot gamma.p gamma.x) :
                        Option (PolyQuot gamma.p gamma.x)

                        Validate a recovered primitive coordinate against its canonical algebraic target.

                        Equations
                        Instances For
                          def Hex.NumberTower.Flatten.checkPair? (theta alpha gamma : AlgebraicNumber) (coordinates : PolyQuot gamma.p gamma.x × PolyQuot gamma.p gamma.x) :
                          Option (PolyQuot gamma.p gamma.x × PolyQuot gamma.p gamma.x)

                          Validate both fast gcd coordinates before exposing them.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Hex.NumberTower.Flatten.recoverPairFast? (theta alpha gamma : AlgebraicNumber) (shift : Int) :
                            Option (PolyQuot gamma.p gamma.x × PolyQuot gamma.p gamma.x)

                            Recover theta and alpha in a candidate presentation gamma = theta + shift * alpha using the validated linear-gcd path only.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def Hex.NumberTower.Flatten.recoverPair? (theta alpha gamma : AlgebraicNumber) (shift : Int) :
                              Option (PolyQuot gamma.p gamma.x × PolyQuot gamma.p gamma.x)

                              Recover theta and alpha in a primitive candidate presentation. The bounded scan uses only recoverPairFast?; this total fallback adds trace pairing for the maximum-degree candidate and for a zero shift.

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

                                A full-degree primitive candidate together with its recovered old and new generator coordinates.

                                • shift : Int

                                  The signed shift producing the accepted candidate.

                                • The accepted full-degree primitive candidate.

                                • thetaCoordinate : PolyQuot self.root.p self.root.x

                                  The prior generator's coordinate in the candidate presentation.

                                • alphaCoordinate : PolyQuot self.root.p self.root.x

                                  The new generator's coordinate in the candidate presentation.

                                Instances For

                                  Search a prescribed shift suffix, rejecting degree collisions and any candidate for which validated linear-gcd recovery fails.

                                  Equations
                                  Instances For

                                    Try the direct full-degree search first. If it is exhausted, select a maximum-degree primitive candidate and recover both input coordinates through the generated field.

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

                                      Combine the fixed generators one level at a time, retaining a tower coordinate for each accepted canonical primitive element.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        def Hex.NumberTower.Flatten.extendBasis {p : ZPoly} {x : SimpleRoot p} (basis : Array (PolyQuot p x)) (generator : PolyQuot p x) (degree : Nat) :

                                        Extend lower mixed-radix basis images by powers of one newly recovered generator. The lower basis remains the fastest-varying coordinate block.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          def Hex.NumberTower.Flatten.basisImages {T : NumberTower} {p : ZPoly} {x : SimpleRoot p} (generators : Array (Generator T)) (coordinates : Array (PolyQuot p x)) :

                                          Images of the full tower mixed-radix basis in the primitive presentation.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            def Hex.NumberTower.Flatten.toPrimitiveWith {T : NumberTower} {p : ZPoly} {x : SimpleRoot p} (images : Array (PolyQuot p x)) (a : T.Elem) :

                                            Apply a rational coordinate vector to precomputed primitive-basis images.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              def Hex.NumberTower.Flatten.fromPrimitiveWith {T : NumberTower} {p : ZPoly} {x : SimpleRoot p} (generator : T.Elem) (a : PolyQuot p x) :

                                              Evaluate a reduced primitive coordinate polynomial at its tower element.

                                              Equations
                                              Instances For

                                                Evaluate an integer polynomial at a tower element.

                                                Equations
                                                Instances For
                                                  def Hex.NumberTower.Flatten.certifies {T : NumberTower} (candidate : Candidate T) (images : Array (PolyQuot candidate.root.p candidate.root.x)) :

                                                  Verify the coordinate composite on the tower basis and check that the candidate tower element satisfies its claimed primitive minimal polynomial. The first condition makes the rational-linear coordinate maps inverse; the root relation and irreducibility make evaluation through the primitive quotient an injective ring map. The resulting dimension squeeze makes the linear inverse multiplicative as well. The size, dimension, and root checks remain independent executable defenses even where the semantic proof can derive them from the successful construction.

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

                                                    Replace a checked tower by one canonical primitive-element presentation. The result is returned only after exact generator recovery, a tower-basis round trip, and the primitive polynomial relation succeed.

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