Large Models Confront Algebraic P/NP: How Far Can Machine Verification Go?

    A recent proof claim from a large language model has sparked intense discussion in the theoretical computer science community. This article breaks down the core technical concepts behind the claim—the algebraic complexity classes VP and VNP, the computational divide between the determinant and the permanent, and the nuances of claimed lower bounds. It also explains how formal verification with Lean 4 works, what machine-checked proofs can and cannot guarantee, and why this "large model plus proof assistant" paradigm matters for developers working on software reliability and cloud-native engineering. The piece concludes with practical recommendations for integrating formal methods into enterprise workflows.

    1. Recap: A Proof Claim With “No Human Author”

    Recently, a research claim asserting a solution to the algebraic analogue of P/NP has drawn widespread attention in the theoretical computer science community. According to publicly available information, an internal research version of a large language model developed by a cloud vendor published, with itself as the sole author, a paper claiming “VP ≠ VNP over any field.” The paper includes a complete, machine-verifiable proof, with end-to-end proof generation and verification carried out by the formal verification tool Lean 4. Some important background:

    • Weight of the conclusion. VP and VNP are algebraic complexity classes introduced by Valiant in the late 1970s. If the claim holds, it would mean the algebraic version of the “P vs. NP” conjecture has been formally resolved.
    • Unusual process. The paper has no human author on record and has not undergone traditional peer review by human mathematicians. Until the result is widely accepted, it should be understood as “a machine-verified claim awaiting human scrutiny.”
    • Methodological novelty. There have been reports of “AI generating a lemma” before. What makes this case different is two points: the large language model independently completed the entire work as the primary author, and every step of the result was verified item by item by a proof assistant.

    To assess the weight of such a claim, three things must be clarified first: what exactly it claims to have proven, what kind of lower bound it provides, and what “machine verification passed” actually means.

    2. Algebraic P/NP: The Divide Between VP and VNP

    2.1 From Boolean Circuits to Arithmetic Circuits

    The classical P/NP problem concerns Boolean circuits: logic gates perform only AND, OR, and NOT operations, and the target problem is usually “does there exist an assignment that satisfies the constraints.”

    Valiant’s idea was to move the problem onto a field:

    • Gates in the circuit are replaced with arithmetic gates that perform only addition and multiplication;
    • Inputs are variables or field constants;
    • The circuit forms a directed acyclic graph, evaluated gate by gate from bottom to top.

    A polynomial family (f_n) is said to have polynomial-size arithmetic circuits if it can be computed by an arithmetic circuit whose size (number of gates) is polynomial in n. It can be shown that the Boolean problem SAT can be solved on polynomial-size arithmetic circuits if and only if P equals NP. Therefore, “does there exist a problem requiring superpolynomial-size arithmetic circuits” is the algebraic counterpart of P vs. NP.

    2.2 Formal Definitions

    Here are general definitions of the two complexity classes:

    1. # Polynomial f_n: x is the variable group, y is the auxiliary variable group
    2. VP : f_n can be written as an arithmetic circuit C_n(x),
    3. with size(C_n) ≤ n^k and degree(C_n) ≤ n^k # k is a constant
    4. VNP : f_n(x) = Σ_{e ∈ {0,1}^{p(n)}} g_n(x, e),
    5. g_n ∈ VP, p is a polynomial # Sum over exponentially many assignments, each evaluated in polynomial size
    6. Relation: VF ⊆ VBP ⊆ VP ⊆ VNP, where VBP ⊆ VP and VP/VNP remain open problems

    Two key points in these definitions:

    1. VP’s “degree constraint” cannot be dropped. Consider f_n = x^(2^n). It can be computed by a circuit of size only O(n) using n consecutive squaring steps. But its degree is exponential, so it does not belong to VP. Lower bound research often first discusses “whether something can be computed” and then “whether the degree is restricted”—these must not be conflated.
    2. VNP brings extra power from “exponential summation.” Note that the summation variable e only takes 0/1 values, and each evaluation internally requires only polynomial cost. This form is highly analogous to NP’s “there exists a certificate of polynomial length that can be verified in polynomial time,” which is the origin of the term “algebraic P vs. NP.”

    From this, a corollary follows: over a finite field of characteristic not 2, the permanent is #P-hard; if the permanent belongs to VP, the polynomial hierarchy collapses. This is precisely why VP ≠ VNP is widely believed.

    2.3 The Permanent: A Complete Representative of VNP

    In this framework, two families of polynomials sit on opposite sides of the divide:

    • Determinant (det): Its value equals the signed sum over all column permutations. It has polynomial-time algorithms such as Gaussian elimination and lies in VP. More precisely, it lies in the smaller class VBP (algebraic branching programs).
    • Permanent (per): Replace the sign of each permutation in the det formula with +1 to obtain per(X) = Σ{σ∈S_m} Π_i x{i,σ(i)}. It can be computed within VNP by mapping each 0/1 assignment e ∈ {0,1}^m to the corresponding product term and summing over exponentially many assignments. Valiant proved that the permanent is complete for VNP.

    If the permanent belonged to VP, it would imply VP = VNP; conversely, if VP ≠ VNP, the permanent must lie outside VP. Therefore, the permanent’s lower bound directly determines the relationship between these two classes. The Hamiltonian cycle polynomial is another representative in VNP, often used as an alternative to the permanent over fields of special characteristic.

    3. One Sign Difference, Two Computational Destinies

    For a 2×2 matrix [[a, b], [c, d]]:

    • Determinant: det = a·d − b·c
    • Permanent: per = a·d + b·c

    Just a sign difference, yet the gap in computational difficulty widens sharply as the order increases. Explicit expansions of both the m×m determinant and permanent contain m! terms, but the former can be computed with O(m³) arithmetic operations, while the latter has no known analogous shortcut.

    A more critical difference lies in their properties:

    • The determinant is alternating. Swapping any two rows changes only the sign, so the determinant remains invariant or changes by a factor under elementary row operations. Gaussian elimination exploits this by progressively transforming the matrix into upper triangular form.
    • The permanent is invariant under row permutation. Swapping two rows leaves the permanent’s value completely unchanged, so Gaussian elimination no longer applies.

    The code snippet below uses symmetric group representations to illustrate the contrast and demonstrate the “exponential summation” form of the permanent:

    1. from math import factorial
    2. from itertools import permutations
    3. def signed_perm_weight(sigma):
    4. # Parity of inversions: even number -> even permutation, otherwise odd
    5. inversions = sum(1 for i in range(len(sigma))
    6. for j in range(i + 1, len(sigma))
    7. if sigma[i] > sigma[j])
    8. return -1 if inversions % 2 else 1
    9. def determinant_expand(A): # For illustration only, complexity O(m! * m)
    10. n = len(A)
    11. return sum(signed_perm_weight(p) * prod(A[i][p[i]] for i in range(n))
    12. for p in permutations(range(n)))
    13. def permanent_expand(A): # Exponential summation: typical VNP form
    14. n = len(A)
    15. return sum(prod(A[i][p[i]] for i in range(n))
    16. for p in permutations(range(n)))

    In one sentence: Polynomial-size computable families form VP; the family containing the permanent lies in VNP; whether the two are equal is the algebraic version of P vs. NP.

    4. How to Read the Claimed Lower Bounds

    4.1 Two Core Lower Bounds

    According to the original paper, its lower bound results can be split into two parts:

    • Permanent: Over the real numbers and any field of characteristic not 2, any arithmetic circuit computing the m×m permanent has size greater than m^c·(log m)^(1/3), where c is a constant greater than 0.
    • Hamiltonian cycle polynomial: Over fields of any characteristic, the size lower bound is superpolynomial.

    4.2 Why the “Magnitude” of a Lower Bound Matters More Than “Whether a Lower Bound Exists”

    Lower bound claims roughly fall into three tiers:

    • Superlinear: size greater than c·m, where c is a constant.
    • Quasi-polynomial: size greater than m^c·(log m)^(1/3), i.e., the exponent c·(log m)^(1/3) grows with the input size.
    • Superpolynomial: for every constant k and sufficiently large m, size greater than m^k.

    The lower bound of the form m^c·(log m)^(1/3) given in the original paper for the permanent belongs to the second tier:

    • If c < 3, for any constant k, when m is large enough, m^c·(log m)^(1/3) is always less than m^k. In this case, it only rules out “circuits of very small size” and cannot refute “the existence of a polynomial-size circuit family.”
    • Only the third tier—the result the original paper uses for the Hamiltonian cycle polynomial—could support VP ≠ VNP.

    Another note: such results often differ in wording between “a lower bound for a single value of m” and “an asymptotic lower bound in m.” Readers should refer to the original definitions in the formalized statements.

    4.3 “Any Field” and Characteristic 2

    Fields of characteristic 2 (such as the binary finite field) are a boundary case that needs separate treatment:

    • In characteristic 2, “−” and “+” are equivalent, so the permanent and determinant coincide pointwise. The permanent is already in VP, and the approach of using it to separate VP from VNP fails directly on such fields.
    • The Hamiltonian cycle polynomial does not depend on sign structure, so it can serve as an alternative to the permanent over fields of any characteristic. The original paper’s emphasis on “any characteristic” precisely fills this gap in the permanent-based route.

    4.4 Methodological Context: From Partial Derivatives to Multilinear Formulas

    The mainstream approach to algebraic circuit lower bounds uses derived objects such as “partial derivatives” to characterize computational power:

    • For a polynomial computed by a circuit of size s, all its first-order partial derivatives can be simultaneously computed by a circuit of size O(s).
    • If the space spanned by the partial derivatives of the target polynomial has high dimension, a size lower bound follows.

    The literature already contains results showing that the permanent and the Hamiltonian cycle polynomial require multilinear formulas of size n^(Ω(log n)), consistent with the above direction. Lower bounds in the general circuit model are far stronger and far more difficult than in the multilinear formula model. This is also the most important point to consider when judging such a result: whether it holds “for all arithmetic circuits” or only for some restricted model.

    5. What Machine Verification Did—and What It Left Undone

    5.1 Basic Principles of Formal Verification

    Formal verification uses interactive theorem provers to write mathematical propositions and their proofs in a formal language. The prover’s kernel checks each inference step under the correspondence “types are propositions, proof terms are programs.” Its key properties are:

    • Decidability: Proof checking is mechanical and decidable; the kernel does not “misread” and does not skip steps due to length.
    • Explicit dependencies: All referenced lemmas, axioms, and definitions are explicitly recorded and can be extracted with tools.
    • Reproducibility: With fixed dependency versions, anyone can rebuild on their own machine and obtain the same verification results.

    5.2 Trust Boundary: What Machine Verification Solves

    Machine verification solves “whether every step in the reasoning chain is correct.” It cannot, on its own, prove “the proposition itself is true.” Several types of risk still require human review:

    1. Conditional truth. A formalized theorem takes the form “if the assumptions hold, then the conclusion holds.” If extra axioms or assumptions are introduced (e.g., an unproven conjecture or a circularly dependent lemma), the conclusion is only conditional.
    2. Faithfulness of the statement. Formalization only guarantees “the written conclusion follows from the written proposition.” If the definitions of VP, VNP, or the permanent in the formalization deviate from the original intent (e.g., missing the degree constraint, restricted to a limited model, or covering only some fields), the proof can pass—but the solved problem is no longer the original one.
    3. Semantic and methodological judgment. Machines do not judge “whether this lower bound suffices to separate two complexity classes” or “whether the proof method generalizes,” nor are they responsible for mathematical meaning and novelty.

    5.3 Formal Verification Checklist Worth Examining

    For a result of this kind, produced “independently by a model,” the following checklist can be drawn up at the formalization level:

    1. [1] Export the list of axioms referenced throughout the document; confirm there are no mathematical conjectures, circular references, or unproven assumptions
    2. [2] Confirm that no placeholder proof steps are accepted by default in the code
    3. [3] Verify that the definitions of VP and VNP include key conditions such as degree constraints, constant fields, and non-uniformity
    4. [4] Verify the exponent form of the permanent lower bound: is it c·m·(log m)^(1/3) or m^c·(log m)^(1/3)
    5. [5] Verify whether the circuit model is general arithmetic circuits or a restricted model such as multilinear formulas
    6. [6] Verify whether the coverage of "any field" includes characteristic 2
    7. [7] Rebuild independently by a third party under a fixed toolchain and dependency versions

    Items [1] and [2] can typically be automated with the prover’s built-in tools; the remaining items depend on human mathematical judgment.

    6. Why This Matters for Developers

    6.1 Large Models + Formal Verification: From “Looks Correct” to “Provably Correct”

    A key shortcoming of large models is that generated content may appear plausible but contain errors, and is hard for humans to review line by line. Formal verification can precisely compensate for this:

    • Clear division of labor: The large model proposes proof strategies, generates proof terms, and handles large amounts of repetitive mechanical derivation; the prover checks every step.
    • Closed-loop self-improvement: Failures are fed back immediately, and the model iterates until all checks pass.
    • Relatively mature: Recent research and practice have shown that the “large model generates proofs, prover verifies” paradigm can produce checkable results on multiple competition math problems, advanced undergraduate math problems, and even some research-level problems. This claim simply pushes it to the extreme case of “complex mathematical structures + a long-standing open problem.”

    6.2 Reliability Methods Transferable to Software Engineering

    The same ideas already have mature applications in systems software:

    • Using provers to verify compiler correctness;
    • Machine-proving functional correctness for microkernels;
    • Building machine-checkable security models for cryptographic protocols and mechanically ensuring invariants are not violated in implementations.

    Historical classic cases demonstrate that such methods can genuinely catch errors. A certain open-source cryptographic library once introduced an out-of-bounds read bug that did not touch memory. The library had previously passed a family of static analysis tools, yet this vulnerability was not surfaced. A more suitable tool could express “the pointer lies outside the allocated buffer” as a decidable proposition and provide a machine-checkable proof.

    6.3 General Requirements for Hosting Formal Engineering in the Cloud

    Large-scale formalization work has infrastructure requirements similar to those of conventional application development:

    • Elastic compute: Concurrent building of large numbers of proof goals and concurrent running of model inference. This can use either CPU instances or GPU instances oriented toward training and inference acceleration.
    • Containerized builds: Fixing toolchain versions to ensure every person builds an identical proof environment.
    • Object storage: Storing proof code, dependency caches, and historical build artifacts.
    • Logging and monitoring alerts: Tracking the distribution of proof failures, timeouts, and retries to pinpoint bottlenecks.
    • Continuous integration: Incorporating proof checks into the code review process so that any change to definitions or axioms triggers re-verification.

    Enterprises wishing to adopt a similar workflow can leverage general capabilities such as elastic containers, object storage, logging, and monitoring offered by cloud platforms like Baidu AI Cloud to build their pipelines. This way, they need not build underlying infrastructure themselves and can make “reproducible formal verification” part of their deliverables.

    6.4 Recommendations for Teams

    1. Define the scope of formalization first: Specify which properties need machine proofs and which are covered only by tests.
    2. Stick to the “checkable artifact” principle: Make proofs a reproducible build step rather than a one-off document.
    3. Maintain an axiom and assumption registry: Explicitly record all introduced assumptions and periodically review them manually.
    4. Retain human review: Apply human judgment to proof strategies, problem modeling, and modification intent—not just to “the check passed.”
    5. Prioritize investment by tier: Formalize first the parts where correctness costs are high—core algorithms, cryptographic implementations, protocol state machines; cover routine business logic with tests and static checks initially.

    7. Conclusion: Separating “Trustworthy” From “Readable”

    Returning to the original question: what does this claim mean? It can be viewed on two levels.

    • Technically: Formal verification makes “every step of the entire proof is correct” a mechanically checkable fact—this part is certain. Large models have moved from “assisting with code writing” to “independently producing machine-verifiable mathematical results.”
    • Mathematically: Whether “VP ≠ VNP over any field” will become a widely accepted conclusion still depends on human mathematicians’ review of statement faithfulness, model applicability, and mathematical significance.

    For developers, the most valuable takeaway is not the conclusion itself but the methodology it represents: turning “looks correct” into “provably correct.” This method can be directly transferred to reliability engineering in code generation, systems software, and data platforms. While pursuing delivery speed, using formal methods to guard critical invariants is becoming an increasingly pragmatic engineering practice.