Cryptographic Boolean Functions in Lean

1.11. Fourier support🔗

Theorem1.11.1
Group: Chapter 1: Generalities on Boolean functions (40)
Group member previews
Preview
Definition 1.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Theorem 1.4.7
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 3.8.5
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Fourier-support bounds (Carlet, Section 2.2.2, p. 32). For \varphi:V_n\to\mathbb R, let N_{\widehat\varphi} =\bigl|\{u\in V_n:\widehat\varphi(u)\ne0\}\bigr|. If J\subseteq[n], b\in\mathbb F_2^{[n]\setminus J}, and \psi:\mathbb F_2^J\to\mathbb R is the coordinate restriction \psi(y)=\varphi(y,b), then N_{\widehat\psi}\le N_{\widehat\varphi}. For a Boolean function f:V_n\to\mathbb F_2, let \varphi_f:V_n\to\mathbb R be its \{0,1\}-valued real embedding. If f\ne0 and \deg_{\mathrm{alg}}(f)=d, then N_{\widehat{\varphi_f}}\ge 2^d. Finally, if \varphi\ne0, \varphi(x)=\sum_{S\subseteq[n]}\lambda_Sx^S is its unique NNF, and D=\max\{|S|:\lambda_S\ne0\} is its numerical degree, then N_{\widehat\varphi}\le\sum_{i=0}^{D}\binom ni.

