Documentation

Complexitylib.BooleanAnalysis.PolynomialThreshold.Internal.SignParity

Gotsman--Linial: SignParity #

Adapted from OpenAI's formalization of Average Sensitivity of Polynomial Threshold Functions (25 September 2026), at revision adc7f1241b42e322a6451854ab7e4b4c146bf78a. Source: https://github.com/openai/math/blob/adc7f1241b42e322a6451854ab7e4b4c146bf78a/lean/OAI/Combinatorics/GotsmanLinial/SignParity.lean

The original Boolean-cube representation is used internally in this proof development; Complexitylib.BooleanAnalysis.PolynomialThreshold transports the result to the library's Fourier and influence API. Changes here adapt module visibility, namespace names, formatting, and redundant simp attributes to complexitylib.

Removing threshold zeros and turning sensitive edges into constant-sign edges #

All graph pairs are ordered. The cube coordinates are the real signs encoded by Bool in the public statement.

All ordered pairs of neighboring vertices.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Complexity.BooleanAnalysis.PolynomialThreshold.Internal.exists_pos_shift_nonzero_preserves_sign {α : Type u_1} [Fintype α] (v : α → ℝ) :
    ∃ (ε : ℝ), 0 < ε ∧ (∀ (x : α), v x + ε ≠ 0) ∧ ∀ (x : α), thresholdSign (v x + ε) = thresholdSign (v x)

    A positive constant removes all zeros of a real function on a finite set without changing its threshold signs, including the convention sign(0)=1.

    @[simp]

    Reversing one coordinate reverses full parity.

    The flip definition of adjacency agrees with Hamming distance one.

    A vertex and a direction identify a unique ordered cube edge.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      The n * 2^n count includes both orientations of every cube edge.

      theorem Complexity.BooleanAnalysis.PolynomialThreshold.Internal.parity_twist_eq_iff {n : ℕ} {f : Cube n → ℝ} (hf : ∀ (x : Cube n), f x = 1 ∨ f x = -1) (i : Fin n) (x : Cube n) :
      fullParity x * f x = fullParity (flip i x) * f (flip i x) ↔ f x ≠ f (flip i x)

      Twisting a sign-valued function by parity changes sensitivity into equality across a coordinate flip.

      theorem Complexity.BooleanAnalysis.PolynomialThreshold.Internal.parity_twist_cases {n : ℕ} {f : Cube n → ℝ} (hf : ∀ (x : Cube n), f x = 1 ∨ f x = -1) (x : Cube n) :
      fullParity x * f x = 1 ∨ fullParity x * f x = -1

      Exact uniform normalization: both sides count each sensitive undirected edge twice, once in each direction.

      @[simp]

      The real parity used for threshold signs is exactly the full complex Walsh character under the standard real embedding.

      The zero-removal reduction preserves multilinearity, the degree bound, and the entire threshold function.