Boolean valued functions #
This file introduces a typeclass BooleanValued for Boolean functions only taking values ±1
and proves some basic properties specific to Boolean-valued functions.
Main results #
eq_character_of_fourier_weight_one_eq_one, used in the proof of Arrow's theoremalmost_character-- a theorem on BLR linearity testing
Walsh characters are Boolean valued
A Boolean valued function that is a linear combination of degree one characters must be constant
times a degree one character.
Most involved step towards eq_character_of_fourier_weight_one_eq_one.
A Boolean valued function with degree one Fourier weight equal to one
must be ±1 times a degree one character.
A Boolean valued function with degree one Fourier weight equal to one
must be ±1 times a degree one character.
This is [odonnell2014], Exercise 1.19(a).
The Hamming distance of two Boolean-valued functions is equal to
the proportion of inputs where they are not equal. The definition does not
require f g be Boolean-valued, but it will only be used in this context.
Equations
- LeanPool.LeanBooleanfun.BooleanFun.BV.distance f g = LeanPool.LeanBooleanfun.BooleanFun.expectation fun (x : Fin n → Fin 2) => LeanPool.LeanBooleanfun.BooleanFun.oneOn (f x ≠ g x)
Instances For
We introduce the BLR "linearity" test [Blum, Luby, Rubinfeld][blr1990] following O'Donnell [odonnell2014], Sec. 1.6.
The BLR test accepts f on independently and uniformly chosen x y if
(f x) * (f y) = f (x + y). The acceptance probability is the proportion of inputs x y on which
the test accepts.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The BLR test can detect that a Boolean valued function is close to being a character. See [odonnell2014], Theorem 1.30.