Documentation

HexPolyFast.Multipoint

The monic linear factor vanishing at a.

Equations
Instances For

    The point factor is x - a.

    Evaluating the point factor at x gives x - a.

    @[simp]

    The point factor vanishes at its defining point.

    theorem Hex.DensePoly.pointFactor_size {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (a : R) (hone : 1 ≠ 0) :

    Over a nontrivial ring, a point factor has size two.

    Every point factor is monic, including over the trivial ring.

    inductive Hex.DensePoly.PointNode (R : Type u) [DecidableEq R] [Lean.Grind.CommRing R] (mul : MulPlan R) :
    List R → DensePoly R → Type u

    Internal balanced remainder-tree shape, indexed by its exact point sequence and product polynomial. Public clients use it only through opaque plans.

    Instances For
      def Hex.DensePoly.PointNode.CapacitySafe {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] {mul : MulPlan R} {points : List R} {poly : DensePoly R} :
      PointNode R mul points poly → Prop

      The cached child plans have the exact divisor sizes and sibling capacities needed by a bounded remainder-tree traversal.

      Equations
      Instances For

        An opaque reusable multipoint-evaluation plan.

        Instances For

          Build the point-product tree and all finite-capacity reciprocal plans.

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

            The planned point sequence.

            Equations
            Instances For
              @[simp]
              theorem Hex.DensePoly.EvalPlan.points_build {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (mul : MulPlan R) (points : Array R) :
              (build mul points).points = points

              Building an evaluation plan preserves the supplied point sequence.

              Number of planned points.

              Equations
              Instances For

                Lawful multiplication plan used by the cached tree.

                Equations
                Instances For

                  The cached indexed tree, when the point sequence and coefficient ring are nondegenerate.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    theorem Hex.DensePoly.EvalPlan.cachedNode_build_isSome {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (mul : MulPlan R) (points : Array R) (hone : 1 ≠ 0) (hne : points.toList ≠ []) :

                    A nonempty point sequence over a nontrivial ring has a cached node.

                    Rebuild the observational leaf-and-root product-tree view. Constructing an evaluation plan does not eagerly recompute this redundant product tree.

                    Equations
                    Instances For
                      noncomputable def Hex.DensePoly.EvalPlan.eval {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (plan : EvalPlan R) (f : DensePoly R) :

                      Specification of multipoint evaluation. The compiled implementation below replaces this direct map by the cached remainder tree.

                      Equations
                      Instances For
                        @[simp]
                        theorem Hex.DensePoly.EvalPlan.size_eval {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (plan : EvalPlan R) (f : DensePoly R) :
                        (plan.eval f).size = plan.size

                        Evaluation preserves the planned point count.

                        @[simp]

                        The points accessor has the advertised plan size.

                        theorem Hex.DensePoly.EvalPlan.eval_eq_map {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (plan : EvalPlan R) (f : DensePoly R) :
                        plan.eval f = Array.map (fun (x : R) => f.eval x) plan.points

                        Semantic expansion of the evaluation specification.

                        Executable cached remainder-tree evaluation. Oversized inputs and the degenerate ring use direct Horner evaluation, exactly as specified.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          theorem Hex.DensePoly.EvalPlan.eval_eq_impl {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (plan : EvalPlan R) (f : DensePoly R) :
                          plan.eval f = plan.evalImpl f

                          The cached implementation agrees exactly with direct evaluation.

                          @[csimp]

                          Compile multipoint evaluation through the cached remainder tree.

                          theorem Hex.DensePoly.EvalPlan.get_eval {R : Type u} [DecidableEq R] [Lean.Grind.CommRing R] (plan : EvalPlan R) (f : DensePoly R) (i : Nat) (hi : i < plan.size) :
                          (plan.eval f)[i] = f.eval plan.points[i]

                          Every output entry is evaluation at the corresponding planned point.