Cryptographic Boolean Functions in Lean

1.4. Algebraic degree, distance, and affine functions🔗

Definition1.4.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.
uses 1
Used by 23
Reverse dependency previews
Preview
Lemma 1.4.2
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Algebraic degree (Carlet, p. 12). Let f(x)=\bigoplus_{S\subseteq[n]}c_{f,S}x^S be the unique ANF of f:V_n\to\mathbb F_2. Define \deg_{\mathrm{alg}}(f) =\max\{|S|:c_{f,S}\ne0\}, with \deg_{\mathrm{alg}}(0)=0. Then \deg_{\mathrm{alg}}(f)\le n, and, for every r\ge0, \deg_{\mathrm{alg}}(f)\le r \quad\Longleftrightarrow\quad c_{f,S}\ne0\Longrightarrow |S|\le r \quad\text{for every }S\subseteq[n].

Lean code for Definition1.4.16 declarations
  • defdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    def FABL.functionAlgebraicDegree {n : } (f : FABL.F₂BooleanFunction n) : 
    def FABL.functionAlgebraicDegree {n : }
      (f : FABL.F₂BooleanFunction n) : 
    The algebraic degree of a Boolean function, through its unique ANF. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_le_dimension {n : }
      (f : FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree f  n
    theorem FABL.functionAlgebraicDegree_le_dimension
      {n : } (f : FABL.F₂BooleanFunction n) :
      FABL.functionAlgebraicDegree f  n
    Function-level algebraic degree is bounded by the number of variables. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.algebraicDegree_le_iff {n : } (c : FABL.ANFCoefficients n)
      (r : ) :
      FABL.algebraicDegree c  r 
         (S : Finset (Fin n)), c S  0  S.card  r
    theorem FABL.algebraicDegree_le_iff {n : }
      (c : FABL.ANFCoefficients n) (r : ) :
      FABL.algebraicDegree c  r 
         (S : Finset (Fin n)),
          c S  0  S.card  r
    Degree at most `r` is exactly the coefficientwise vanishing condition above `r`. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.anfCoeff_zero {n : } : FABL.anfCoeff 0 = fun x => 0
    theorem FABL.anfCoeff_zero {n : } :
      FABL.anfCoeff 0 = fun x => 0
    The zero Boolean function has the zero canonical ANF. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.algebraicDegree_zero {n : } :
      (FABL.algebraicDegree fun x => 0) = 0
    theorem FABL.algebraicDegree_zero {n : } :
      (FABL.algebraicDegree fun x => 0) = 0
    The zero coefficient family has algebraic degree zero. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_zero {n : } :
      FABL.functionAlgebraicDegree 0 = 0
    theorem FABL.functionAlgebraicDegree_zero
      {n : } :
      FABL.functionAlgebraicDegree 0 = 0
    The zero Boolean function has algebraic degree zero. 
Lemma1.4.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.
uses 1
Used by 2
Reverse dependency previews
Preview
Definition 2.1.2
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Degree under addition. For all Boolean functions f,g:V_n\to\mathbb F_2, their ANF coefficients satisfy c_{f+g,S}=c_{f,S}+c_{g,S} \qquad(S\subseteq[n]), and therefore \deg_{\mathrm{alg}}(f+g) \le\max\{\deg_{\mathrm{alg}}(f),\deg_{\mathrm{alg}}(g)\}.

Lean code for Lemma1.4.23 theorems
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.anfCoeff_add {n : } (f g : FABL.F₂BooleanFunction n) :
      FABL.anfCoeff (f + g) = fun S => FABL.anfCoeff f S + FABL.anfCoeff g S
    theorem FABL.anfCoeff_add {n : }
      (f g : FABL.F₂BooleanFunction n) :
      FABL.anfCoeff (f + g) = fun S =>
        FABL.anfCoeff f S + FABL.anfCoeff g S
    The canonical ANF transform is additive. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.algebraicDegree_add_le_max {n : } (c d : FABL.ANFCoefficients n) :
      (FABL.algebraicDegree fun S => c S + d S) 
        max (FABL.algebraicDegree c) (FABL.algebraicDegree d)
    theorem FABL.algebraicDegree_add_le_max {n : }
      (c d : FABL.ANFCoefficients n) :
      (FABL.algebraicDegree fun S =>
          c S + d S) 
        max (FABL.algebraicDegree c)
          (FABL.algebraicDegree d)
    Algebraic degree of a coefficient sum is bounded by the maximum of the two degrees. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_add_le_max {n : }
      (f g : FABL.F₂BooleanFunction n) :
      FABL.functionAlgebraicDegree (f + g) 
        max (FABL.functionAlgebraicDegree f)
          (FABL.functionAlgebraicDegree g)
    theorem FABL.functionAlgebraicDegree_add_le_max
      {n : }
      (f g : FABL.F₂BooleanFunction n) :
      FABL.functionAlgebraicDegree (f + g) 
        max (FABL.functionAlgebraicDegree f)
          (FABL.functionAlgebraicDegree g)
    Algebraic degree is submaximal under addition of Boolean functions. 
Definition1.4.3
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.
uses 1
Used by 11
Reverse dependency previews
Preview
Theorem 1.4.4
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Hamming distance (Carlet, p. 8). For Boolean functions f,g:V_n\to\mathbb F_2, define d_H(f,g) =\bigl|\{x\in V_n:f(x)\ne g(x)\}\bigr|. Then d_H(f,g)=w_H(f+g), where addition is pointwise in \mathbb F_2.

Lean code for Definition1.4.32 declarations
  • abbrevdefined in CryptBoolean/Carlet/Chapter02/AlgebraicDegree.lean
    complete
    abbrev CryptBoolean.hammingDistance {n : }
      (f g : CryptBoolean.BooleanFunction n) : 
    abbrev CryptBoolean.hammingDistance {n : }
      (f g : CryptBoolean.BooleanFunction n) :
      
    The unnormalized Hamming distance between Boolean functions, reusing Mathlib. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/AlgebraicDegree.lean
    complete
    theorem CryptBoolean.hammingDistance_eq_hammingWeight_add {n : }
      (f g : CryptBoolean.BooleanFunction n) :
      CryptBoolean.hammingDistance f g = CryptBoolean.hammingWeight (f + g)
    theorem CryptBoolean.hammingDistance_eq_hammingWeight_add
      {n : }
      (f g : CryptBoolean.BooleanFunction n) :
      CryptBoolean.hammingDistance f g =
        CryptBoolean.hammingWeight (f + g)
    On `GF(2)`, distance is the weight of the pointwise sum. 
Theorem1.4.4
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.
uses 1used by 0L∃∀N

Normalization of relative Hamming distance. Define d_{\mathrm{rel}}(f,g) =2^{-n}\bigl|\{x\in V_n:f(x)\ne g(x)\}\bigr|. Then, for all f,g:V_n\to\mathbb F_2, d_H(f,g)=2^n d_{\mathrm{rel}}(f,g).

Lean code for Theorem1.4.41 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Affine.lean
    complete
    theorem CryptBoolean.hammingDistance_eq_two_pow_mul_relativeHammingDist {n : }
      (f g : CryptBoolean.BooleanFunction n) :
      (CryptBoolean.hammingDistance f g) =
        2 ^ n * FABL.relativeHammingDist f g
    theorem CryptBoolean.hammingDistance_eq_two_pow_mul_relativeHammingDist
      {n : }
      (f g : CryptBoolean.BooleanFunction n) :
      (CryptBoolean.hammingDistance f g) =
        2 ^ n * FABL.relativeHammingDist f g
    Raw distance scales FABL's relative Hamming distance by the cube cardinality. 
Definition1.4.5
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.
uses 1
Used by 12
Reverse dependency previews
Preview
Theorem 1.4.6
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Affine Boolean functions (Carlet, p. 14). For a\in V_n and b\in\mathbb F_2, set A_{a,b}(x)=b+a\mathbin\cdot x. Its ANF coefficients are c_{A_{a,b},\varnothing}=b, \qquad c_{A_{a,b},\{i\}}=a_i, \qquad c_{A_{a,b},S}=0\quad(|S|>1). For every f:V_n\to\mathbb F_2, \deg_{\mathrm{alg}}(f)\le1 \quad\Longleftrightarrow\quad \exists a\in V_n\;\exists b\in\mathbb F_2\; \forall x\in V_n,\ f(x)=A_{a,b}(x).

Lean code for Definition1.4.56 declarations
  • defdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    def FABL.affineFunction {n : } (b : FABL.𝔽₂) (a : FABL.F₂Cube n) :
      FABL.F₂BooleanFunction n
    def FABL.affineFunction {n : } (b : FABL.𝔽₂)
      (a : FABL.F₂Cube n) :
      FABL.F₂BooleanFunction n
    The affine Boolean function `x ↦ b + a · x`. 
  • defdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    def FABL.affineCoefficients {n : } (b : FABL.𝔽₂) (a : FABL.F₂Cube n) :
      FABL.ANFCoefficients n
    def FABL.affineCoefficients {n : }
      (b : FABL.𝔽₂) (a : FABL.F₂Cube n) :
      FABL.ANFCoefficients n
    The ANF coefficients of an affine function. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    theorem FABL.anfEval_affineCoefficients {n : } (b : FABL.𝔽₂)
      (a : FABL.F₂Cube n) :
      FABL.anfEval (FABL.affineCoefficients b a) = FABL.affineFunction b a
    theorem FABL.anfEval_affineCoefficients {n : }
      (b : FABL.𝔽₂) (a : FABL.F₂Cube n) :
      FABL.anfEval
          (FABL.affineCoefficients b a) =
        FABL.affineFunction b a
    Evaluating the affine coefficient family gives the affine function. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    theorem FABL.anfCoeff_affineFunction {n : } (b : FABL.𝔽₂) (a : FABL.F₂Cube n) :
      FABL.anfCoeff (FABL.affineFunction b a) = FABL.affineCoefficients b a
    theorem FABL.anfCoeff_affineFunction {n : }
      (b : FABL.𝔽₂) (a : FABL.F₂Cube n) :
      FABL.anfCoeff
          (FABL.affineFunction b a) =
        FABL.affineCoefficients b a
    The canonical ANF transform recovers the affine coefficient family. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    theorem FABL.functionAlgebraicDegree_affineFunction_le_one {n : } (b : FABL.𝔽₂)
      (a : FABL.F₂Cube n) :
      FABL.functionAlgebraicDegree (FABL.affineFunction b a)  1
    theorem FABL.functionAlgebraicDegree_affineFunction_le_one
      {n : } (b : FABL.𝔽₂)
      (a : FABL.F₂Cube n) :
      FABL.functionAlgebraicDegree
          (FABL.affineFunction b a) 
        1
    Affine functions have algebraic degree at most one. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    theorem FABL.exists_affineFunction_of_functionAlgebraicDegree_le_one {n : }
      (f : FABL.F₂BooleanFunction n)
      (hdegree : FABL.functionAlgebraicDegree f  1) :
       b a, f = FABL.affineFunction b a
    theorem FABL.exists_affineFunction_of_functionAlgebraicDegree_le_one
      {n : } (f : FABL.F₂BooleanFunction n)
      (hdegree :
        FABL.functionAlgebraicDegree f  1) :
       b a, f = FABL.affineFunction b a
    Every Boolean function of algebraic degree at most one is affine. 
Theorem1.4.6
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 6
Reverse dependency previews
Preview
Theorem 1.4.7
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Affine invariance of algebraic degree (Carlet, p. 12). Let L:V_n\to V_n be an affine isomorphism, so that L(x)=Mx+t for some M\in\operatorname{GL}_n(\mathbb F_2) and t\in V_n. Then every Boolean function f:V_n\to\mathbb F_2 satisfies \deg_{\mathrm{alg}}(f\circ L)=\deg_{\mathrm{alg}}(f).

Lean code for Theorem1.4.613 declarations
  • theoremdefined in FABL/Chapter06/F₂Polynomials/ANF.lean
    complete
    theorem FABL.anfMonomial_mul {n : } (S T : Finset (Fin n))
      (x : FABL.F₂Cube n) :
      FABL.anfMonomial S x * FABL.anfMonomial T x =
        FABL.anfMonomial (S  T) x
    theorem FABL.anfMonomial_mul {n : }
      (S T : Finset (Fin n))
      (x : FABL.F₂Cube n) :
      FABL.anfMonomial S x *
          FABL.anfMonomial T x =
        FABL.anfMonomial (S  T) x
    Products of square-free monomials are indexed by the union of their variables. 
  • defdefined in FABL/Chapter06/F₂Polynomials/ANF.lean
    complete
    def FABL.anfMul {n : } (c d : FABL.ANFCoefficients n) :
      FABL.ANFCoefficients n
    def FABL.anfMul {n : }
      (c d : FABL.ANFCoefficients n) :
      FABL.ANFCoefficients n
    Multiplication of square-free ANFs, with repeated variables reduced by `xᵢ²=xᵢ`. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/ANF.lean
    complete
    theorem FABL.anfEval_anfMul {n : } (c d : FABL.ANFCoefficients n)
      (x : FABL.F₂Cube n) :
      FABL.anfEval (FABL.anfMul c d) x = FABL.anfEval c x * FABL.anfEval d x
    theorem FABL.anfEval_anfMul {n : }
      (c d : FABL.ANFCoefficients n)
      (x : FABL.F₂Cube n) :
      FABL.anfEval (FABL.anfMul c d) x =
        FABL.anfEval c x * FABL.anfEval d x
    Evaluation of the square-free ANF product is pointwise multiplication. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.algebraicDegree_anfMul_le_add {n : }
      (c d : FABL.ANFCoefficients n) :
      FABL.algebraicDegree (FABL.anfMul c d) 
        FABL.algebraicDegree c + FABL.algebraicDegree d
    theorem FABL.algebraicDegree_anfMul_le_add {n : }
      (c d : FABL.ANFCoefficients n) :
      FABL.algebraicDegree (FABL.anfMul c d) 
        FABL.algebraicDegree c +
          FABL.algebraicDegree d
    Multiplication of square-free ANFs adds their algebraic-degree bounds. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.anfCoeff_mul {n : } (f g : FABL.F₂BooleanFunction n) :
      FABL.anfCoeff (f * g) =
        FABL.anfMul (FABL.anfCoeff f) (FABL.anfCoeff g)
    theorem FABL.anfCoeff_mul {n : }
      (f g : FABL.F₂BooleanFunction n) :
      FABL.anfCoeff (f * g) =
        FABL.anfMul (FABL.anfCoeff f)
          (FABL.anfCoeff g)
    The canonical ANF of a pointwise product is the square-free ANF product. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_mul_le_add {n : }
      (f g : FABL.F₂BooleanFunction n) :
      FABL.functionAlgebraicDegree (f * g) 
        FABL.functionAlgebraicDegree f + FABL.functionAlgebraicDegree g
    theorem FABL.functionAlgebraicDegree_mul_le_add
      {n : }
      (f g : FABL.F₂BooleanFunction n) :
      FABL.functionAlgebraicDegree (f * g) 
        FABL.functionAlgebraicDegree f +
          FABL.functionAlgebraicDegree g
    Algebraic degree is subadditive under pointwise multiplication. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_one {n : } :
      FABL.functionAlgebraicDegree 1 = 0
    theorem FABL.functionAlgebraicDegree_one {n : } :
      FABL.functionAlgebraicDegree 1 = 0
    The constant-one Boolean function has algebraic degree zero. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_finset_prod_le.{u_1} {n : } {ι : Type u_1}
      (s : Finset ι) (g : ι  FABL.F₂BooleanFunction n) :
      FABL.functionAlgebraicDegree (∏ i  s, g i) 
         i  s, FABL.functionAlgebraicDegree (g i)
    theorem FABL.functionAlgebraicDegree_finset_prod_le.{u_1}
      {n : } {ι : Type u_1} (s : Finset ι)
      (g : ι  FABL.F₂BooleanFunction n) :
      FABL.functionAlgebraicDegree
          (∏ i  s, g i) 
         i  s,
          FABL.functionAlgebraicDegree (g i)
    The degree of a finite pointwise product is bounded by the sum of factor degrees. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.lean
    complete
    theorem FABL.functionAlgebraicDegree_finset_sum_le.{u_1} {n : } {ι : Type u_1}
      (s : Finset ι) (g : ι  FABL.F₂BooleanFunction n) (r : )
      (hg :  i  s, FABL.functionAlgebraicDegree (g i)  r) :
      FABL.functionAlgebraicDegree (∑ i  s, g i)  r
    theorem FABL.functionAlgebraicDegree_finset_sum_le.{u_1}
      {n : } {ι : Type u_1} (s : Finset ι)
      (g : ι  FABL.F₂BooleanFunction n)
      (r : )
      (hg :
         i  s,
          FABL.functionAlgebraicDegree (g i) 
            r) :
      FABL.functionAlgebraicDegree
          (∑ i  s, g i) 
        r
    A finite sum of functions of degree at most `r` again has degree at most `r`. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    theorem FABL.functionAlgebraicDegree_affineMap_coordinate_le_one {n : }
      (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) (i : Fin n) :
      (FABL.functionAlgebraicDegree fun x => L x i)  1
    theorem FABL.functionAlgebraicDegree_affineMap_coordinate_le_one
      {n : }
      (L :
        FABL.F₂Cube n →ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n)
      (i : Fin n) :
      (FABL.functionAlgebraicDegree fun x =>
          L x i) 
        1
    Every coordinate of an affine map on the binary cube has algebraic degree at most one. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    theorem FABL.functionAlgebraicDegree_anfMonomial_comp_affineMap_le_card {n : }
      (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) (S : Finset (Fin n)) :
      (FABL.functionAlgebraicDegree fun x => FABL.anfMonomial S (L x)) 
        S.card
    theorem FABL.functionAlgebraicDegree_anfMonomial_comp_affineMap_le_card
      {n : }
      (L :
        FABL.F₂Cube n →ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n)
      (S : Finset (Fin n)) :
      (FABL.functionAlgebraicDegree fun x =>
          FABL.anfMonomial S (L x)) 
        S.card
    Substituting affine coordinates into a square-free monomial does not increase its degree. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    theorem FABL.functionAlgebraicDegree_comp_affineMap_le {n : }
      (f : FABL.F₂BooleanFunction n)
      (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) :
      FABL.functionAlgebraicDegree (f  L)  FABL.functionAlgebraicDegree f
    theorem FABL.functionAlgebraicDegree_comp_affineMap_le
      {n : } (f : FABL.F₂BooleanFunction n)
      (L :
        FABL.F₂Cube n →ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n) :
      FABL.functionAlgebraicDegree (f  L) 
        FABL.functionAlgebraicDegree f
    Composition with an affine map on the binary cube cannot increase algebraic degree. 
  • theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.lean
    complete
    theorem FABL.functionAlgebraicDegree_comp_affineEquiv {n : }
      (f : FABL.F₂BooleanFunction n)
      (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) :
      FABL.functionAlgebraicDegree (f  L) = FABL.functionAlgebraicDegree f
    theorem FABL.functionAlgebraicDegree_comp_affineEquiv
      {n : } (f : FABL.F₂BooleanFunction n)
      (L :
        FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n) :
      FABL.functionAlgebraicDegree (f  L) =
        FABL.functionAlgebraicDegree f
    Algebraic degree is invariant under affine equivalences of the binary cube. 

The proof first establishes nonincrease under an arbitrary affine map by substituting affine coordinate functions into the unique square-free ANF, then applies the same bound to L^{-1}.

Theorem1.4.7
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
Theorem 1.3.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Recovery from low-weight restrictions (Carlet, pp. 13--14). Write y\preceq x when \operatorname{supp}(y)\subseteq\operatorname{supp}(x), and let E_d=\{y\in V_n:w_H(y)\le d\}. If f:V_n\to\mathbb F_2 satisfies \deg_{\mathrm{alg}}(f)\le d<n, then for every x\in V_n, f(x) =\bigoplus_{\substack{y\preceq x\\y\in E_d}} f(y) \left[ \sum_{i=0}^{d-w_H(y)} \binom{w_H(x)-w_H(y)}{i} \bmod 2 \right]. Consequently, f is uniquely determined by its restriction to E_d. More generally, for every affine automorphism L\in\operatorname{AGL}(V_n), it is uniquely determined by its restriction to L(E_d).

Lean code for Theorem1.4.710 declarations
  • defdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    def CryptBoolean.supportPrecedes {n : } (y x : FABL.F₂Cube n) : Prop
    def CryptBoolean.supportPrecedes {n : }
      (y x : FABL.F₂Cube n) : Prop
    The coordinatewise support order on the binary cube. 
  • defdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    def CryptBoolean.supportPrecedesDecidable {n : } (y x : FABL.F₂Cube n) :
      Decidable (CryptBoolean.supportPrecedes y x)
    def CryptBoolean.supportPrecedesDecidable
      {n : } (y x : FABL.F₂Cube n) :
      Decidable
        (CryptBoolean.supportPrecedes y x)
  • defdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    def CryptBoolean.lowWeightInputs {n : } (d : ) : Finset (FABL.F₂Cube n)
    def CryptBoolean.lowWeightInputs {n : }
      (d : ) : Finset (FABL.F₂Cube n)
    Carlet's set `E_d` of binary vectors of Hamming weight at most `d`. 
  • defdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    def CryptBoolean.restrictionRecoveryCoefficient {n : } (d : )
      (x y : FABL.F₂Cube n) : FABL.𝔽₂
    def CryptBoolean.restrictionRecoveryCoefficient
      {n : } (d : ) (x y : FABL.F₂Cube n) :
      FABL.𝔽₂
    The binomial-parity coefficient in Carlet's restriction-recovery formula. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    theorem CryptBoolean.card_powerset_filter_card_le {n : } (U : Finset (Fin n))
      (k : ) :
      {S  U.powerset | S.card  k}.card =
         i  Finset.range (k + 1), U.card.choose i
    theorem CryptBoolean.card_powerset_filter_card_le
      {n : } (U : Finset (Fin n)) (k : ) :
      {S  U.powerset | S.card  k}.card =
         i  Finset.range (k + 1),
          U.card.choose i
    The number of subsets of `U` of cardinality at most `k`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    theorem CryptBoolean.card_intermediate_subsets_le {n : } (T U : Finset (Fin n))
      (d : ) (hTU : T  U) (hTd : T.card  d) :
      {S  U.powerset | T  S  S.card  d}.card =
         i  Finset.range (d - T.card + 1), (U.card - T.card).choose i
    theorem CryptBoolean.card_intermediate_subsets_le
      {n : } (T U : Finset (Fin n)) (d : )
      (hTU : T  U) (hTd : T.card  d) :
      {S  U.powerset |
            T  S  S.card  d}.card =
         i  Finset.range (d - T.card + 1),
          (U.card - T.card).choose i
    The number of intermediate subsets `S` with `T ⊆ S ⊆ U` and `|S| ≤ d`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    theorem CryptBoolean.restrictionRecoveryFormula_f₂CubeOfFinset {n : }
      (f : CryptBoolean.BooleanFunction n) (d : )
      (hdegree : FABL.functionAlgebraicDegree f  d) (U : Finset (Fin n)) :
      f (FABL.f₂CubeOfFinset U) =
         T  U.powerset,
          if T.card  d then
            f (FABL.f₂CubeOfFinset T) *
              (∑ i  Finset.range (d - T.card + 1),
                  (U.card - T.card).choose i)
          else 0
    theorem CryptBoolean.restrictionRecoveryFormula_f₂CubeOfFinset
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (d : )
      (hdegree :
        FABL.functionAlgebraicDegree f  d)
      (U : Finset (Fin n)) :
      f (FABL.f₂CubeOfFinset U) =
         T  U.powerset,
          if T.card  d then
            f (FABL.f₂CubeOfFinset T) *
              (∑
                  i 
                    Finset.range
                      (d - T.card + 1),
                  (U.card - T.card).choose i)
          else 0
    Carlet's recovery identity at the indicator vector of a coordinate subset. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    theorem CryptBoolean.restrictionRecoveryFormula {n : }
      (f : CryptBoolean.BooleanFunction n) (d : )
      (hdegree : FABL.functionAlgebraicDegree f  d) (_hdn : d < n)
      (x : FABL.F₂Cube n) :
      f x =
         y  CryptBoolean.lowWeightInputs d with
          CryptBoolean.supportPrecedes y x,
          f y * CryptBoolean.restrictionRecoveryCoefficient d x y
    theorem CryptBoolean.restrictionRecoveryFormula
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (d : )
      (hdegree :
        FABL.functionAlgebraicDegree f  d)
      (_hdn : d < n) (x : FABL.F₂Cube n) :
      f x =
        
          y 
            CryptBoolean.lowWeightInputs
              d with
          CryptBoolean.supportPrecedes y x,
          f y *
            CryptBoolean.restrictionRecoveryCoefficient
              d x y
    Carlet, pp. 13--14: a Boolean function of degree at most `d < n` is
    recovered at every input from its values on `E_d`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    theorem CryptBoolean.eq_of_eq_on_lowWeightInputs {n : }
      (f g : CryptBoolean.BooleanFunction n) (d : )
      (hf : FABL.functionAlgebraicDegree f  d)
      (hg : FABL.functionAlgebraicDegree g  d) (hdn : d < n)
      (hfg :  y  CryptBoolean.lowWeightInputs d, f y = g y) : f = g
    theorem CryptBoolean.eq_of_eq_on_lowWeightInputs
      {n : }
      (f g : CryptBoolean.BooleanFunction n)
      (d : )
      (hf :
        FABL.functionAlgebraicDegree f  d)
      (hg :
        FABL.functionAlgebraicDegree g  d)
      (hdn : d < n)
      (hfg :
         y  CryptBoolean.lowWeightInputs d,
          f y = g y) :
      f = g
    Values on `E_d` uniquely determine a Boolean function of degree at most `d < n`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.lean
    complete
    theorem CryptBoolean.eq_of_eq_on_affineImage_lowWeightInputs {n : }
      (f g : CryptBoolean.BooleanFunction n) (d : )
      (hf : FABL.functionAlgebraicDegree f  d)
      (hg : FABL.functionAlgebraicDegree g  d) (hdn : d < n)
      (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n)
      (hfg :
         z  Finset.image (fun y => L y) (CryptBoolean.lowWeightInputs d),
          f z = g z) :
      f = g
    theorem CryptBoolean.eq_of_eq_on_affineImage_lowWeightInputs
      {n : }
      (f g : CryptBoolean.BooleanFunction n)
      (d : )
      (hf :
        FABL.functionAlgebraicDegree f  d)
      (hg :
        FABL.functionAlgebraicDegree g  d)
      (hdn : d < n)
      (L :
        FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n)
      (hfg :
        
          z 
            Finset.image (fun y => L y)
              (CryptBoolean.lowWeightInputs
                d),
          f z = g z) :
      f = g
    Values on an affine image of `E_d` uniquely determine a Boolean function
    of degree at most `d < n`.