# Can zk-SNARK be used in proofs that are not NP problems?

My understanding of zk SNARK is as follows: through (flattening -> R1CS -> QAP), bind the answer of the original proposition to the solution vector s of QAP, and then because QAP is an NP problem. So if the verification is passed, the verifier can be sure that the prover knows s. And because of the NP problem, the only way for the prover to know s, other than good luck, is to solve the original proposition

But if the original proposition is not NP, the prover may cheat

What if the answer to the original proposition is unique? For example, I want to prove that I know what x is for x-5=0? Of course, in this way, the dimension of QAP may be too small, and the attacker can generate many legitimate s, then if I change the dimension of the equation to be solved to 1 million

• Your example is clearly an NP-problem. The witness is the value of x. Sep 19 at 6:03
• Solving equations is an NP-problem ? Sep 19 at 13:17
• A language is in NP, iff there exists an efficient algorithms, called a verifier, such that for every word in the language (and only those in the language) there exists a short witness, such that the verifier can check that the word is indeed in the language. Ignoring for a moment that what you describe there is a very trivial language, because any equation of that form would be in the language, this is clearly true for the problem you describe. Given the witness 5 I can efficiently verify that 5-5=0. Sep 19 at 13:37
• @StevenWu is the current answer acceptable? Sep 21 at 22:57