From: Lachnitt Date: Tue, 26 Oct 2021 14:00:55 +0000 (-0700) Subject: [proofs] Alethe: Translate AND_INTRO rule (#7405) X-Git-Tag: cvc5-1.0.0~970 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8995119775293b5b3e618701d2e4e318f18e5fed;p=cvc5.git [proofs] Alethe: Translate AND_INTRO rule (#7405) Implementation of the translation of EQ_RESOLVE rules into the Alethe calculus. Co-authored-by: Haniel Barbosa --- diff --git a/src/proof/alethe/alethe_post_processor.cpp b/src/proof/alethe/alethe_post_processor.cpp index ae6705025..8060eb697 100644 --- a/src/proof/alethe/alethe_post_processor.cpp +++ b/src/proof/alethe/alethe_post_processor.cpp @@ -960,6 +960,39 @@ bool AletheProofPostprocessCallback::update(Node res, {}, *cdp); } + // ======== And introduction + // See proof_rule.h for documentation on the AND_INTRO rule. This + // comment uses variable names as introduced there. + // + // + // ----- AND_NEG + // VP1 P1 ... Pn + // -------------------------- RESOLUTION + // (cl (and F1 ... Fn))* + // + // VP1:(cl (and F1 ... Fn) (not F1) ... (not Fn)) + // + // * the corresponding proof node is (and F1 ... Fn) + case PfRule::AND_INTRO: + { + std::vector neg_Nodes = {d_cl,res}; + for (size_t i = 0, size = children.size(); i < size; i++) + { + neg_Nodes.push_back(children[i].notNode()); + } + Node vp1 = nm->mkNode(kind::SEXPR, neg_Nodes); + + std::vector new_children = {vp1}; + new_children.insert(new_children.end(), children.begin(), children.end()); + + return addAletheStep(AletheRule::AND_NEG, vp1, vp1, {}, {}, *cdp) + && addAletheStep(AletheRule::RESOLUTION, + res, + nm->mkNode(kind::SEXPR, d_cl, res), + new_children, + {}, + *cdp); + } default: { return addAletheStep(AletheRule::UNDEFINED,