The satisfiability language and verifier
Lax429075.Satisfiability · concepts/Lax429075/Satisfiability.lean · lax-429075
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
SAT contains precisely the encodings of satisfiable CNF formulas. A certificate is a finite list of truth values, extended by false outside its length. The verifier accepts a paired formula encoding and certificate when every clause is satisfied. Malformed encodings are outside the language.
Concept map
In the paper
- page 1 of this submission's paper
Lean source view on GitHub
| 1 | import Lax429075.Encoding |
| 2 | import Lax434930.Certificates |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: The satisfiability language and verifier |
| 7 | type: definition |
| 8 | --- |
| 9 | SAT contains precisely the encodings of satisfiable CNF formulas. |
| 10 | A certificate is a finite list of truth values, extended by false outside |
| 11 | its length. The verifier accepts a paired formula encoding and certificate |
| 12 | when every clause is satisfied. Malformed encodings are outside the language. |
| 13 | -/ |
| 14 | |
| 15 | namespace Lax429075.Satisfiability |
| 16 | |
| 17 | open CNF Encoding Lax434930.PolynomialTime Lax434930.Certificates |
| 18 | |
| 19 | def assignment (y : Word) : Assignment := fun i => (y[i]?).getD false |
| 20 | |
| 21 | def SAT : Language := {w | ∃ F, encodeCNF F = w ∧ Satisfiable F} |
| 22 | |
| 23 | def Verifier : Language := |
| 24 | {z | ∃ (F : Formula) (y : Word), z = pair (encodeCNF F) y ∧ eval F (assignment y) = true} |
| 25 | |
| 26 | end Lax429075.Satisfiability |
| 27 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments