Uh oh!
There was an error while loading. Please reload this page.
Add predicate elimination as a new preprocessing step - #892
Conversation
…default off)
Implements the technique of Khasidashvili and Korovin (SAT 2016): a predicate P
occurring at most once in every clause is eliminated by replacing S_P and S_~P
with all pairwise resolvents on P. On problems without equality and theories,
resolvents are computed with an mgu and non-unifiable pairs dropped; otherwise
the P-literals are (virtually) flattened, introducing argument disequalities
which are then simplified away by exhaustive equality substitution (this can
introduce equality into a problem previously without it). FMB forces the
equational mode, since its model reconstruction cannot rely on the
Herbrand-interpretation argument justifying the mgu variant.
Elimination steps are gated SAT-VE-style by growth limits on the estimated
clause count |S_P|*|S_~P| - |S_P| - |S_~P|: a per-step tolerance factor over
the current total (-pelst, default 1.05) and a global cap relative to the
original total (-peltl, default 2.0). Syntactic tautologies (complementary
pair, t != t, s = s) and duplicate literals are removed from generated
resolvents, and the actual surviving count feeds back into the budget.
The next predicate to eliminate is by default the one with the smallest
estimated growth (pure predicates thus go first, their clauses being simply
deleted); with -pelr the choice is uniformly random among the admissible
candidates (controlled by random_seed), since the process is not confluent.
With -pels, the clause set is kept forward-inter-subsumed throughout, using a
standalone LiteralSubstitutionTree index (unit literal, or the least matchable
one) plus SATSubsumptionAndResolution; backward subsumption is left as future
work.
Every elimination records a model-repairing definition
P(xs) <=> \/_{D \/ P(ts) in S_P} exists ys. (xs = ts /\ ~D)
via Problem::addEliminatedPredicate (addTrivialPredicate for pure ones), so
both the textual model updates output and FMB model restoration stay correct
(verified via --mode model_check).
Skipped for higher-order/polymorphic inputs (predicates could hide inside
terms, breaking the occurrence counting) and for color-annotated problems.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>The original commit message is preserved in the commit but describes more than what I eventually decided to keep. (I used interactive rebasing and "fixup" to hide my update commits, not sure if for the better.) A TPTP FOL discount comparison is now: Overall, I already reviewed this and as a separate module in preprocessing, this shouldn't cause any problems. |
Uh oh!
There was an error while loading. Please reload this page.
easychair
commented
Aug 6, 2026
via email
This predicate elimination technique was implemented in very early versions
of Vampire, I think as early as in 1999. I am not claiming it is exactly
the same as when K&K published, but it was in the code. The elimination was
done for (1 x n) occurrences or (2 x 2) occurrences because in these two
cases the number of clauses does not increase (1 + n clauses are replaced
by n and 4 clauses replaced by 4.
There is a caveat though: you don't want to have definition introduction
during formula preprocessing following predicate definition elimination,
which effectively undoes the introduction.
A …On Mon, 3 Aug 2026 at 12:15, Martin Suda ***@***.***> wrote:
Implements the technique of Khasidashvili and Korovin (SAT 2016): a
predicate P occurring at most once in every clause is eliminated by
replacing S_P and S_~P with all pairwise resolvents on P. On problems
without equality and theories, resolvents are computed with an mgu and
non-unifiable pairs dropped; otherwise the P-literals are (virtually)
flattened, introducing argument disequalities which are then simplified
away by exhaustive equality substitution (this can introduce equality into
a problem previously without it). FMB forces the equational mode, since its
model reconstruction cannot rely on the Herbrand-interpretation argument
justifying the mgu variant.
Elimination steps are gated SAT-VE-style by growth limits on the estimated
clause count |S_P|*|S_~P| - |S_P| - |S_~P|: a global cap relative to the
original total (-peltl, default 2.0). Syntactic tautologies (complementary
pair, s = s) and duplicate literals are removed from generated resolvents,
and the actual surviving count feeds back into the budget.
The next predicate to eliminate is by default the one with the smallest
estimated growth (pure predicates thus go first, their clauses being simply
deleted)
With -pels, the clause set is kept forward-inter-subsumed throughout,
using a standalone LiteralSubstitutionTree index (unit literal, or the
least matchable one) plus SATSubsumptionAndResolution; backward subsumption
is left as future work.
Every elimination records a model-repairing definition
P(xs) <=> /_{D / P(ts) in S_P} exists ys. (xs = ts /\ ~D)
via Problem::addEliminatedPredicate (addTrivialPredicate for pure ones),
so both the textual model updates output and FMB model restoration stay
correct (verified via --mode model_check).
Skipped for higher-order/polymorphic inputs (predicates could hide inside
terms, breaking the occurrence counting) and for color-annotated problems.
------------------------------
You can view, comment on, or merge this pull request online at:
#892
Commit Summary
- 119524f
<119524f>
Add predicate elimination as a new preprocessing step (option: -pel,
default off)
File Changes
(17 files <https://github.com/vprover/vampire/pull/892/files>)
- *M* Kernel/Inference.cpp
<https://github.com/vprover/vampire/pull/892/files#diff-7a0c538d026b495a9cbe1206aa0bbba871265593b78fc1d3a52d55fe498eb294>
(2)
- *M* Kernel/Inference.hpp
<https://github.com/vprover/vampire/pull/892/files#diff-f39bb9c583a00abd1bef6f2b36cc7619a868f458d3263cb869adb35d77243a78>
(2)
- *M* Makefile
<https://github.com/vprover/vampire/pull/892/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52>
(1)
- *M* Shell/Options.cpp
<https://github.com/vprover/vampire/pull/892/files#diff-1d9a8bda26b884ff0eb2beeb509c437de7f04fc3df40e704901fdd26864a6d8c>
(28)
- *M* Shell/Options.hpp
<https://github.com/vprover/vampire/pull/892/files#diff-7e16f1074b0fafe3d87a886793c87cd07002a361d5b1d8514cd50a1484a79701>
(6)
- *A* Shell/PredicateElimination.cpp
<https://github.com/vprover/vampire/pull/892/files#diff-a8d54d83b75bf96b02661c6a3d689fbe1b0c61e05fd781eec3153b5fb7da28a7>
(694)
- *A* Shell/PredicateElimination.hpp
<https://github.com/vprover/vampire/pull/892/files#diff-332139a4e2276e718fd25f24fcd052393ffffca758b4ffec14b94958a6c9580c>
(132)
- *M* Shell/Preprocess.cpp
<https://github.com/vprover/vampire/pull/892/files#diff-d2ed7f8ad3d8c7844410206bf29266eb04da6c010984f5e9476542d8ba9daa13>
(19)
- *M* Shell/Statistics.cpp
<https://github.com/vprover/vampire/pull/892/files#diff-9101858d03e79d08341f2fc45ca5a11dec594d22500a5bb60793725062bf20b0>
(6)
- *M* Shell/Statistics.hpp
<https://github.com/vprover/vampire/pull/892/files#diff-563a31ccb959ad26a9226c8cd46518c2e72a41bd2f1ab61b505ac6c208922026>
(9)
- *A* UnitTests/tPredicateElimination.cpp
<https://github.com/vprover/vampire/pull/892/files#diff-a52ad388c16723847a2be0531747b78def273df7391f3dcdf5a12a4e7ed7908d>
(374)
- *M* cmake/sources.cmake
<https://github.com/vprover/vampire/pull/892/files#diff-a56d5c701e96a485b37ee07f16c6ba1b8382825fa99731897e4d7fc8290bac5c>
(3)
- *M* samplers/samplerFNT.smp
<https://github.com/vprover/vampire/pull/892/files#diff-9f23b71a064f9b09e948449d2ee7107171713441ccf856023f9e4bf2b4ebbd93>
(9)
- *M* samplers/samplerFOL.smp
<https://github.com/vprover/vampire/pull/892/files#diff-f8bd0658b1a6c4d4d397959eaf14d70dde04710f45686b6e4d1048d3b8b77e58>
(9)
- *M* samplers/samplerHOL.smp
<https://github.com/vprover/vampire/pull/892/files#diff-2ec7c12e7f41dc78f3f54a6cb380a9aeec58ededfb0548fa93dd830bc3fee778>
(9)
- *M* samplers/samplerIND.smp
<https://github.com/vprover/vampire/pull/892/files#diff-dc218f474ed75736f1da8200c10da22b6d25d65893f7a672a8ccd0df581bf6b2>
(9)
- *M* samplers/samplerSMT.smp
<https://github.com/vprover/vampire/pull/892/files#diff-8fda531ec8de3d8dbabb79dd5b8ad22b9ad223b5ac2d123142a30f4159a6b955>
(9)
Patch Links:
- https://github.com/vprover/vampire/pull/892.patch
- https://github.com/vprover/vampire/pull/892.diff
—
Reply to this email directly, view it on GitHub
<#892?email_source=notifications&email_token=ABVY4BPPBLYJCVZOMRWLIP35IBQ57A5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DCOJTGM3TKNRWGOTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVY4BNADEJIRBFSJSQBCDD5IBQ57AVCNFSNUABEKJSXA33TNF2G64TZHMYTQMBWG44TCMB3JFZXG5LFHM2TANBYG4YTQMZYGOQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ABVY4BKGS3SRRUXZ4CCN3XT5IBQ57A5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DCOJTGM3TKNRWGOTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/ABVY4BID2G7MPMGRV3NCY5T5IBQ57A5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DCOJTGM3TKNRWGOTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Replace the hand-written port of ForwardSubsumptionAndResolution (a LiteralSubstitutionTree keyed by the least matchable literal, a two-pass generalization scan, and a SATSubsumptionAndResolution instance) with the ClauseCodeTree path that SaturationAlgorithm uses under -cts. The code tree indexes whole clauses and performs the multi-literal matching itself, so the index-key bookkeeping (_indexedKey), the two passes and the SAT solver all go away; forwardSubsumedOrResolved becomes a ClauseMatcher loop modelled on CodeTreeForwardSubsumptionAndResolution::perform. PredicateElimination no longer depends on SATSubsumption/ at all. higherOrder is fixed to false: Preprocess does not run predicate elimination on higher-order or polymorphic problems. Also drop input tautologies (in addition to the duplicate literals we already removed): the code tree's multi-literal matching assumes no clause carries two equal or opposite literals, an invariant maintained in saturation by running these very simplifications on every new clause. Two behavioural notes: - subsumption is no longer globally preferred over subsumption resolution -- ClauseMatcher returns whichever it reaches first -- but forwardSimplify still iterates to a fixpoint, so the resulting clause set rarely differs; - the empty clause has nothing to match on and is passed through, mirroring the guard indexInsert already had. On a sample of 80 TPTP problems clausified with -pel on -pels on, predicate elimination ran out of time on 16 problems before and only 3 after.
easychair
commented
Aug 10, 2026
via email
This restriction can be relaxed: A predicate P which occurs at most once in every clause (is "non-self-referential") For example, one can eliminate
p(s) \/ p(t) \/ C
against
p(r) \/ D
The restriction should be
1. Either all positive occurrences of p occur at most once in every
clause or all negative occurrences occur at most once in every clause
2. There is no clause with both positive and negative occurrences of p
Andrei …On Mon, 10 Aug 2026 at 09:56, Martin Suda ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Shell/PredicateElimination.hpp
<#892 (comment)>:
> +
+namespace Shell {
+
+using namespace Kernel;
+
+/**
+ * Predicate elimination for preprocessing of clausified problems,
+ * after Khasidashvili and Korovin: "Predicate Elimination for Preprocessing
+ * in First-Order Theorem Proving" (SAT 2016).
+ *
+ * A predicate P which occurs at most once in every clause (is "non-self-referential")
+ * can be eliminated by replacing the clauses S_P and S_~P (those containing P positively,
+ * respectively, negatively) by all the pairwise resolvents on P. In the presence
+ * of equality (or theories), the resolvents need to be computed via (virtual) flattening
+ * of the P-literals, i.e. C \/ P(ts) and D \/ ~P(ss) yield C \/ D' \/ t1 != s1' \/ ... \/ tn != sn'
+ * (with D renamed apart), simplified by the equality substitution rule
Yes, fixing the comment.
—
Reply to this email directly, view it on GitHub
<#892?email_source=notifications&email_token=ABVY4BLKCNBNEGXX7GPTU3L5JF53VA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIOBZGQ3TAMZUHA2KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#discussion_r3747623841>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVY4BLCYN4QNWA56LYGWDL5JF53VAVCNFSNUABEKJSXA33TNF2G64TZHMYTQMBWG44TCMB3JFZXG5LFHM2TANBYG4YTQMZYGOQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ABVY4BJG3R7KH6HYOB3H4ZD5JF53VA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIOBZGQ3TAMZUHA2KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/ABVY4BIW76IVBTOMB6KZUXD5JF53VA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIOBZGQ3TAMZUHA2KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you commented.Message ID:
***@***.***>
|
MichaelRawson
left a comment
There was a problem hiding this comment.
Cool! I wondered if something similar could be achieved during saturation by literal selection - but it's not the same thing at all.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Implements the technique of Khasidashvili and Korovin (SAT 2016): a predicate P occurring at most once in every clause is eliminated by replacing S_P and S_~P with all pairwise resolvents on P. On problems without equality and theories, resolvents are computed with an mgu and non-unifiable pairs dropped; otherwise the P-literals are (virtually) flattened, introducing argument disequalities which are then simplified away by exhaustive equality substitution (this can introduce equality into a problem previously without it). FMB forces the equational mode, since its model reconstruction cannot rely on the Herbrand-interpretation argument justifying the mgu variant.
Elimination steps are gated SAT-VE-style by growth limits on the estimated clause count |S_P|*|S_~P| - |S_P| - |S_~P|: a global cap relative to the original total (-peltl, default 2.0). Syntactic tautologies (complementary pair, s = s) and duplicate literals are removed from generated resolvents, and the actual surviving count feeds back into the budget.
The next predicate to eliminate is by default the one with the smallest estimated growth (pure predicates thus go first, their clauses being simply deleted)
With -pels, the clause set is kept forward-inter-subsumed throughout, using a standalone LiteralSubstitutionTree index (unit literal, or the least matchable one) plus SATSubsumptionAndResolution; backward subsumption is left as future work.
Every elimination records a model-repairing definition
P(xs) <=> /_{D / P(ts) in S_P} exists ys. (xs = ts /\ ~D)
via Problem::addEliminatedPredicate (addTrivialPredicate for pure ones), so both the textual model updates output and FMB model restoration stay correct (verified via --mode model_check).
Skipped for higher-order/polymorphic inputs (predicates could hide inside terms, breaking the occurrence counting) and for color-annotated problems.