Documentation

MIPRE.Foundations.LowDegree.BinarySquareRoot

A polynomial-time square root in the binary cyclic group algebra #

For an odd-length coefficient vector, reading the doubled indices means reading the even positions followed by the odd positions. Splitting those two lists and appending them is polynomial-time in the ambient cost model. This implements the square-root step of self-dualization; it does not compute the inverse Gram element or the initial normal basis.

def MIPRE.LowDegree.splitParity {α : Type u_1} :
List α → List α × List α

Split a list into its even-position and odd-position subsequences.

Equations
Instances For
    theorem MIPRE.LowDegree.splitParity_eq_foldr {α : Type u_1} (l : List α) :
    splitParity l = List.foldr (fun (a : α) (s : List α × List α) => (a :: s.2, s.1)) ([], []) l
    theorem MIPRE.LowDegree.getD_splitParity {α : Type u_1} (l : List α) (fallback : α) (n : ℕ) :
    (splitParity l).1.getD n fallback = l.getD (2 * n) fallback ∧ (splitParity l).2.getD n fallback = l.getD (2 * n + 1) fallback
    def MIPRE.LowDegree.rootBits {α : Type u_1} (l : List α) :
    List α

    The doubled-index permutation for an odd-length coefficient vector.

    Equations
    Instances For
      @[simp]
      theorem MIPRE.LowDegree.length_rootBits {α : Type u_1} (l : List α) :
      theorem MIPRE.LowDegree.getD_rootBits {α : Type u_1} (l : List α) (fallback : α) (hodd : Odd l.length) {i : ℕ} (hi : i < l.length) :
      (rootBits l).getD i fallback = l.getD ((i + i) % l.length) fallback
      noncomputable def MIPRE.LowDegree.splitParityStep {α : Type u_1} [Cost.SizedEncoding α] :
      Cost.PolyTimeFun ((List α × List α) × α) (List α × List α)
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        The parity split, with an ambient program and polynomial cost proof.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def MIPRE.LowDegree.rootBitsProg {α : Type u_1} [Cost.SizedEncoding α] :

          The coefficient square-root permutation, in polynomial time.

          Equations
          Instances For

            On bit vectors, the ambient running time is polynomial in the vector length.

            noncomputable def MIPRE.LowDegree.groupOfBits {k : ℕ} [NeZero k] (l : Cost.BitStr) :

            A binary coefficient list interpreted in the cyclic group algebra.

            Equations
            Instances For

              The implemented permutation agrees with the algebraic square-root formula.

              Correctness of the polynomial-time square-root program on odd-length vectors.