Lean code for Theorem1.11.124 declarations
  • defdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    def CryptBoolean.rawFourierSupport {n : }
      (φ : FABL.PseudoBooleanFunction n) : Finset (FABL.F₂Cube n)
    def CryptBoolean.rawFourierSupport {n : }
      (φ : FABL.PseudoBooleanFunction n) :
      Finset (FABL.F₂Cube n)
    The support of Carlet's unnormalized Fourier transform. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.mem_rawFourierSupport {n : }
      (φ : FABL.PseudoBooleanFunction n) (u : FABL.F₂Cube n) :
      u  CryptBoolean.rawFourierSupport φ 
        CryptBoolean.rawFourierTransform φ u  0
    theorem CryptBoolean.mem_rawFourierSupport {n : }
      (φ : FABL.PseudoBooleanFunction n)
      (u : FABL.F₂Cube n) :
      u  CryptBoolean.rawFourierSupport φ 
        CryptBoolean.rawFourierTransform φ u 
          0
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.mem_rawFourierSupport_iff_vectorFourierCoeff_ne_zero
      {n : } (φ : FABL.PseudoBooleanFunction n) (u : FABL.F₂Cube n) :
      u  CryptBoolean.rawFourierSupport φ  FABL.vectorFourierCoeff φ u  0
    theorem CryptBoolean.mem_rawFourierSupport_iff_vectorFourierCoeff_ne_zero
      {n : }
      (φ : FABL.PseudoBooleanFunction n)
      (u : FABL.F₂Cube n) :
      u  CryptBoolean.rawFourierSupport φ 
        FABL.vectorFourierCoeff φ u  0
    Raw and normalized Fourier coefficients have exactly the same support. 
  • defdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    def CryptBoolean.indexedRawFourierTransform.{u_1} {ι : Type u_1} [Fintype ι]
      [DecidableEq ι] (φ : FABL.IndexedSignCube ι  ) (S : Finset ι) : 
    def CryptBoolean.indexedRawFourierTransform.{u_1}
      {ι : Type u_1} [Fintype ι]
      [DecidableEq ι]
      (φ : FABL.IndexedSignCube ι  )
      (S : Finset ι) : 
    Carlet's unnormalized Fourier transform on a sign cube with an arbitrary finite
    coordinate type. 
  • defdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    def CryptBoolean.indexedRawFourierSupport.{u_1} {ι : Type u_1} [Fintype ι]
      [DecidableEq ι] (φ : FABL.IndexedSignCube ι  ) : Finset (Finset ι)
    def CryptBoolean.indexedRawFourierSupport.{u_1}
      {ι : Type u_1} [Fintype ι]
      [DecidableEq ι]
      (φ : FABL.IndexedSignCube ι  ) :
      Finset (Finset ι)
    The support of the unnormalized Fourier transform on an indexed sign cube. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.mem_indexedRawFourierSupport.{u_1} {ι : Type u_1}
      [Fintype ι] [DecidableEq ι] (φ : FABL.IndexedSignCube ι  )
      (S : Finset ι) :
      S  CryptBoolean.indexedRawFourierSupport φ 
        CryptBoolean.indexedRawFourierTransform φ S  0
    theorem CryptBoolean.mem_indexedRawFourierSupport.{u_1}
      {ι : Type u_1} [Fintype ι]
      [DecidableEq ι]
      (φ : FABL.IndexedSignCube ι  )
      (S : Finset ι) :
      S 
          CryptBoolean.indexedRawFourierSupport
            φ 
        CryptBoolean.indexedRawFourierTransform
            φ S 
          0
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.indexedRawFourierTransform_eq_card_mul_indexedFourierCoeff.{u_1}
      {ι : Type u_1} [Fintype ι] [DecidableEq ι]
      (φ : FABL.IndexedSignCube ι  ) (S : Finset ι) :
      CryptBoolean.indexedRawFourierTransform φ S =
        (Fintype.card (FABL.IndexedSignCube ι)) *
          FABL.indexedFourierCoeff φ S
    theorem CryptBoolean.indexedRawFourierTransform_eq_card_mul_indexedFourierCoeff.{u_1}
      {ι : Type u_1} [Fintype ι]
      [DecidableEq ι]
      (φ : FABL.IndexedSignCube ι  )
      (S : Finset ι) :
      CryptBoolean.indexedRawFourierTransform
          φ S =
        (Fintype.card
              (FABL.IndexedSignCube ι)) *
          FABL.indexedFourierCoeff φ S
    An indexed raw coefficient is the cardinality-scaled normalized coefficient. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.mem_indexedRawFourierSupport_iff_indexedFourierCoeff_ne_zero.{u_1}
      {ι : Type u_1} [Fintype ι] [DecidableEq ι]
      (φ : FABL.IndexedSignCube ι  ) (S : Finset ι) :
      S  CryptBoolean.indexedRawFourierSupport φ 
        FABL.indexedFourierCoeff φ S  0
    theorem CryptBoolean.mem_indexedRawFourierSupport_iff_indexedFourierCoeff_ne_zero.{u_1}
      {ι : Type u_1} [Fintype ι]
      [DecidableEq ι]
      (φ : FABL.IndexedSignCube ι  )
      (S : Finset ι) :
      S 
          CryptBoolean.indexedRawFourierSupport
            φ 
        FABL.indexedFourierCoeff φ S  0
    Raw and normalized indexed Fourier coefficients have the same support. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.card_indexedRawFourierSupport_signRestriction_le {n : }
      (φ : FABL.SignCube n  ) (J : Finset (Fin n))
      (z : FABL.FixedSignCube J) :
      (CryptBoolean.indexedRawFourierSupport
            (FABL.signRestriction φ J z)).card 
        (CryptBoolean.indexedRawFourierSupport φ).card
    theorem CryptBoolean.card_indexedRawFourierSupport_signRestriction_le
      {n : } (φ : FABL.SignCube n  )
      (J : Finset (Fin n))
      (z : FABL.FixedSignCube J) :
      (CryptBoolean.indexedRawFourierSupport
            (FABL.signRestriction φ J
              z)).card 
        (CryptBoolean.indexedRawFourierSupport
            φ).card
    Fixing any collection of coordinates cannot increase the number of nonzero raw
    Fourier coefficients. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.card_indexedRawFourierSupport_binaryFunctionOnSignCube
      {n : } (φ : FABL.PseudoBooleanFunction n) :
      (CryptBoolean.indexedRawFourierSupport
            (FABL.binaryFunctionOnSignCube φ)).card =
        (CryptBoolean.rawFourierSupport φ).card
    theorem CryptBoolean.card_indexedRawFourierSupport_binaryFunctionOnSignCube
      {n : }
      (φ : FABL.PseudoBooleanFunction n) :
      (CryptBoolean.indexedRawFourierSupport
            (FABL.binaryFunctionOnSignCube
              φ)).card =
        (CryptBoolean.rawFourierSupport
            φ).card
    The vector-indexed and finite-subset-indexed raw supports have the same cardinality under the
    canonical binary/sign correspondence. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.card_rawFourierSupport_coordinateRestriction_le {n : }
      (φ : FABL.PseudoBooleanFunction n) (J : Finset (Fin n))
      (z : FABL.FixedSignCube J) :
      (CryptBoolean.indexedRawFourierSupport
            (FABL.signRestriction (FABL.binaryFunctionOnSignCube φ) J
              z)).card 
        (CryptBoolean.rawFourierSupport φ).card
    theorem CryptBoolean.card_rawFourierSupport_coordinateRestriction_le
      {n : }
      (φ : FABL.PseudoBooleanFunction n)
      (J : Finset (Fin n))
      (z : FABL.FixedSignCube J) :
      (CryptBoolean.indexedRawFourierSupport
            (FABL.signRestriction
              (FABL.binaryFunctionOnSignCube
                φ)
              J z)).card 
        (CryptBoolean.rawFourierSupport
            φ).card
    Carlet's coordinate-restriction bound under the canonical binary/sign correspondence:
    the restricted raw spectrum has no more nonzero coefficients than the ambient raw spectrum. 
  • defdefined in FABL/Chapter06/F₂Polynomials/Encoding.lean
    complete
    def FABL.booleanRealEmbedding {n : } (f : FABL.F₂BooleanFunction n) :
      FABL.PseudoBooleanFunction n
    def FABL.booleanRealEmbedding {n : }
      (f : FABL.F₂BooleanFunction n) :
      FABL.PseudoBooleanFunction n
    The `{0,1}`-valued real embedding of an `𝔽₂`-valued Boolean function.
    
    This is the canonical definition formerly owned by CryptBoolean. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.two_pow_functionAlgebraicDegree_le_card_rawFourierSupport_booleanRealEmbedding
      {n : } (f : CryptBoolean.BooleanFunction n) (hf : f  0) :
      2 ^ FABL.functionAlgebraicDegree f 
        (CryptBoolean.rawFourierSupport (FABL.booleanRealEmbedding f)).card
    theorem CryptBoolean.two_pow_functionAlgebraicDegree_le_card_rawFourierSupport_booleanRealEmbedding
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (hf : f  0) :
      2 ^ FABL.functionAlgebraicDegree f 
        (CryptBoolean.rawFourierSupport
            (FABL.booleanRealEmbedding
              f)).card
    Carlet's algebraic-degree lower bound, transported from FABL's canonical normalized
    spectral-sparsity theorem to the raw-transform support. 
  • defdefined in FABL/Chapter06/F₂Polynomials/FourierToF₂Polynomial.lean
    complete
    def FABL.numericalSupport {n : } (c : FABL.NumericalCoefficients n) :
      Finset (Finset (Fin n))
    def FABL.numericalSupport {n : }
      (c : FABL.NumericalCoefficients n) :
      Finset (Finset (Fin n))
    The nonzero coefficient support of a numerical normal form. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/FourierToF₂Polynomial.lean
    complete
    theorem FABL.mem_numericalSupport {n : } (c : FABL.NumericalCoefficients n)
      (S : Finset (Fin n)) : S  FABL.numericalSupport c  c S  0
    theorem FABL.mem_numericalSupport {n : }
      (c : FABL.NumericalCoefficients n)
      (S : Finset (Fin n)) :
      S  FABL.numericalSupport c  c S  0
    Membership in numerical support is nonvanishing of the corresponding coefficient. 
  • defdefined in FABL/Chapter06/F₂Polynomials/FourierToF₂Polynomial.lean
    complete
    def FABL.numericalDegree {n : } (c : FABL.NumericalCoefficients n) : 
    def FABL.numericalDegree {n : }
      (c : FABL.NumericalCoefficients n) : 
    The degree of a numerical normal form, with degree zero for the zero form. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/FourierToF₂Polynomial.lean
    complete
    theorem FABL.numericalDegree_le_iff {n : } (c : FABL.NumericalCoefficients n)
      (D : ) :
      FABL.numericalDegree c  D 
         (S : Finset (Fin n)), c S  0  S.card  D
    theorem FABL.numericalDegree_le_iff {n : }
      (c : FABL.NumericalCoefficients n)
      (D : ) :
      FABL.numericalDegree c  D 
         (S : Finset (Fin n)),
          c S  0  S.card  D
    Numerical degree at most `D` is coefficientwise vanishing above `D`. 
  • defdefined in FABL/Chapter06/F₂Polynomials/FourierToF₂Polynomial.lean
    complete
    def FABL.functionNumericalDegree {n : }
      (φ : FABL.PseudoBooleanFunction n) : 
    def FABL.functionNumericalDegree {n : }
      (φ : FABL.PseudoBooleanFunction n) : 
    The numerical degree of a pseudo-Boolean function is the degree of its unique NNF. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.numericalMonomial_eq_setIndicator_coordinateSubcube {n : }
      (S : Finset (Fin n)) :
      FABL.numericalMonomial S =
        FABL.setIndicator
          (FABL.F₂DecisionTree.coordinateSubcube S (FABL.f₂CubeOfFinset S))
    theorem CryptBoolean.numericalMonomial_eq_setIndicator_coordinateSubcube
      {n : } (S : Finset (Fin n)) :
      FABL.numericalMonomial S =
        FABL.setIndicator
          (FABL.F₂DecisionTree.coordinateSubcube
            S (FABL.f₂CubeOfFinset S))
    A numerical monomial is the indicator of the coordinate subcube on which its variables
    are all one. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.f₂Support_subset_of_vectorFourierCoeff_numericalMonomial_ne_zero
      {n : } (S : Finset (Fin n)) (u : FABL.F₂Cube n)
      (hu : FABL.vectorFourierCoeff (FABL.numericalMonomial S) u  0) :
      FABL.f₂Support u  S
    theorem CryptBoolean.f₂Support_subset_of_vectorFourierCoeff_numericalMonomial_ne_zero
      {n : } (S : Finset (Fin n))
      (u : FABL.F₂Cube n)
      (hu :
        FABL.vectorFourierCoeff
            (FABL.numericalMonomial S) u 
          0) :
      FABL.f₂Support u  S
    A numerical monomial has no Fourier frequency outside its set of variables. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.vectorFourierCoeff_numericalEval {n : }
      (c : FABL.NumericalCoefficients n) (u : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff (FABL.numericalEval c) u =
         S, c S * FABL.vectorFourierCoeff (FABL.numericalMonomial S) u
    theorem CryptBoolean.vectorFourierCoeff_numericalEval
      {n : }
      (c : FABL.NumericalCoefficients n)
      (u : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (FABL.numericalEval c) u =
         S,
          c S *
            FABL.vectorFourierCoeff
              (FABL.numericalMonomial S) u
    Fourier coefficients commute with the finite numerical-normal-form sum. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.f₂Support_card_le_functionNumericalDegree_of_mem_rawFourierSupport
      {n : } (φ : FABL.PseudoBooleanFunction n) (u : FABL.F₂Cube n)
      (hu : u  CryptBoolean.rawFourierSupport φ) :
      (FABL.f₂Support u).card  FABL.functionNumericalDegree φ
    theorem CryptBoolean.f₂Support_card_le_functionNumericalDegree_of_mem_rawFourierSupport
      {n : }
      (φ : FABL.PseudoBooleanFunction n)
      (u : FABL.F₂Cube n)
      (hu :
        u 
          CryptBoolean.rawFourierSupport φ) :
      (FABL.f₂Support u).card 
        FABL.functionNumericalDegree φ
    Numerical degree bounds the Hamming weight of every nonzero Fourier frequency. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.card_lowWeightInputs (n D : ) :
      (CryptBoolean.lowWeightInputs D).card =
         i  Finset.range (D + 1), n.choose i
    theorem CryptBoolean.card_lowWeightInputs
      (n D : ) :
      (CryptBoolean.lowWeightInputs D).card =
         i  Finset.range (D + 1), n.choose i
    The binary vectors of Hamming weight at most `D` are counted by the lower binomial sum. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.card_rawFourierSupport_le_sum_choose_functionNumericalDegree
      {n : } (φ : FABL.PseudoBooleanFunction n) :
      (CryptBoolean.rawFourierSupport φ).card 
         i  Finset.range (FABL.functionNumericalDegree φ + 1), n.choose i
    theorem CryptBoolean.card_rawFourierSupport_le_sum_choose_functionNumericalDegree
      {n : }
      (φ : FABL.PseudoBooleanFunction n) :
      (CryptBoolean.rawFourierSupport
            φ).card 
        
          i 
            Finset.range
              (FABL.functionNumericalDegree
                  φ +
                1),
          n.choose i
    Carlet's numerical-degree bound: at most the lower binomial sum of raw Fourier
    coefficients are nonzero. 

The lower bound assumes f\ne0, since the zero function has empty Fourier support. The condition \varphi\ne0 likewise makes the displayed numerical degree a maximum over a nonempty set; with the zero-degree convention, the resulting upper bound also holds for \varphi=0.

Proposition1.11.2
Group: Chapter 1: Generalities on Boolean functions (40)
Group member previews
Preview
Definition 1.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Definition 1.4.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Proposition 11 (Carlet, p. 34). Let n\ge2 and 1\le k\le n. If 2^k divides W_f(a) for every a\in V_n, then \deg_{\mathrm{alg}}(f)\le n-k+1.

Lean code for Proposition1.11.22 theorems
  • theoremdefined in CryptBoolean/Carlet/Chapter02/WalshDivisibility.lean
    complete
    theorem CryptBoolean.vectorFourierCoeff_booleanRealEmbedding_eq {n : }
      (f : CryptBoolean.BooleanFunction n) (a : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff (FABL.booleanRealEmbedding f) a =
        ((if FABL.f₂Support a =  then 1 else 0) -
            FABL.vectorFourierCoeff (CryptBoolean.realSignView f) a) /
          2
    theorem CryptBoolean.vectorFourierCoeff_booleanRealEmbedding_eq
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (a : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (FABL.booleanRealEmbedding f) a =
        ((if FABL.f₂Support a =  then 1
            else 0) -
            FABL.vectorFourierCoeff
              (CryptBoolean.realSignView f)
              a) /
          2
    The normalized Fourier coefficient of the zero-one embedding is obtained
    from the sign embedding by the affine relation `f = (1-χ_f)/2`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/WalshDivisibility.lean
    complete
    theorem CryptBoolean.functionAlgebraicDegree_le_of_two_pow_dvd_walshTransform
      {n : } (f : CryptBoolean.BooleanFunction n) (k : ) (_hn : 2  n)
      (_hk : 1  k) (hkn : k  n)
      (hdiv :
         (a : FABL.F₂Cube n), 2 ^ k  CryptBoolean.walshTransform f a) :
      FABL.functionAlgebraicDegree f  n - k + 1
    theorem CryptBoolean.functionAlgebraicDegree_le_of_two_pow_dvd_walshTransform
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (k : ) (_hn : 2  n) (_hk : 1  k)
      (hkn : k  n)
      (hdiv :
         (a : FABL.F₂Cube n),
          2 ^ k 
            CryptBoolean.walshTransform f a) :
      FABL.functionAlgebraicDegree f 
        n - k + 1
    Carlet Proposition 11: divisibility of every raw Walsh coefficient by
    `2^k` forces algebraic degree at most `n-k+1`.