1.1. Boolean functions and support
Definition1.1.1
uses 0
✓L∃∀N
Associated Lean declarations
-
CryptBoolean.BooleanFunction[complete] -
CryptBoolean.realSignView[complete]
Boolean and sign functions (Carlet, pp. 8 and 22). Fix n\ge 0 and write
V_n=\mathbb F_2^n. An n-variable Boolean function is a map
f:V_n\to\mathbb F_2. Its sign function is
f_\chi:V_n\longrightarrow\{-1,1\}\subset\mathbb R,
\qquad f_\chi(x)=(-1)^{f(x)}.
Lean code for Definition1.1.1●2 definitions
Associated Lean declarations
-
CryptBoolean.BooleanFunction[complete]
-
CryptBoolean.realSignView[complete]
Associated Lean declarations
-
CryptBoolean.BooleanFunction[complete] -
CryptBoolean.realSignView[complete]
-
abbrevdefined in CryptBoolean/BooleanFunction.leancomplete
abbrev CryptBoolean.BooleanFunction (n : ℕ) : Type
abbrev CryptBoolean.BooleanFunction (n : ℕ) : Type
Scalar cryptographic Boolean functions on the additive binary cube.
-
abbrevdefined in CryptBoolean/BooleanFunction.leancomplete
abbrev CryptBoolean.realSignView {n : ℕ} (f : CryptBoolean.BooleanFunction n) : FABL.F₂Cube n → ℝ
abbrev CryptBoolean.realSignView {n : ℕ} (f : CryptBoolean.BooleanFunction n) : FABL.F₂Cube n → ℝ
The real sign view `(-1)^{f(x)}` of a bit-valued Boolean function.
Definition1.1.2
uses 1
✓L∃∀N
Associated Lean declarations
-
CryptBoolean.support[complete] -
CryptBoolean.hammingWeight[complete] -
CryptBoolean.mem_support[complete] -
CryptBoolean.hammingWeight_eq_card_support[complete]
Support and Hamming weight (Carlet, p. 8). For
f:V_n\to\mathbb F_2, define
\operatorname{supp}(f)=\{x\in V_n:f(x)=1\},
\qquad
w_H(f)=|\operatorname{supp}(f)|.
Lean code for Definition1.1.2●4 declarations
Associated Lean declarations
-
CryptBoolean.support[complete]
-
CryptBoolean.hammingWeight[complete]
-
CryptBoolean.mem_support[complete]
-
CryptBoolean.hammingWeight_eq_card_support[complete]
Associated Lean declarations
-
CryptBoolean.support[complete] -
CryptBoolean.hammingWeight[complete] -
CryptBoolean.mem_support[complete] -
CryptBoolean.hammingWeight_eq_card_support[complete]
-
abbrevdefined in CryptBoolean/Carlet/Chapter02/Foundations.leancomplete
abbrev CryptBoolean.support {n : ℕ} (f : CryptBoolean.BooleanFunction n) : Finset (FABL.F₂Cube n)
abbrev CryptBoolean.support {n : ℕ} (f : CryptBoolean.BooleanFunction n) : Finset (FABL.F₂Cube n)
The support of a Boolean function, as the finite set on which it is one.
-
abbrevdefined in CryptBoolean/Carlet/Chapter02/Foundations.leancomplete
abbrev CryptBoolean.hammingWeight {n : ℕ} (f : CryptBoolean.BooleanFunction n) : ℕ
abbrev CryptBoolean.hammingWeight {n : ℕ} (f : CryptBoolean.BooleanFunction n) : ℕ
The Hamming weight of a Boolean function.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Foundations.leancomplete
theorem CryptBoolean.mem_support {n : ℕ} (f : CryptBoolean.BooleanFunction n) (x : FABL.F₂Cube n) : x ∈ CryptBoolean.support f ↔ f x = 1
theorem CryptBoolean.mem_support {n : ℕ} (f : CryptBoolean.BooleanFunction n) (x : FABL.F₂Cube n) : x ∈ CryptBoolean.support f ↔ f x = 1
The support predicate is extensionally the one-set of the Boolean function.
-
theoremdefined in CryptBoolean/Carlet/Chapter02/Foundations.leancomplete
theorem CryptBoolean.hammingWeight_eq_card_support {n : ℕ} (f : CryptBoolean.BooleanFunction n) : CryptBoolean.hammingWeight f = (CryptBoolean.support f).card
theorem CryptBoolean.hammingWeight_eq_card_support {n : ℕ} (f : CryptBoolean.BooleanFunction n) : CryptBoolean.hammingWeight f = (CryptBoolean.support f).card
On binary-valued functions, Mathlib's Hamming norm is the cardinality of the one-set.