Cryptographic Boolean Functions in Lean

8.3. Functions with optimal algebraic immunity🔗

Theorem8.3.1
Group: Chapter 8: Algebraic immune functions (18)
Group member previews
Preview
Theorem 8.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 5
Statement dependency previews
Preview
Definition 1.1.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 8.3.2
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Parameters of the majority function (Carlet, pp. 135, 137). Let n>0 and define \operatorname{Maj}_n:V_n\to\mathbb F_2 by \operatorname{Maj}_n(x)=1 \quad\Longleftrightarrow\quad 2w_H(x)\ge n. It is symmetric, \lfloor n/2\rfloor-normal, and \operatorname{AI}(\operatorname{Maj}_n)=\lceil n/2\rceil. Its exact nonlinearity is \operatorname{nl}(\operatorname{Maj}_n)= \begin{cases} 2^{n-1}-\binom{n-1}{n/2},& n\text{ even},\\ 2^{n-1}-\binom{n-1}{(n-1)/2},& n\text{ odd}. \end{cases}

Lean code for Theorem8.3.119 declarations
  • defdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    def CryptBoolean.carletMajority (n : ) : CryptBoolean.BooleanFunction n
    def CryptBoolean.carletMajority (n : ) :
      CryptBoolean.BooleanFunction n
    Carlet's majority function, with a tie included in the one-set. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletMajority_apply_eq_one_iff {n : }
      (x : FABL.F₂Cube n) :
      CryptBoolean.carletMajority n x = 1  n  2 * (FABL.f₂Support x).card
    theorem CryptBoolean.carletMajority_apply_eq_one_iff
      {n : } (x : FABL.F₂Cube n) :
      CryptBoolean.carletMajority n x = 1 
        n  2 * (FABL.f₂Support x).card
    Carlet's convention is the weak majority threshold. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletMajority_apply_eq_one_iff_ceiling_half {n : }
      (x : FABL.F₂Cube n) :
      CryptBoolean.carletMajority n x = 1 
        (n + 1) / 2  (FABL.f₂Support x).card
    theorem CryptBoolean.carletMajority_apply_eq_one_iff_ceiling_half
      {n : } (x : FABL.F₂Cube n) :
      CryptBoolean.carletMajority n x = 1 
        (n + 1) / 2  (FABL.f₂Support x).card
    Carlet's majority threshold is equivalently Hamming weight at least `⌈n/2⌉`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletMajority_eq_of_support_card_eq {n : }
      (x y : FABL.F₂Cube n)
      (hweight : (FABL.f₂Support x).card = (FABL.f₂Support y).card) :
      CryptBoolean.carletMajority n x = CryptBoolean.carletMajority n y
    theorem CryptBoolean.carletMajority_eq_of_support_card_eq
      {n : } (x y : FABL.F₂Cube n)
      (hweight :
        (FABL.f₂Support x).card =
          (FABL.f₂Support y).card) :
      CryptBoolean.carletMajority n x =
        CryptBoolean.carletMajority n y
    Binary Hamming weight determines Carlet's majority value. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletMajority_symmetric {n : } :
      FABL.IsSymmetric fun x =>
        CryptBoolean.carletMajority n ((FABL.binaryCubeSignEquiv n).symm x)
    theorem CryptBoolean.carletMajority_symmetric
      {n : } :
      FABL.IsSymmetric fun x =>
        CryptBoolean.carletMajority n
          ((FABL.binaryCubeSignEquiv n).symm
            x)
    Carlet's majority is invariant under every coordinate permutation. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletMajority_isKNormal {n : } (hn : 0 < n) :
      CryptBoolean.IsKNormal (CryptBoolean.carletMajority n) (n / 2)
    theorem CryptBoolean.carletMajority_isKNormal
      {n : } (hn : 0 < n) :
      CryptBoolean.IsKNormal
        (CryptBoolean.carletMajority n)
        (n / 2)
    Majority is constant on a coordinate flat of dimension `⌊n/2⌋`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.algebraicImmunity_carletMajority {n : } :
      CryptBoolean.algebraicImmunity (CryptBoolean.carletMajority n) =
        (n + 1) / 2
    theorem CryptBoolean.algebraicImmunity_carletMajority
      {n : } :
      CryptBoolean.algebraicImmunity
          (CryptBoolean.carletMajority n) =
        (n + 1) / 2
    Majority has optimal algebraic immunity `⌈n/2⌉`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.fourierInfinityNorm_majority_even (r : ) :
      FABL.fourierInfinityNorm (FABL.majority (2 * r)).toReal =
        FABL.oddMajorityInfluence r
    theorem CryptBoolean.fourierInfinityNorm_majority_even
      (r : ) :
      FABL.fourierInfinityNorm
          (FABL.majority (2 * r)).toReal =
        FABL.oddMajorityInfluence r
    The exact Fourier infinity norm of even majority. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.fourierInfinityNorm_majority_odd (r : ) :
      FABL.fourierInfinityNorm (FABL.majority (2 * r + 1)).toReal =
        FABL.oddMajorityInfluence r
    theorem CryptBoolean.fourierInfinityNorm_majority_odd
      (r : ) :
      FABL.fourierInfinityNorm
          (FABL.majority (2 * r + 1)).toReal =
        FABL.oddMajorityInfluence r
    The exact Fourier infinity norm of odd majority. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.maxWalshMagnitude_carletStrictMajority_even (r : ) :
      CryptBoolean.maxWalshMagnitude
          (CryptBoolean.carletStrictMajority (2 * r)) =
        (2 * r).choose r
    theorem CryptBoolean.maxWalshMagnitude_carletStrictMajority_even
      (r : ) :
      CryptBoolean.maxWalshMagnitude
          (CryptBoolean.carletStrictMajority
            (2 * r)) =
        (2 * r).choose r
    The maximum raw Walsh magnitude of strict majority in even dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.maxWalshMagnitude_carletStrictMajority_odd (r : ) :
      CryptBoolean.maxWalshMagnitude
          (CryptBoolean.carletStrictMajority (2 * r + 1)) =
        2 * (2 * r).choose r
    theorem CryptBoolean.maxWalshMagnitude_carletStrictMajority_odd
      (r : ) :
      CryptBoolean.maxWalshMagnitude
          (CryptBoolean.carletStrictMajority
            (2 * r + 1)) =
        2 * (2 * r).choose r
    The maximum raw Walsh magnitude of strict majority in odd dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletStrictMajority_odd (r : ) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletStrictMajority (2 * r + 1)) =
        2 ^ (2 * r) - (2 * r).choose r
    theorem CryptBoolean.nonlinearity_carletStrictMajority_odd
      (r : ) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletStrictMajority
            (2 * r + 1)) =
        2 ^ (2 * r) - (2 * r).choose r
    Exact nonlinearity of strict majority in odd dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletStrictMajority_even (r : )
      (hr : 0 < r) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletStrictMajority (2 * r)) =
        2 ^ (2 * r - 1) - (2 * r - 1).choose r
    theorem CryptBoolean.nonlinearity_carletStrictMajority_even
      (r : ) (hr : 0 < r) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletStrictMajority
            (2 * r)) =
        2 ^ (2 * r - 1) - (2 * r - 1).choose r
    Exact nonlinearity of strict majority in positive even dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletStrictMajority {n : } (hn : 0 < n) :
      CryptBoolean.nonlinearity (CryptBoolean.carletStrictMajority n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    theorem CryptBoolean.nonlinearity_carletStrictMajority
      {n : } (hn : 0 < n) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletStrictMajority
            n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    Exact nonlinearity of strict majority in every positive dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_add_constant_one {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.nonlinearity (f + 1) = CryptBoolean.nonlinearity f
    theorem CryptBoolean.nonlinearity_add_constant_one
      {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.nonlinearity (f + 1) =
        CryptBoolean.nonlinearity f
    Output complementation preserves nonlinearity. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletMajority_eq_strictMajority {n : } :
      CryptBoolean.nonlinearity (CryptBoolean.carletMajority n) =
        CryptBoolean.nonlinearity (CryptBoolean.carletStrictMajority n)
    theorem CryptBoolean.nonlinearity_carletMajority_eq_strictMajority
      {n : } :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletMajority n) =
        CryptBoolean.nonlinearity
          (CryptBoolean.carletStrictMajority
            n)
    Every majority threshold convention has the same nonlinearity. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletMajority {n : } (hn : 0 < n) :
      CryptBoolean.nonlinearity (CryptBoolean.carletMajority n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    theorem CryptBoolean.nonlinearity_carletMajority
      {n : } (hn : 0 < n) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletMajority n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    Exact nonlinearity of Carlet's majority in every positive dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletMajority_of_even {n : } (hn : 0 < n)
      (_heven : Even n) :
      CryptBoolean.nonlinearity (CryptBoolean.carletMajority n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    theorem CryptBoolean.nonlinearity_carletMajority_of_even
      {n : } (hn : 0 < n) (_heven : Even n) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletMajority n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    Exact even-dimensional majority nonlinearity. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletMajority_of_odd {n : } (hodd : Odd n) :
      CryptBoolean.nonlinearity (CryptBoolean.carletMajority n) =
        2 ^ (n - 1) - (n - 1).choose ((n - 1) / 2)
    theorem CryptBoolean.nonlinearity_carletMajority_of_odd
      {n : } (hodd : Odd n) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletMajority n) =
        2 ^ (n - 1) -
          (n - 1).choose ((n - 1) / 2)
    Exact odd-dimensional majority nonlinearity. 
Theorem8.3.2
Group: Chapter 8: Algebraic immune functions (18)
Group member previews
Preview
Theorem 8.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Definition 3.7.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Majority threshold variants (Carlet, p. 137). Replacing the condition w_H(x)\ge n/2 by any of w_H(x)>n/2, \qquad w_H(x)\le n/2, \qquad w_H(x)<n/2 gives a function affinely equivalent to \operatorname{Maj}_n, possibly after adding the constant one. All four functions therefore have algebraic immunity \lceil n/2\rceil.

Lean code for Theorem8.3.218 declarations
  • defdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    def CryptBoolean.binaryComplementAffineEquiv (n : ) :
      FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n
    def CryptBoolean.binaryComplementAffineEquiv
      (n : ) :
      FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n
    The affine involution that complements every binary input coordinate. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.binaryComplementAffineEquiv_apply {n : }
      (x : FABL.F₂Cube n) :
      (CryptBoolean.binaryComplementAffineEquiv n) x =
        FABL.binaryCubeComplement x
    theorem CryptBoolean.binaryComplementAffineEquiv_apply
      {n : } (x : FABL.F₂Cube n) :
      (CryptBoolean.binaryComplementAffineEquiv
            n)
          x =
        FABL.binaryCubeComplement x
  • defdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    def CryptBoolean.carletStrictMajority (n : ) :
      CryptBoolean.BooleanFunction n
    def CryptBoolean.carletStrictMajority
      (n : ) : CryptBoolean.BooleanFunction n
    The strict majority threshold, equal to one exactly above half weight. 
  • defdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    def CryptBoolean.carletStrictMinority (n : ) :
      CryptBoolean.BooleanFunction n
    def CryptBoolean.carletStrictMinority
      (n : ) : CryptBoolean.BooleanFunction n
    The strict minority threshold, equal to one exactly below half weight. 
  • defdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    def CryptBoolean.carletWeakMinority (n : ) : CryptBoolean.BooleanFunction n
    def CryptBoolean.carletWeakMinority (n : ) :
      CryptBoolean.BooleanFunction n
    The weak minority threshold, equal to one at weights at most half. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.f₂Support_binaryCubeComplement {n : }
      (x : FABL.F₂Cube n) :
      FABL.f₂Support (FABL.binaryCubeComplement x) = (FABL.f₂Support x)
    theorem CryptBoolean.f₂Support_binaryCubeComplement
      {n : } (x : FABL.F₂Cube n) :
      FABL.f₂Support
          (FABL.binaryCubeComplement x) =
        (FABL.f₂Support x)
    Complementing every binary coordinate complements its support. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.card_f₂Support_binaryCubeComplement {n : }
      (x : FABL.F₂Cube n) :
      (FABL.f₂Support (FABL.binaryCubeComplement x)).card =
        n - (FABL.f₂Support x).card
    theorem CryptBoolean.card_f₂Support_binaryCubeComplement
      {n : } (x : FABL.F₂Cube n) :
      (FABL.f₂Support
            (FABL.binaryCubeComplement
              x)).card =
        n - (FABL.f₂Support x).card
    Complementing an input subtracts its Hamming weight from the dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletStrictMajority_apply_eq_one_iff {n : }
      (x : FABL.F₂Cube n) :
      CryptBoolean.carletStrictMajority n x = 1 
        n < 2 * (FABL.f₂Support x).card
    theorem CryptBoolean.carletStrictMajority_apply_eq_one_iff
      {n : } (x : FABL.F₂Cube n) :
      CryptBoolean.carletStrictMajority n x =
          1 
        n < 2 * (FABL.f₂Support x).card
    The encoded FABL majority is the strict binary majority threshold. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletStrictMinority_apply_eq_one_iff {n : }
      (x : FABL.F₂Cube n) :
      CryptBoolean.carletStrictMinority n x = 1 
        2 * (FABL.f₂Support x).card < n
    theorem CryptBoolean.carletStrictMinority_apply_eq_one_iff
      {n : } (x : FABL.F₂Cube n) :
      CryptBoolean.carletStrictMinority n x =
          1 
        2 * (FABL.f₂Support x).card < n
    The input-complement convention is the strict minority threshold. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletWeakMinority_apply_eq_one_iff {n : }
      (x : FABL.F₂Cube n) :
      CryptBoolean.carletWeakMinority n x = 1 
        2 * (FABL.f₂Support x).card  n
    theorem CryptBoolean.carletWeakMinority_apply_eq_one_iff
      {n : } (x : FABL.F₂Cube n) :
      CryptBoolean.carletWeakMinority n x =
          1 
        2 * (FABL.f₂Support x).card  n
    Output complementation gives the weak minority threshold. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletStrictMinority_eq_affineReindexing {n : } :
      CryptBoolean.carletStrictMinority n =
        CryptBoolean.carletStrictMajority n 
          (CryptBoolean.binaryComplementAffineEquiv n)
    theorem CryptBoolean.carletStrictMinority_eq_affineReindexing
      {n : } :
      CryptBoolean.carletStrictMinority n =
        CryptBoolean.carletStrictMajority n 
          (CryptBoolean.binaryComplementAffineEquiv
              n)
    The strict minority convention is an affine input reindexing. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletWeakMinority_eq_outputComplement {n : } :
      CryptBoolean.carletWeakMinority n =
        CryptBoolean.carletStrictMajority n + 1
    theorem CryptBoolean.carletWeakMinority_eq_outputComplement
      {n : } :
      CryptBoolean.carletWeakMinority n =
        CryptBoolean.carletStrictMajority n +
          1
    The weak minority convention is output complementation. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.carletMajority_eq_affineReindexing_add_one {n : } :
      CryptBoolean.carletMajority n =
        CryptBoolean.carletStrictMajority n 
            (CryptBoolean.binaryComplementAffineEquiv n) +
          1
    theorem CryptBoolean.carletMajority_eq_affineReindexing_add_one
      {n : } :
      CryptBoolean.carletMajority n =
        CryptBoolean.carletStrictMajority n 
            (CryptBoolean.binaryComplementAffineEquiv
                n) +
          1
    Carlet's convention is affine input reindexing followed by output complementation. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.algebraicImmunity_carletStrictMajority {n : } :
      CryptBoolean.algebraicImmunity (CryptBoolean.carletStrictMajority n) =
        (n + 1) / 2
    theorem CryptBoolean.algebraicImmunity_carletStrictMajority
      {n : } :
      CryptBoolean.algebraicImmunity
          (CryptBoolean.carletStrictMajority
            n) =
        (n + 1) / 2
    Strict majority has optimal algebraic immunity. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.algebraicImmunity_carletStrictMinority {n : } :
      CryptBoolean.algebraicImmunity (CryptBoolean.carletStrictMinority n) =
        (n + 1) / 2
    theorem CryptBoolean.algebraicImmunity_carletStrictMinority
      {n : } :
      CryptBoolean.algebraicImmunity
          (CryptBoolean.carletStrictMinority
            n) =
        (n + 1) / 2
    Strict minority has optimal algebraic immunity. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.algebraicImmunity_carletWeakMinority {n : } :
      CryptBoolean.algebraicImmunity (CryptBoolean.carletWeakMinority n) =
        (n + 1) / 2
    theorem CryptBoolean.algebraicImmunity_carletWeakMinority
      {n : } :
      CryptBoolean.algebraicImmunity
          (CryptBoolean.carletWeakMinority
            n) =
        (n + 1) / 2
    Weak minority has optimal algebraic immunity. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletWeakMinority {n : } (hn : 0 < n) :
      CryptBoolean.nonlinearity (CryptBoolean.carletWeakMinority n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    theorem CryptBoolean.nonlinearity_carletWeakMinority
      {n : } (hn : 0 < n) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletWeakMinority
            n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    Weak minority has the same exact nonlinearity as strict majority. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/Majority.lean
    complete
    theorem CryptBoolean.nonlinearity_carletStrictMinority {n : } (hn : 0 < n) :
      CryptBoolean.nonlinearity (CryptBoolean.carletStrictMinority n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    theorem CryptBoolean.nonlinearity_carletStrictMinority
      {n : } (hn : 0 < n) :
      CryptBoolean.nonlinearity
          (CryptBoolean.carletStrictMinority
            n) =
        2 ^ (n - 1) - (n - 1).choose (n / 2)
    Strict minority has the same exact nonlinearity as strict majority. 
Theorem8.3.3
Group: Chapter 8: Algebraic immune functions (18)
Group member previews
Preview
Theorem 8.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 5
Statement dependency previews
Preview
Definition 1.1.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 8.3.4
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Theorem 15 (Carlet, pp. 138--139). Let n\ge2, let K=\operatorname{GF}(2^n), and let \alpha be a primitive element of K. Let f:K\to\mathbb F_2 have support \{0\}\cup\{\alpha^i\mid 0\le i\le2^{n-1}-2\}. Then f is balanced and \operatorname{AI}(f)=\left\lceil\frac n2\right\rceil.

Lean code for Theorem8.3.39 declarations
  • defdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    def CryptBoolean.carletFengSupport {n : }
      (alpha : CryptBoolean.BinaryGaloisField n) :
      Finset (CryptBoolean.BinaryGaloisField n)
    def CryptBoolean.carletFengSupport {n : }
      (alpha :
        CryptBoolean.BinaryGaloisField n) :
      Finset
        (CryptBoolean.BinaryGaloisField n)
    The Carlet--Feng support consists of zero and the first `2^(n-1)-1`
    powers of a primitive element. 
  • defdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    def CryptBoolean.carletFengFieldFunction {n : }
      (alpha : CryptBoolean.BinaryGaloisField n) :
      CryptBoolean.FieldBooleanFunction n
    def CryptBoolean.carletFengFieldFunction
      {n : }
      (alpha :
        CryptBoolean.BinaryGaloisField n) :
      CryptBoolean.FieldBooleanFunction n
    The field-domain Carlet--Feng Boolean function. 
  • defdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    def CryptBoolean.carletFengBooleanFunction {n : }
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      (alpha : CryptBoolean.BinaryGaloisField n) :
      CryptBoolean.BooleanFunction n
    def CryptBoolean.carletFengBooleanFunction
      {n : }
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      (alpha :
        CryptBoolean.BinaryGaloisField n) :
      CryptBoolean.BooleanFunction n
    The scalar Carlet--Feng function after a binary linear identification with
    the extension field. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.mem_carletFengSupport_iff {n : }
      (alpha x : CryptBoolean.BinaryGaloisField n) :
      x  CryptBoolean.carletFengSupport alpha 
        x = 0   i < 2 ^ (n - 1) - 1, x = alpha ^ i
    theorem CryptBoolean.mem_carletFengSupport_iff
      {n : }
      (alpha x :
        CryptBoolean.BinaryGaloisField n) :
      x 
          CryptBoolean.carletFengSupport
            alpha 
        x = 0 
           i < 2 ^ (n - 1) - 1, x = alpha ^ i
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.carletFengSupport_card {n : } (hn : 2  n)
      {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) :
      (CryptBoolean.carletFengSupport alpha).card = 2 ^ (n - 1)
    theorem CryptBoolean.carletFengSupport_card
      {n : } (hn : 2  n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1)) :
      (CryptBoolean.carletFengSupport
            alpha).card =
        2 ^ (n - 1)
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.support_carletFengBooleanFunction {n : }
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      (alpha : CryptBoolean.BinaryGaloisField n) :
      Finset.map θ.toEquiv.toEmbedding
          (CryptBoolean.support
            (CryptBoolean.carletFengBooleanFunction θ alpha)) =
        CryptBoolean.carletFengSupport alpha
    theorem CryptBoolean.support_carletFengBooleanFunction
      {n : }
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      (alpha :
        CryptBoolean.BinaryGaloisField n) :
      Finset.map θ.toEquiv.toEmbedding
          (CryptBoolean.support
            (CryptBoolean.carletFengBooleanFunction
              θ alpha)) =
        CryptBoolean.carletFengSupport alpha
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.isBalanced_carletFengBooleanFunction {n : } (hn : 2  n)
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) :
      CryptBoolean.IsBalanced
        (CryptBoolean.carletFengBooleanFunction θ alpha)
    theorem CryptBoolean.isBalanced_carletFengBooleanFunction
      {n : } (hn : 2  n)
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1)) :
      CryptBoolean.IsBalanced
        (CryptBoolean.carletFengBooleanFunction
          θ alpha)
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.algebraicImmunity_carletFengBooleanFunction {n : }
      (hn : 2  n)
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) :
      CryptBoolean.algebraicImmunity
          (CryptBoolean.carletFengBooleanFunction θ alpha) =
        (n + 1) / 2
    theorem CryptBoolean.algebraicImmunity_carletFengBooleanFunction
      {n : } (hn : 2  n)
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1)) :
      CryptBoolean.algebraicImmunity
          (CryptBoolean.carletFengBooleanFunction
            θ alpha) =
        (n + 1) / 2
    Carlet Theorem 15: the consecutive-power construction has optimal
    algebraic immunity. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.carletFeng_balanced_and_algebraicImmunity {n : }
      (hn : 2  n)
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) :
      CryptBoolean.IsBalanced
          (CryptBoolean.carletFengBooleanFunction θ alpha) 
        CryptBoolean.algebraicImmunity
            (CryptBoolean.carletFengBooleanFunction θ alpha) =
          (n + 1) / 2
    theorem CryptBoolean.carletFeng_balanced_and_algebraicImmunity
      {n : } (hn : 2  n)
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1)) :
      CryptBoolean.IsBalanced
          (CryptBoolean.carletFengBooleanFunction
            θ alpha) 
        CryptBoolean.algebraicImmunity
            (CryptBoolean.carletFengBooleanFunction
              θ alpha) =
          (n + 1) / 2
    Carlet Theorem 15: for `n ≥ 2`, the function supported on zero and the
    first `2^(n-1)-1` powers of a primitive element is balanced and has algebraic
    immunity `⌈n/2⌉`. 
