Inspecting proofs, typed #
The sort-erased Cvc.Untyped.Proof with formulas typed: a step's view holds its formulas — an
assumption, a pivot, a clause-form input — as Term Bool, and freeAssumptions answers them so.
A term that is not a formula — REFL's term, CONG's application, a rewrite's instantiation —
stays sort-erased, as Solver.Proof.getArguments does: a rule fixes no sort for it, so there is
no index to give it, and Untyped.Term.typeCheck is the way to put one on.
The decoding is the sort-erased one; each formula is then checked to be Boolean, and a step whose
formulas are not falls back to other, so a Term Bool here is never a guess.
A step of a typed proof, taken apart: formulas as Term Bool, other terms sort-erased.
Equations
- s.ProofView pc = Cvc.Proof.View (s.Proof pc) (Cvc.Typed.Term Bool) Cvc.Untyped.Term
Instances For
Decoding a step #
The root step of p, taken apart, with premises standing for its premises.
What view and foldUp are built on: view passes the premises themselves, foldUp what it
computed for them. premises is expected to hold one element per premise, in order, as
getChildren does; a step whose premises do not match its rule's layout is other, and so is one
with a formula that is not Boolean.
Equations
- p.viewWith premises = (Cvc.Proof.View.mapM pure Cvc.Typed.Solver.Proof.formula?✝ pure (p.relax.viewWith premises)).getD (Cvc.Proof.View.other p.getRule premises p.getArguments)
Instances For
The root step of p, taken apart: its rule as a constructor, its premises and arguments.
Equations
- p.view = p.viewWith p.getChildren
Instances For
Traversing #
Folds over the distinct steps of p, depth-first, with early exit, in any monad.
Each step is handed over with its view. pre is called on reaching a step, before its premises,
and can skip them or stop; post on leaving it, once its premises are done, and can stop. Both
default to carrying on.
A step shared by several others is visited once, on the first path that reaches it, unless
revisit is set — which can take exponentially long.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Computes a value for every distinct step of p, bottom-up, and answers the root's.
f is handed each step with its view, the premises of which are the values already computed for
them. It is called once per distinct step, so a sub-proof shared by many steps is computed once,
which is what rebuilding a proof elsewhere wants. To end early, throw, in Except for instance.
Equations
- One or more equations did not get rendered due to their size.
Instances For
for step in p do … visits the distinct steps of p, in the order fold enters them.
break ends the loop.
Equations
- One or more equations did not get rendered due to their size.
Questions about a proof #
The number of distinct steps in p.
Equations
- One or more equations did not get rendered due to their size.
Instances For
How many distinct steps of p apply each rule, rules in the order they are first reached.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The assumptions p leaves open, in the order they are first reached.
These are the formulas of its ASSUME steps that no enclosing SCOPE discharges.
A proof cvc5 answers for the full component leaves none open, its root scope discharging the
assertions. Below that scope, they are the assertions the refutation actually uses.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The distinct steps of p that cvc5 does not justify, in the order they are first reached.
These are its TRUST and TRUST_THEORY_REWRITE steps.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Solver.Proof.fold over several proofs at once, left to right.
A step they share is visited once in all.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Solver.Proof.foldUp over several proofs at once, answering each proof's value, in order.
A step they share is computed once in all.
Equations
- ps.foldUp f = Cvc.Proof.foldUpWith (fun (x : s.Proof pc) => x.getChildren) (fun (q : s.Proof pc) (bs : Array β) => f q (q.viewWith bs)) ps