Cryptographic Boolean Functions in Lean

8.1. Algebraic immunity🔗

Theorem8.1.1
Group: Chapter 8: Algebraic immune functions (18)
Group member previews
Preview
Theorem 8.1.2
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
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 immunity of trace monomials (Carlet, p. 134). Let n>0, let K=\operatorname{GF}(2^n), and let d be represented modulo 2^n-1 by an n-bit word. Let r(d) be the number of cyclic maximal nonempty blocks of consecutive ones in this word. For a\in K, define f(x)=\operatorname{Tr}_n(ax^d). If r(d)<\sqrt n/2, then \operatorname{AI}(f)\le r(d)\lfloor\sqrt n\rfloor+ \left\lceil\frac{n}{\lfloor\sqrt n\rfloor}\right\rceil-1.

Lean code for Theorem8.1.127 declarations
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.binaryWeight_ofBits {n : } (f : Fin n  Bool) :
      CryptBoolean.binaryWeight (Nat.ofBits f) =  i, (f i).toNat
    theorem CryptBoolean.binaryWeight_ofBits {n : }
      (f : Fin n  Bool) :
      CryptBoolean.binaryWeight
          (Nat.ofBits f) =
         i, (f i).toNat
    The binary weight of an `n`-bit word is the sum of its Boolean digits. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.binaryWeight_two_pow_sub_one (n : ) :
      CryptBoolean.binaryWeight (2 ^ n - 1) = n
    theorem CryptBoolean.binaryWeight_two_pow_sub_one
      (n : ) :
      CryptBoolean.binaryWeight (2 ^ n - 1) =
        n
    The all-ones `n`-bit word has binary weight `n`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.ofBits_eq_sum {n : } (f : Fin n  Bool) :
      Nat.ofBits f =  i, (f i).toNat * 2 ^ i
    theorem CryptBoolean.ofBits_eq_sum {n : }
      (f : Fin n  Bool) :
      Nat.ofBits f =  i, (f i).toNat * 2 ^ i
    Reconstructing a bounded binary word is its place-value expansion. 
  • defdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    def CryptBoolean.rotateBinaryExponent (n k : ) : 
    def CryptBoolean.rotateBinaryExponent
      (n k : ) : 
    One cyclic left rotation of the low `n` binary digits of an exponent. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.testBit_rotateBinaryExponent (n k : ) (i : Fin n) :
      (CryptBoolean.rotateBinaryExponent n k).testBit i =
        k.testBit ((Equiv.symm (finRotate n)) i)
    theorem CryptBoolean.testBit_rotateBinaryExponent
      (n k : ) (i : Fin n) :
      (CryptBoolean.rotateBinaryExponent n
              k).testBit
          i =
        k.testBit
          ((Equiv.symm (finRotate n)) i)
  • defdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    def CryptBoolean.binaryCyclicExponent (n k s : ) : 
    def CryptBoolean.binaryCyclicExponent
      (n k s : ) : 
    Multiplication of an exponent by a Frobenius power, reduced modulo
    `2^n-1`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.binaryCyclicExponent_lt (n k : ) (hn : 0 < n) (s : ) :
      CryptBoolean.binaryCyclicExponent n k s < 2 ^ n - 1
    theorem CryptBoolean.binaryCyclicExponent_lt
      (n k : ) (hn : 0 < n) (s : ) :
      CryptBoolean.binaryCyclicExponent n k
          s <
        2 ^ n - 1
    A positive-dimensional cyclic exponent is the canonical residue modulo
    `2^n-1`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.binaryCyclicExponent_succ_eq_rotate (n k s : )
      (hn : 0 < n) :
      CryptBoolean.binaryCyclicExponent n k (s + 1) =
        CryptBoolean.rotateBinaryExponent n
          (CryptBoolean.binaryCyclicExponent n k s)
    theorem CryptBoolean.binaryCyclicExponent_succ_eq_rotate
      (n k s : ) (hn : 0 < n) :
      CryptBoolean.binaryCyclicExponent n k
          (s + 1) =
        CryptBoolean.rotateBinaryExponent n
          (CryptBoolean.binaryCyclicExponent n
            k s)
    Successive Frobenius multiplication applies one cyclic binary rotation. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.binaryWeight_binaryCyclicExponent (n k s : ) (hn : 0 < n)
      (hk : k < 2 ^ n - 1) :
      CryptBoolean.binaryWeight (CryptBoolean.binaryCyclicExponent n k s) =
        CryptBoolean.binaryWeight k
    theorem CryptBoolean.binaryWeight_binaryCyclicExponent
      (n k s : ) (hn : 0 < n)
      (hk : k < 2 ^ n - 1) :
      CryptBoolean.binaryWeight
          (CryptBoolean.binaryCyclicExponent n
            k s) =
        CryptBoolean.binaryWeight k
    Frobenius multiplication cyclically rotates the `n`-bit exponent and
    preserves its binary weight. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.binaryCyclicExponent_pos {n k : } (hn : 0 < n)
      (hk0 : 0 < k) (hk : k < 2 ^ n - 1) (s : ) :
      0 < CryptBoolean.binaryCyclicExponent n k s
    theorem CryptBoolean.binaryCyclicExponent_pos
      {n k : } (hn : 0 < n) (hk0 : 0 < k)
      (hk : k < 2 ^ n - 1) (s : ) :
      0 <
        CryptBoolean.binaryCyclicExponent n k
          s
    A nonzero canonical exponent stays nonzero under Frobenius rotation. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.pow_binaryCyclicExponent {n k : } (hn : 0 < n)
      (hk0 : 0 < k) (hk : k < 2 ^ n - 1)
      (x : CryptBoolean.BinaryGaloisField n) (s : ) :
      x ^ CryptBoolean.binaryCyclicExponent n k s = x ^ (k * 2 ^ s)
    theorem CryptBoolean.pow_binaryCyclicExponent
      {n k : } (hn : 0 < n) (hk0 : 0 < k)
      (hk : k < 2 ^ n - 1)
      (x : CryptBoolean.BinaryGaloisField n)
      (s : ) :
      x ^
          CryptBoolean.binaryCyclicExponent n
            k s =
        x ^ (k * 2 ^ s)
    Reducing a positive exponent in its Frobenius orbit does not change the
    associated finite-field power function, including at zero. 
  • theoremdefined in CryptBoolean/Carlet/Chapter02/TraceMonomialDegree.lean
    complete
    theorem CryptBoolean.functionAlgebraicDegree_traceMonomial_le_binaryWeight
      {n k : } (hn : 0 < n) (hk : k  2 ^ n - 1)
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      (a : CryptBoolean.BinaryGaloisField n) :
      (FABL.functionAlgebraicDegree fun x =>
          (CryptBoolean.absoluteTrace n) (a * θ x ^ k)) 
        CryptBoolean.binaryWeight k
    theorem CryptBoolean.functionAlgebraicDegree_traceMonomial_le_binaryWeight
      {n k : } (hn : 0 < n)
      (hk : k  2 ^ n - 1)
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      (a : CryptBoolean.BinaryGaloisField n) :
      (FABL.functionAlgebraicDegree fun x =>
          (CryptBoolean.absoluteTrace n)
            (a * θ x ^ k)) 
        CryptBoolean.binaryWeight k
    A trace monomial whose exponent is represented by at most `n` binary
    digits has algebraic degree at most the exponent's binary weight. 
  • defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    def CryptBoolean.tracePowerFunction {n : }
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      (a : CryptBoolean.BinaryGaloisField n) (d : ) :
      CryptBoolean.BooleanFunction n
    def CryptBoolean.tracePowerFunction {n : }
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      (a : CryptBoolean.BinaryGaloisField n)
      (d : ) : CryptBoolean.BooleanFunction n
    A Boolean trace-power function in fixed finite-field coordinates. 
  • defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    def CryptBoolean.cyclicOneRunCount (n d : ) : 
    def CryptBoolean.cyclicOneRunCount (n d : ) :
      
    The number of cyclic one-runs in the canonical `n`-bit representative of
    an exponent modulo `2^n-1`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.cyclicOneRunCount_binaryCyclicExponent {n d s : }
      (hn : 0 < n) (hd : d < 2 ^ n - 1) :
      CryptBoolean.cyclicOneRunCount n
          (CryptBoolean.binaryCyclicExponent n d s) =
        CryptBoolean.cyclicOneRunCount n d
    theorem CryptBoolean.cyclicOneRunCount_binaryCyclicExponent
      {n d s : } (hn : 0 < n)
      (hd : d < 2 ^ n - 1) :
      CryptBoolean.cyclicOneRunCount n
          (CryptBoolean.binaryCyclicExponent n
            d s) =
        CryptBoolean.cyclicOneRunCount n d
    Cyclic Frobenius rotation preserves the number of cyclic one-runs. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.cyclicOneRunCount_pos {n d : } (hn : 0 < n) (hd0 : 0 < d)
      (hd : d < 2 ^ n - 1) : 0 < CryptBoolean.cyclicOneRunCount n d
    theorem CryptBoolean.cyclicOneRunCount_pos
      {n d : } (hn : 0 < n) (hd0 : 0 < d)
      (hd : d < 2 ^ n - 1) :
      0 < CryptBoolean.cyclicOneRunCount n d
    Every nonzero canonical exponent has a nonempty cyclic one-run. 
  • defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    def CryptBoolean.traceRunMultiplierPositions (n : ) : List 
    def CryptBoolean.traceRunMultiplierPositions
      (n : ) : List 
    The nonzero bit positions of the Nawaz--Gong--Gupta multiplier. If
    `k = n mod ⌊√n⌋` vanishes these are `0,⌊√n⌋,…`; otherwise they are
    `0,k,k+⌊√n⌋,…`, exactly as in the cited construction. 
  • defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    def CryptBoolean.traceRunMultiplierExponent (n : ) : 
    def CryptBoolean.traceRunMultiplierExponent
      (n : ) : 
    The Nawaz--Gong--Gupta multiplier exponent. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.bitIndices_traceRunMultiplierExponent {n : }
      (hn : 0 < n) :
      (CryptBoolean.traceRunMultiplierExponent n).bitIndices =
        CryptBoolean.traceRunMultiplierPositions n
    theorem CryptBoolean.bitIndices_traceRunMultiplierExponent
      {n : } (hn : 0 < n) :
      (CryptBoolean.traceRunMultiplierExponent
            n).bitIndices =
        CryptBoolean.traceRunMultiplierPositions
          n
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.testBit_traceRunMultiplierExponent {n i : } (hn : 0 < n) :
      (CryptBoolean.traceRunMultiplierExponent n).testBit i = true 
        i  CryptBoolean.traceRunMultiplierPositions n
    theorem CryptBoolean.testBit_traceRunMultiplierExponent
      {n i : } (hn : 0 < n) :
      (CryptBoolean.traceRunMultiplierExponent
                n).testBit
            i =
          true 
        i 
          CryptBoolean.traceRunMultiplierPositions
            n
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.traceRunMultiplierExponent_lt_two_pow {n : }
      (hn : 0 < n) : CryptBoolean.traceRunMultiplierExponent n < 2 ^ n
    theorem CryptBoolean.traceRunMultiplierExponent_lt_two_pow
      {n : } (hn : 0 < n) :
      CryptBoolean.traceRunMultiplierExponent
          n <
        2 ^ n
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.binaryWeight_traceRunMultiplierExponent {n : }
      (hn : 0 < n) :
      CryptBoolean.binaryWeight
          (CryptBoolean.traceRunMultiplierExponent n) =
        n ⌈/⌉ n.sqrt
    theorem CryptBoolean.binaryWeight_traceRunMultiplierExponent
      {n : } (hn : 0 < n) :
      CryptBoolean.binaryWeight
          (CryptBoolean.traceRunMultiplierExponent
            n) =
        n ⌈/⌉ n.sqrt
    The multiplier has precisely `⌈n/⌊√n⌋⌉` nonzero binary digits. 
  • defdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    def CryptBoolean.positiveCyclicSum (n x y : ) : 
    def CryptBoolean.positiveCyclicSum
      (n x y : ) : 
    The positive representative of `x+y` modulo `2^n-1`, for bounded
    positive summands. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.pow_positiveCyclicSum {n x y : } (hn : 0 < n)
      (hxy : 0 < x + y) (z : CryptBoolean.BinaryGaloisField n) :
      z ^ CryptBoolean.positiveCyclicSum n x y = z ^ (x + y)
    theorem CryptBoolean.pow_positiveCyclicSum
      {n x y : } (hn : 0 < n)
      (hxy : 0 < x + y)
      (z : CryptBoolean.BinaryGaloisField n) :
      z ^
          CryptBoolean.positiveCyclicSum n x
            y =
        z ^ (x + y)
    Positive cyclic reduction of an exponent preserves finite-field powers,
    including at zero. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.binaryWeight_positiveCyclicSum_traceRunMultiplier_le
      {n x : } (hn : 0 < n) (hx : x < 2 ^ n - 1) :
      CryptBoolean.binaryWeight
          (CryptBoolean.positiveCyclicSum n x
            (CryptBoolean.traceRunMultiplierExponent n)) 
        CryptBoolean.cyclicOneRunCount n x * (n.sqrt - 1) + n ⌈/⌉ n.sqrt
    theorem CryptBoolean.binaryWeight_positiveCyclicSum_traceRunMultiplier_le
      {n x : } (hn : 0 < n)
      (hx : x < 2 ^ n - 1) :
      CryptBoolean.binaryWeight
          (CryptBoolean.positiveCyclicSum n x
            (CryptBoolean.traceRunMultiplierExponent
              n)) 
        CryptBoolean.cyclicOneRunCount n x *
            (n.sqrt - 1) +
          n ⌈/⌉ n.sqrt
    Adding the Nawaz--Gong--Gupta multiplier to a canonical nonzero exponent
    costs at most one block-minus-one per cyclic one-run, in addition to the
    multiplier's own binary weight. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.binaryWeight_traceRunMultiplier_add_binaryCyclicExponent_le
      {n d s : } (hn : 0 < n) (hd0 : 0 < d) (hd : d < 2 ^ n - 1) :
      CryptBoolean.binaryWeight
          (CryptBoolean.positiveCyclicSum n
            (CryptBoolean.binaryCyclicExponent n d s)
            (CryptBoolean.traceRunMultiplierExponent n)) 
        CryptBoolean.cyclicOneRunCount n d * n.sqrt + n ⌈/⌉ n.sqrt - 1
    theorem CryptBoolean.binaryWeight_traceRunMultiplier_add_binaryCyclicExponent_le
      {n d s : } (hn : 0 < n) (hd0 : 0 < d)
      (hd : d < 2 ^ n - 1) :
      CryptBoolean.binaryWeight
          (CryptBoolean.positiveCyclicSum n
            (CryptBoolean.binaryCyclicExponent
              n d s)
            (CryptBoolean.traceRunMultiplierExponent
              n)) 
        CryptBoolean.cyclicOneRunCount n d *
              n.sqrt +
            n ⌈/⌉ n.sqrt -
          1
    Nawaz--Gong--Gupta's cyclic carry estimate for every Frobenius rotation of
    a nonzero canonical exponent. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/TracePowerRunBound.lean
    complete
    theorem CryptBoolean.algebraicImmunity_tracePowerFunction_le_runBound {n d : }
      (hn : 0 < n) (hd : d < 2 ^ n - 1)
      (θ : FABL.F₂Cube n ≃ₗ[FABL.𝔽₂] CryptBoolean.BinaryGaloisField n)
      (a : CryptBoolean.BinaryGaloisField n)
      (_hrun : (CryptBoolean.cyclicOneRunCount n d) < n / 2) :
      CryptBoolean.algebraicImmunity
          (CryptBoolean.tracePowerFunction θ a d) 
        CryptBoolean.cyclicOneRunCount n d * n.sqrt + n ⌈/⌉ n.sqrt - 1
    theorem CryptBoolean.algebraicImmunity_tracePowerFunction_le_runBound
      {n d : } (hn : 0 < n)
      (hd : d < 2 ^ n - 1)
      (θ :
        FABL.F₂Cube n ≃ₗ[FABL.𝔽₂]
          CryptBoolean.BinaryGaloisField n)
      (a : CryptBoolean.BinaryGaloisField n)
      (_hrun :
        (CryptBoolean.cyclicOneRunCount n
              d) <
          n / 2) :
      CryptBoolean.algebraicImmunity
          (CryptBoolean.tracePowerFunction θ a
            d) 
        CryptBoolean.cyclicOneRunCount n d *
              n.sqrt +
            n ⌈/⌉ n.sqrt -
          1
    Carlet's trace-power run bound: if the cyclic run count is below
    `√n/2`, then the algebraic immunity is bounded by the
    Nawaz--Gong--Gupta multiplier estimate. 
Theorem8.1.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 5
Statement dependency previews
Preview
Definition 2.1.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Proposition 38 (Carlet, pp. 134--135). Let n be odd and let f:V_n\to\mathbb F_2 be balanced. If f has no nonzero annihilator of algebraic degree at most (n-1)/2, then \operatorname{AI}(f)=\frac{n+1}{2}.

Lean code for Theorem8.1.21 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.lean
    complete
    theorem CryptBoolean.algebraicImmunity_eq_ceiling_half_of_odd_balanced_of_no_annihilator
      {n : } (f : CryptBoolean.BooleanFunction n) (hn : Odd n)
      (hbalanced : CryptBoolean.IsBalanced f)
      (hnoAnnihilator :
         (g : CryptBoolean.BooleanFunction n),
          g  0 
            FABL.functionAlgebraicDegree g  (n - 1) / 2  f * g  0) :
      CryptBoolean.algebraicImmunity f = (n + 1) / 2
    theorem CryptBoolean.algebraicImmunity_eq_ceiling_half_of_odd_balanced_of_no_annihilator
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (hn : Odd n)
      (hbalanced : CryptBoolean.IsBalanced f)
      (hnoAnnihilator :
        
          (g :
            CryptBoolean.BooleanFunction n),
          g  0 
            FABL.functionAlgebraicDegree g 
                (n - 1) / 2 
              f * g  0) :
      CryptBoolean.algebraicImmunity f =
        (n + 1) / 2
    Proposition 38: for odd `n`, a balanced function with no nonzero
    annihilator of degree at most `(n-1)/2` has optimal algebraic immunity. 
