Cryptographic Boolean Functions in Lean

1.3. Fourier operations and subspaces🔗

Definition1.3.1
uses 1
Used by 4
Reverse dependency previews
L∃∀N

Discrete Fourier transform (Carlet, Relation (11), p. 21). For a pseudo-Boolean function \varphi:V_n\to\mathbb R, define \mathcal F\varphi(a) =\widehat\varphi(a) =\sum_{x\in V_n}\varphi(x)(-1)^{a\mathbin\cdot x} \qquad(a\in V_n). If \widetilde\varphi(a)=2^{-n}\widehat\varphi(a) denotes the normalized coefficient, then \widehat\varphi(a)=2^n\widetilde\varphi(a).

Lean code for Definition1.3.12 declarations
  • defdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    def CryptBoolean.rawFourierTransform {n : } (φ : FABL.F₂Cube n  )
      (a : FABL.F₂Cube n) : 
    def CryptBoolean.rawFourierTransform {n : }
      (φ : FABL.F₂Cube n  )
      (a : FABL.F₂Cube n) : 
    Carlet's unnormalized Fourier transform of a pseudo-Boolean function. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    theorem CryptBoolean.rawFourierTransform_eq_two_pow_mul_vectorFourierCoeff
      {n : } (φ : FABL.F₂Cube n  ) (a : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform φ a =
        2 ^ n * FABL.vectorFourierCoeff φ a
    theorem CryptBoolean.rawFourierTransform_eq_two_pow_mul_vectorFourierCoeff
      {n : } (φ : FABL.F₂Cube n  )
      (a : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform φ a =
        2 ^ n * FABL.vectorFourierCoeff φ a
    Carlet's raw transform is the cardinality-scaled normalized FABL coefficient. 

Formalization note. The normalized coefficient in the second display is FABL's vectorFourierCoeff; the displayed scaling equation keeps that implementation fact separate from Carlet's definition.

Proposition1.3.2
uses 1
Used by 2
Reverse dependency previews
Preview
Corollary 1.3.5
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Proposition 6 (Carlet, p. 24). Let \varphi:V_n\to\mathbb R and a,b,u\in V_n. If \psi(x)=(-1)^{a\mathbin\cdot x}\varphi(x+b), then \widehat\psi(u) =(-1)^{b\mathbin\cdot(a+u)}\widehat\varphi(a+u).

Lean code for Proposition1.3.22 theorems
  • theoremdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    theorem CryptBoolean.vectorFourierCoeff_mul_vectorWalshCharacter {n : }
      (φ : FABL.F₂Cube n  ) (a u : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (fun x => (FABL.vectorWalshCharacter a) x * φ x) u =
        FABL.vectorFourierCoeff φ (a + u)
    theorem CryptBoolean.vectorFourierCoeff_mul_vectorWalshCharacter
      {n : } (φ : FABL.F₂Cube n  )
      (a u : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (fun x =>
            (FABL.vectorWalshCharacter a) x *
              φ x)
          u =
        FABL.vectorFourierCoeff φ (a + u)
    Multiplying by a Walsh character shifts the normalized Fourier index. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    theorem CryptBoolean.rawFourierTransform_modulate_translate {n : }
      (φ : FABL.F₂Cube n  ) (a b u : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform
          (fun x => (FABL.vectorWalshCharacter a) x * φ (x + b)) u =
        (FABL.vectorWalshCharacter (a + u)) b *
          CryptBoolean.rawFourierTransform φ (a + u)
    theorem CryptBoolean.rawFourierTransform_modulate_translate
      {n : } (φ : FABL.F₂Cube n  )
      (a b u : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform
          (fun x =>
            (FABL.vectorWalshCharacter a) x *
              φ (x + b))
          u =
        (FABL.vectorWalshCharacter (a + u))
            b *
          CryptBoolean.rawFourierTransform φ
            (a + u)
    Carlet Proposition 6: modulation and translation shift the raw spectrum. 
Theorem1.3.3
uses 1used by 1L∃∀N

Corollary 2 (Carlet, Relation (19), p. 25). For every \varphi:V_n\to\mathbb R and x\in V_n, \widehat{\widehat\varphi}(x)=2^n\varphi(x).

Lean code for Theorem1.3.31 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    theorem CryptBoolean.rawFourierTransform_involution {n : }
      (φ : FABL.F₂Cube n  ) (x : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform (CryptBoolean.rawFourierTransform φ)
          x =
        2 ^ n * φ x
    theorem CryptBoolean.rawFourierTransform_involution
      {n : } (φ : FABL.F₂Cube n  )
      (x : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform
          (CryptBoolean.rawFourierTransform φ)
          x =
        2 ^ n * φ x
    Carlet Corollary 2: applying the raw Fourier transform twice multiplies by `2^n`. 
Proposition1.3.4
uses 1
Used by 2
Reverse dependency previews
Preview
Corollary 1.3.5
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Proposition 7 (Carlet, Relation (16), pp. 24--25). Let E\le V_n, let E^\perp=\{u\in V_n:u\mathbin\cdot x=0\text{ for every }x\in E\}, and let \mathbf 1_E be the real-valued indicator of E. Then, for every u\in V_n, \widehat{\mathbf 1_E}(u) = \begin{cases} |E|,&u\in E^\perp,\\ 0,&u\notin E^\perp. \end{cases} Equivalently, \widehat{\mathbf 1_E}=|E|\mathbf 1_{E^\perp}.

Lean code for Proposition1.3.42 theorems
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Subspaces.lean
    complete
    theorem CryptBoolean.two_pow_mul_inversePerpendicularCard_eq_card {n : }
      (E : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) :
      2 ^ n * FABL.inversePerpendicularCard E = (Nat.card E)
    theorem CryptBoolean.two_pow_mul_inversePerpendicularCard_eq_card
      {n : }
      (E :
        Submodule FABL.𝔽₂ (FABL.F₂Cube n)) :
      2 ^ n *
          FABL.inversePerpendicularCard E =
        (Nat.card E)
    The raw scaling factor for a subspace is its cardinality. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Subspaces.lean
    complete
    theorem CryptBoolean.rawFourierTransform_setIndicator_submodule {n : }
      (E : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (u : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform (FABL.setIndicator E) u =
        if u  FABL.perpendicularSubspace E then (Nat.card E) else 0
    theorem CryptBoolean.rawFourierTransform_setIndicator_submodule
      {n : }
      (E : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (u : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform
          (FABL.setIndicator E) u =
        if
            u 
              FABL.perpendicularSubspace
                E then
          (Nat.card E)
        else 0
    Carlet Proposition 7: the raw transform of a subspace indicator is its
    cardinality on the perpendicular subspace and zero off it. 
Corollary1.3.5
Statement uses 2
Statement dependency previews
Preview
Proposition 1.3.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Normalized Poisson summation specialization. Let E\le V_n, let \varphi:V_n\to\mathbb R, and let z\in V_n. Then \frac{1}{|E|}\sum_{h\in E}\varphi(h+z) =\sum_{u\in E^\perp}(-1)^{u\mathbin\cdot z}\widetilde\varphi(u). Here \widetilde\varphi(u)=2^{-n}\widehat\varphi(u).

Lean code for Corollary1.3.51 theorem
  • theoremdefined in FABL/Chapter03/Restrictions.lean
    complete
    theorem FABL.poissonSummationFormula {n : } (f : FABL.F₂Cube n  )
      (H : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (z : FABL.F₂Cube n) :
      (Finset.univ.expect fun h => f (h + z)) =
         γ, (FABL.vectorWalshCharacter γ) z * FABL.vectorFourierCoeff f γ
    theorem FABL.poissonSummationFormula {n : }
      (f : FABL.F₂Cube n  )
      (H : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (z : FABL.F₂Cube n) :
      (Finset.univ.expect fun h =>
          f (h + z)) =
         γ,
          (FABL.vectorWalshCharacter γ) z *
            FABL.vectorFourierCoeff f γ
    O'Donnell's Poisson Summation Formula on the binary cube. 

Formalization note. This is the normalized coset-average specialization compiled through FABL. Carlet's full Corollary 1 retains both modulation parameters and is recorded separately below.

Corollary1.3.6
Statement uses 2
Statement dependency previews
Preview
Proposition 1.3.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Corollary 1 (Poisson summation; Carlet, Relation (17), p. 25). For every \varphi:V_n\to\mathbb R, every subspace E\le V_n, and all a,b\in V_n, \sum_{u\in a+E}(-1)^{b\mathbin\cdot u}\widehat\varphi(u) =|E|(-1)^{a\mathbin\cdot b} \sum_{x\in b+E^\perp}(-1)^{a\mathbin\cdot x}\varphi(x).

Lean code for Corollary1.3.61 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Subspaces.lean
    complete
    theorem CryptBoolean.rawPoissonSummationFormula {n : } (φ : FABL.F₂Cube n  )
      (E : Submodule FABL.𝔽₂ (FABL.F₂Cube n)) (a b : FABL.F₂Cube n) :
       u,
          (FABL.vectorWalshCharacter b) (a + u) *
            CryptBoolean.rawFourierTransform φ (a + u) =
        (Nat.card E) * (FABL.vectorWalshCharacter b) a *
           x, (FABL.vectorWalshCharacter a) (b + x) * φ (b + x)
    theorem CryptBoolean.rawPoissonSummationFormula
      {n : } (φ : FABL.F₂Cube n  )
      (E : Submodule FABL.𝔽₂ (FABL.F₂Cube n))
      (a b : FABL.F₂Cube n) :
       u,
          (FABL.vectorWalshCharacter b)
              (a + u) *
            CryptBoolean.rawFourierTransform φ
              (a + u) =
        (Nat.card E) *
            (FABL.vectorWalshCharacter b) a *
           x,
            (FABL.vectorWalshCharacter a)
                (b + x) *
              φ (b + x)
    Carlet Corollary 1, Relation (17): the full raw Poisson summation formula
    on affine cosets, with both modulation parameters explicit. 
Definition1.3.7
uses 0
Used by 2
Reverse dependency previews
Preview
Proposition 1.3.8
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Convolution (Carlet, p. 26). For \varphi,\psi:V_n\to\mathbb R, define their unnormalized convolution by (\varphi\otimes\psi)(x) =\sum_{y\in V_n}\varphi(y)\psi(x+y) \qquad(x\in V_n).

Lean code for Definition1.3.72 declarations
  • defdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    def CryptBoolean.rawConvolution {n : } (φ ψ : FABL.F₂Cube n  )
      (x : FABL.F₂Cube n) : 
    def CryptBoolean.rawConvolution {n : }
      (φ ψ : FABL.F₂Cube n  )
      (x : FABL.F₂Cube n) : 
    Carlet's unnormalized convolution on the additive binary cube. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    theorem CryptBoolean.rawConvolution_eq_two_pow_mul_convolution {n : }
      (φ ψ : FABL.F₂Cube n  ) (x : FABL.F₂Cube n) :
      CryptBoolean.rawConvolution φ ψ x = 2 ^ n * FABL.convolution φ ψ x
    theorem CryptBoolean.rawConvolution_eq_two_pow_mul_convolution
      {n : } (φ ψ : FABL.F₂Cube n  )
      (x : FABL.F₂Cube n) :
      CryptBoolean.rawConvolution φ ψ x =
        2 ^ n * FABL.convolution φ ψ x
    Raw convolution is the cardinality-scaled normalized FABL convolution. 

Formalization note. This raw convolution is 2^n times FABL's normalized convolution.

Proposition1.3.8
Statement uses 2
Statement dependency previews
Preview
Definition 1.3.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 1.3.9
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Proposition 8 (Carlet, Relation (20), p. 26). For all \varphi,\psi:V_n\to\mathbb R and u\in V_n, \widehat{\varphi\otimes\psi}(u) =\widehat\varphi(u)\widehat\psi(u).

Lean code for Proposition1.3.81 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    theorem CryptBoolean.rawFourierTransform_rawConvolution {n : }
      (φ ψ : FABL.F₂Cube n  ) (a : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform (CryptBoolean.rawConvolution φ ψ) a =
        CryptBoolean.rawFourierTransform φ a *
          CryptBoolean.rawFourierTransform ψ a
    theorem CryptBoolean.rawFourierTransform_rawConvolution
      {n : } (φ ψ : FABL.F₂Cube n  )
      (a : FABL.F₂Cube n) :
      CryptBoolean.rawFourierTransform
          (CryptBoolean.rawConvolution φ ψ)
          a =
        CryptBoolean.rawFourierTransform φ a *
          CryptBoolean.rawFourierTransform ψ a
    Carlet Proposition 8: the raw Fourier transform sends raw convolution to pointwise product. 
Theorem1.3.9
Statement uses 2
Statement dependency previews
Preview
Theorem 1.3.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Relation (22) and Parseval's relation (Carlet, p. 27). For all \varphi,\psi:V_n\to\mathbb R, \sum_{u\in V_n}\widehat\varphi(u)\widehat\psi(u) =2^n\sum_{x\in V_n}\varphi(x)\psi(x). In particular, taking \psi=\varphi gives Corollary 3: \sum_{u\in V_n}\widehat\varphi(u)^2 =2^n\sum_{x\in V_n}\varphi(x)^2.

Lean code for Theorem1.3.91 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter02/FourierOperations.lean
    complete
    theorem CryptBoolean.sum_rawFourierTransform_mul {n : }
      (φ ψ : FABL.F₂Cube n  ) :
       a,
          CryptBoolean.rawFourierTransform φ a *
            CryptBoolean.rawFourierTransform ψ a =
        2 ^ n *  x, φ x * ψ x
    theorem CryptBoolean.sum_rawFourierTransform_mul
      {n : } (φ ψ : FABL.F₂Cube n  ) :
       a,
          CryptBoolean.rawFourierTransform φ
              a *
            CryptBoolean.rawFourierTransform ψ
              a =
        2 ^ n *  x, φ x * ψ x
    Carlet Corollary 3: Plancherel for the unnormalized transform. 
Theorem1.3.10
Statement uses 3
Statement dependency previews
Preview
Corollary 1.3.6
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀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.3.1024 declarations
  • defdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    def CryptBoolean.rawFourierSupport {n : }
      (φ : CryptBoolean.PseudoBooleanFunction n) : Finset (FABL.F₂Cube n)
    def CryptBoolean.rawFourierSupport {n : }
      (φ :
        CryptBoolean.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 : }
      (φ : CryptBoolean.PseudoBooleanFunction n) (u : FABL.F₂Cube n) :
      u  CryptBoolean.rawFourierSupport φ 
        CryptBoolean.rawFourierTransform φ u  0
    theorem CryptBoolean.mem_rawFourierSupport {n : }
      (φ :
        CryptBoolean.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 : } (φ : CryptBoolean.PseudoBooleanFunction n)
      (u : FABL.F₂Cube n) :
      u  CryptBoolean.rawFourierSupport φ  FABL.vectorFourierCoeff φ u  0
    theorem CryptBoolean.mem_rawFourierSupport_iff_vectorFourierCoeff_ne_zero
      {n : }
      (φ :
        CryptBoolean.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 : } (φ : CryptBoolean.PseudoBooleanFunction n) :
      (CryptBoolean.indexedRawFourierSupport
            (FABL.binaryFunctionOnSignCube φ)).card =
        (CryptBoolean.rawFourierSupport φ).card
    theorem CryptBoolean.card_indexedRawFourierSupport_binaryFunctionOnSignCube
      {n : }
      (φ :
        CryptBoolean.PseudoBooleanFunction
          n) :
      (CryptBoolean.indexedRawFourierSupport
            (FABL.binaryFunctionOnSignCube
              φ)).card =
        (CryptBoolean.rawFourierSupport
            φ).card
    The vector-indexed raw support and the finite-subset-indexed raw support have the same
    cardinality under the canonical binary/sign representation bridge. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.card_rawFourierSupport_coordinateRestriction_le {n : }
      (φ : CryptBoolean.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 : }
      (φ :
        CryptBoolean.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, stated through the canonical binary/sign bridge:
    the restricted raw spectrum has no more nonzero coefficients than the ambient raw spectrum. 
  • defdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    def CryptBoolean.booleanRealEmbedding {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.PseudoBooleanFunction n
    def CryptBoolean.booleanRealEmbedding {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.PseudoBooleanFunction n
    The `{0,1}`-valued real embedding of a bit-valued Boolean function. 
  • 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 ^ CryptBoolean.functionAlgebraicDegree f 
        (CryptBoolean.rawFourierSupport
            (CryptBoolean.booleanRealEmbedding f)).card
    theorem CryptBoolean.two_pow_functionAlgebraicDegree_le_card_rawFourierSupport_booleanRealEmbedding
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (hf : f  0) :
      2 ^
          CryptBoolean.functionAlgebraicDegree
            f 
        (CryptBoolean.rawFourierSupport
            (CryptBoolean.booleanRealEmbedding
              f)).card
    Carlet's algebraic-degree lower bound: a nonzero Boolean function has at least
    `2^d` nonzero raw Fourier coefficients, where `d` is its algebraic degree. 
  • defdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    def CryptBoolean.numericalSupport {n : }
      (c : CryptBoolean.NumericalCoefficients n) : Finset (Finset (Fin n))
    def CryptBoolean.numericalSupport {n : }
      (c :
        CryptBoolean.NumericalCoefficients
          n) :
      Finset (Finset (Fin n))
    The nonzero coefficient support of a numerical normal form. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.mem_numericalSupport {n : }
      (c : CryptBoolean.NumericalCoefficients n) (S : Finset (Fin n)) :
      S  CryptBoolean.numericalSupport c  c S  0
    theorem CryptBoolean.mem_numericalSupport {n : }
      (c :
        CryptBoolean.NumericalCoefficients n)
      (S : Finset (Fin n)) :
      S  CryptBoolean.numericalSupport c 
        c S  0
  • defdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    def CryptBoolean.numericalDegree {n : }
      (c : CryptBoolean.NumericalCoefficients n) : 
    def CryptBoolean.numericalDegree {n : }
      (c :
        CryptBoolean.NumericalCoefficients
          n) :
      
    The degree of a numerical normal form, with degree zero for the zero form. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    theorem CryptBoolean.numericalDegree_le_iff {n : }
      (c : CryptBoolean.NumericalCoefficients n) (D : ) :
      CryptBoolean.numericalDegree c  D 
         (S : Finset (Fin n)), c S  0  S.card  D
    theorem CryptBoolean.numericalDegree_le_iff
      {n : }
      (c :
        CryptBoolean.NumericalCoefficients n)
      (D : ) :
      CryptBoolean.numericalDegree c  D 
         (S : Finset (Fin n)),
          c S  0  S.card  D
    Degree at most `D` is coefficientwise vanishing above `D`. 
  • defdefined in CryptBoolean/Carlet/Chapter02/SpectralSupport.lean
    complete
    def CryptBoolean.functionNumericalDegree {n : }
      (φ : CryptBoolean.PseudoBooleanFunction n) : 
    def CryptBoolean.functionNumericalDegree
      {n : }
      (φ :
        CryptBoolean.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)) :
      CryptBoolean.numericalMonomial S =
        FABL.setIndicator
          (FABL.F₂DecisionTree.coordinateSubcube S (FABL.f₂CubeOfFinset S))
    theorem CryptBoolean.numericalMonomial_eq_setIndicator_coordinateSubcube
      {n : } (S : Finset (Fin n)) :
      CryptBoolean.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 (CryptBoolean.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
            (CryptBoolean.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 : CryptBoolean.NumericalCoefficients n) (u : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff (CryptBoolean.numericalEval c) u =
         S,
          c S * FABL.vectorFourierCoeff (CryptBoolean.numericalMonomial S) u
    theorem CryptBoolean.vectorFourierCoeff_numericalEval
      {n : }
      (c :
        CryptBoolean.NumericalCoefficients n)
      (u : FABL.F₂Cube n) :
      FABL.vectorFourierCoeff
          (CryptBoolean.numericalEval c) u =
         S,
          c S *
            FABL.vectorFourierCoeff
              (CryptBoolean.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 : } (φ : CryptBoolean.PseudoBooleanFunction n) (u : FABL.F₂Cube n)
      (hu : u  CryptBoolean.rawFourierSupport φ) :
      (FABL.f₂Support u).card  CryptBoolean.functionNumericalDegree φ
    theorem CryptBoolean.f₂Support_card_le_functionNumericalDegree_of_mem_rawFourierSupport
      {n : }
      (φ :
        CryptBoolean.PseudoBooleanFunction n)
      (u : FABL.F₂Cube n)
      (hu :
        u 
          CryptBoolean.rawFourierSupport φ) :
      (FABL.f₂Support u).card 
        CryptBoolean.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 : } (φ : CryptBoolean.PseudoBooleanFunction n) :
      (CryptBoolean.rawFourierSupport φ).card 
         i  Finset.range (CryptBoolean.functionNumericalDegree φ + 1),
          n.choose i
    theorem CryptBoolean.card_rawFourierSupport_le_sum_choose_functionNumericalDegree
      {n : }
      (φ :
        CryptBoolean.PseudoBooleanFunction
          n) :
      (CryptBoolean.rawFourierSupport
            φ).card 
        
          i 
            Finset.range
              (CryptBoolean.functionNumericalDegree
                  φ +
                1),
          n.choose i
    Carlet's numerical-degree bound: at most the lower binomial sum of raw Fourier
    coefficients are nonzero. 

Formalization note. Carlet's proof chooses a degree-d monomial occurring in the ANF, so the lower bound implicitly concerns a nonzero Boolean function. The explicit hypothesis is necessary because this project assigns degree zero to the zero ANF, whose Fourier support is empty. The nonzero hypothesis in the numerical-degree bound likewise makes the displayed maximum nonempty. The Lean upper bound is proved for every \varphi, including the zero function, using the project's explicit zero-degree convention. Its proof reuses FABL's normalized Fourier support, restriction formula, and exact spectrum of coordinate affine-subspace indicators through the raw to normalized scaling bridge.