Documentation
Atlas
.
BooleanFunctions
.
code
.
FourierExpansion
Search
return to top
source
Imports
Init
Mathlib.Tactic.FieldSimp
Mathlib.Tactic.Linarith
Mathlib.Tactic.NormNum
Mathlib.Tactic.Ring
Mathlib.Data.Fintype.BigOperators
Mathlib.Data.Fintype.Powerset
Mathlib.Data.Real.Basic
Mathlib.Logic.Function.Basic
Mathlib.Algebra.BigOperators.GroupWithZero.Finset
Mathlib.Algebra.BigOperators.Ring.Finset
Imported by
BooleanFourier
.
boolToReal
BooleanFourier
.
boolToReal_true
BooleanFourier
.
boolToReal_false
BooleanFourier
.
boolToReal_sq
BooleanFourier
.
boolToReal_ne_zero
BooleanFourier
.
boolToReal_mul_self
BooleanFourier
.
boolToReal_not
BooleanFourier
.
one_add_boolToReal_mul_boolToReal
BooleanFourier
.
chi
BooleanFourier
.
chi_empty
BooleanFourier
.
chi_sq
BooleanFourier
.
chi_mul_self
BooleanFourier
.
chi_ne_zero
BooleanFourier
.
fourierCoeff
BooleanFourier
.
flipAt
BooleanFourier
.
flipAt_flipAt
BooleanFourier
.
flipAt_ne_self
BooleanFourier
.
chi_flipAt
BooleanFourier
.
sum_chi
BooleanFourier
.
sum_chi_mul_chi
BooleanFourier
.
fourier_expansion
BooleanFourier
.
levelComponent
BooleanFourier
.
degree
source
noncomputable def
BooleanFourier
.
boolToReal
(
b
:
Bool
)
:
ℝ
Instances For
source
@[simp]
theorem
BooleanFourier
.
boolToReal_true
:
boolToReal
true
=
1
source
@[simp]
theorem
BooleanFourier
.
boolToReal_false
:
boolToReal
false
=
-
1
source
theorem
BooleanFourier
.
boolToReal_sq
(
b
:
Bool
)
:
boolToReal
b
^
2
=
1
source
theorem
BooleanFourier
.
boolToReal_ne_zero
(
b
:
Bool
)
:
boolToReal
b
≠
0
source
theorem
BooleanFourier
.
boolToReal_mul_self
(
b
:
Bool
)
:
boolToReal
b
*
boolToReal
b
=
1
source
theorem
BooleanFourier
.
boolToReal_not
(
b
:
Bool
)
:
(
boolToReal
!
b
)
=
-
boolToReal
b
source
theorem
BooleanFourier
.
one_add_boolToReal_mul_boolToReal
(
a
b
:
Bool
)
:
1
+
boolToReal
a
*
boolToReal
b
=
if
a
=
b
then
2
else
0
source
noncomputable def
BooleanFourier
.
chi
{
n
:
ℕ
}
(
S
:
Finset
(
Fin
n
)
)
(
x
:
Fin
n
→
Bool
)
:
ℝ
Instances For
source
@[simp]
theorem
BooleanFourier
.
chi_empty
{
n
:
ℕ
}
(
x
:
Fin
n
→
Bool
)
:
chi
∅
x
=
1
source
theorem
BooleanFourier
.
chi_sq
{
n
:
ℕ
}
(
S
:
Finset
(
Fin
n
)
)
(
x
:
Fin
n
→
Bool
)
:
chi
S
x
^
2
=
1
source
theorem
BooleanFourier
.
chi_mul_self
{
n
:
ℕ
}
(
S
:
Finset
(
Fin
n
)
)
(
x
:
Fin
n
→
Bool
)
:
chi
S
x
*
chi
S
x
=
1
source
theorem
BooleanFourier
.
chi_ne_zero
{
n
:
ℕ
}
(
S
:
Finset
(
Fin
n
)
)
(
x
:
Fin
n
→
Bool
)
:
chi
S
x
≠
0
source
noncomputable def
BooleanFourier
.
fourierCoeff
{
n
:
ℕ
}
(
f
:
(
Fin
n
→
Bool
)
→
ℝ
)
(
S
:
Finset
(
Fin
n
)
)
:
ℝ
Instances For
source
def
BooleanFourier
.
flipAt
{
n
:
ℕ
}
(
j
:
Fin
n
)
(
x
:
Fin
n
→
Bool
)
:
Fin
n
→
Bool
Instances For
source
theorem
BooleanFourier
.
flipAt_flipAt
{
n
:
ℕ
}
(
j
:
Fin
n
)
(
x
:
Fin
n
→
Bool
)
:
flipAt
j
(
flipAt
j
x
)
=
x
source
theorem
BooleanFourier
.
flipAt_ne_self
{
n
:
ℕ
}
(
j
:
Fin
n
)
(
x
:
Fin
n
→
Bool
)
:
flipAt
j
x
≠
x
source
theorem
BooleanFourier
.
chi_flipAt
{
n
:
ℕ
}
(
S
:
Finset
(
Fin
n
)
)
(
j
:
Fin
n
)
(
hj
:
j
∈
S
)
(
x
:
Fin
n
→
Bool
)
:
chi
S
(
flipAt
j
x
)
=
-
chi
S
x
source
theorem
BooleanFourier
.
sum_chi
{
n
:
ℕ
}
(
S
:
Finset
(
Fin
n
)
)
:
∑
x
:
Fin
n
→
Bool
,
chi
S
x
=
if
S
=
∅
then
2
^
n
else
0
source
theorem
BooleanFourier
.
sum_chi_mul_chi
{
n
:
ℕ
}
(
x
y
:
Fin
n
→
Bool
)
:
∑
S
:
Finset
(
Fin
n
)
,
chi
S
x
*
chi
S
y
=
if
x
=
y
then
2
^
n
else
0
source
theorem
BooleanFourier
.
fourier_expansion
{
n
:
ℕ
}
(
f
:
(
Fin
n
→
Bool
)
→
ℝ
)
(
x
:
Fin
n
→
Bool
)
:
f
x
=
∑
S
:
Finset
(
Fin
n
)
,
fourierCoeff
f
S
*
chi
S
x
source
noncomputable def
BooleanFourier
.
levelComponent
{
n
:
ℕ
}
(
k
:
ℕ
)
(
f
:
(
Fin
n
→
Bool
)
→
ℝ
)
(
x
:
Fin
n
→
Bool
)
:
ℝ
Instances For
source
noncomputable def
BooleanFourier
.
degree
{
n
:
ℕ
}
(
f
:
(
Fin
n
→
Bool
)
→
ℝ
)
:
ℕ
Instances For