Theorem8.1.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 3
Statement dependency previews
Preview
Proposition 2.1.5
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 8.1.4
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Normality and algebraic immunity (Carlet, p. 135). If f:V_n\to\mathbb F_2 is k-normal, then \operatorname{AI}(f)\le n-k. More precisely, if f is constantly \varepsilon on a k-dimensional affine flat A, then the indicator of A is a nonzero annihilator of f+\varepsilon and has algebraic degree n-k.

Lean code for Theorem8.1.31 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.lean
    complete
    theorem CryptBoolean.algebraicImmunity_le_sub_of_isKNormal {n k : }
      (f : CryptBoolean.BooleanFunction n)
      (hf : CryptBoolean.IsKNormal f k) :
      CryptBoolean.algebraicImmunity f  n - k
    theorem CryptBoolean.algebraicImmunity_le_sub_of_isKNormal
      {n k : }
      (f : CryptBoolean.BooleanFunction n)
      (hf : CryptBoolean.IsKNormal f k) :
      CryptBoolean.algebraicImmunity f  n - k
    A `k`-normal `n`-variable Boolean function has algebraic immunity at most `n-k`. 
Theorem8.1.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 3
Statement dependency previews
Preview
Theorem 3.7.4
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Algebraic-immunity bounds do not force normality (Carlet, p. 135). Let a>1. As n tends to infinity, the uniform probability that an n-variable Boolean function is not \lfloor a\log_2 n\rfloor-normal tends to one, while every such function satisfies \operatorname{AI}(f)\le\lceil n/2\rceil. Consequently, for all sufficiently large n there exists f such that \operatorname{AI}(f)\le n-\lfloor a\log_2 n\rfloor but f is not \lfloor a\log_2 n\rfloor-normal.

