Tripled sets, the NAE predicate, and NAE-satisfiability
DefinitionFourToOneGames_NAEDefinitions 4.1, 4.9, 4.10, 4.11 and 4.12 of the source paper.
A tripled set is a finite set together with a partition into triples; here a tripled set with triple-index set is modelled as , the triple indexed by being , and is the space of functions .
The not-all-equal predicate is over , which equals exactly when are not all equal.
For a linear functional , its coefficient vector is , so that ; linear functionals are jointly NAE-satisfying when for every triple . For a symmetric bilinear form with matrix , being NAE-satisfying means for every triple.
A tensor decomposition of a bilinear form is a family of linear functionals such that each is of the form and for all .
import Mathlib
/-!
# Tripled sets, the NAE predicate, and NAE-satisfiability
Definitions 4.1, 4.9, 4.10, 4.11 and 4.12 of Fei–Minzer–Wang, *On the Hardness of 4-to-1 Games
with Perfect Completeness* (ECCC TR26-179).
A *tripled set* (Definition 4.1) is a finite set equipped with a partition into triples. Here a
tripled set with triple-index type `ι` is modelled as the product `ι × Fin 3`: the triple
indexed by `i : ι` is `{(i, 0), (i, 1), (i, 2)}`.
-/
namespace FourToOneGames
open scoped BigOperators
/-- The Not-All-Equal predicate over `F₂` (Definition 4.9):
`NAE3 x₁ x₂ x₃ = x₁ + x₂ + x₃ + x₁x₂ + x₂x₃ + x₃x₁`, which equals `1` exactly when
`x₁, x₂, x₃` are not all equal. -/
def NAE3 (x₁ x₂ x₃ : ZMod 2) : ZMod 2 :=
x₁ + x₂ + x₃ + x₁ * x₂ + x₂ * x₃ + x₃ * x₁
variable {ι : Type} [Fintype ι] [DecidableEq ι]
/-- The `F₂`-vector space `F₂^E` attached to the tripled set `E = ι × Fin 3`. -/
abbrev TripledSpace (ι : Type) : Type := (ι × Fin 3) → ZMod 2
/-- The coefficient `a_v` of a linear functional `φ : F₂^E → F₂`, i.e. the value of `φ` on the
standard basis vector `e_v`; thus `φ x = ∑_{v ∈ E} a_v x_v`. -/
def coeff (φ : TripledSpace ι →ₗ[ZMod 2] ZMod 2) (v : ι × Fin 3) : ZMod 2 :=
φ (Pi.single v 1)
/-- The entry `X_{u,v}` of the matrix representing a bilinear form `f` on `F₂^E`, i.e. the value
of `f` on the pair of standard basis vectors `e_u, e_v`. -/
def bilinCoeff (f : TripledSpace ι →ₗ[ZMod 2] TripledSpace ι →ₗ[ZMod 2] ZMod 2)
(u v : ι × Fin 3) : ZMod 2 := f (Pi.single u 1) (Pi.single v 1)
/-- `f` is a symmetric bilinear form. -/
def IsSymmetricForm (f : TripledSpace ι →ₗ[ZMod 2] TripledSpace ι →ₗ[ZMod 2] ZMod 2) : Prop :=
∀ x y, f x y = f y x
/-- The linear functionals `φ 0, …, φ (r-1) : F₂^E → F₂` are *jointly NAE-satisfying*
(Definition 4.10): for every triple `{v₁, v₂, v₃}` of `E`,
`∑_{j < r} NAE3 (a^{(j)}_{v₁}, a^{(j)}_{v₂}, a^{(j)}_{v₃}) = 1`, where `a^{(j)}` is the
coefficient vector of `φ j`. -/
def JointlyNAESatisfying {r : ℕ} (φ : Fin r → TripledSpace ι →ₗ[ZMod 2] ZMod 2) : Prop :=
∀ i : ι, (∑ j : Fin r, NAE3 (coeff (φ j) (i, 0)) (coeff (φ j) (i, 1)) (coeff (φ j) (i, 2))) = 1
/-- A symmetric bilinear form `f` on `F₂^E` is *NAE-satisfying* (Definition 4.11): for every
triple `{v₁, v₂, v₃}` of `E`,
`X_{v₁v₁} + X_{v₂v₂} + X_{v₃v₃} + X_{v₁v₂} + X_{v₂v₃} + X_{v₃v₁} = 1`. -/
def NAESatisfyingForm (f : TripledSpace ι →ₗ[ZMod 2] TripledSpace ι →ₗ[ZMod 2] ZMod 2) : Prop :=
∀ i : ι,
bilinCoeff f (i, 0) (i, 0) + bilinCoeff f (i, 1) (i, 1) + bilinCoeff f (i, 2) (i, 2)
+ bilinCoeff f (i, 0) (i, 1) + bilinCoeff f (i, 1) (i, 2) + bilinCoeff f (i, 2) (i, 0) = 1
/-- `(φ 0, …, φ (r-1))` is a *tensor decomposition* of the symmetric bilinear form `f`
(Definition 4.12): each `φ j` lies in the image of the map `x ↦ f (x ⊗ ·)`, and
`f (x ⊗ y) = ∑_{j < r} φ j x * φ j y` for all `x, y`. -/
def IsTensorDecomposition {r : ℕ}
(f : TripledSpace ι →ₗ[ZMod 2] TripledSpace ι →ₗ[ZMod 2] ZMod 2)
(φ : Fin r → TripledSpace ι →ₗ[ZMod 2] ZMod 2) : Prop :=
(∀ j : Fin r, ∃ x : TripledSpace ι, ∀ y : TripledSpace ι, φ j y = f x y) ∧
(∀ x y : TripledSpace ι, f x y = ∑ j : Fin r, φ j x * φ j y)
end FourToOneGamesRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) - NON-BLIND self-audit by the drafting agent
Disclosure — this read-back is NOT blind and NOT independent. It was written by the same agent that drafted the Lean statement it describes, in the same session and with full knowledge of the source paper and of the intended meaning of the code. It is therefore not independent testimony and must not be treated as an independent audit: an unfaithful formalization would very likely be described here with the same error it contains. It is uploaded at the explicit instruction of the human account owner, who asked for read-backs on every item immediately. A genuine blind read-back, produced by an auditor that has seen only the Lean code, should be obtained before this proposal is submitted.
This bundle fixes a finite index type with decidable equality and declares the following.
The NAE predicate. , computed in .
The space. for is the space of all functions . The triple indexed by is ; the index type may be empty.
Coefficients. For a linear functional on and , , where is the indicator of . For a bilinear form (a linear map from to the space of linear functionals on ), .
Symmetry. is symmetric iff for all .
Joint NAE-satisfiability. A family of linear functionals is jointly NAE-satisfying iff for every
For the empty sum is , so the condition then holds only when is empty.
NAE-satisfying forms. A bilinear form is NAE-satisfying iff for every
Symmetry of is not part of this predicate.
Tensor decomposition. The family is a tensor decomposition of iff both: (i) for each there exists with for all ; and (ii) for all .