Theorem8.3.4
Group: Chapter 8: Algebraic immune functions (18)
Group member previews
Preview
Theorem 8.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 1.5.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Relation (70) (Carlet, pp. 139--140). Under the hypotheses of Theorem 15, the bounded univariate representation of f is f(x)=1+\sum_{i=1}^{2^n-2} \frac{\alpha^i}{(1+\alpha^i)^{1/2}}x^i, where u^{1/2}=u^{2^{n-1}} in \operatorname{GF}(2^n).

Lean code for Theorem8.3.46 declarations
  • defdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    def CryptBoolean.carletFengUnivariateRepresentation {n : }
      (alpha : CryptBoolean.BinaryGaloisField n) :
      Polynomial (CryptBoolean.BinaryGaloisField n)
    def CryptBoolean.carletFengUnivariateRepresentation
      {n : }
      (alpha :
        CryptBoolean.BinaryGaloisField n) :
      Polynomial
        (CryptBoolean.BinaryGaloisField n)
    The canonical bounded univariate representation of the field-domain
    Carlet--Feng function. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.coeff_carletFengUnivariateRepresentation {n i : }
      (hn : 2  n) {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) (hi0 : 0 < i)
      (hi : i < 2 ^ n - 1) :
      (CryptBoolean.carletFengUnivariateRepresentation alpha).coeff i =
        alpha ^ i / (1 + alpha ^ i) ^ 2 ^ (n - 1)
    theorem CryptBoolean.coeff_carletFengUnivariateRepresentation
      {n i : } (hn : 2  n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1))
      (hi0 : 0 < i) (hi : i < 2 ^ n - 1) :
      (CryptBoolean.carletFengUnivariateRepresentation
              alpha).coeff
          i =
        alpha ^ i /
          (1 + alpha ^ i) ^ 2 ^ (n - 1)
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.coeff_top_carletFengUnivariateRepresentation {n : }
      (hn : 2  n) {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) :
      (CryptBoolean.carletFengUnivariateRepresentation alpha).coeff
          (2 ^ n - 1) =
        0
    theorem CryptBoolean.coeff_top_carletFengUnivariateRepresentation
      {n : } (hn : 2  n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1)) :
      (CryptBoolean.carletFengUnivariateRepresentation
              alpha).coeff
          (2 ^ n - 1) =
        0
  • defdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    def CryptBoolean.carletFengClosedPolynomial {n : }
      (alpha : CryptBoolean.BinaryGaloisField n) :
      Polynomial (CryptBoolean.BinaryGaloisField n)
    def CryptBoolean.carletFengClosedPolynomial
      {n : }
      (alpha :
        CryptBoolean.BinaryGaloisField n) :
      Polynomial
        (CryptBoolean.BinaryGaloisField n)
    The polynomial displayed in Carlet Relation (70). 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.carletFengUnivariateRepresentation_eq_closedPolynomial
      {n : } (hn : 2  n) {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) :
      CryptBoolean.carletFengUnivariateRepresentation alpha =
        CryptBoolean.carletFengClosedPolynomial alpha
    theorem CryptBoolean.carletFengUnivariateRepresentation_eq_closedPolynomial
      {n : } (hn : 2  n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1)) :
      CryptBoolean.carletFengUnivariateRepresentation
          alpha =
        CryptBoolean.carletFengClosedPolynomial
          alpha
    Carlet Relation (70) as equality with the canonical bounded univariate
    representation. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.carletFeng_relation_70 {n : } (hn : 2  n)
      {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1))
      (x : CryptBoolean.BinaryGaloisField n) :
      (algebraMap FABL.𝔽₂ (CryptBoolean.BinaryGaloisField n))
          (CryptBoolean.carletFengFieldFunction alpha x) =
        1 +
           i  Finset.Ico 1 (2 ^ n - 1),
            alpha ^ i / (1 + alpha ^ i) ^ 2 ^ (n - 1) * x ^ i
    theorem CryptBoolean.carletFeng_relation_70
      {n : } (hn : 2  n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1))
      (x : CryptBoolean.BinaryGaloisField n) :
      (algebraMap FABL.𝔽₂
            (CryptBoolean.BinaryGaloisField
              n))
          (CryptBoolean.carletFengFieldFunction
            alpha x) =
        1 +
           i  Finset.Ico 1 (2 ^ n - 1),
            alpha ^ i /
                (1 + alpha ^ i) ^
                  2 ^ (n - 1) *
              x ^ i
    Carlet Relation (70): the field-domain function is the displayed
    univariate sum, with square root `u^(1/2) = u^(2^(n-1))`. 
