1.4. Algebraic degree, distance, and affine functions
-
FABL.functionAlgebraicDegree[complete] -
FABL.functionAlgebraicDegree_le_dimension[complete] -
FABL.algebraicDegree_le_iff[complete] -
FABL.anfCoeff_zero[complete] -
FABL.algebraicDegree_zero[complete] -
FABL.functionAlgebraicDegree_zero[complete]
Algebraic degree (Carlet, p. 12). Let
f(x)=\bigoplus_{S\subseteq[n]}c_{f,S}x^S
be the unique ANF of f:V_n\to\mathbb F_2. Define
\deg_{\mathrm{alg}}(f)
=\max\{|S|:c_{f,S}\ne0\},
with \deg_{\mathrm{alg}}(0)=0. Then
\deg_{\mathrm{alg}}(f)\le n,
and, for every r\ge0,
\deg_{\mathrm{alg}}(f)\le r
\quad\Longleftrightarrow\quad
c_{f,S}\ne0\Longrightarrow |S|\le r
\quad\text{for every }S\subseteq[n].
Lean code for Definition1.4.1●6 declarations
Associated Lean declarations
-
FABL.functionAlgebraicDegree[complete]
-
FABL.functionAlgebraicDegree_le_dimension[complete]
-
FABL.algebraicDegree_le_iff[complete]
-
FABL.anfCoeff_zero[complete]
-
FABL.algebraicDegree_zero[complete]
-
FABL.functionAlgebraicDegree_zero[complete]
-
FABL.functionAlgebraicDegree[complete] -
FABL.functionAlgebraicDegree_le_dimension[complete] -
FABL.algebraicDegree_le_iff[complete] -
FABL.anfCoeff_zero[complete] -
FABL.algebraicDegree_zero[complete] -
FABL.functionAlgebraicDegree_zero[complete]
-
defdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
def FABL.functionAlgebraicDegree {n : ℕ} (f : FABL.F₂BooleanFunction n) : ℕ
def FABL.functionAlgebraicDegree {n : ℕ} (f : FABL.F₂BooleanFunction n) : ℕ
The algebraic degree of a Boolean function, through its unique ANF.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.functionAlgebraicDegree_le_dimension {n : ℕ} (f : FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree f ≤ n
theorem FABL.functionAlgebraicDegree_le_dimension {n : ℕ} (f : FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree f ≤ n
Function-level algebraic degree is bounded by the number of variables.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.algebraicDegree_le_iff {n : ℕ} (c : FABL.ANFCoefficients n) (r : ℕ) : FABL.algebraicDegree c ≤ r ↔ ∀ (S : Finset (Fin n)), c S ≠ 0 → S.card ≤ r
theorem FABL.algebraicDegree_le_iff {n : ℕ} (c : FABL.ANFCoefficients n) (r : ℕ) : FABL.algebraicDegree c ≤ r ↔ ∀ (S : Finset (Fin n)), c S ≠ 0 → S.card ≤ r
Degree at most `r` is exactly the coefficientwise vanishing condition above `r`.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.anfCoeff_zero {n : ℕ} : FABL.anfCoeff 0 = fun x => 0
theorem FABL.anfCoeff_zero {n : ℕ} : FABL.anfCoeff 0 = fun x => 0
The zero Boolean function has the zero canonical ANF.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.algebraicDegree_zero {n : ℕ} : (FABL.algebraicDegree fun x => 0) = 0
theorem FABL.algebraicDegree_zero {n : ℕ} : (FABL.algebraicDegree fun x => 0) = 0
The zero coefficient family has algebraic degree zero.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.functionAlgebraicDegree_zero {n : ℕ} : FABL.functionAlgebraicDegree 0 = 0
theorem FABL.functionAlgebraicDegree_zero {n : ℕ} : FABL.functionAlgebraicDegree 0 = 0
The zero Boolean function has algebraic degree zero.
-
FABL.anfCoeff_add[complete] -
FABL.algebraicDegree_add_le_max[complete] -
FABL.functionAlgebraicDegree_add_le_max[complete]
Degree under addition. For all Boolean functions f,g:V_n\to\mathbb F_2,
their ANF coefficients satisfy
c_{f+g,S}=c_{f,S}+c_{g,S}
\qquad(S\subseteq[n]),
and therefore
\deg_{\mathrm{alg}}(f+g)
\le\max\{\deg_{\mathrm{alg}}(f),\deg_{\mathrm{alg}}(g)\}.
Lean code for Lemma1.4.2●3 theorems
Associated Lean declarations
-
FABL.anfCoeff_add[complete]
-
FABL.algebraicDegree_add_le_max[complete]
-
FABL.functionAlgebraicDegree_add_le_max[complete]
-
FABL.anfCoeff_add[complete] -
FABL.algebraicDegree_add_le_max[complete] -
FABL.functionAlgebraicDegree_add_le_max[complete]
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.anfCoeff_add {n : ℕ} (f g : FABL.F₂BooleanFunction n) : FABL.anfCoeff (f + g) = fun S => FABL.anfCoeff f S + FABL.anfCoeff g S
theorem FABL.anfCoeff_add {n : ℕ} (f g : FABL.F₂BooleanFunction n) : FABL.anfCoeff (f + g) = fun S => FABL.anfCoeff f S + FABL.anfCoeff g S
The canonical ANF transform is additive.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.algebraicDegree_add_le_max {n : ℕ} (c d : FABL.ANFCoefficients n) : (FABL.algebraicDegree fun S => c S + d S) ≤ max (FABL.algebraicDegree c) (FABL.algebraicDegree d)
theorem FABL.algebraicDegree_add_le_max {n : ℕ} (c d : FABL.ANFCoefficients n) : (FABL.algebraicDegree fun S => c S + d S) ≤ max (FABL.algebraicDegree c) (FABL.algebraicDegree d)
Algebraic degree of a coefficient sum is bounded by the maximum of the two degrees.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.functionAlgebraicDegree_add_le_max {n : ℕ} (f g : FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree (f + g) ≤ max (FABL.functionAlgebraicDegree f) (FABL.functionAlgebraicDegree g)
theorem FABL.functionAlgebraicDegree_add_le_max {n : ℕ} (f g : FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree (f + g) ≤ max (FABL.functionAlgebraicDegree f) (FABL.functionAlgebraicDegree g)
Algebraic degree is submaximal under addition of Boolean functions.
-
CryptBoolean.hammingDistance[complete] -
CryptBoolean.hammingDistance_eq_hammingWeight_add[complete]
Hamming distance (Carlet, p. 8). For Boolean functions
f,g:V_n\to\mathbb F_2, define
d_H(f,g)
=\bigl|\{x\in V_n:f(x)\ne g(x)\}\bigr|.
Then
d_H(f,g)=w_H(f+g),
where addition is pointwise in \mathbb F_2.
Lean code for Definition1.4.3●2 declarations
Associated Lean declarations
-
CryptBoolean.hammingDistance[complete]
-
CryptBoolean.hammingDistance_eq_hammingWeight_add[complete]
-
CryptBoolean.hammingDistance[complete] -
CryptBoolean.hammingDistance_eq_hammingWeight_add[complete]
-
abbrevdefined in CryptBoolean/Carlet/Chapter02/AlgebraicDegree.leancomplete
abbrev CryptBoolean.hammingDistance {n : ℕ} (f g : CryptBoolean.BooleanFunction n) : ℕ
abbrev CryptBoolean.hammingDistance {n : ℕ} (f g : CryptBoolean.BooleanFunction n) : ℕ
The unnormalized Hamming distance between Boolean functions, reusing Mathlib.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/AlgebraicDegree.leancomplete
theorem CryptBoolean.hammingDistance_eq_hammingWeight_add {n : ℕ} (f g : CryptBoolean.BooleanFunction n) : CryptBoolean.hammingDistance f g = CryptBoolean.hammingWeight (f + g)
theorem CryptBoolean.hammingDistance_eq_hammingWeight_add {n : ℕ} (f g : CryptBoolean.BooleanFunction n) : CryptBoolean.hammingDistance f g = CryptBoolean.hammingWeight (f + g)
On `GF(2)`, distance is the weight of the pointwise sum.
Normalization of relative Hamming distance. Define
d_{\mathrm{rel}}(f,g)
=2^{-n}\bigl|\{x\in V_n:f(x)\ne g(x)\}\bigr|.
Then, for all f,g:V_n\to\mathbb F_2,
d_H(f,g)=2^n d_{\mathrm{rel}}(f,g).
Lean code for Theorem1.4.4●1 theorem
Associated Lean declarations
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Affine.leancomplete
theorem CryptBoolean.hammingDistance_eq_two_pow_mul_relativeHammingDist {n : ℕ} (f g : CryptBoolean.BooleanFunction n) : ↑(CryptBoolean.hammingDistance f g) = 2 ^ n * FABL.relativeHammingDist f g
theorem CryptBoolean.hammingDistance_eq_two_pow_mul_relativeHammingDist {n : ℕ} (f g : CryptBoolean.BooleanFunction n) : ↑(CryptBoolean.hammingDistance f g) = 2 ^ n * FABL.relativeHammingDist f g
Raw distance scales FABL's relative Hamming distance by the cube cardinality.
-
FABL.affineFunction[complete] -
FABL.affineCoefficients[complete] -
FABL.anfEval_affineCoefficients[complete] -
FABL.anfCoeff_affineFunction[complete] -
FABL.functionAlgebraicDegree_affineFunction_le_one[complete] -
FABL.exists_affineFunction_of_functionAlgebraicDegree_le_one[complete]
Affine Boolean functions (Carlet, p. 14). For a\in V_n and
b\in\mathbb F_2, set
A_{a,b}(x)=b+a\mathbin\cdot x.
Its ANF coefficients are
c_{A_{a,b},\varnothing}=b,
\qquad
c_{A_{a,b},\{i\}}=a_i,
\qquad
c_{A_{a,b},S}=0\quad(|S|>1).
For every f:V_n\to\mathbb F_2,
\deg_{\mathrm{alg}}(f)\le1
\quad\Longleftrightarrow\quad
\exists a\in V_n\;\exists b\in\mathbb F_2\;
\forall x\in V_n,\ f(x)=A_{a,b}(x).
Lean code for Definition1.4.5●6 declarations
Associated Lean declarations
-
FABL.affineFunction[complete]
-
FABL.affineCoefficients[complete]
-
FABL.anfEval_affineCoefficients[complete]
-
FABL.anfCoeff_affineFunction[complete]
-
FABL.functionAlgebraicDegree_affineFunction_le_one[complete]
-
FABL.exists_affineFunction_of_functionAlgebraicDegree_le_one[complete]
-
FABL.affineFunction[complete] -
FABL.affineCoefficients[complete] -
FABL.anfEval_affineCoefficients[complete] -
FABL.anfCoeff_affineFunction[complete] -
FABL.functionAlgebraicDegree_affineFunction_le_one[complete] -
FABL.exists_affineFunction_of_functionAlgebraicDegree_le_one[complete]
-
defdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
def FABL.affineFunction {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.F₂BooleanFunction n
def FABL.affineFunction {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.F₂BooleanFunction n
The affine Boolean function `x ↦ b + a · x`.
-
defdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
def FABL.affineCoefficients {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.ANFCoefficients n
def FABL.affineCoefficients {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.ANFCoefficients n
The ANF coefficients of an affine function.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
theorem FABL.anfEval_affineCoefficients {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.anfEval (FABL.affineCoefficients b a) = FABL.affineFunction b a
theorem FABL.anfEval_affineCoefficients {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.anfEval (FABL.affineCoefficients b a) = FABL.affineFunction b a
Evaluating the affine coefficient family gives the affine function.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
theorem FABL.anfCoeff_affineFunction {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.anfCoeff (FABL.affineFunction b a) = FABL.affineCoefficients b a
theorem FABL.anfCoeff_affineFunction {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.anfCoeff (FABL.affineFunction b a) = FABL.affineCoefficients b a
The canonical ANF transform recovers the affine coefficient family.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
theorem FABL.functionAlgebraicDegree_affineFunction_le_one {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.functionAlgebraicDegree (FABL.affineFunction b a) ≤ 1
theorem FABL.functionAlgebraicDegree_affineFunction_le_one {n : ℕ} (b : FABL.𝔽₂) (a : FABL.F₂Cube n) : FABL.functionAlgebraicDegree (FABL.affineFunction b a) ≤ 1
Affine functions have algebraic degree at most one.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
theorem FABL.exists_affineFunction_of_functionAlgebraicDegree_le_one {n : ℕ} (f : FABL.F₂BooleanFunction n) (hdegree : FABL.functionAlgebraicDegree f ≤ 1) : ∃ b a, f = FABL.affineFunction b a
theorem FABL.exists_affineFunction_of_functionAlgebraicDegree_le_one {n : ℕ} (f : FABL.F₂BooleanFunction n) (hdegree : FABL.functionAlgebraicDegree f ≤ 1) : ∃ b a, f = FABL.affineFunction b a
Every Boolean function of algebraic degree at most one is affine.
-
FABL.anfMonomial_mul[complete] -
FABL.anfMul[complete] -
FABL.anfEval_anfMul[complete] -
FABL.algebraicDegree_anfMul_le_add[complete] -
FABL.anfCoeff_mul[complete] -
FABL.functionAlgebraicDegree_mul_le_add[complete] -
FABL.functionAlgebraicDegree_one[complete] -
FABL.functionAlgebraicDegree_finset_prod_le[complete] -
FABL.functionAlgebraicDegree_finset_sum_le[complete] -
FABL.functionAlgebraicDegree_affineMap_coordinate_le_one[complete] -
FABL.functionAlgebraicDegree_anfMonomial_comp_affineMap_le_card[complete] -
FABL.functionAlgebraicDegree_comp_affineMap_le[complete] -
FABL.functionAlgebraicDegree_comp_affineEquiv[complete]
Affine invariance of algebraic degree (Carlet, p. 12). Let
L:V_n\to V_n be an affine isomorphism, so that
L(x)=Mx+t for some M\in\operatorname{GL}_n(\mathbb F_2) and t\in V_n.
Then every Boolean function f:V_n\to\mathbb F_2 satisfies
\deg_{\mathrm{alg}}(f\circ L)=\deg_{\mathrm{alg}}(f).
Lean code for Theorem1.4.6●13 declarations
Associated Lean declarations
-
FABL.anfMonomial_mul[complete]
-
FABL.anfMul[complete]
-
FABL.anfEval_anfMul[complete]
-
FABL.algebraicDegree_anfMul_le_add[complete]
-
FABL.anfCoeff_mul[complete]
-
FABL.functionAlgebraicDegree_mul_le_add[complete]
-
FABL.functionAlgebraicDegree_one[complete]
-
FABL.functionAlgebraicDegree_finset_prod_le[complete]
-
FABL.functionAlgebraicDegree_finset_sum_le[complete]
-
FABL.functionAlgebraicDegree_affineMap_coordinate_le_one[complete]
-
FABL.functionAlgebraicDegree_anfMonomial_comp_affineMap_le_card[complete]
-
FABL.functionAlgebraicDegree_comp_affineMap_le[complete]
-
FABL.functionAlgebraicDegree_comp_affineEquiv[complete]
-
FABL.anfMonomial_mul[complete] -
FABL.anfMul[complete] -
FABL.anfEval_anfMul[complete] -
FABL.algebraicDegree_anfMul_le_add[complete] -
FABL.anfCoeff_mul[complete] -
FABL.functionAlgebraicDegree_mul_le_add[complete] -
FABL.functionAlgebraicDegree_one[complete] -
FABL.functionAlgebraicDegree_finset_prod_le[complete] -
FABL.functionAlgebraicDegree_finset_sum_le[complete] -
FABL.functionAlgebraicDegree_affineMap_coordinate_le_one[complete] -
FABL.functionAlgebraicDegree_anfMonomial_comp_affineMap_le_card[complete] -
FABL.functionAlgebraicDegree_comp_affineMap_le[complete] -
FABL.functionAlgebraicDegree_comp_affineEquiv[complete]
-
theoremdefined in FABL/Chapter06/F₂Polynomials/ANF.leancomplete
theorem FABL.anfMonomial_mul {n : ℕ} (S T : Finset (Fin n)) (x : FABL.F₂Cube n) : FABL.anfMonomial S x * FABL.anfMonomial T x = FABL.anfMonomial (S ∪ T) x
theorem FABL.anfMonomial_mul {n : ℕ} (S T : Finset (Fin n)) (x : FABL.F₂Cube n) : FABL.anfMonomial S x * FABL.anfMonomial T x = FABL.anfMonomial (S ∪ T) x
Products of square-free monomials are indexed by the union of their variables.
-
defdefined in FABL/Chapter06/F₂Polynomials/ANF.leancomplete
def FABL.anfMul {n : ℕ} (c d : FABL.ANFCoefficients n) : FABL.ANFCoefficients n
def FABL.anfMul {n : ℕ} (c d : FABL.ANFCoefficients n) : FABL.ANFCoefficients n
Multiplication of square-free ANFs, with repeated variables reduced by `xᵢ²=xᵢ`.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/ANF.leancomplete
theorem FABL.anfEval_anfMul {n : ℕ} (c d : FABL.ANFCoefficients n) (x : FABL.F₂Cube n) : FABL.anfEval (FABL.anfMul c d) x = FABL.anfEval c x * FABL.anfEval d x
theorem FABL.anfEval_anfMul {n : ℕ} (c d : FABL.ANFCoefficients n) (x : FABL.F₂Cube n) : FABL.anfEval (FABL.anfMul c d) x = FABL.anfEval c x * FABL.anfEval d x
Evaluation of the square-free ANF product is pointwise multiplication.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.algebraicDegree_anfMul_le_add {n : ℕ} (c d : FABL.ANFCoefficients n) : FABL.algebraicDegree (FABL.anfMul c d) ≤ FABL.algebraicDegree c + FABL.algebraicDegree d
theorem FABL.algebraicDegree_anfMul_le_add {n : ℕ} (c d : FABL.ANFCoefficients n) : FABL.algebraicDegree (FABL.anfMul c d) ≤ FABL.algebraicDegree c + FABL.algebraicDegree d
Multiplication of square-free ANFs adds their algebraic-degree bounds.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.anfCoeff_mul {n : ℕ} (f g : FABL.F₂BooleanFunction n) : FABL.anfCoeff (f * g) = FABL.anfMul (FABL.anfCoeff f) (FABL.anfCoeff g)
theorem FABL.anfCoeff_mul {n : ℕ} (f g : FABL.F₂BooleanFunction n) : FABL.anfCoeff (f * g) = FABL.anfMul (FABL.anfCoeff f) (FABL.anfCoeff g)
The canonical ANF of a pointwise product is the square-free ANF product.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.functionAlgebraicDegree_mul_le_add {n : ℕ} (f g : FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree (f * g) ≤ FABL.functionAlgebraicDegree f + FABL.functionAlgebraicDegree g
theorem FABL.functionAlgebraicDegree_mul_le_add {n : ℕ} (f g : FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree (f * g) ≤ FABL.functionAlgebraicDegree f + FABL.functionAlgebraicDegree g
Algebraic degree is subadditive under pointwise multiplication.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.functionAlgebraicDegree_one {n : ℕ} : FABL.functionAlgebraicDegree 1 = 0
theorem FABL.functionAlgebraicDegree_one {n : ℕ} : FABL.functionAlgebraicDegree 1 = 0
The constant-one Boolean function has algebraic degree zero.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.functionAlgebraicDegree_finset_prod_le.{u_1} {n : ℕ} {ι : Type u_1} (s : Finset ι) (g : ι → FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree (∏ i ∈ s, g i) ≤ ∑ i ∈ s, FABL.functionAlgebraicDegree (g i)
theorem FABL.functionAlgebraicDegree_finset_prod_le.{u_1} {n : ℕ} {ι : Type u_1} (s : Finset ι) (g : ι → FABL.F₂BooleanFunction n) : FABL.functionAlgebraicDegree (∏ i ∈ s, g i) ≤ ∑ i ∈ s, FABL.functionAlgebraicDegree (g i)
The degree of a finite pointwise product is bounded by the sum of factor degrees.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/AlgebraicDegree.leancomplete
theorem FABL.functionAlgebraicDegree_finset_sum_le.{u_1} {n : ℕ} {ι : Type u_1} (s : Finset ι) (g : ι → FABL.F₂BooleanFunction n) (r : ℕ) (hg : ∀ i ∈ s, FABL.functionAlgebraicDegree (g i) ≤ r) : FABL.functionAlgebraicDegree (∑ i ∈ s, g i) ≤ r
theorem FABL.functionAlgebraicDegree_finset_sum_le.{u_1} {n : ℕ} {ι : Type u_1} (s : Finset ι) (g : ι → FABL.F₂BooleanFunction n) (r : ℕ) (hg : ∀ i ∈ s, FABL.functionAlgebraicDegree (g i) ≤ r) : FABL.functionAlgebraicDegree (∑ i ∈ s, g i) ≤ r
A finite sum of functions of degree at most `r` again has degree at most `r`.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
theorem FABL.functionAlgebraicDegree_affineMap_coordinate_le_one {n : ℕ} (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) (i : Fin n) : (FABL.functionAlgebraicDegree fun x => L x i) ≤ 1
theorem FABL.functionAlgebraicDegree_affineMap_coordinate_le_one {n : ℕ} (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) (i : Fin n) : (FABL.functionAlgebraicDegree fun x => L x i) ≤ 1
Every coordinate of an affine map on the binary cube has algebraic degree at most one.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
theorem FABL.functionAlgebraicDegree_anfMonomial_comp_affineMap_le_card {n : ℕ} (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) (S : Finset (Fin n)) : (FABL.functionAlgebraicDegree fun x => FABL.anfMonomial S (L x)) ≤ S.card
theorem FABL.functionAlgebraicDegree_anfMonomial_comp_affineMap_le_card {n : ℕ} (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) (S : Finset (Fin n)) : (FABL.functionAlgebraicDegree fun x => FABL.anfMonomial S (L x)) ≤ S.card
Substituting affine coordinates into a square-free monomial does not increase its degree.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
theorem FABL.functionAlgebraicDegree_comp_affineMap_le {n : ℕ} (f : FABL.F₂BooleanFunction n) (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) : FABL.functionAlgebraicDegree (f ∘ ⇑L) ≤ FABL.functionAlgebraicDegree f
theorem FABL.functionAlgebraicDegree_comp_affineMap_le {n : ℕ} (f : FABL.F₂BooleanFunction n) (L : FABL.F₂Cube n →ᵃ[FABL.𝔽₂] FABL.F₂Cube n) : FABL.functionAlgebraicDegree (f ∘ ⇑L) ≤ FABL.functionAlgebraicDegree f
Composition with an affine map on the binary cube cannot increase algebraic degree.
-
theoremdefined in FABL/Chapter06/F₂Polynomials/Affine.leancomplete
theorem FABL.functionAlgebraicDegree_comp_affineEquiv {n : ℕ} (f : FABL.F₂BooleanFunction n) (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) : FABL.functionAlgebraicDegree (f ∘ ⇑L) = FABL.functionAlgebraicDegree f
theorem FABL.functionAlgebraicDegree_comp_affineEquiv {n : ℕ} (f : FABL.F₂BooleanFunction n) (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) : FABL.functionAlgebraicDegree (f ∘ ⇑L) = FABL.functionAlgebraicDegree f
Algebraic degree is invariant under affine equivalences of the binary cube.
The proof first establishes nonincrease under an arbitrary affine map by
substituting affine coordinate functions into the unique square-free ANF, then applies the same
bound to L^{-1}.
-
CryptBoolean.supportPrecedes[complete] -
CryptBoolean.supportPrecedesDecidable[complete] -
CryptBoolean.lowWeightInputs[complete] -
CryptBoolean.restrictionRecoveryCoefficient[complete] -
CryptBoolean.card_powerset_filter_card_le[complete] -
CryptBoolean.card_intermediate_subsets_le[complete] -
CryptBoolean.restrictionRecoveryFormula_f₂CubeOfFinset[complete] -
CryptBoolean.restrictionRecoveryFormula[complete] -
CryptBoolean.eq_of_eq_on_lowWeightInputs[complete] -
CryptBoolean.eq_of_eq_on_affineImage_lowWeightInputs[complete]
Recovery from low-weight restrictions (Carlet, pp. 13--14). Write
y\preceq x when \operatorname{supp}(y)\subseteq\operatorname{supp}(x), and
let E_d=\{y\in V_n:w_H(y)\le d\}. If
f:V_n\to\mathbb F_2 satisfies \deg_{\mathrm{alg}}(f)\le d<n, then for
every x\in V_n,
f(x)
=\bigoplus_{\substack{y\preceq x\\y\in E_d}}
f(y)
\left[
\sum_{i=0}^{d-w_H(y)}
\binom{w_H(x)-w_H(y)}{i}
\bmod 2
\right].
Consequently, f is uniquely determined by its restriction to E_d. More generally, for every
affine automorphism L\in\operatorname{AGL}(V_n), it is uniquely determined by its restriction
to L(E_d).
Lean code for Theorem1.4.7●10 declarations
Associated Lean declarations
-
CryptBoolean.supportPrecedes[complete]
-
CryptBoolean.supportPrecedesDecidable[complete]
-
CryptBoolean.lowWeightInputs[complete]
-
CryptBoolean.restrictionRecoveryCoefficient[complete]
-
CryptBoolean.card_powerset_filter_card_le[complete]
-
CryptBoolean.card_intermediate_subsets_le[complete]
-
CryptBoolean.restrictionRecoveryFormula_f₂CubeOfFinset[complete]
-
CryptBoolean.restrictionRecoveryFormula[complete]
-
CryptBoolean.eq_of_eq_on_lowWeightInputs[complete]
-
CryptBoolean.eq_of_eq_on_affineImage_lowWeightInputs[complete]
-
CryptBoolean.supportPrecedes[complete] -
CryptBoolean.supportPrecedesDecidable[complete] -
CryptBoolean.lowWeightInputs[complete] -
CryptBoolean.restrictionRecoveryCoefficient[complete] -
CryptBoolean.card_powerset_filter_card_le[complete] -
CryptBoolean.card_intermediate_subsets_le[complete] -
CryptBoolean.restrictionRecoveryFormula_f₂CubeOfFinset[complete] -
CryptBoolean.restrictionRecoveryFormula[complete] -
CryptBoolean.eq_of_eq_on_lowWeightInputs[complete] -
CryptBoolean.eq_of_eq_on_affineImage_lowWeightInputs[complete]
-
defdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
def CryptBoolean.supportPrecedes {n : ℕ} (y x : FABL.F₂Cube n) : Prop
def CryptBoolean.supportPrecedes {n : ℕ} (y x : FABL.F₂Cube n) : Prop
The coordinatewise support order on the binary cube.
-
defdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
def CryptBoolean.supportPrecedesDecidable {n : ℕ} (y x : FABL.F₂Cube n) : Decidable (CryptBoolean.supportPrecedes y x)
def CryptBoolean.supportPrecedesDecidable {n : ℕ} (y x : FABL.F₂Cube n) : Decidable (CryptBoolean.supportPrecedes y x)
-
defdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
def CryptBoolean.lowWeightInputs {n : ℕ} (d : ℕ) : Finset (FABL.F₂Cube n)
def CryptBoolean.lowWeightInputs {n : ℕ} (d : ℕ) : Finset (FABL.F₂Cube n)
Carlet's set `E_d` of binary vectors of Hamming weight at most `d`.
-
defdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
def CryptBoolean.restrictionRecoveryCoefficient {n : ℕ} (d : ℕ) (x y : FABL.F₂Cube n) : FABL.𝔽₂
def CryptBoolean.restrictionRecoveryCoefficient {n : ℕ} (d : ℕ) (x y : FABL.F₂Cube n) : FABL.𝔽₂
The binomial-parity coefficient in Carlet's restriction-recovery formula.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
theorem CryptBoolean.card_powerset_filter_card_le {n : ℕ} (U : Finset (Fin n)) (k : ℕ) : {S ∈ U.powerset | S.card ≤ k}.card = ∑ i ∈ Finset.range (k + 1), U.card.choose i
theorem CryptBoolean.card_powerset_filter_card_le {n : ℕ} (U : Finset (Fin n)) (k : ℕ) : {S ∈ U.powerset | S.card ≤ k}.card = ∑ i ∈ Finset.range (k + 1), U.card.choose i
The number of subsets of `U` of cardinality at most `k`.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
theorem CryptBoolean.card_intermediate_subsets_le {n : ℕ} (T U : Finset (Fin n)) (d : ℕ) (hTU : T ⊆ U) (hTd : T.card ≤ d) : {S ∈ U.powerset | T ⊆ S ∧ S.card ≤ d}.card = ∑ i ∈ Finset.range (d - T.card + 1), (U.card - T.card).choose i
theorem CryptBoolean.card_intermediate_subsets_le {n : ℕ} (T U : Finset (Fin n)) (d : ℕ) (hTU : T ⊆ U) (hTd : T.card ≤ d) : {S ∈ U.powerset | T ⊆ S ∧ S.card ≤ d}.card = ∑ i ∈ Finset.range (d - T.card + 1), (U.card - T.card).choose i
The number of intermediate subsets `S` with `T ⊆ S ⊆ U` and `|S| ≤ d`.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
theorem CryptBoolean.restrictionRecoveryFormula_f₂CubeOfFinset {n : ℕ} (f : CryptBoolean.BooleanFunction n) (d : ℕ) (hdegree : FABL.functionAlgebraicDegree f ≤ d) (U : Finset (Fin n)) : f (FABL.f₂CubeOfFinset U) = ∑ T ∈ U.powerset, if T.card ≤ d then f (FABL.f₂CubeOfFinset T) * ↑(∑ i ∈ Finset.range (d - T.card + 1), (U.card - T.card).choose i) else 0
theorem CryptBoolean.restrictionRecoveryFormula_f₂CubeOfFinset {n : ℕ} (f : CryptBoolean.BooleanFunction n) (d : ℕ) (hdegree : FABL.functionAlgebraicDegree f ≤ d) (U : Finset (Fin n)) : f (FABL.f₂CubeOfFinset U) = ∑ T ∈ U.powerset, if T.card ≤ d then f (FABL.f₂CubeOfFinset T) * ↑(∑ i ∈ Finset.range (d - T.card + 1), (U.card - T.card).choose i) else 0
Carlet's recovery identity at the indicator vector of a coordinate subset.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
theorem CryptBoolean.restrictionRecoveryFormula {n : ℕ} (f : CryptBoolean.BooleanFunction n) (d : ℕ) (hdegree : FABL.functionAlgebraicDegree f ≤ d) (_hdn : d < n) (x : FABL.F₂Cube n) : f x = ∑ y ∈ CryptBoolean.lowWeightInputs d with CryptBoolean.supportPrecedes y x, f y * CryptBoolean.restrictionRecoveryCoefficient d x y
theorem CryptBoolean.restrictionRecoveryFormula {n : ℕ} (f : CryptBoolean.BooleanFunction n) (d : ℕ) (hdegree : FABL.functionAlgebraicDegree f ≤ d) (_hdn : d < n) (x : FABL.F₂Cube n) : f x = ∑ y ∈ CryptBoolean.lowWeightInputs d with CryptBoolean.supportPrecedes y x, f y * CryptBoolean.restrictionRecoveryCoefficient d x y
Carlet, pp. 13--14: a Boolean function of degree at most `d < n` is recovered at every input from its values on `E_d`.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
theorem CryptBoolean.eq_of_eq_on_lowWeightInputs {n : ℕ} (f g : CryptBoolean.BooleanFunction n) (d : ℕ) (hf : FABL.functionAlgebraicDegree f ≤ d) (hg : FABL.functionAlgebraicDegree g ≤ d) (hdn : d < n) (hfg : ∀ y ∈ CryptBoolean.lowWeightInputs d, f y = g y) : f = g
theorem CryptBoolean.eq_of_eq_on_lowWeightInputs {n : ℕ} (f g : CryptBoolean.BooleanFunction n) (d : ℕ) (hf : FABL.functionAlgebraicDegree f ≤ d) (hg : FABL.functionAlgebraicDegree g ≤ d) (hdn : d < n) (hfg : ∀ y ∈ CryptBoolean.lowWeightInputs d, f y = g y) : f = g
Values on `E_d` uniquely determine a Boolean function of degree at most `d < n`.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Restrictions.leancomplete
theorem CryptBoolean.eq_of_eq_on_affineImage_lowWeightInputs {n : ℕ} (f g : CryptBoolean.BooleanFunction n) (d : ℕ) (hf : FABL.functionAlgebraicDegree f ≤ d) (hg : FABL.functionAlgebraicDegree g ≤ d) (hdn : d < n) (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) (hfg : ∀ z ∈ Finset.image (fun y => L y) (CryptBoolean.lowWeightInputs d), f z = g z) : f = g
theorem CryptBoolean.eq_of_eq_on_affineImage_lowWeightInputs {n : ℕ} (f g : CryptBoolean.BooleanFunction n) (d : ℕ) (hf : FABL.functionAlgebraicDegree f ≤ d) (hg : FABL.functionAlgebraicDegree g ≤ d) (hdn : d < n) (L : FABL.F₂Cube n ≃ᵃ[FABL.𝔽₂] FABL.F₂Cube n) (hfg : ∀ z ∈ Finset.image (fun y => L y) (CryptBoolean.lowWeightInputs d), f z = g z) : f = g
Values on an affine image of `E_d` uniquely determine a Boolean function of degree at most `d < n`.