zenmili.blogg.se

Coq tutorial
Coq tutorial







I'm a big fan of Z3 clearly, but there are entire realms of human thought that can be clearly encoded into Coq that basically cannot in Z3. The logic of Coq is vastly more expressive and it's proof process is vastly more controllable.Īll of this comes at the cost of level of expertise required and ease and scale of automation. They actually have different enough use cases and abilities that it is rare to consider them as competitors. Coq is the better choice for almost anything more complex than that. Z3 is the better choice for large scale but conceptually simple queries or proofs, such as a theorem just involving linear inequalities, arrays, Ands, and Ors, or for solving constraint problems. In principle Coq could use Z3 as a plugin but the other direction would make no sense at the moment. What may be more surprising to people who have taken introductory tutorials is that there is significant automation in Coq, it just takes more effort and expertise than Z3's. Coq also basically requires IDE support of sorts, as the proving process is a kind of REPL converation with the system.Ĭoq is vastly more expressive than Z3, so it makes sense that anything expressible in Z3 is expressible in Coq. On top of that there are scripting system like Ltac or plugins for specialized solvers. But around that is built something called the tactic system, which slightly or signifcantly automates proof steps.

coq tutorial

At it's core it has a dependently typed functional programming language and specification language called Gallina. Z3 is more of a solver than a platform.Ĭoq has many, many moving parts.

coq tutorial

Interactive provers tend to accumulate varying degrees of automation.Ĭoq is a project at the scale of other niche programming languages. Coq is usually called an interactive theorem prover, not an automated prover.









Coq tutorial