{
  "abstract": "A Lean 4 proof of the PCP theorem and of its consequences for approximation, for an explicit single-tape Turing machine model. The compared theorems are: the PCP theorem in gap form, that for a fixed fraction num/den > 0 every NP language reduces in polynomial time to 3-SAT so that members give satisfiable formulas and non-members give formulas of which every assignment leaves at least that fraction of the clauses unsatisfied (Complexity.pcp_gap); the PCP theorem in verifier form, NP = PCP(O(log n), O(1)) (Complexity.pcp_theorem); that the problems of the syntactic class MaxSNP0 are in NPO (Complexity.npo_maxSNP0); that MaxSNP-hard problems have no polynomial-time approximation scheme unless P = NP (Complexity.maxSNPHard_not_hasPTAS), even when a separate algorithm is allowed for each precision (Complexity.maxSNPHard_no_ptas); that MAX-3-SAT and 3-OCCURRENCE MAX-3-SAT are MaxSNP-complete (Complexity.max3SAT_maxSNPComplete, Complexity.max3SAT3_maxSNPComplete); and that both are APX-complete (Complexity.max3SAT_apxComplete, Complexity.max3SAT3_apxComplete). The statement, Challenge.lean, imports only Lean core and defines everything it uses: the machine model, P, NP and polynomial-time functions; probabilistically checkable proofs and gap reductions; optimization problems, approximation algorithms and schemes; NPO; L-reductions, the syntactic class MaxSNP0 of Papadimitriou and Yannakakis (structures of fixed input and solution signatures on a finite universe, and a well-formed quantifier-free formula) and the class MaxSNP of NPO problems L-reducible to it; APX and PTAS-reductions in the sense of Crescenzi and Trevisan; and the two problems.\nThe gap form of the PCP theorem is proved by Dinur's gap amplification: the 3-CNF gap map, its soundness and its implementation as a polynomial-time multi-stack Turing machine are taken from the Lean formalization of the Unique Games theorem in the OpenAI mathematics repository (194 files, adapted to the Lean module system and to Lean v4.35.0-rc2), and composed with the Cook-Levin reduction of the Palomar entry PALOMAR-2026-10-02-000013 (whose library is included). A simulation theorem carries polynomial time from Mathlib's multi-stack machines to the single-tape model. The verifier form samples clauses of the gap formula with O(log n) random bits. MaxSNP-hard problems have no approximation scheme because MAX-3-SAT L-reduces to them and an approximation scheme for MAX-3-SAT would decide the gap. MAX-3-SAT is put in MaxSNP0 by an explicit quantifier-free formula, and every MaxSNP0 problem L-reduces to it by the Papadimitriou-Yannakakis clause construction (one clause per falsifying pattern of atoms, split into 3-clauses with fresh variables, with an averaging bound for the constant; assignments are mapped back to structures of the solution signature). The MaxSNP0 problems are in NPO by an explicit polynomial-time parser and feasibility check, and a size bound for structures of a fixed signature. 3-OCCURRENCE MAX-3-SAT is reached in two L-reductions: copies of each variable linked along an explicit constant-degree expander (from the same OpenAI development), and then a torus gadget of implications. APX-hardness under PTAS-reductions needs a witness-recovering PCP theorem, which is proved here: an explicit deterministic decoder, shown polynomial-time, turns every assignment of the gap formula that satisfies more than the fraction 1 - num/den of its clauses into an assignment of the original formula and then into an NP certificate. With it every APX problem reduces to MAX-3-SAT by a threshold construction. Membership in APX uses a 2-approximation. The proof uses only the axioms propext, Classical.choice and Quot.sound.",
  "authors": [
    {
      "name": "Robert D. Barish"
    }
  ],
  "challenge_render": {
    "artifact_path": "renders/PALOMAR-2026-10-09-000010-v1/1fb4764e1f9921f92db6220e41ace2b484f61d2d47cd55ac32d1693d08ebe87a/",
    "artifact_tree_sha256": "1fb4764e1f9921f92db6220e41ace2b484f61d2d47cd55ac32d1693d08ebe87a",
    "bwrap_source_tag": "v0.12.0",
    "entrypoint": "Challenge/index.html",
    "format": "verso-html",
    "rendered_at": "2026-10-09T11:46:51Z",
    "renderer_commit": "d4e41c1d5b0d114c4859e6e5831dc6d3ad1d0d44",
    "verso_commit": "9f8096e40b31715b1d8d5997f15a0bd832f7e37d"
  },
  "classification": {
    "arxiv": [
      "cs.CC",
      "cs.LO"
    ],
    "msc2020": [
      "68Q17",
      "68Q25",
      "68W25",
      "68Q15",
      "68V20"
    ]
  },
  "first_registered_on": "2026-10-09",
  "formalization": {
    "challenge_path": "Challenge.lean",
    "comparator_config_path": "comparator.json",
    "definition_names": [],
    "formalization_metadata_path": "formalization.yaml",
    "lakefile_path": "lakefile.toml",
    "lean_toolchain": "leanprover/lean4:v4.35.0-rc2",
    "permitted_axioms": [
      "propext",
      "Quot.sound",
      "Classical.choice"
    ],
    "project_dependencies": [
      {
        "name": "mathlib",
        "repository": "leanprover-community/mathlib4",
        "revision": "065356127b1dc0016f66b7283ce0ce2c4055aa55"
      },
      {
        "name": "plausible",
        "repository": "leanprover-community/plausible",
        "revision": "e50948299c4dc4a4c21b1c34b6a6a4fddc19f912"
      },
      {
        "name": "LeanSearchClient",
        "repository": "leanprover-community/LeanSearchClient",
        "revision": "95e037bfdc31d3916ac615446847fb01960e2719"
      },
      {
        "name": "importGraph",
        "repository": "leanprover-community/import-graph",
        "revision": "10930f8138f0462dbd744a91fc03a16fae0e046f"
      },
      {
        "name": "proofwidgets",
        "repository": "leanprover-community/ProofWidgets4",
        "revision": "4c70ac059693669e5756e32a7a94b57ee1e99dc5"
      },
      {
        "name": "aesop",
        "repository": "leanprover-community/aesop",
        "revision": "75d936c7af167cc93fac0d31237682fc2204591d"
      },
      {
        "name": "Qq",
        "repository": "leanprover-community/quote4",
        "revision": "786b7acdca7eb4e9c76c5d1d5bd810e7e5c56334"
      },
      {
        "name": "batteries",
        "repository": "leanprover-community/batteries",
        "revision": "ed9b316aabe389fec1ef43c3326ab48c7e59be42"
      },
      {
        "name": "Cli",
        "repository": "leanprover/lean4-cli",
        "revision": "2842b9871b04862f944c032e34052cb9448ccb71"
      }
    ],
    "solution_path": "Solution.lean",
    "theorem_names": [
      "Complexity.pcp_gap",
      "Complexity.pcp_theorem",
      "Complexity.npo_maxSNP0",
      "Complexity.maxSNPHard_no_ptas",
      "Complexity.maxSNPHard_not_hasPTAS",
      "Complexity.max3SAT_maxSNPComplete",
      "Complexity.max3SAT3_maxSNPComplete",
      "Complexity.max3SAT_apxComplete",
      "Complexity.max3SAT3_apxComplete"
    ]
  },
  "id": "PALOMAR-2026-10-09-000010",
  "preservation": {
    "archive_owner": "PalomarArchive",
    "archived_at": "2026-10-09T11:47:37Z",
    "receipt_sha256": "c9be628f3598f50819572107e4b24bb737b12830891bd9902368a7415e8ebdfb",
    "repositories": [
      {
        "commit": "75d936c7af167cc93fac0d31237682fc2204591d",
        "fork_repository": "PalomarArchive/leanprover-community--aesop--01b46b609077",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/75d936c7af167cc93fac0d31237682fc2204591d",
        "source_repository": "leanprover-community/aesop"
      },
      {
        "commit": "ed9b316aabe389fec1ef43c3326ab48c7e59be42",
        "fork_repository": "PalomarArchive/leanprover-community--batteries--1b4c776305c9",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/ed9b316aabe389fec1ef43c3326ab48c7e59be42",
        "source_repository": "leanprover-community/batteries"
      },
      {
        "commit": "10930f8138f0462dbd744a91fc03a16fae0e046f",
        "fork_repository": "PalomarArchive/leanprover-community--import-graph--e0a79261b05a",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/10930f8138f0462dbd744a91fc03a16fae0e046f",
        "source_repository": "leanprover-community/import-graph"
      },
      {
        "commit": "95e037bfdc31d3916ac615446847fb01960e2719",
        "fork_repository": "PalomarArchive/leanprover-community--LeanSearchClient--9de355ab5f53",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/95e037bfdc31d3916ac615446847fb01960e2719",
        "source_repository": "leanprover-community/LeanSearchClient"
      },
      {
        "commit": "065356127b1dc0016f66b7283ce0ce2c4055aa55",
        "fork_repository": "PalomarArchive/leanprover-community--mathlib4--67b3d817d8a2",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/065356127b1dc0016f66b7283ce0ce2c4055aa55",
        "source_repository": "leanprover-community/mathlib4"
      },
      {
        "commit": "e50948299c4dc4a4c21b1c34b6a6a4fddc19f912",
        "fork_repository": "PalomarArchive/leanprover-community--plausible--fb632f6f7bf4",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/e50948299c4dc4a4c21b1c34b6a6a4fddc19f912",
        "source_repository": "leanprover-community/plausible"
      },
      {
        "commit": "4c70ac059693669e5756e32a7a94b57ee1e99dc5",
        "fork_repository": "PalomarArchive/leanprover-community--ProofWidgets4--26014acbbaff",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/4c70ac059693669e5756e32a7a94b57ee1e99dc5",
        "source_repository": "leanprover-community/ProofWidgets4"
      },
      {
        "commit": "786b7acdca7eb4e9c76c5d1d5bd810e7e5c56334",
        "fork_repository": "PalomarArchive/leanprover-community--quote4--90d31d153685",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/786b7acdca7eb4e9c76c5d1d5bd810e7e5c56334",
        "source_repository": "leanprover-community/quote4"
      },
      {
        "commit": "2842b9871b04862f944c032e34052cb9448ccb71",
        "fork_repository": "PalomarArchive/leanprover--lean4-cli--df175a7fc790",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/2842b9871b04862f944c032e34052cb9448ccb71",
        "source_repository": "leanprover/lean4-cli"
      },
      {
        "commit": "10079b2a14bd0df47d2a24364133f6008b9c207f",
        "fork_repository": "PalomarArchive/RBarish-UTokyo--Max3SAT-MaxSNP-APX-Lean4--da68bef5965e",
        "ref": "refs/tags/palomar/PALOMAR-2026-10-09-000010-v1/10079b2a14bd0df47d2a24364133f6008b9c207f",
        "source_repository": "RBarish-UTokyo/Max3SAT-MaxSNP-APX-Lean4"
      }
    ]
  },
  "provenance": {
    "mathematical_sources": [
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Sanjeev Arora"
          },
          {
            "name": "Shmuel Safra"
          }
        ],
        "identifier": "doi:10.1145/273865.273901",
        "location": "Journal of the ACM 45(1) (1998), 70-122",
        "relationship": "formalizes",
        "title": "Probabilistic checking of proofs: a new characterization of NP",
        "type": "paper"
      },
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Sanjeev Arora"
          },
          {
            "name": "Carsten Lund"
          },
          {
            "name": "Rajeev Motwani"
          },
          {
            "name": "Madhu Sudan"
          },
          {
            "name": "Mario Szegedy"
          }
        ],
        "identifier": "doi:10.1145/278298.278306",
        "location": "Journal of the ACM 45(3) (1998), 501-555",
        "relationship": "formalizes",
        "title": "Proof verification and the hardness of approximation problems",
        "type": "paper"
      },
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Irit Dinur"
          }
        ],
        "identifier": "doi:10.1145/1236457.1236459",
        "location": "Journal of the ACM 54(3) (2007), Article 12",
        "relationship": "adapts",
        "title": "The PCP theorem by gap amplification",
        "type": "paper"
      },
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Christos H. Papadimitriou"
          },
          {
            "name": "Mihalis Yannakakis"
          }
        ],
        "identifier": "doi:10.1016/0022-0000(91)90023-X",
        "location": "Journal of Computer and System Sciences 43(3) (1991), 425-440",
        "relationship": "formalizes",
        "title": "Optimization, approximation, and complexity classes",
        "type": "paper"
      },
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Christos H. Papadimitriou"
          }
        ],
        "location": "Addison-Wesley (1994), Chapter 13 (Approximability), Theorem 13.10 and Corollary",
        "relationship": "formalizes",
        "title": "Computational Complexity",
        "type": "book"
      },
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Pierluigi Crescenzi"
          },
          {
            "name": "Luca Trevisan"
          }
        ],
        "identifier": "doi:10.1007/s002249910001",
        "location": "Theory of Computing Systems 33(1) (2000), 1-16; preliminary version FSTTCS 1994",
        "relationship": "formalizes",
        "title": "On approximation scheme preserving reducibility and its applications",
        "type": "paper"
      },
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Sanjeev Khanna"
          },
          {
            "name": "Rajeev Motwani"
          },
          {
            "name": "Madhu Sudan"
          },
          {
            "name": "Umesh Vazirani"
          }
        ],
        "identifier": "https://eccc.weizmann.ac.il/report/1995/023",
        "location": "SIAM Journal on Computing 28(1) (1998), 164-191; ECCC TR95-023",
        "relationship": "adapts",
        "title": "On syntactic versus computational views of approximability",
        "type": "paper"
      },
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Giorgio Ausiello"
          },
          {
            "name": "Pierluigi Crescenzi"
          },
          {
            "name": "Giorgio Gambosi"
          },
          {
            "name": "Viggo Kann"
          },
          {
            "name": "Alberto Marchetti-Spaccamela"
          },
          {
            "name": "Marco Protasi"
          }
        ],
        "location": "Springer (1999), Chapters 3 and 8",
        "relationship": "background",
        "title": "Complexity and Approximation: Combinatorial Optimization Problems and Their Approximability Properties",
        "type": "book"
      },
      {
        "author_endorsement": "not-contacted",
        "authors": [
          {
            "name": "Omer Reingold"
          },
          {
            "name": "Salil Vadhan"
          },
          {
            "name": "Avi Wigderson"
          }
        ],
        "identifier": "doi:10.2307/3062153",
        "location": "Annals of Mathematics 155(1) (2002), 157-187",
        "relationship": "background",
        "title": "Entropy waves, the zig-zag graph product, and new constant-degree expanders",
        "type": "paper"
      }
    ],
    "related_formalizations": [
      {
        "identifier": "https://github.com/openai/math",
        "note": "OpenAI mathematics repository, commit adc7f1241b42e322a6451854ab7e4b4c146bf78a, Lean formalization of result 102 (the Unique Games theorem), Apache-2.0. Its 194 files under OAI/Computability/UniqueGames (about 75,000 lines) are included in this repository: the closure of its 3-CNF gap map (Dinur's gap amplification, the explicit expander family and their multi-stack machines). Changes, recorded in the header of every file: conversion to the Lean module system, removal of private modifiers and of a duplicate lemma, small proof adjustments for the module system and for Lean v4.35.0-rc2, a count-form restatement of one clause-gap theorem, an opaque wrapper for one large constant so that the NanoDa checker does not unfold it, and a new statement file PCP/GapTheorem.lean extracted from TableGapReductionLemmas.lean. OAI/LICENSE holds its licence; docs/PROVENANCE.md maps every adapted file to its upstream file.",
        "relationship": "adapts"
      },
      {
        "identifier": "https://palomar-registry.org/entry?id=PALOMAR-2026-10-02-000013&version=1",
        "note": "NP-completeness of SAT and 3-SAT (the Cook-Levin theorem) in Lean 4, github.com/RBarish-UTokyo/NPCompleteness-Lean4 at commit 3e603e795b44fedcf7d6dd65b7d1e30547ead925. Its machine model and definitions of P, NP and formula codes are reused verbatim in the statement, and the part of its Complexity library needed for the Cook-Levin reduction is included: 75 files, byte-identical to that commit (one instance declaration in an unused file had to be fixed and that file was then dropped). According to that entry, its library was written by GPT-6 Astra (OpenAI) and revised and extended by Claude Opus 5.5 (Anthropic). New modules are added under Complexity/Reg, Complexity/Witness, Complexity/PCP and Complexity/Approx. docs/PROVENANCE.md lists the origin of every Lean file.",
        "relationship": "builds-on"
      },
      {
        "identifier": "https://github.com/SamuelSchlesinger/complexitylib",
        "note": "Complexitylib, a Lean 4 library of computational complexity theory, proves the PCP theorem NP = PCP[O(log n), O(1)] (Complexity.PCP_theorem in Complexitylib/Classes/PCP.lean, by Bolton Bailey, added in commit a27b9885 on 2026-08-30), also by Dinur's gap amplification, for its own machine model and definitions. Nothing from it is used or included here. At commit 3f4b5fee, checked on 2026-10-08, it contains nothing on MaxSNP, APX or polynomial-time approximation schemes.",
        "relationship": "independent"
      }
    ],
    "repository_role": "substantive-development",
    "responsible_maintainers": [
      {
        "name": "Robert D. Barish"
      }
    ],
    "result_origin": "source-based"
  },
  "registered_at": "2026-10-09T11:47:04Z",
  "review": {
    "outcome": "neutral",
    "policy_commit": "96b034cc31a72a63d4f4041911dce337a85c9a04",
    "report": {
      "sha256": "fea790340cc56dbd075c6fc9ce8d43f12e6d0b0998e58cca26e0b8352079d8a1"
    },
    "reviewed_at": "2026-10-08T17:38:51Z",
    "reviewer_models": [
      "codex:gpt-6-sol"
    ],
    "warnings": []
  },
  "schema_version": 5,
  "source": {
    "commit": "10079b2a14bd0df47d2a24364133f6008b9c207f",
    "license": {
      "declared_identifier": "Apache-2.0",
      "detected_identifier": "Apache-2.0",
      "path": "LICENSE",
      "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4"
    },
    "repository": "RBarish-UTokyo/Max3SAT-MaxSNP-APX-Lean4",
    "repository_url": "https://github.com/RBarish-UTokyo/Max3SAT-MaxSNP-APX-Lean4",
    "tree_url": "https://github.com/RBarish-UTokyo/Max3SAT-MaxSNP-APX-Lean4/tree/10079b2a14bd0df47d2a24364133f6008b9c207f"
  },
  "status": "registered",
  "submission": {
    "authorization": {
      "relationship": "maintainer"
    },
    "submission_id": "27fglaqq2rgr"
  },
  "title": "MaxSNP-completeness and APX-completeness of MAX-3-SAT and 3-OCCURRENCE MAX-3-SAT (the PCP theorem and hardness of approximation) in Lean 4",
  "trust": {
    "challenge_bytes": 26268,
    "challenge_dependencies": [],
    "challenge_imports": [],
    "challenge_lines": 591,
    "level": "high",
    "reasons": [
      "Challenge exceeds the preferred audit surface"
    ]
  },
  "verification": {
    "bwrap_source_tag": "v0.12.0",
    "challenge_sha256": "47cfe41048e4a5a44370256cfda3b95b9ffc47c2ef0bed21376d710cf27da4c9",
    "evidence_path": "evidence/PALOMAR-2026-10-09-000010-v1/6efa4af616ec630b3486be4508e55035bed06640b99a26388fdc7503bc1da9c9/",
    "evidence_tree_sha256": "6efa4af616ec630b3486be4508e55035bed06640b99a26388fdc7503bc1da9c9",
    "kernels": [
      {
        "argv": [
          "/home/runner/.elan/toolchains/leanprover--lean4---v4.35.0-rc2/bin/nanoda_bin"
        ],
        "name": "nanoda"
      },
      {
        "argv": [
          "/home/runner/.elan/toolchains/leanprover--lean4---v4.35.0-rc2/bin/con-ron",
          "--jobs=2"
        ],
        "name": "con-ron"
      }
    ],
    "mechanical_report_sha256": "322cdd601089ea5b65b5724bf13d4fea61626876a34d9a1de5feffe77c546e4c",
    "protected_config_sha256": "e32c8c73f3576becf4c9d3c9aa662634c9bbc3ef4cc9289cea30f15df35286c1",
    "repository": "PalomarRegistry/PalomarSubmission",
    "run_id": 37810596808,
    "solution_sha256": "f276b593c8c7c0132029fee2d1be5933d0844f423861a745b1cdef56fd6a0151",
    "tool_digests": {
      "bwrap": "d16057732cd980043da3dbd841eef808a901fb48c7c41770d51e27d307f47847",
      "con-ron": "4e5616d94374cae37324dad2594f6230c2bb2297240249fc78ff508f3bc5acef",
      "lake": "8ba83c98f76562d03b8dbc33f1057151ba6cbb121679dde76b2260ccc90495e1",
      "lean": "bf8d54e4714cc4b03d3f6bb34c83b7202b87e49c8bfcbff6895c085bb90ceb38",
      "leanchecker": "9e36e955a251b1313c8eb5b7fa101282d51df109d34d8bb7c1cfdf51985aba29",
      "leanexport": "c5bc1a10a21e22cbb3671d65987cdef2076833b14182d823ccb2153adf2fa954",
      "nanoda_bin": "8241c5e6baa29490aa118d382f97961b208ae730fdb96545c2abed74c9ece5a8"
    },
    "toolchain_commit": "11acb17ec6b07a8f9e9173e6845197929540936b",
    "verified_at": "2026-10-08T16:49:17Z",
    "workflow_commit": "d4e41c1d5b0d114c4859e6e5831dc6d3ad1d0d44",
    "workflow_path": ".github/workflows/submission.yml",
    "workflow_run_attempt": 1,
    "workflow_url": "https://github.com/PalomarRegistry/PalomarSubmission/actions/runs/37810596808"
  },
  "version": 1
}
