Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 8.1 (algebraic core) — no finite D with 1-in-3 → D → NAE has a cyclic polymorphism of prime arity p > 60|D|

Proved
AlgebraicPCSP.OneInThree.theorem_8_1_core

by mikedeng1 · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

cyclic-operationsnp-hardnessp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1polymorphismspromise-csp

Let DDD be a finite set and R⊆D3R\subseteq D^3R⊆D3. Suppose f:{0,1}→Df:\{0,1\}\to Df:{0,1}→D is a homomorphism from the 1-in-3 structure T\mathbf TT to (D;R)(D;R)(D;R), and g:D→{0,1}g:D\to\{0,1\}g:D→{0,1} is a homomorphism from (D;R)(D;R)(D;R) to the not-all-equal structure H2\mathbf H_2H2​; that is, (T,H2)(\mathbf T,\mathbf H_2)(T,H2​) is a homomorphic relaxation of ((D;R),(D;R))((D;R),(D;R))((D;R),(D;R)):

T→ f (D;R)→ g H2.\mathbf T\xrightarrow{\ f\ }(D;R)\xrightarrow{\ g\ }\mathbf H_2 .T f ​(D;R) g ​H2​.

Let ppp be a prime with p>60 ∣D∣p>60\,|D|p>60∣D∣. Then (D;R)(D;R)(D;R) has no cyclic polymorphism s:Dp→Ds:D^p\to Ds:Dp→D, i.e. no polymorphism with s(a1,a2,…,ap)=s(a2,…,ap,a1)s(a_1,a_2,\dots,a_p)=s(a_2,\dots,a_p,a_1)s(a1​,a2​,…,ap​)=s(a2​,…,ap​,a1​) for all a∈Dpa\in D^pa∈Dp.

Theorem 8.1 of the paper states that if (T,H2)(\mathbf T,\mathbf H_2)(T,H2​) is pp-constructible from a finite relational structure D\mathbf DD, then CSP(D)\mathrm{CSP}(\mathbf D)CSP(D) is NP-complete. Its proof (i) uses Theorem 4.12 to turn pp-constructibility into a homomorphic relaxation of a pp-power of D\mathbf DD, (ii) uses that a pp-power of a finite tractable CSP template is a finite tractable CSP template, so the pp-power may be taken to be D\mathbf DD itself with a single ternary relation, and (iii) invokes the theorem of Barto and Kozik [BK12] (Theorem 8.3) that a finite D\mathbf DD whose CSP is not NP-complete has a cyclic polymorphism of every prime arity p>∣D∣p>|D|p>∣D∣. What remains, and what is stated here, is the combinatorial contradiction of §8.2–8.4.

The result shows that 1-in-3 versus Not-All-Equal-SAT, although solvable in polynomial time, cannot be solved by reduction to any finite tractable CSP; infinite templates are necessary.

Formalization Note The complexity conclusion, steps (i)–(ii) and the cited Theorem 8.3 are not formalized; the statement is the contrapositive core. The paper renames DDD so that f(0)=0f(0)=0f(0)=0, f(1)=1f(1)=1f(1)=1; here fff is kept. The hypotheses on sss are exactly "polymorphism of (D;R)(D;R)(D;R)" and "cyclic"; nothing like idempotence or count-dependence is assumed.

Preamble
import Mathlib
import Definitions.Def_PCSPBLPAff_Symmetric_Setting
import Definitions.Def_AlgebraicPCSP_OneInThree_Structures
import Definitions.Def_AlgebraicPCSP_OneInThree_Matrices
Formal statement
namespace AlgebraicPCSP.OneInThree

open PCSPBLPAff.Symmetric

/-- Theorem 8.1 (p. 52), algebraic core: let `D` be a finite set and `R ⊆ D³`, and let
`f : T → (D; R)` and `g : (D; R) → H₂` be homomorphisms, where `T` is 1-in-3 and `H₂` is
not-all-equal on `{0, 1}`. Then `(D; R)` has no cyclic polymorphism of prime arity
`p > 60|D|`. -/
theorem theorem_8_1_core {D : Type} [Fintype D] [DecidableEq D] (R : Set (Fin 3 → D))
    (f : Fin 2 → D) (g : D → Fin 2)
    (hf : IsHom oneInThree (ternaryStruct R) f) (hg : IsHom (ternaryStruct R) nae g)
    (p : ℕ) (hp : p.Prime) (hpD : 60 * Fintype.card D < p)
    (s : (Fin p → D) → D) (hs : IsPolymorphism (ternaryStruct R) (ternaryStruct R) s)
    (hcyc : IsCyclic s) :
    False := by sorry

end AlgebraicPCSP.OneInThree
Source
L. Barto, J. Bulín, A. Krokhin, J. Opršal, Algebraic approach to promise constraint satisfaction, arXiv:1811.00970v3, p. 52, Theorem 8.1 (algebraic core established by the proof, pp. 52–58)
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me