Documentation

ArkLib.Data.Domain.CosetFftDomain.Subdomain

Subdomains of smooth coset FFT domains #

This file develops the hierarchy of subdomains of a smooth coset FFT domain.

It also studies roots, cardinalities of fibers of powering maps, and provides a root-finding procedure.

Main definitions #

Main results #

def Domain.CosetFftDomainClass.subdomain_embed {n : } (i : ) (k : Fin (2 ^ (n - i))) :
Fin (2 ^ n)

Embed the index type of the ith subdomain into the index type of the ambient smooth coset FFT domain. When i < n, this sends k to 2 ^ i * k; when i ≥ n, the subdomain is trivial and everything maps to 0.

Instances For

    The subdomain embedding sends 0 to 0.

    def Domain.CosetFftDomainClass.subdomain {F : Type} [Field F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] (ω : D) (i : ) :

    Given a smooth coset FFT domain ω of log-order n, return its subdomain of log-order n - i.

    The resulting coset generator is ω 0 ^ 2 ^ i.

    Instances For
      theorem Domain.CosetFftDomainClass.mem_subdomain_of_eq_vals {F : Type} [Field F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} {i j : } (hij : i = j) :
      x subdomain ω i x subdomain ω j

      Membership in subdomains is invariant under equal subdomain indices.

      @[simp]
      theorem Domain.CosetFftDomainClass.subdomain_generator_pow_generator {F : Type} [Field F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} (i : ) :
      (subdomain ω i).cosetGenerator = ω 0 ^ 2 ^ i

      The coset generator of the ith subdomain is ω 0 ^ 2 ^ i.

      @[simp]
      theorem Domain.CosetFftDomainClass.mem_subdomain_0_iff_mem {F : Type} [Field F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} :
      x subdomain ω 0 x ω

      Membership to the 0th subdomain is the same as membership to the original coset FFT domain.

      theorem Domain.CosetFftDomainClass.mem_subdomain_n_iff_eq_pow_generator {F : Type} [Field F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} :
      x subdomain ω n x = ω 0 ^ 2 ^ n

      The nth subdomain consists exactly of the single element ω 0 ^ 2 ^ n.

      theorem Domain.CosetFftDomainClass.pow_mem_of_mem {F : Type} [Field F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} {i j : } (hsum : j + i n) (h : x subdomain ω j) :
      x ^ 2 ^ i subdomain ω (j + i)

      If x lies in the jth subdomain, then x ^ 2 ^ i lies in the (j + i)th subdomain, provided j + i ≤ n.

      theorem Domain.CosetFftDomainClass.pow_mem_subdomain_of_mem_subdomain_0 {F : Type} [Field F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} {i : } (hi : i n) (h : x subdomain ω 0) :
      x ^ 2 ^ i subdomain ω i

      If x lies in the original domain, then x ^ 2 ^ i lies in the ith subdomain.

      theorem Domain.CosetFftDomainClass.mem_subdomain_of_le_of_mem_subdomain {F : Type} [Field F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} {i j : } (h : j i) (hx : x subdomain ω i) :
      ω 0 ^ 2 ^ j * (ω 0)⁻¹ ^ 2 ^ i * x subdomain ω j

      If j ≤ i, then we do not have x ∈ subdomain ω i → x ∈ subdomain ω j in the general case but rescaling x as ω 0 ^ 2 ^ j * (ω 0)⁻¹ ^ 2 ^ i * x gives us a member of subdomain ω j.

      theorem Domain.CosetFftDomainClass.card_roots {F : Type} [Field F] [DecidableEq F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} {i j : } (hij : i + j n) (h : x subdomain ω (i + j)) :
      {yCosetFftDomain.toFinset (subdomain ω i) | y ^ 2 ^ j = x}.card = 2 ^ j

      If x lies in the (i + j)th subdomain, then it has exactly 2 ^ j preimages under y ↦ y ^ 2 ^ j from the ith subdomain.

      theorem Domain.CosetFftDomainClass.root_exists {F : Type} [Field F] [DecidableEq F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} {i j : } (hij : i + j n) (h : x subdomain ω (i + j)) :
      ysubdomain ω i, y ^ 2 ^ j = x

      Every element of the (i + j)th subdomain has a 2 ^ jth root in the ith subdomain.

      theorem Domain.CosetFftDomainClass.sq_root_mem_subdomain {F : Type} [Field F] [DecidableEq F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} {i : } (hi : i < n) {y : F} (hx : x subdomain ω (i + 1)) (hy : y ^ 2 = x) :
      y subdomain ω i

      Any square root of an element of the (i + 1)th subdomain lies in the ith subdomain.

      theorem Domain.CosetFftDomainClass.square_roots_explicit {F : Type} [Field F] [DecidableEq F] {n : } {D : Type} [FunLike D (Fin (2 ^ n)) F] [CosetFftDomainClass D (Fin (2 ^ n)) F] {ω : D} {x : F} {i : } (hi : i < n) {y : F} (hx : x subdomain ω (i + 1)) (hy : y ^ 2 = x) :
      {yCosetFftDomain.toFinset (subdomain ω i) | y ^ 2 = x} = {y, -y}

      The square roots of x inside the ith subdomain are exactly y and -y, for any square root y of x.

      @[reducible, inline]

      Concrete notation for taking the ith subdomain of a smooth coset FFT domain.

      Instances For

        Search through a smooth coset FFT domain for an element whose 2 ^ ith power is x, using fuel as the remaining search bound.

        Instances For

          Finds a 2 ^ nth root of x.

          Instances For
            theorem Domain.CosetFftDomain.twoNthRoot_correct {F : Type} [Field F] [DecidableEq F] {n i : } {ω : SmoothCosetFftDomain n F} (hi : i n) {x : (CosetFftDomainClass.toFinset (subdomain ω i))} :
            (twoNthRoot x) ^ 2 ^ i = x

            The value returned by twoNthRoot is a 2 ^ ith root of its input.

            @[simp]

            Specialized correctness statement for square roots from the first subdomain.