Induction and first-order assertions #1724
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds some new capabilities to SAW's proof engine.
The first is the ability to automatically generate and use induction principles on bitvector values to prove inductive properties, with a new
prove_by_bv_induction
command. The idea is that the user specifies both the property to prove and also a decreasing bitvector value. The system automatically constructs an appropriate induction schema by reduction to induction on the natural numbers and applies it to the term. For example:Indicates that the user is attempting to prove that 64-bit addition is commutative by induction on the (unsigned) value of
x
. Upon invoking this, the given tactic will need to prove a goal of the following form (which as been cleaned up a bit for readability):This provides the user with an induction hypothesis for all
x_i
values less thanx
.Also in this PR is the ability to assert universally-quantified statements to solvers via the What4 backend. This is helpful for, e.g., actually invoking the induction hypotheses that arise as above, but also for general reasoning up to universal lemmas.