cfahlgren1/math / lean /ComparatorChallenges /GotsmanLinial.lean
cfahlgren1's picture
download
raw
1.67 kB
import Mathlib.Algebra.MvPolynomial.Degrees
import Mathlib.Algebra.BigOperators.Field
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Analysis.Real.Sqrt
import Mathlib.Tactic.NormNum
namespace OAI
open scoped BigOperators
namespace LeanBlast.GotsmanLinial
abbrev Cube (n : ℕ) := Fin n → Bool
def cubeCoord {n : ℕ} (x : Cube n) (i : Fin n) : ℝ :=
if x i then 1 else -1
def flip {n : ℕ} (i : Fin n) (x : Cube n) : Cube n :=
Function.update x i (!(x i))
noncomputable def thresholdSign (t : ℝ) : ℝ :=
if 0 ≤ t then 1 else -1
noncomputable def sensitiveVertices {n : ℕ} (f : Cube n → ℝ) (i : Fin n) :
Finset (Cube n) := by
classical
exact Finset.univ.filter fun x => f x ≠ f (flip i x)
noncomputable def averageSensitivity {n : ℕ} (f : Cube n → ℝ) : ℝ :=
∑ i : Fin n, ((sensitiveVertices f i).card : ℝ) / (2 : ℝ) ^ n
def IsMultilinear {n : ℕ} (p : MvPolynomial (Fin n) ℝ) : Prop :=
∀ m ∈ p.support, ∀ i : Fin n, m i ≤ 1
noncomputable def polynomialValue {n : ℕ} (p : MvPolynomial (Fin n) ℝ)
(x : Cube n) : ℝ :=
MvPolynomial.eval (cubeCoord x) p
noncomputable def polynomialThreshold {n : ℕ} (p : MvPolynomial (Fin n) ℝ) :
Cube n → ℝ :=
fun x => thresholdSign (polynomialValue p x)
def GotsmanLinialStatement : Prop :=
∀ (n d : ℕ), 1 ≤ n → 1 ≤ d → d ≤ n →
∀ p : MvPolynomial (Fin n) ℝ,
IsMultilinear p → p.totalDegree ≤ d →
averageSensitivity (polynomialThreshold p) ≤ 8 * (d : ℝ) * Real.sqrt (n : ℝ)
theorem gotsmanLinialStatement : GotsmanLinialStatement := by
sorry
end LeanBlast.GotsmanLinial
end OAI

Xet Storage Details

Size:
1.67 kB
·
Xet hash:
f36d3c834e9cd57d14b4bcfd3633bacf230d18fc9e2b45df4d034443dbf6df99

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.