Documentation

CompPoly.Univariate.Context

Univariate Algorithm Contexts #

Algorithm dictionaries for reusable univariate polynomial operations, including canonical, NTT, and NTTFast-backed implementations.

structure CompPoly.CPolynomial.MulContext (R : Type u_2) [Semiring R] [BEq R] [LawfulBEq R] :
Type u_2

Explicit multiplication backend for univariate polynomial algorithms.

Instances For
    structure CompPoly.CPolynomial.ModContext (R : Type u_2) [Field R] [BEq R] [LawfulBEq R] :
    Type u_2

    Explicit remainder backend for algorithms that only need reduction modulo monic divisors.

    Instances For

      The default multiplication context, backed by canonical CPolynomial multiplication.

      Instances For
        def CompPoly.CPolynomial.MulContext.ntt {R : Type u_1} [Field R] [BEq R] [LawfulBEq R] (bestDomainForLength? : (requiredLen : ) → Option (NTT.FittingDomain R requiredLen)) :

        NTT-backed multiplication context with canonical multiplication for unsupported lengths.

        The context asks the selector for a domain that fits the current operands. If no supported domain is available, it uses ordinary CPolynomial multiplication.

        Instances For
          def CompPoly.CPolynomial.MulContext.nttFast {R : Type u_1} [Field R] [BEq R] [LawfulBEq R] (bestDomainForLength? : (requiredLen : ) → Option (NTT.FittingDomain R requiredLen)) :

          NTTFast-backed multiplication context with canonical multiplication for unsupported lengths.

          The context asks the selector for a domain that fits the current operands. If no supported domain is available, it uses ordinary CPolynomial multiplication.

          Instances For

            The default monic-remainder context, backed by CPolynomial.modByMonic.

            Instances For

              A remainder-only backend for monic remainders.

              Instances For

                A reversal-based monic-remainder backend parameterized by low-product multiplication.

                Instances For
                  def CompPoly.CPolynomial.ModContext.reversalNtt {R : Type u_1} [Field R] [BEq R] [LawfulBEq R] (bestDomainForLength? : (requiredLen : ) → Option (NTT.FittingDomain R requiredLen)) :

                  Monic remainders by reversal, using an NTT low-product backend.

                  Instances For
                    def CompPoly.CPolynomial.ModContext.reversalNttFast {R : Type u_1} [Field R] [BEq R] [LawfulBEq R] (bestDomainForLength? : (requiredLen : ) → Option (NTT.FittingDomain R requiredLen)) :

                    Monic remainders by reversal, using an NTTFast low-product backend.

                    Instances For