Module type Solver_intf.PROOF
Type declarations
type formulatype atomtype lemmatype clauseAbstract types for atoms, clauses and theory-specific lemmas
type tLazy type for proof trees. Proofs are persistent objects, and can be extended to proof nodes using functions defined later.
and proof_node={conclusion : clause;The conclusion of the proof
step : step;The reasoning step used to prove the conclusion
}A proof can be expanded into a proof node, which show the first step of the proof.
and step=|Hypothesis of lemmaThe conclusion is a user-provided hypothesis
|AssumptionThe conclusion has been locally assumed by the user
|Lemma of lemmaThe conclusion is a tautology provided by the theory, with associated proof
|Duplicate of t * atom listThe conclusion is obtained by eliminating multiple occurences of the atom in the conclusion of the provided proof.
|Hyper_res of hyper_res_stepThe type of reasoning steps allowed in a proof.
Proof building functions
val prove : clause -> tGiven a clause, return a proof of that clause.
- raises Resolution_error
if it does not succeed.
val prove_unsat : clause -> tGiven a conflict clause
c, returns a proof of the empty clause.- raises Resolution_error
if it does not succeed.
val prove_atom : atom -> t optionGiven an atom
a, returns a proof of the clause[a]ifais true at level 0
val res_of_hyper_res : hyper_res_step -> t * t * atomTurn an hyper resolution step into a resolution step. The conclusion can be deduced by performing a resolution between the conclusions of the two given proofs. The atom on which to perform the resolution is also given.
Proof Nodes
val is_leaf : step -> boolReturns wether the the proof node is a leaf, i.e. an hypothesis, an assumption, or a lemma.
trueif and only ifparentsreturns the empty list.
val expl : step -> stringReturns a short string description for the proof step; for instance
"hypothesis"for aHypothesis(it currently returns the variant name in lowercase).
Proof Manipulation
val expand : t -> proof_nodeReturn the proof step at the root of a given proof.
val fold : ('a -> proof_node -> 'a) -> 'a -> t -> 'afold f acc p, foldfover the proofpand all its node. It is guaranteed thatfis executed exactly once on each proof node in the tree, and that the execution offon a proof node happens after the execution on the parents of the nodes.
Misc
val check_empty_conclusion : t -> unitCheck that the proof's conclusion is the empty clause,
- raises Resolution_error
otherwise
val check : t -> unitCheck the contents of a proof. Mainly for internal use.