Documentation

Complexitylib.RationalHitting.Internal.TaylorComputation

Rational hitting lists: taylor computation #

Adapted from OpenAI's formalization at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a. Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Computability/RationalHitting/TaylorComputation.lean

Imports, namespaces, module visibility, documentation, and formatting are adapted for complexitylib. The source theorem statements and mathematical arguments are retained.

theorem Complexity.RationalHitting.StackLanguage.range_sum_fin {A : Type} [AddCommMonoid A] (n : ℕ) (f : ℕ → A) :
(List.map f (List.range n)).sum = ∑ i : Fin n, f ↑i
theorem Complexity.RationalHitting.StackLanguage.range_sum_zmod {A : Type} [AddCommMonoid A] (m : ℕ) [NeZero m] (f : ZMod m → A) :
(List.map (fun (k : ℕ) => f ↑k) (List.range m)).sum = ∑ k : ZMod m, f k
theorem Complexity.RationalHitting.StackLanguage.zmod_val_sub {m : ℕ} [NeZero m] (a b : ZMod m) :
(a - b).val = (a.val + (m - b.val) % m) % m

One integer summand in a Taylor test-matrix entry.

Equations
Instances For

    Sum the integer Taylor test-matrix entry over its finite range.

    Equations
    Instances For

      Set Taylor entries outside the retained column range to zero.

      Equations
      Instances For
        theorem Complexity.RationalHitting.StackLanguage.Runtime.taylor_eq (m : ℕ) (a t : ℤ) (i j : Fin m) :
        taylor m a t ↑i ↑j = IntegralTest.full m a t i j
        theorem Complexity.RationalHitting.StackLanguage.Runtime.padded_eq (m N : ℕ) (a t : ℤ) (i j : Fin m) :
        padded m N a t ↑i ↑j = IntegralTest.padded m N a t i j
        @[reducible, inline]

        Encoded arguments for one Taylor matrix entry.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem Complexity.RationalHitting.StackLanguage.Runtime.taylorTerm_poly :
          Poly fun (a : TaylorArgs × Unary) => taylorTerm a.1.1.val a.1.2.1 a.1.2.2.1 a.1.2.2.2.1.val a.1.2.2.2.2.val a.2.val
          theorem Complexity.RationalHitting.StackLanguage.Runtime.taylor_poly :
          Poly fun (a : TaylorArgs) => taylor a.1.val a.2.1 a.2.2.1 a.2.2.2.1.val a.2.2.2.2.val
          theorem Complexity.RationalHitting.StackLanguage.Runtime.padded_poly :
          Poly fun (a : Unary × TaylorArgs) => padded a.2.1.val a.1.val a.2.2.1 a.2.2.2.1 a.2.2.2.2.1.val a.2.2.2.2.2.val
          @[reducible, inline]

          Unary parameters for variable count, truncation, dimension, degree, and grid size.

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

            Number of input variables in the encoded parameter record.

            Equations
            Instances For
              @[reducible, inline]

              Truncation threshold in the encoded parameter record.

              Equations
              Instances For
                @[reducible, inline]

                Cyclotomic matrix dimension in the encoded parameter record.

                Equations
                Instances For
                  @[reducible, inline]

                  Cyclotomic degree in the encoded parameter record.

                  Equations
                  Instances For
                    @[reducible, inline]

                    Grid side length in the encoded parameter record.

                    Equations
                    Instances For

                      Construct the encoded generator parameters from variable count and formula size.

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

                        Compute the cyclotomic degree as a unary value.

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