Theorem8.3.5
Group: Chapter 8: Algebraic immune functions (18)
Group member previews
Preview
Theorem 8.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 2
Statement dependency previews
Preview
Theorem 1.5.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Algebraic degree of the Carlet--Feng function (Carlet, p. 140). Under the hypotheses of Theorem 15, \deg(f)=n-1.

Lean code for Theorem8.3.52 theorems
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.coeff_two_pow_sub_two_carletFengUnivariateRepresentation_ne_zero
      {n : } (hn : 2  n) {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) :
      (CryptBoolean.carletFengUnivariateRepresentation alpha).coeff
          (2 ^ n - 2) 
        0
    theorem CryptBoolean.coeff_two_pow_sub_two_carletFengUnivariateRepresentation_ne_zero
      {n : } (hn : 2  n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1)) :
      (CryptBoolean.carletFengUnivariateRepresentation
              alpha).coeff
          (2 ^ n - 2) 
        0
    The coefficient at exponent `2^n-2` in Relation (70) is nonzero. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFeng.lean
    complete
    theorem CryptBoolean.functionAlgebraicDegree_carletFengBooleanFunction {n : }
      (hn : 2  n)
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      {alpha : CryptBoolean.BinaryGaloisField n}
      (halpha : IsPrimitiveRoot alpha (2 ^ n - 1)) :
      FABL.functionAlgebraicDegree
          (CryptBoolean.carletFengBooleanFunction θ alpha) =
        n - 1
    theorem CryptBoolean.functionAlgebraicDegree_carletFengBooleanFunction
      {n : } (hn : 2  n)
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      {alpha :
        CryptBoolean.BinaryGaloisField n}
      (halpha :
        IsPrimitiveRoot alpha (2 ^ n - 1)) :
      FABL.functionAlgebraicDegree
          (CryptBoolean.carletFengBooleanFunction
            θ alpha) =
        n - 1
    The algebraic-degree consequence of Carlet Relation (70): the balanced
    Carlet--Feng function has the maximal possible degree `n-1`. 
