Two new features have been added to blueqat poqet’s capability to formally verify the correctness of QUBO (quadratic expressions of binary variables) using Lean 4 (Mathlib), a theorem proving assistant. One feature enables proving that answers are optimal even for assignment problems with 100 people × 100 jobs (a 10,000-variable QUBO). The other is “reverse translation,” which reads conditions and objectives from QUBO coefficients to check whether they match the requested conditions.

In the previous announcement, Lean verified that an answer was globally minimal by exhaustively checking all 0/1 combinations. This method could only handle small problems with a dozen or so variables, and methods for demonstrating optimality in larger problems were described as “in development.” This time, we have enabled optimality proofs for large-scale assignment problems.
Assignment Problems: Proving Optimality Without Enumerating All Combinations
What Are Dual Certificates?
An assignment problem involves assigning n jobs one-to-one to n people to minimize the total cost. In QUBO, the variable “person i does job j” becomes a 0/1 variable, resulting in n × n variables. For 100 × 100, this equals 10,000 variables, making exhaustive enumeration impossible.
To address this, the solver generates a lower bound certificate stating “no assignment cost can be lower than this value,” alongside the answer. Lean then only needs to verify this certificate. This is known as a dual certificate. The classical Hungarian algorithm (Kuhn, 1955), well-known for solving assignment problems, also produces this certificate along with the solution.
The certificate consists of values u per person and v per job. If “u_i + v_j ≤ cost c_ij” holds for all persons i and jobs j, then no assignment can cost less than the sum of all u values plus the sum of all v values, since each person and job is used exactly once. If the answer’s cost equals this sum, the answer is optimal. Lean only verifies n × n inequalities and one summation.
Examining a Small Example
Consider the previous example with costs [[4,1,3],[2,0,5],[3,2,2]] for 3 people × 3 jobs. With u = (2, 1, 2) and v = (1, −1, 0), u_i + v_j is less than or equal to the cost for all nine combinations (e.g., for person 1 and job 1: 2 + 1 = 3 ≤ 4). The sum of u is 5, and the sum of v is 0, yielding a lower bound of 5.
On the other hand, assigning job 2 to person 1, job 1 to person 2, and job 3 to person 3 results in a cost of 1 + 2 + 2 = 5, which exactly meets the lower bound. Therefore, this assignment is optimal. There is no need to list and compare all six possible assignments.
Capabilities
- Up to 100 people × 100 jobs (10,000 variables): In experimental measurements, verifying a 100 × 100 case in Lean took approximately 16 seconds (when the verifier was idle). On the service, measuring a 30 × 30 case took 21.6 seconds
- No need to provide an answer: If no answer is provided, poqet finds the optimal assignment and proves its optimality
- Global minimum of QUBO: If the penalty weight A is sufficiently large, it proves that the answer is the global minimum of the entire QUBO (including assignments violating constraints) and that the QUBO minimum always satisfies the constraints
- Errors returned as ✗: If the provided answer is not optimal or violates constraints (e.g., a person has no job or two people share the same job), Lean proves the error and returns ✗
- General theorems proven once: The consistency between the formulation formula and QUBO, the form of penalties, and the sufficiency of penalties are proven once as general theorems independent of the number of people, costs, or A. For each problem, these theorems are simply instantiated with specific numbers
For Max-Cut and General QUBOs
For max-cut and general QUBOs, if a linear lower bound certificate reaches the answer’s value, optimality is proven without enumerating all combinations. In experiments, we successfully proved optimality for a grid graph with 48 vertices. When the certificate does not reach the answer’s value, the difference from the lower bound is shown as “—”, and optimality is not claimed. For portfolio optimization and complex max-cut cases, it often still results in “—”.
Reverse Translation of Formulations
After creating a QUBO, it is difficult to determine solely by looking at the coefficient table whether the coefficients truly represent the intended conditions. While methods for writing conditions as QUBO penalties are summarized in sources such as Lucas (2014), transcription errors and overlooked conditions frequently occur.
When logged in, you can paste your created QUBO and request poqet to “check if it matches the intent.” Poqet will read the following conditions and objectives from the coefficients:
- “Person A must be assigned exactly one job”
- “Exactly 3 stocks must be selected”
- “Minimize the total cost”
Poqet compares the read conditions with the requested ones. If they match, it displays ✓; if they conflict, it marks them with a warning. Conflicts include missing conditions, extra conditions, reversed minimization/maximization goals, or incorrect counts.
Lean 4 is used to prove that the read equations are identical to the original QUBO. Additionally, it shows how much the penalty increases for assignments violating conditions and provides examples of assignments where penalties do not apply despite violating insufficient conditions. If conflicts exist, it proposes corrected QUBO alternatives.
In 15 tested examples (assignment, portfolio, max-cut, etc.), it identified all missing constraints, count discrepancies, and reversed min/max goals. Most proofs took 1–10 seconds, with the largest 8 × 8 assignment taking approximately 19 seconds.
Limitations
- Optimality proofs for large problems are limited to assignment problems and cases where lower bound certificates are achievable: For portfolios and complex max-cuts, it often still results in “—”. In such cases, the difference from the lower bound is shown, and optimality is not claimed
- Some QUBOs cannot be reverse-translated: In QUBOs where objective coefficients are as large as penalty coefficients, conditions may not be readable
- Solving speed remains unchanged: Verification applies only to answers and formulations; it does not accelerate solvers
- It does not verify what happened inside the quantum computer: It verifies only whether the returned answer and formulation are correct
- Human judgment remains for real-world applicability: Reverse translation indicates whether the QUBO matches the “requested conditions,” but whether those conditions themselves align with real-world problems requires human judgment
As before, all proofs are verified using the type checker (kernel) of Lean 4 and the mathematical library Mathlib. We compile and execute calculations, trusting the native_decide shortcut results. We do not use native_decide. Properties that cannot be proven are marked with “—” and their reasons are displayed; we do not claim they are proven. Results include formal verification marks (✓/✗) and .lean files. These features are available on any plan when logged in.
Examples of Requests
- “Solve this 30 people × 30 jobs assignment problem (cost table) and prove its optimality using Lean”
- “For the problem of assigning 3 jobs to 3 people (costs [[4,1,3],[2,0,5],[3,2,2]]), verify using Lean whether assigning job 2 to person 1, job 1 to person 2, and job 3 to person 3 is optimal”
- “Prove using Lean that this partitioning yields the maximum cut for this graph”
- “This QUBO was created with the intent of minimizing risk by selecting 3 stocks from 5. Please verify if it matches the intent”
blueqat poqet is available from blueqat.app.