Documentation

HexPolyFast.RemainderTree

A nonzero monic polynomial suitable as a remainder-tree leaf.

Instances For

    RemainderSpec origin leaves results states that results contains, in order, the canonical-size remainder of origin at every corresponding leaf. The divisibility and size conditions uniquely characterize a monic remainder.

    Instances For

      An opaque balanced remainder tree whose root has fixed reciprocal capacity and whose proper nodes use the degree of their sibling subtree.

      Instances For
        def Hex.DensePoly.RemainderTree.build {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (mul : MulPlan R) (capacity : Nat) (leaves : Array (MonicLeaf R)) (hone : 1 ≠ 0) :

        Build a cached remainder tree. capacity is the reciprocal capacity of the root; every proper node derives the exact worst-case capacity it needs from its sibling subtree. The empty leaf sequence is represented without an internal root.

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

          Leaf divisors in their original order.

          Equations
          Instances For

            Proof-carrying leaf entries in their original order.

            Equations
            Instances For

              Number of leaf divisors.

              Equations
              Instances For

                Reciprocal capacity cached at the root.

                Equations
                Instances For

                  Degree of the root product, computed as the sum of the leaf degrees.

                  Equations
                  Instances For

                    Compute all leaf remainders with the cached reciprocal plans. Returns none exactly when the input needs more reciprocal precision than the root capacity. Proper-node capacities are sufficient by construction.

                    Equations
                    Instances For

                      A caller-supplied root capacity covering the input above the root degree makes the entire traversal succeed. Every proper-node guard follows from the sibling-degree capacities recorded by construction.

                      theorem Hex.DensePoly.RemainderTree.remainders?_sound {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (tree : RemainderTree R) (p : DensePoly R) (results : Array (DensePoly R)) (h : tree.remainders? p = some results) :

                      Every successful traversal returns, in leaf order, the canonical-size remainder of the input modulo each leaf polynomial.