From 446185d47831197312d6a95fc78a89ce4bbe6f9c Mon Sep 17 00:00:00 2001 From: Lachnitt Date: Mon, 25 Oct 2021 15:24:04 -0700 Subject: [PATCH] [proofs] Alethe: Translate MODUS_PONENS rule (#7401) Implementation of the translation of MODUS_PONENS rules into the Alethe calculus. Co-authored-by: Haniel Barbosa --- src/proof/alethe/alethe_post_processor.cpp | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/proof/alethe/alethe_post_processor.cpp b/src/proof/alethe/alethe_post_processor.cpp index 6aa6498f6..167b885f4 100644 --- a/src/proof/alethe/alethe_post_processor.cpp +++ b/src/proof/alethe/alethe_post_processor.cpp @@ -885,6 +885,30 @@ bool AletheProofPostprocessCallback::update(Node res, {}, *cdp); } + // ======== Modus ponens + // See proof_rule.h for documentation on the MODUS_PONENS rule. This comment + // uses variable names as introduced there. + // + // (P2:(=> F1 F2)) + // ------------------------ IMPLIES + // (VP1:(cl (not F1) F2)) (P1:F1) + // -------------------------------------------- RESOLUTION + // (cl F2)* + // + // * the corresponding proof node is F2 + case PfRule::MODUS_PONENS: + { + Node vp1 = nm->mkNode(kind::SEXPR, d_cl, children[0].notNode(), res); + + return addAletheStep( + AletheRule::IMPLIES, vp1, vp1, {children[1]}, {}, *cdp) + && addAletheStep(AletheRule::RESOLUTION, + res, + nm->mkNode(kind::SEXPR, d_cl, res), + {vp1, children[0]}, + {}, + *cdp); + } default: { return addAletheStep(AletheRule::UNDEFINED, -- 2.30.2