AFTD Auto-Formalizing Theoretical Domains

BoolFourier.parseval_identity_aux_hL2

theoremverifiedimported Lean

$L^2$ norm squared as a self inner product. Let $f : \{0,1\}^n \to \bbr$ be a real-valued function on the Boolean hypercube, and equip such functions with the uniform-measure inner product $\langle g, h \rangle = 2^{-n}\sum_{x \in \{0,1\}^n} g(x)\,h(x)$. Then the squared $L^2$ norm of $f$ equals the inner product of $f$ with itself: \[ \|f\|_2^2 \;=\; \langle f, f \rangle. \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
open Finset BooleanAnalysis in
lemma BoolFourier.parseval_identity_aux_hL2 {n : Nat} (f : BoolFun n) : L2_norm_sq f = (BooleanAnalysis.innerProduct f f)
Source
TCSlib, `BoolFourier.parseval_identity_aux_hL2`
Lean proof
By Prastik Mohanraj, from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 Prastik Mohanraj. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
What was changed in BoolFourier.parseval_identity_aux_hL2
--- TCSlib/BooleanAnalysis/BLR/BoolFourier.lean:336 (BoolFourier.parseval_identity_aux_hL2)
+++ as compiled here
@@ -1,2 +1,5 @@
-private lemma parseval_identity_aux_hL2 {n : Nat} (f : BoolFun n) : L2_norm_sq f = ⟪f, f⟫_𝔹 := by
+set_option relaxedAutoImplicit false in
+set_option autoImplicit false in
+open Finset BooleanAnalysis in
+lemma BoolFourier.parseval_identity_aux_hL2 {n : Nat} (f : BoolFun n) : L2_norm_sq f = (BooleanAnalysis.innerProduct f f) := by
   unfold L2_norm_sq BooleanAnalysis.innerProduct
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 4
  • BoolFourier.L2_norm_sqThe squared $L^2$ norm of $f : \{0,1\}^n \to \mathbb{R}$ is \[ \|f\|_2^2 = \mathbb{E}[f^2] = \frac{1}{2^n}\sum_{x} f(x)^2. \]
  • BoolFourier.expectation_eq_expectAgreement of two definitions of the uniform expectation. Let $n$ be a natural number and let $f : \{0,1\}^n \to \bbr$ be a Boolean…
  • BooleanAnalysis.innerProductThe $L^2$ inner product of two Boolean functions with respect to the uniform measure:…
  • BoolFourier.BoolFunA Boolean function of arity $n$ is an element of type $\{0,1\}^n \to \mathbb{R}$, defined as an abbreviation for…
Used by 1
  • BoolFourier.parseval_identityParseval's identity for the Walsh–Fourier expansion. Let $f : \{0,1\}^n \to \bbr$ be a real-valued function on the Boolean hypercube, and…

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false inopen Finset BooleanAnalysis inlemma BoolFourier.parseval_identity_aux_hL2 {n : Nat} (f : BoolFun n) : L2_norm_sq f = (BooleanAnalysis.innerProduct f f) := by  unfold L2_norm_sq BooleanAnalysis.innerProduct  rw [expectation_eq_expect]  congr 1; funext x; ring
See it in the graphDiscuss this resultChallenge it