Theorem8.3.6
Group: Chapter 8: Algebraic immune functions (18)
Group member previews
Preview
Theorem 8.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Theorem 1.5.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Nonlinearity of the Carlet--Feng function (Carlet, p. 140). Under the hypotheses of Theorem 15, \operatorname{nl}(f)\ge 2^{n-1}-n\ln(2)\,2^{n/2}-1, where the integer nonlinearity is embedded in \mathbb R.

Lean code for Theorem8.3.62 theorems
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFengNonlinearity.lean
    complete
    theorem CryptBoolean.maxWalshMagnitude_carletFengBooleanFunction_cast_le {n : }
      (hn : 2  n)
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      {α : CryptBoolean.BinaryGaloisField n}
      ( : IsPrimitiveRoot α (2 ^ n - 1)) :
      (CryptBoolean.maxWalshMagnitude
            (CryptBoolean.carletFengBooleanFunction θ α)) 
        2 * (1 + n * Real.log 2 * (2 ^ n))
    theorem CryptBoolean.maxWalshMagnitude_carletFengBooleanFunction_cast_le
      {n : } (hn : 2  n)
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      {α : CryptBoolean.BinaryGaloisField n}
      ( : IsPrimitiveRoot α (2 ^ n - 1)) :
      (CryptBoolean.maxWalshMagnitude
            (CryptBoolean.carletFengBooleanFunction
              θ α)) 
        2 * (1 + n * Real.log 2 * (2 ^ n))
    The real embedding of every Walsh magnitude of the Carlet--Feng function is bounded by
    the logarithmic incomplete-character-sum estimate. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/CarletFengNonlinearity.lean
    complete
    theorem CryptBoolean.nonlinearity_carletFengBooleanFunction_lower_bound {n : }
      (hn : 2  n)
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      {α : CryptBoolean.BinaryGaloisField n}
      ( : IsPrimitiveRoot α (2 ^ n - 1)) :
      2 ^ (n - 1) - n * Real.log 2 * (2 ^ n) - 1 
        (CryptBoolean.nonlinearity
            (CryptBoolean.carletFengBooleanFunction θ α))
    theorem CryptBoolean.nonlinearity_carletFengBooleanFunction_lower_bound
      {n : } (hn : 2  n)
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      {α : CryptBoolean.BinaryGaloisField n}
      ( : IsPrimitiveRoot α (2 ^ n - 1)) :
      2 ^ (n - 1) -
            n * Real.log 2 * (2 ^ n) -
          1 
        (CryptBoolean.nonlinearity
            (CryptBoolean.carletFengBooleanFunction
              θ α))
    The survey's logarithmic lower bound for the nonlinearity of the Carlet--Feng function.