Cryptographic Boolean Functions in Lean

3.9. Maximum correlation🔗

Definition3.9.1
Group: Chapter 3: Boolean functions and cryptography (72)
Group member previews
Preview
Theorem 3.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 3
Statement dependency previews
Preview
Theorem 1.7.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
Used by 2
Reverse dependency previews
Preview
Theorem 3.9.2
Loading preview
Reverse dependency preview content is loaded from the rendered-fragment cache.
L∃∀N

Maximum correlation on a coordinate set (Carlet, pp. 66--67). Let \mathrm{BF}_{I,n} be the functions depending only on coordinates in I and define C_f(I)=2^{-n}\max_{g\in\mathrm{BF}_{I,n}}\mathcal F(f+g). Then d_H(f,\mathrm{BF}_{I,n})=2^{n-1}(1-C_f(I)). If |I|=r, this distance is at least \operatorname{nl}_r(f). Moreover, C_f(I) is 2^{-n} times the sum of the absolute imbalances of the restrictions obtained by fixing I; hence it vanishes exactly when all those restrictions are balanced.

Lean code for Definition3.9.115 declarations
  • abbrevdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    abbrev CryptBoolean.CoordinateSignChoice {n : } (I : Finset (Fin n)) : Type
    abbrev CryptBoolean.CoordinateSignChoice {n : }
      (I : Finset (Fin n)) : Type
    Sign choices indexed by assignments to the coordinates in `I`.  FABL's
    restriction convention makes these the fixed coordinates of the free set `Iᶜ`. 
  • defdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    def CryptBoolean.coordinateBooleanFunction {n : } (I : Finset (Fin n))
      (g : CryptBoolean.CoordinateSignChoice I) :
      CryptBoolean.BooleanFunction n
    def CryptBoolean.coordinateBooleanFunction
      {n : } (I : Finset (Fin n))
      (g :
        CryptBoolean.CoordinateSignChoice I) :
      CryptBoolean.BooleanFunction n
    The Boolean function depending on `I` induced by one sign choice for each
    assignment to those coordinates. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.coordinateBooleanFunction_dependsOn {n : }
      (I : Finset (Fin n)) (g : CryptBoolean.CoordinateSignChoice I) :
      DependsOn (CryptBoolean.coordinateBooleanFunction I g) I
    theorem CryptBoolean.coordinateBooleanFunction_dependsOn
      {n : } (I : Finset (Fin n))
      (g :
        CryptBoolean.CoordinateSignChoice I) :
      DependsOn
        (CryptBoolean.coordinateBooleanFunction
          I g)
        I
    Every function represented by `coordinateBooleanFunction I` depends only
    on the coordinates in `I`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.exists_coordinateSignChoice_iff_dependsOn {n : }
      (I : Finset (Fin n)) (g : CryptBoolean.BooleanFunction n) :
      (∃ q, CryptBoolean.coordinateBooleanFunction I q = g)  DependsOn g I
    theorem CryptBoolean.exists_coordinateSignChoice_iff_dependsOn
      {n : } (I : Finset (Fin n))
      (g : CryptBoolean.BooleanFunction n) :
      (∃ q,
          CryptBoolean.coordinateBooleanFunction
              I q =
            g) 
        DependsOn g I
    The coordinate-sign representation is exactly the class of Boolean
    functions depending only on `I`. 
  • defdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    def CryptBoolean.normalizedCorrelation {n : }
      (f g : CryptBoolean.BooleanFunction n) : 
    def CryptBoolean.normalizedCorrelation {n : }
      (f g : CryptBoolean.BooleanFunction n) :
      
    A normalized correlation, with Carlet's raw zero-frequency Walsh sum made
    explicit before division by the cube cardinality. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.normalizedCorrelation_eq_one_sub_two_mul_hammingDistance
      {n : } (f g : CryptBoolean.BooleanFunction n) :
      CryptBoolean.normalizedCorrelation f g =
        1 - 2 * (CryptBoolean.hammingDistance f g) / 2 ^ n
    theorem CryptBoolean.normalizedCorrelation_eq_one_sub_two_mul_hammingDistance
      {n : }
      (f g : CryptBoolean.BooleanFunction n) :
      CryptBoolean.normalizedCorrelation f g =
        1 -
          2 *
              (CryptBoolean.hammingDistance f
                  g) /
            2 ^ n
    Normalized correlation is one minus twice relative Hamming distance. 
  • defdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    def CryptBoolean.distanceToCoordinateFunctions {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) : 
    def CryptBoolean.distanceToCoordinateFunctions
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) : 
    Carlet's `BF_{I,n}` distance: minimum raw Hamming distance to a Boolean
    function depending only on the coordinates in `I`. 
  • defdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    def CryptBoolean.maximumCorrelation {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) : 
    def CryptBoolean.maximumCorrelation {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) : 
    Carlet's maximum correlation `C_f(I)`, as the maximum normalized raw
    correlation with a Boolean function depending only on `I`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.distanceToCoordinateFunctions_cast_eq {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      (CryptBoolean.distanceToCoordinateFunctions f I) =
        2 ^ n / 2 * (1 - CryptBoolean.maximumCorrelation f I)
    theorem CryptBoolean.distanceToCoordinateFunctions_cast_eq
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      (CryptBoolean.distanceToCoordinateFunctions
            f I) =
        2 ^ n / 2 *
          (1 -
            CryptBoolean.maximumCorrelation f
              I)
    The source distance formula `d_H(f,BF_{I,n}) = 2^(n-1)(1-C_f(I))`,
    written as `2^n / 2` so that it also has the intended meaning at `n = 0`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.higherOrderNonlinearity_le_distanceToCoordinateFunctions
      {n : } (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      CryptBoolean.higherOrderNonlinearity I.card f 
        CryptBoolean.distanceToCoordinateFunctions f I
    theorem CryptBoolean.higherOrderNonlinearity_le_distanceToCoordinateFunctions
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      CryptBoolean.higherOrderNonlinearity
          I.card f 
        CryptBoolean.distanceToCoordinateFunctions
          f I
    Distance to functions on a prescribed `r`-coordinate set is at least the
    order-`r` nonlinearity. 
  • defdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    def CryptBoolean.restrictionMaximumCorrelation {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) : 
    def CryptBoolean.restrictionMaximumCorrelation
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) : 
    The normalized absolute imbalance of the restrictions obtained by fixing
    the coordinates in `I`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.maximumCorrelation_eq_restrictionMaximumCorrelation {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I =
        CryptBoolean.restrictionMaximumCorrelation f I
    theorem CryptBoolean.maximumCorrelation_eq_restrictionMaximumCorrelation
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I =
        CryptBoolean.restrictionMaximumCorrelation
          f I
    The maximum correlation is the average absolute imbalance of all
    restrictions obtained by fixing the coordinates in `I`. 
  • defdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    def CryptBoolean.restrictionRawImbalance {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n))
      (z : FABL.FixedSignCube I) : 
    def CryptBoolean.restrictionRawImbalance
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n))
      (z : FABL.FixedSignCube I) : 
    The unnormalized sign imbalance of the restriction obtained by fixing
    the coordinates in `I` to `z`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.maximumCorrelation_eq_sum_abs_restrictionRawImbalance_div_two_pow
      {n : } (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I =
        (∑ z, |CryptBoolean.restrictionRawImbalance f I z|) / 2 ^ n
    theorem CryptBoolean.maximumCorrelation_eq_sum_abs_restrictionRawImbalance_div_two_pow
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I =
        (∑ z,
            |CryptBoolean.restrictionRawImbalance
                f I z|) /
          2 ^ n
    Carlet's displayed restriction formula:
    `C_f(I) = 2⁻ⁿ ∑_z |ℱ(f|_z)|`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.maximumCorrelation_eq_zero_iff_restrictions_balanced
      {n : } (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I = 0 
         (z : FABL.FixedSignCube I),
          FABL.IsBalanced
            (FABL.signRestriction (CryptBoolean.signCubeView f).toReal I z)
    theorem CryptBoolean.maximumCorrelation_eq_zero_iff_restrictions_balanced
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I =
          0 
         (z : FABL.FixedSignCube I),
          FABL.IsBalanced
            (FABL.signRestriction
              (CryptBoolean.signCubeView
                  f).toReal
              I z)
    Maximum correlation vanishes exactly when every restriction obtained by
    fixing `I` is balanced. 
Theorem3.9.2
Group: Chapter 3: Boolean functions and cryptography (72)
Group member previews
Preview
Theorem 3.1.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
Statement uses 4
Statement dependency previews
Preview
Definition 1.7.1
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 1L∃∀N

Relation (40) (Carlet, p. 66). For I\subseteq\{1,\ldots,n\}, C_f(I) \le2^{-n}\left(\sum_{\operatorname{supp}(u)\subseteq I}W_f(u)^2\right)^{1/2} \le2^{-n+|I|/2}\bigl(2^n-2\operatorname{nl}(f)\bigr). Equivalently, d_H(f,\mathrm{BF}_{I,n}) \ge2^{n-1}-\frac12 \left(\sum_{\operatorname{supp}(u)\subseteq I}W_f(u)^2\right)^{1/2} \ge2^{n-1}-2^{|I|/2-1}\max_u|W_f(u)|.

Lean code for Theorem3.9.29 declarations
  • defdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    def CryptBoolean.restrictedWalshSquareSum {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) : 
    def CryptBoolean.restrictedWalshSquareSum
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) : 
    The raw Walsh square mass on frequencies supported inside `I`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.restrictedWalshSquareSum_eq_sum_filter {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      CryptBoolean.restrictedWalshSquareSum f I =
         u with FABL.f₂Support u  I,
          (CryptBoolean.walshTransform f u) ^ 2
    theorem CryptBoolean.restrictedWalshSquareSum_eq_sum_filter
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      CryptBoolean.restrictedWalshSquareSum f
          I =
         u with FABL.f₂Support u  I,
          (CryptBoolean.walshTransform f u) ^
            2
    The subtype-indexed definition is exactly Carlet's displayed filtered
    sum over ambient frequencies. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.two_pow_sq_mul_expect_restrictionMean_sq_eq_restrictedWalshSquareSum
      {n : } (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      ((2 ^ n) ^ 2 *
          Finset.univ.expect fun z =>
            FABL.mean
                (FABL.signRestriction (CryptBoolean.signCubeView f).toReal
                  I z) ^
              2) =
        CryptBoolean.restrictedWalshSquareSum f I
    theorem CryptBoolean.two_pow_sq_mul_expect_restrictionMean_sq_eq_restrictedWalshSquareSum
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      ((2 ^ n) ^ 2 *
          Finset.univ.expect fun z =>
            FABL.mean
                (FABL.signRestriction
                  (CryptBoolean.signCubeView
                      f).toReal
                  I z) ^
              2) =
        CryptBoolean.restrictedWalshSquareSum
          f I
    The Walsh square mass on `I` is the cube-cardinality square times the
    second moment of the corresponding restriction imbalances. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.maximumCorrelation_le_sqrt_restrictedWalshSquareSum_div
      {n : } (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I 
        (CryptBoolean.restrictedWalshSquareSum f I) / 2 ^ n
    theorem CryptBoolean.maximumCorrelation_le_sqrt_restrictedWalshSquareSum_div
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I 
        (CryptBoolean.restrictedWalshSquareSum
              f I) /
          2 ^ n
    The first inequality in Carlet Relation (40). 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.restrictedWalshSquareSum_le_card_mul_maxWalshMagnitude_sq
      {n : } (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      CryptBoolean.restrictedWalshSquareSum f I 
        2 ^ I.card * (CryptBoolean.maxWalshMagnitude f) ^ 2
    theorem CryptBoolean.restrictedWalshSquareSum_le_card_mul_maxWalshMagnitude_sq
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      CryptBoolean.restrictedWalshSquareSum f
          I 
        2 ^ I.card *
          (CryptBoolean.maxWalshMagnitude
                f) ^
            2
    The supported Walsh square mass is at most the number of supported
    frequencies times the square of the largest Walsh magnitude. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.sqrt_restrictedWalshSquareSum_le {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      (CryptBoolean.restrictedWalshSquareSum f I) 
        (2 ^ I.card) * (CryptBoolean.maxWalshMagnitude f)
    theorem CryptBoolean.sqrt_restrictedWalshSquareSum_le
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      (CryptBoolean.restrictedWalshSquareSum
            f I) 
        (2 ^ I.card) *
          (CryptBoolean.maxWalshMagnitude f)
    The square-root form of the second inequality in Relation (40). 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.relation_40_maximumCorrelation_bound {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I 
          (CryptBoolean.restrictedWalshSquareSum f I) / 2 ^ n 
        CryptBoolean.maximumCorrelation f I 
          2 ^ (-n + I.card / 2) *
            (2 ^ n - 2 * (CryptBoolean.nonlinearity f))
    theorem CryptBoolean.relation_40_maximumCorrelation_bound
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      CryptBoolean.maximumCorrelation f I 
          (CryptBoolean.restrictedWalshSquareSum
                f I) /
            2 ^ n 
        CryptBoolean.maximumCorrelation f I 
          2 ^ (-n + I.card / 2) *
            (2 ^ n -
              2 *
                (CryptBoolean.nonlinearity
                    f))
    Both maximum-correlation bounds in Carlet Relation (40), with the second
    one written in its printed real-exponent and nonlinearity form. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.distanceToCoordinateFunctions_cast_ge_walshSquare {n : }
      (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      2 ^ n / 2 - (CryptBoolean.restrictedWalshSquareSum f I) / 2 
        (CryptBoolean.distanceToCoordinateFunctions f I)
    theorem CryptBoolean.distanceToCoordinateFunctions_cast_ge_walshSquare
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      2 ^ n / 2 -
          (CryptBoolean.restrictedWalshSquareSum
                f I) /
            2 
        (CryptBoolean.distanceToCoordinateFunctions
            f I)
    The first equivalent distance bound in Relation (40). 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/MaximumCorrelation.lean
    complete
    theorem CryptBoolean.distanceToCoordinateFunctions_cast_ge_maxWalshMagnitude
      {n : } (f : CryptBoolean.BooleanFunction n) (I : Finset (Fin n)) :
      2 ^ n / 2 -
          2 ^ (I.card / 2 - 1) * (CryptBoolean.maxWalshMagnitude f) 
        (CryptBoolean.distanceToCoordinateFunctions f I)
    theorem CryptBoolean.distanceToCoordinateFunctions_cast_ge_maxWalshMagnitude
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (I : Finset (Fin n)) :
      2 ^ n / 2 -
          2 ^ (I.card / 2 - 1) *
            (CryptBoolean.maxWalshMagnitude
                f) 
        (CryptBoolean.distanceToCoordinateFunctions
            f I)
    The second equivalent distance bound in Relation (40). 
Definition3.9.3
Group: Chapter 3: Boolean functions and cryptography (72)
Group member previews
Preview
Theorem 3.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.3
Loading preview
Statement dependency preview content is loaded from the rendered-fragment cache.
used by 0L∃∀N

Generalized distance to a large zero-derivative space (Carlet, p. 67). For 0\le k\le n, define the distance from f to the functions g satisfying \dim\{e\in V_n:D_eg=0\}\ge k. This distance is invariant under affine equivalence.

Lean code for Definition3.9.314 declarations
  • defdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    def CryptBoolean.IsZeroDerivativeDirection {n : }
      (f : CryptBoolean.BooleanFunction n) (e : FABL.F₂Cube n) : Prop
    def CryptBoolean.IsZeroDerivativeDirection
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (e : FABL.F₂Cube n) : Prop
    A direction along which a Boolean function has identically zero derivative. 
  • defdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    def CryptBoolean.zeroDerivativeKernel {n : }
      (f : CryptBoolean.BooleanFunction n) :
      Submodule FABL.𝔽₂ (FABL.F₂Cube n)
    def CryptBoolean.zeroDerivativeKernel {n : }
      (f : CryptBoolean.BooleanFunction n) :
      Submodule FABL.𝔽₂ (FABL.F₂Cube n)
    The directions along which a Boolean function has identically zero derivative. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.mem_zeroDerivativeKernel {n : }
      (f : CryptBoolean.BooleanFunction n) (e : FABL.F₂Cube n) :
      e  CryptBoolean.zeroDerivativeKernel f 
        CryptBoolean.IsZeroDerivativeDirection f e
    theorem CryptBoolean.mem_zeroDerivativeKernel
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (e : FABL.F₂Cube n) :
      e 
          CryptBoolean.zeroDerivativeKernel
            f 
        CryptBoolean.IsZeroDerivativeDirection
          f e
    Membership in the zero-derivative kernel is the defining pointwise condition. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.zeroDerivativeKernel_le_linearKernel {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.zeroDerivativeKernel f  CryptBoolean.linearKernel f
    theorem CryptBoolean.zeroDerivativeKernel_le_linearKernel
      {n : }
      (f : CryptBoolean.BooleanFunction n) :
      CryptBoolean.zeroDerivativeKernel f 
        CryptBoolean.linearKernel f
    The zero-derivative kernel is a subspace of Carlet's linear kernel. 
  • defdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    def CryptBoolean.zeroDerivativeKernelAffineEquiv {n : }
      (f : CryptBoolean.BooleanFunction n)
      (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) :
      (CryptBoolean.zeroDerivativeKernel (f  L)) ≃ₗ[FABL.𝔽₂]
        (CryptBoolean.zeroDerivativeKernel f)
    def CryptBoolean.zeroDerivativeKernelAffineEquiv
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (L :
        FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n) :
      (CryptBoolean.zeroDerivativeKernel
            (f  L)) ≃ₗ[FABL.𝔽₂]
        (CryptBoolean.zeroDerivativeKernel f)
    Affine input reindexing transports the zero-derivative kernel by its linear part. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.finrank_zeroDerivativeKernel_comp_affineEquiv {n : }
      (f : CryptBoolean.BooleanFunction n)
      (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) :
      Module.finrank FABL.𝔽₂ (CryptBoolean.zeroDerivativeKernel (f  L)) =
        Module.finrank FABL.𝔽₂ (CryptBoolean.zeroDerivativeKernel f)
    theorem CryptBoolean.finrank_zeroDerivativeKernel_comp_affineEquiv
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (L :
        FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n) :
      Module.finrank FABL.𝔽₂
          (CryptBoolean.zeroDerivativeKernel
              (f  L)) =
        Module.finrank FABL.𝔽₂
          (CryptBoolean.zeroDerivativeKernel
              f)
    Affine input reindexing preserves the zero-derivative dimension. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.zeroDerivativeKernel_zero {n : } :
      CryptBoolean.zeroDerivativeKernel 0 = 
    theorem CryptBoolean.zeroDerivativeKernel_zero
      {n : } :
      CryptBoolean.zeroDerivativeKernel 0 = 
    The zero function has every direction in its zero-derivative kernel. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.finrank_zeroDerivativeKernel_zero {n : } :
      Module.finrank FABL.𝔽₂ (CryptBoolean.zeroDerivativeKernel 0) = n
    theorem CryptBoolean.finrank_zeroDerivativeKernel_zero
      {n : } :
      Module.finrank FABL.𝔽₂
          (CryptBoolean.zeroDerivativeKernel
              0) =
        n
    The zero function's zero-derivative kernel has the full cube dimension. 
  • defdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    def CryptBoolean.largeZeroDerivativeFunctions {n : } (k : ) :
      Finset (CryptBoolean.BooleanFunction n)
    def CryptBoolean.largeZeroDerivativeFunctions
      {n : } (k : ) :
      Finset (CryptBoolean.BooleanFunction n)
    Functions whose zero-derivative space has dimension at least `k`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.largeZeroDerivativeFunctions_nonempty {n : } (k : )
      (hk : k  n) : (CryptBoolean.largeZeroDerivativeFunctions k).Nonempty
    theorem CryptBoolean.largeZeroDerivativeFunctions_nonempty
      {n : } (k : ) (hk : k  n) :
      (CryptBoolean.largeZeroDerivativeFunctions
          k).Nonempty
    The comparison class is nonempty throughout its meaningful range `k ≤ n`. 
  • defdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    def CryptBoolean.generalizedLinearStructureDistance {n : }
      (f : CryptBoolean.BooleanFunction n) (k : ) (hk : k  n) : 
    def CryptBoolean.generalizedLinearStructureDistance
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (k : ) (hk : k  n) : 
    Carlet's generalized distance to functions with a zero-derivative space
    of dimension at least `k`. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.mem_largeZeroDerivativeFunctions_comp_affineEquiv_iff
      {n : } (g : CryptBoolean.BooleanFunction n) (k : )
      (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) :
      g  L  CryptBoolean.largeZeroDerivativeFunctions k 
        g  CryptBoolean.largeZeroDerivativeFunctions k
    theorem CryptBoolean.mem_largeZeroDerivativeFunctions_comp_affineEquiv_iff
      {n : }
      (g : CryptBoolean.BooleanFunction n)
      (k : )
      (L :
        FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n) :
      g  L 
          CryptBoolean.largeZeroDerivativeFunctions
            k 
        g 
          CryptBoolean.largeZeroDerivativeFunctions
            k
    Affine input reindexing preserves membership in the comparison class. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.generalizedLinearStructureDistance_comp_affineEquiv_le
      {n : } (f : CryptBoolean.BooleanFunction n) (k : ) (hk : k  n)
      (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) :
      CryptBoolean.generalizedLinearStructureDistance (f  L) k hk 
        CryptBoolean.generalizedLinearStructureDistance f k hk
    theorem CryptBoolean.generalizedLinearStructureDistance_comp_affineEquiv_le
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (k : ) (hk : k  n)
      (L :
        FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n) :
      CryptBoolean.generalizedLinearStructureDistance
          (f  L) k hk 
        CryptBoolean.generalizedLinearStructureDistance
          f k hk
    One half of affine invariance for the generalized distance. 
  • theoremdefined in CryptBoolean/Carlet/Chapter04/GeneralizedLinearStructureDistance.lean
    complete
    theorem CryptBoolean.generalizedLinearStructureDistance_comp_affineEquiv {n : }
      (f : CryptBoolean.BooleanFunction n) (k : ) (hk : k  n)
      (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) :
      CryptBoolean.generalizedLinearStructureDistance (f  L) k hk =
        CryptBoolean.generalizedLinearStructureDistance f k hk
    theorem CryptBoolean.generalizedLinearStructureDistance_comp_affineEquiv
      {n : }
      (f : CryptBoolean.BooleanFunction n)
      (k : ) (hk : k  n)
      (L :
        FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂]
          FABL.F₂Cube n) :
      CryptBoolean.generalizedLinearStructureDistance
          (f  L) k hk =
        CryptBoolean.generalizedLinearStructureDistance
          f k hk
    Carlet's generalized linear-structure distance is affine invariant.