Lean code for Theorem8.1.43 theorems
  • theoremdefined in CryptBoolean/Carlet/Chapter09/NormalitySeparation.lean
    complete
    theorem CryptBoolean.tendsto_carletNonnormalityDimension_div {α : }
      ( : 1 < α) :
      Filter.Tendsto
        (fun n => (CryptBoolean.carletNonnormalityDimension α n) / n)
        Filter.atTop (nhds 0)
    theorem CryptBoolean.tendsto_carletNonnormalityDimension_div
      {α : } ( : 1 < α) :
      Filter.Tendsto
        (fun n =>
          (CryptBoolean.carletNonnormalityDimension
                α n) /
            n)
        Filter.atTop (nhds 0)
    Carlet's logarithmic normality dimension is sublinear. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/NormalitySeparation.lean
    complete
    theorem CryptBoolean.eventually_ceilingHalf_le_sub_carletNonnormalityDimension
      {α : } ( : 1 < α) :
      ∀ᶠ (n : ) in Filter.atTop,
        (n + 1) / 2  n - CryptBoolean.carletNonnormalityDimension α n
    theorem CryptBoolean.eventually_ceilingHalf_le_sub_carletNonnormalityDimension
      {α : } ( : 1 < α) :
      ∀ᶠ (n : ) in Filter.atTop,
        (n + 1) / 2 
          n -
            CryptBoolean.carletNonnormalityDimension
              α n
    Eventually the universal ceiling-half algebraic-immunity bound is no
    larger than `n` minus Carlet's logarithmic normality dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/NormalitySeparation.lean
    complete
    theorem CryptBoolean.eventually_exists_algebraicImmunity_le_sub_not_isKNormal
      {α : } ( : 1 < α) :
      ∀ᶠ (n : ) in Filter.atTop,
         f,
          CryptBoolean.algebraicImmunity f 
              n - CryptBoolean.carletNonnormalityDimension α n 
            ¬CryptBoolean.IsKNormal f
                (CryptBoolean.carletNonnormalityDimension α n)
    theorem CryptBoolean.eventually_exists_algebraicImmunity_le_sub_not_isKNormal
      {α : } ( : 1 < α) :
      ∀ᶠ (n : ) in Filter.atTop,
         f,
          CryptBoolean.algebraicImmunity f 
              n -
                CryptBoolean.carletNonnormalityDimension
                  α n 
            ¬CryptBoolean.IsKNormal f
                (CryptBoolean.carletNonnormalityDimension
                  α n)
    For every `α>1`, in all sufficiently large dimensions there exists a function whose
    universal algebraic-immunity upper bound does not imply
    `floor (α log₂ n)`-normality. 
Theorem8.1.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 4
Statement dependency previews
Preview
Definition 1.1.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 7
Reverse dependency previews
Preview
Theorem 8.1.6
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Weight bounds from algebraic immunity (Carlet, pp. 135--136). Let k=\operatorname{AI}(f). Then \sum_{i=0}^{k-1}\binom ni \le w_H(f)\le \sum_{i=0}^{n-k}\binom ni. The lower sum is zero when k=0.

Lean code for Theorem8.1.53 theorems
  • theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.lean
    complete
    theorem CryptBoolean.algebraicImmunity_add_constant_one {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.algebraicImmunity (f + 1) =
        CryptBoolean.algebraicImmunity f
    theorem CryptBoolean.algebraicImmunity_add_constant_one
      {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.algebraicImmunity (f + 1) =
        CryptBoolean.algebraicImmunity f
    Algebraic immunity is invariant under complementation. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.lean
    complete
    theorem CryptBoolean.sum_choose_below_algebraicImmunity_le_hammingWeight {n : }
      (f : CryptBoolean.BooleanFunction n) :
       i  Finset.range (CryptBoolean.algebraicImmunity f), n.choose i 
        CryptBoolean.hammingWeight f
    theorem CryptBoolean.sum_choose_below_algebraicImmunity_le_hammingWeight
      {n : }
      (f : CryptBoolean.BooleanFunction n) :
      
          i 
            Finset.range
              (CryptBoolean.algebraicImmunity
                f),
          n.choose i 
        CryptBoolean.hammingWeight f
    The weight of a Boolean function is at least the number of monomials of
    degree strictly below its algebraic immunity. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.lean
    complete
    theorem CryptBoolean.hammingWeight_le_sum_choose_to_sub_algebraicImmunity
      {n : } (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.hammingWeight f 
         i  Finset.range (n - CryptBoolean.algebraicImmunity f + 1),
          n.choose i
    theorem CryptBoolean.hammingWeight_le_sum_choose_to_sub_algebraicImmunity
      {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.hammingWeight f 
        
          i 
            Finset.range
              (n -
                  CryptBoolean.algebraicImmunity
                    f +
                1),
          n.choose i
    The weight of a Boolean function is at most the complementary binomial
    sum determined by its algebraic immunity. 
Theorem8.1.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 2
Statement dependency previews
Preview
Definition 1.1.2
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Optimal algebraic immunity in odd dimension (Carlet, p. 136). Let n be odd. If \operatorname{AI}(f)=\frac{n+1}{2}, then f is balanced, equivalently w_H(f)=2^{n-1}.

Lean code for Theorem8.1.61 theorem
  • theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.lean
    complete
    theorem CryptBoolean.isBalanced_of_odd_of_algebraicImmunity_eq_ceiling_half
      {n : } (f : CryptBoolean.BooleanFunction n) (hn : Odd n)
      (hAI : CryptBoolean.algebraicImmunity f = (n + 1) / 2) :
      CryptBoolean.IsBalanced f
    theorem CryptBoolean.isBalanced_of_odd_of_algebraicImmunity_eq_ceiling_half
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (hn : Odd n)
      (hAI :
        CryptBoolean.algebraicImmunity f =
          (n + 1) / 2) :
      CryptBoolean.IsBalanced f
    In odd dimension, every function with optimal algebraic immunity is balanced. 
Theorem8.1.7
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
Definition 1.4.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 3
Reverse dependency previews
Preview
Theorem 8.2.1
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Stability under low-degree perturbations (Carlet, p. 136). Let f,h:V_n\to\mathbb F_2 and suppose \deg(h)\le r. Then \operatorname{AI}(f)\le\operatorname{AI}(f+h)+r \quad\text{and}\quad \operatorname{AI}(f+h)\le\operatorname{AI}(f)+r.

Lean code for Theorem8.1.72 theorems
  • theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.lean
    complete
    theorem CryptBoolean.algebraicImmunity_add_le_add_functionAlgebraicDegree
      {n : } (f h : CryptBoolean.BooleanFunction n) :
      CryptBoolean.algebraicImmunity (f + h) 
        CryptBoolean.algebraicImmunity f + FABL.functionAlgebraicDegree h
    theorem CryptBoolean.algebraicImmunity_add_le_add_functionAlgebraicDegree
      {n : }
      (f h : CryptBoolean.BooleanFunction n) :
      CryptBoolean.algebraicImmunity (f + h) 
        CryptBoolean.algebraicImmunity f +
          FABL.functionAlgebraicDegree h
    Adding a Boolean function of degree `r` can increase algebraic immunity by at most `r`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter09/GeneralProperties.lean
    complete
    theorem CryptBoolean.algebraicImmunity_sub_functionAlgebraicDegree_le_add
      {n : } (f h : CryptBoolean.BooleanFunction n) :
      CryptBoolean.algebraicImmunity f - FABL.functionAlgebraicDegree h 
        CryptBoolean.algebraicImmunity (f + h)
    theorem CryptBoolean.algebraicImmunity_sub_functionAlgebraicDegree_le_add
      {n : }
      (f h : CryptBoolean.BooleanFunction n) :
      CryptBoolean.algebraicImmunity f -
          FABL.functionAlgebraicDegree h 
        CryptBoolean.algebraicImmunity (f + h)
    Symmetric lower form of stability under low-degree perturbations.