SAT-INSPIRED HIGHER-ORDER ELIMINATIONS

. We generalize several propositional preprocessing techniques to higher-order logic, building on existing ﬁrst-order generalizations. These techniques eliminate literals, clauses, or predicate symbols from the problem, with the aim of making it more amenable to automatic proof search. We also introduce a new technique, which we call quasipure literal elimination , that strictly subsumes pure literal elimination. The new techniques are implemented in the Zipperposition theorem prover. Our evaluation shows that they sometimes help prove problems originating from Isabelle formalizations and the TPTP library.


Introduction
Processing techniques are an important optimization in SAT (Boolean satisfiability) solving.Following up on early work in the 1990s [GO92,Ohl96], there has recently been renewed interest in adapting propositional techniques to first-order logic [KK16, KSS + 17, VBH23], resulting in a noticeable increase of the success rate of automatic theorem provers based on superposition [BG94].
In this article, we consider the extension of four main classes of SAT preprocessing techniques to classical higher-order logic.These extensions are called hidden-literal-based elimination (Section 3), predicate elimination (Section 4), blocked clause elimination (Section 5), and quasipure literal elimination (Section 6).Elimination techniques make the problem simpler and hence possibly more amenable to automatic proof search.The techniques can be used either to preprocess the problem or to transform the prover's current clause set during proof search, a use that is sometimes called inprocessing.
An advantage of preprocessing is its greater generality: Preprocessing techniques can be used in tandem with any higher-order proof calculus, as long as the calculus is built around a notion of clause.We assume that a clausifier is run as a preprocessor and introduces some clausal structure.The more clausal structure it produces, the more effective the elimination techniques can be.Examples of provers compatible with the techniques are λE [VBS23], Leo-III [SB18], Vampire [BR20], and Zipperposition [BBTV21].
The set is clearly inconsistent because the {y → q, z → a} instance of the first clause is inconsistent with the second and third clauses.
Under some basic conditions, a clause C containing a literal L is said to be "blocked" if all of its so-called binary flat L-resolvents with clauses from N \ {C} are tautologies.(We will see in Section 5 what this means exactly.)The fourth clause is blocked by its literal p a because its only binary flat (p a)-resolvent, with the fifth clause, is the tautology a ≈ z ∨ z ≈ a.Similarly, the fifth clause is blocked by its literal ¬ p z because its only binary flat (¬ p z)-resolvent, with the fourth clause, is the same tautology.Either or both clauses can be removed without from N losing unsatisfiability.
All the techniques are implemented in the higher-order prover Zipperposition (Section 7), allowing us to measure their effectiveness on benchmarks originating from Isabelle [NPW02] formalizations and the TPTP library [Sut17] (Section 8).The raw experimental data are available online. 1  We will mention closely related research in the relevant sections.We point to Vukmirović et al. [VBH23,Section 8] for a more detailed discussion of related work.

Clausal Higher-Order Logic
The logic we use as a basis of our work is a rank-1 polymorphic higher-order logic with general semantics and both functional and Boolean extensionality.It corresponds essentially to the logic embodied by the TPTP TH1 format [KSR16], including Hilbert choice.Our conventions largely follow those used by Bentkamp, Blanchette, Tourret, and Vukmirović to define λ-superposition [BBTV21].Our presentation is based on theirs.
In higher-order logic, formulas are simply terms of Boolean type.Briefly, our version of the logic also has a clausal outer structure, as found in several higher-order provers.Clauses are then built around terms as an extra layer of structure.We write formula-level Boolean operators in bold (e.g., to distinguish them from clause-level operators.
2.1.Syntax.Let us define the syntax of our logic more precisely, starting with types.
Throughout this article, we use the notation #a n , or simply #a , to denote an n-tuple (a 1 , . . ., a n ).Sometimes we might also write #a i , meaning (a i1 , . . ., a in ), to be distinguished from #a i = (a 1 , . . ., a i ).
We start by fixing an infinite set V ty of type variables.A set Σ ty of type constructors with associated arities is a type signature.We require the presence of a nullary type constructor o, for Booleans, and a binary type constructor → for functions.We let α range over type variables and κ over type constructors.A type, ranged over by τ and υ, is defined inductively to be either a variable α ∈ V ty or an expression κ( #τ n ), where κ is an n-ary type constructor and #τ in an n-tuple of types.If n = 0, we write κ instead of κ().In addition, expressions with κ = → are written in infix notation, as τ 1 → τ 2 .A type declaration is an expression Π #α m .τ , where #α consists of distinct type variables and all the type variables occurring in τ belong to #α.If m = 0, we write τ instead of Π. τ .Next, we fix a type signature Σ ty and a set V of term variables with associated types.We require that there are infinitely many variables of each type.A term signature is a set Σ of symbols a, b, c, f, p, q, . . ., each associated with a type declaration.(Often, symbols are called "constants" in the higher-order logic literature.)We write f : Π #α.τ to indicate that symbol f has type signature Π #α.τ .We require the presence in Σ of the logical symbols with their usual type declarations (e.g., Πα. α → α → o for ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈).We also assume the presence of the Hilbert choice operator We will generally leave the signature implicit, assuming some fixed signature Σ.
Polymorphic higher-order logic does not distinguish between function and predicate symbols.Nonetheless, it will be convenient to refer to symbols that can yield Boolean values as predicate symbols.Specifically, we will call a symbol with type declaration p : Π #α.τ that admits an instance of the form p #τ : We now introduce three notions of terms: raw λ-terms, λ-terms, and actual terms.The λ-terms are α-equivalence classes of raw λ-terms, and the actual terms are βη-equivalence classes of λ-terms.
More precisely, the raw λ-terms are defined inductively as follows: -If x is a variable of type τ and t is a term of type υ, then the λ-abstraction λx.t is a raw λ-term of type τ → υ. -If s is a term of type τ → υ and t is a term of type τ , then the application s t is a raw λ-term of type υ.
Abusing notation, we also write t #u n for t u 1 . . .u n .We assume standard notions of An alternative to the η-short β-normal form is the η-long β-normal form, in which unapplied functions are η-expanded rather than η-reduced (i.e., η-reduction is applied in reverse on these).The techniques presented in this article work unchanged in such a setting.Two terms t, u are unifiable if there exists a substitution σ such that tσ = uσ.For example, a and y a are unifiable by taking y := λx.x. (This works because terms are equal up to β-reduction.)Unification of higher-order terms is undecidable.Types, however, are isomorphic to first-order terms, and hence their unification problem is decidable.Moreover, if a unifier exists, then a most general unifier exists (up to the naming of variables).For example, the most general unifier for the unification problem pair(α, nat) Finally, we define literals and clauses on top of terms.An atom is an equation s ≈ t corresponding to an unordered pair {s, t}.(We reserve = for syntactic equality of terms.)A literal is an equation s ≈ t or a disequation s ≈ t.Given a predicate symbol p, the literal Note that it is possible in higher-order logic for a non-p-literal to contain p, or even for the arguments #t of a p-literal to contain p.Given a literal L, we write ¬ L to denote its complement, with ¬ ¬ L = L.
A clause C is a finite multiset of literals, written as L 1 ∨ • • • ∨ L n and interpreted disjunctively.Clauses are often defined as sets of literals, but multisets are better behaved with respect to substitution: If C has n literals, so has Cσ regardless of whether σ unifies some of C's literals.The type and term variables contained in a clause are implicitly quantified universally.(Within terms, can be used to quantify over term variables.)A type, term, or clause is monomorphic if it contains no type variables.A term or clause is closed if it contains no free term variables.
It is sometimes useful to encode a clause C as a formula.The formula [C] representing the clause C is defined by replacing the nonbold symbols ≈, ≈, and ∨ by their bold counterparts This formula is uniquely defined up to the orientation of the equations and the order of the literals, neither of which affects the semantics.2.2.Semantics.A type interpretation I ty = (U, J ty ) consists of two components.The universe U is a collection of nonempty sets, the domains.We require U to contain the domain {0, 1}, where 0 represents falsehood and 1 represents truth.The function J ty associates with each n-ary type constructor κ a function J ty (κ) : U n → U, with the requirements that J ty (o) = {0, 1} and that the set A type valuation ξ is a function that maps every type variable to a domain.
The denotation of a type in a type interpretation I ty under a type valuation ξ is defined by the recursive equations α Ity,ξ = ξ(α) and κ( #τ ) Ity,ξ = J ty (κ)( #τ Ity,ξ ).For monomorphic types τ , the denotation does not depend on the valuation ξ, allowing us to write τ Ity instead of τ Ity,ξ .
A type valuation ξ can be extended to be a valuation by additionally assigning an element ξ(x) ∈ τ Ity,ξ to each variable x : τ .We will sometimes use partial functions as valuations if the values outside the function's domain are irrelevant.An interpretation function J for a type interpretation I ty associates with each symbol f : Π #α m .τ and domain tuple We require that the logical symbols are interpreted in the usual way in terms of 0 and 1.For example, the signature, every type τ must be interpreted by a nonempty set, for ) to be defined.We require the comprehension principle to hold: Every function designated by a λ-abstraction is contained in the domain associated with its type.We initially allow λabstractions to designate arbitrary elements of the domain.This enables us to define the denotation of a term.Then we impose restrictions to rule out undesirable λ-abstraction designations.
A λ-designation function L for a type interpretation I ty is a function that maps a valuation ξ and a λ-abstraction of type τ to an element of τ Ity,ξ .An interpretation I = (I ty , J, L) combines a type interpretation, an interpretation function, and a λ-designation function.
For an interpretation I and a valuation ξ, the denotation of a term is defined recursively as x I,ξ = ξ(x), f #τ I,ξ = J(f, #τ Ity,ξ ), s t I,ξ = s I,ξ ( t I,ξ ), and λx.t I,ξ = L(ξ, λx.t).For monomorphic closed terms t, the denotation does not depend on the valuation ξ, allowing us to write t I instead of t I,ξ .
An interpretation I is proper if λx : υ. t I,ξ (v) = t I,ξ[x →v] for every λ-abstraction λx : υ. t, every valuation ξ, and every value v ∈ υ Ity,ξ .We will assume throughout that all interpretations are proper and will construct only proper interpretations.If a type interpretation I ty and an interpretation function J can be extended by a λ-designation function L to an interpretation (I ty , J, L), then this L is unique [Fit02,Proposition 2.18].
Given an interpretation I and a valuation ξ, an equation s ≈ t is true if s I,ξ and t I,ξ are equal and it is false otherwise.A disequation s ≈ t is true if s ≈ t is false.A clause is true if at least one of its literals is true.A clause set is true if all the clauses it contains are true.An interpretation I is a model of a clause set N , written I |= N , if N is true in I for every valuation ξ.
A clause C is a tautology if I |= {C} for every interpretation I.It is satisfiable if there exists an interpretation I such that I |= {C}; otherwise, it is unsatisfiable.Notice that these concepts are defined with respect to general, and not necessarily standard, interpretations.
It is sometimes convenient to assume that the interpretation of monomorphic types is injective on types-that is, for all monomorphic τ, υ, if τ Ity = υ Ity , then τ = υ.This assumption is reasonable because the elements of J ty (κ), where κ / ∈ {o, →}, are immaterial and can be renamed if desired and because the set-theoretic representation of functions, as nonempty sets of pairs, preserves this property.(The sets of pairs are nonempty thanks to the presence of the signature, as noted above.)We call this principle the distinct domain assumption.

Hidden-Literal-Based Elimination
In propositional logic [HJB11] and clausal first-order logic [VBH23], a hidden literal for a literal L and a clause set N is a literal that can be added or removed from any clause containing L without affecting its truth value in models of N .Several elimination techniques are based on hidden literals; in particular, hidden literal elimination removes hidden literals from clauses in which they occur.The first-order definitions of hidden literals, hidden tautologies, hidden literal elimination, hidden tautology elimination, failed literal elimination, hidden tautology reduction, and failed literal reduction [VBH23] work verbatim in clausal higher-order logic, for both preprocessing and inprocessing.All the techniques preserve satisfiability and unsatisfiability.We call them collectively hidden-literal-based elimination (HLBE).

Predicate Elimination
Predicate elimination (PE) [GO92, KK16, VBH23] is a set of techniques that remove all occurrences of some predicate symbol in a first-order problem by resolving clauses that contain it.Predicate elimination generalizes variable elimination in propositional logic [SP04,CS00].In this section, we generalize two specific techniques to higher-order logic.
, where σ is the most general unifier of #τ ?= #υ .The flat resolvent is not defined if #τ and #υ are not unifiable.
Flat resolvents were already present in the first-order setting [GO92, KK16,VBH23].They are reminiscent of Huet's approach to unification in higher-order resolution [Hue73], which is also used by Benzmüller and colleagues [BK98,SB21].
Definition 4.5.Let M, N be clause sets and p be a singular predicate for M .Let be the following relation on clause set pairs and clause sets: For finite sets M, N , the resolved set N is reached in a finite number of steps, and it is unique up to variable renaming.The argument is as for first-order logic [VBH23, Lemma 4.4].Note that the result may contain deep occurrences of p if the initial set N contains such occurrences.
Definition 4.6.Let N be a clause set and p be a singular predicate symbol for N. Let N + p consist of all clauses belonging to N that contain a positive p-literal, let N − p consist of all clauses belonging to N that contain a negative p-literal, let N p = N + p ∪ N − p , and let Definition 4.7.Let N be a finite clause set that is polymorphism-safe for p and p be a singular predicate for N. Singular predicate elimination (SPE) of p in N replaces N by the . SPE preserves satisfiability: The only clauses added are flat resolvents, and flat resolution is clearly sound.In first-order logic, SPE also preserves unsatisfiability [KK16, Theorem 1].With a small restriction on polymorphism, this result extends to polymorphic higher-order logic.Also note that deep occurrences of p are not possible in the result, because of the requirement that p be a singular predicate for the input N.
Example 4.8.Thanks to the use of flat resolvents, the unification work is left to the proof calculus.This is convenient, because higher-order unification is undecidable and hence, in general, could not be done exhaustively in a preprocessing technique.
Consider the clause set N = {p z z ∨ q z, ¬ p (f (y a)) (y (f a)), ¬ q b}.Applying SPE to p transforms N into N = {f (y a) ≈ z ∨ y (f a) ≈ z ∨ q z, ¬ q b}.It is then the calculus's task to enumerate values for z that solve the unification problem z , this enumeration would be the responsibility of the ERes inference rule.The first clause in N could be simplified to y (f a) ≈ f (y a) ∨ q (f (y a)), by eliminating z.Then ERes would unify the two sides of the first literal, producing one conclusion per unifier.Since there are infinitely many unifiers, this would lead to infinitely many conclusions: q (f a), q (f (f a)), q (f (f (f a))), . . .Using dovetailing, this infinite enumeration can be interwoven with other inferences and other activities of the prover [VBB + 22, Section 6].
Example 4.9.Consider the satisfiable clause set Note that although p is absent from N , a predicate that meets its specification can be created based on the first clause of N , in which the p-literal is positive.This predicate is λx.
In general, we would use all the clauses in which the p-literal is positive and ignore the other clauses.(Dually, we could have defined the predicate in terms of the clauses in which the p-literal is negative.)This predicate makes p true only when it must be true to satisfy the first clause-namely, when the clause's non-p-literal is false.
If we replace p with this λ-abstraction in N and β-reduce, we obtain the satisfiable set Nothing essential is lost by eliminating p-if we need p, we can use the λ-abstraction.This idea is the key to the proof of Theorem 4.11 below.
Example 4.10.Consider the clause set N = {¬ y a, p a}.It is easy to see that the set is unsatisfiable, by taking y := p. SPE of p transforms N into the set N = {¬ y a}.Although y a is unifiable with the literal p a, the first clause is left unchanged by SPE.Like N , N is unsatisfiable.We cannot witness unsatisfiability by taking y := p.We can take y := λx.x≈a, simulating p on the input a.Alternatively, we can take y := λx. .Indeed, we could have taken either instantiation for y to show that N is unsatisfiable, without exploiting the presence of p a.
Example 4.10 corroborates our choice of ignoring literals headed by a variable in the definition of SPE, focusing instead on p-literals.The intuition is that often p is unnecessary to have unsatisfiability, and when it is necessary it can be simulated by a λ-abstraction that does not contain it.
Theorem 4.11.Let N be a finite clause set that is polymorphism-safe for p and p be a singular predicate symbol for N .Let N be the result of applying SPE of p to N .Then N is satisfiable if and only if N is satisfiable.
Proof.The "if" direction follows immediately from the soundness of flat resolution.For the other direction, our strategy is inspired by Khasidashvili and Korovin [KK16, Theorem 1].
Let I = (I ty , J, L) be a model of N = N p ∪ (N + p p N − p ), with I ty = (U, J ty ).We assume without loss of generality that this model satisfies the distinct domain assumption (Section 2).We will define a new interpretation I that extends I with a semantics for p and show that I is a model of To achieve this, we will separately show that (1) The interpretation I = (I ty , J , L ) we construct is identical to I except that J is extended so that J (p, #-D) and L are defined as follows, by mutual recursion.We start with J (p, #-D).We construct a suitable interpretation for p as a curried n-ary predicate.Let #τ be monomorphic types such that #τ Ity = #-D.By the distinct domain assumption, these types are unique if they exists.If no such types exists, let This predicate is guaranteed to exist in the interpretation of the type of p #τ thanks to the comprehension principle (Section 2).The predicate plays the role of a placeholder for impossible interpretations of p; its value is irrelevant.
In the case where the types #τ exist, we will construct a right-hand side for J (p, #-D) using the same idea as in Example 4.9.To cope with polymorphism, we will filter out any clauses whose p's type arguments cannot be instantiated to #τ and instantiate the remaining clauses.
More precisely, let M be the smallest set such that for each clause Notice that the polymorphism-safety hypothesis ensures that Cσ is monomorphic and uniquely specified.This is desirable because we want to assign a unique right-hand side to J (p, #-D).
We now define a term u whose interpretation u I = u I will give us the right-hand side.Let #x n be a tuple of fresh variables.With each clause p #τ #t n ∨ C contained in M and whose free variables are #y , associate the formula (Recall from Section 2 that [C ] denotes a formula representing the clause C .)Let ϕ 1 , . . ., ϕ k be all such formulas, and let Then we take u = λ #x .ϕ.This choice of u will ensure that I satisfies every clause in N + p , and thanks to the comprehension principle, the predicate denoted by u is guaranteed to exist in the interpretation of p #τ 's type.To finish the definition of I , we must specify L .Given a term t, let t[u/p] denote the variant of the term t in which all occurrences of p are replaced by the term u as defined above (for suitable types #τ ).For all valuations ξ and λ-abstractions λx : υ. t, we define L (ξ, λx.t) as the function that maps each v ∈ υ Ity,ξ to t[u/p] I,ξ[x →v] .This function exists in the domain associated with the λ-abstraction's type because I obeys the comprehension principle.Moreover, because t[u/p] replaces p by a term with the same semantics according to I , the interpretation I is proper.
We are now ready to tackle the three conditions we need to prove.To prove (1), we start from I |= N p and show I |= N p .More precisely, we must show that N p I ,ξ is true for every valuation ξ.This is obvious because I and I only differ on p, which does not occur in N p .
To prove (2), we show that I |= N + p holds by construction of I .More precisely, we must show that N + p I ,ξ is true for every valuation ξ.
If C I ,ξ is true, then clearly C I ,ξ is true.Otherwise, the literal p #υ #t is true, because the disjunct ψ is true.This can be seen by taking the values of #y under ξ as the existential 9:10 witnesses.The arguments #t in p #υ #t passed for #x match those expected by the equalities Suppose the displayed disjunct is one of those that makes the whole big disjunction true.This means that there exists a clause , and C I ,ξ is false, where #τ is unifiable with #υ .Let σ be the most general unifier of #τ

Defined Predicate Elimination.
The next technique we generalize from first-order logic to higher-order logic is called defined predicate elimination.It generalizes, in turn, the propositional technique of elimination by substitution [EB05].
Given a clause set N , the basic idea is that the set N p of clauses containing p is partitioned between a definition set (or "gate") G and the remaining clauses R. The definition set fully characterizes p for all input in a unique way and can be seen as constituting a definition of the form p #- where the variables #x are distinct, p does not occur in ϕ, and the variables in ϕ are all among #x .Because of clausification, G will usually consist of multiple clauses that together are equivalent to p #- We define definition sets largely as in monomorphic first-order logic, but with additional requirements on the type arguments and type variables.Intuitively, conditions 1 and 2 check that the definition set looks like the clausification of a definition; conditions 3, 4, and 5 check that the definition is not overconstrained (e.g., p a is not required to be both true and false); and condition 6 checks that it is not underconstrained (e.g., p a is not unspecified).Definition 4.13.Given a definition set G for p, its associated definition is the formula Note that our notion of definition set ensures that in Definition 4.13 the type variables #α are distinct, the term variables #x are distinct, p does not occur in ϕ, the type variables in ϕ are all among #α, and the variables in ϕ are all among #x .
Example 4.14.For the formula r y, clausification would produce the clause set {¬ p x y ∨ q x ∨ r y, p x y ∨ ¬ q x, p x y ∨ ¬ r y}, which qualifies as a definition set for p.The associated definition is Lemma 4.15.Let G be a definition set for p.Then G is equivalent to the definition Proof.We will show that under every valuation ξ, We need to show that I |= G.We will first prove the case of clauses in G where the p-literal is positive; then we will consider the negative case.Let we have that ϕ is false.This means that all of its disjuncts are false and hence that C is true, meaning that C is true.For the remaining case, let Once a definition is identified, it is expanded in the remaining clauses R. For p-literals in R, this is achieved as in first-order logic using flat resolution.For deeper occurrences of p #τ in R, which may arise in higher-order logic, this is achieved by replacing them by the λ-abstraction λ #x .ϕ{ #α → #τ }.An alternative would be to replace all occurrences of p #τ and not only deep occurrences, but this would leave more work for the clausifier.Definition 4.16.Let N be a clause set and p be a predicate symbol.Let G ⊆ N be a definition set for p with associated definition p #- The key result is that DPE preserves satisfiability and unsatisfiability.The proof builds on three lemmas.
Thus, in any model of G, p #α has the same interpretation as λ #x .ϕ.In particular, this applies to their instances: p #τ has the same interpretation as λ #x .ϕ{ #α → #τ }.
Lemma  Like SPE and DPE (Theorems 4.11 and 4.20), PPE can be used as a preprocessor without affecting satisfiability.As for inprocessing, Vukmirović et al. [VBH23] explained that under a reasonable condition, the first-order version of PPE can be used at any point during proof search in a superposition prover without compromising refutational completeness.Inspection of the proofs reveals that the same applies to higher-order PPE and λ-superposition.

Blocked Clause Elimination
In propositional logic, a powerful technique for simplifying a clause set is to identify and remove so-called blocked clauses.These are clauses whose resolvents with other clauses in the set are all tautologies.Removing such clauses preserves unsatisfiability.Blocked clause elimination has been extended to first-order logic with equality by Kiesl et al. [KSS + 17].They call their key notion "equality-blocked clauses," but since we consider only a logic with equality, we simply call these clauses "blocked."

Blocked clause elimination has been shown by Vukmirović et al. [VBH23, Section 5]
to be incompatible with the saturation loop of a superposition prover.Nevertheless, the technique can still be used effectively as a preprocessor, or even as an inprocessing technique within the prover's saturation loop at the cost of potential divergence on some unsatisfiable problems.
Our extension to polymorphic higher-order logic is based on a slightly weaker definition of blocked clause than Kiesl et al.We were unsuccessful at showing that a generalization of blocked clause elimination based on their concept preserves unsatisfiability with respect to general interpretations.The notion we propose allows the generalization.We already see a first key difference with Keisl et al.: They consider n-ary flat resolvents, whereas we need to consider only binary resolvents, for reasons illustrated below (Example 5.4).Another, more superficial difference is that our definition is generalized to polymorphic higher-order logic.Definition 5.2.Let L = (¬) p #τ #s be a predicate literal, C = L ∨ C be a clause, and N be a clause set.Let N consist of all clauses from N \ {C} with their type and term variables renamed so that N shares no variables with C. The clause C is blocked by L in the set N if the following conditions are met: (1) C is polymorphism-safe for L; (2) N contains no deep occurrences of p; (3) C contains no p-literals with the same polarity as L; and (4) all binary flat L-resolvents between C and clauses in N are tautologies.
We now see another key difference with Keisl et al.: They have no restriction corresponding to condition 3 of Definition 5.2.In this respect, our notion is less powerful than theirs.(They also have no restriction corresponding to conditions 1 and 2, but these conditions are trivially satisfied in a monomorphic first-order setting.)As a result, their notion and our notion of blocked clause are incomparable in strength.

Example 5.3. This example is based on Keisl et al. [KSS
and take N = {C, p ∨ ¬ q, ¬ q ∨ r} as the clause set.The clause C is blocked by ¬ p in N according to Definition 5.2 because the only resolvent of C on ¬ p is the tautology q ∨ ¬ q resulting from resolution against p ∨ ¬ q.The clause C is also blocked according to the definition in Kiesl et al.Definition 5.6.Let I = (I ty , J, L) be an interpretation and L ∨ C be a clause that is polymorphism-safe for L and where L = (¬) p #τ #s n .Let #y be the tuple of all free variables in L ∨ C and #x n be a tuple of fresh variables.The interpretation I = (I ty , J , L ) obtained by flipping the truth value of L in L ∨ C is defined as follows by mutual recursion.We let J be the function defined as follows: where ϕ is defined by Moreover, for all valuations ξ and λ-abstractions λx : υ. t, we let L (ξ, λx.t) be the function that maps each v ∈ υ Ity,ξ to t This definition introduces a well-formed interpretation.Because L ∨ C is polymorphismsafe for L, the right-hand side λ #x n .ϕ I,ξ of J (f, #-D) is uniquely defined.Moreover, the comprehension principle guarantees that the corresponding predicate exists in the interpretation of p's type.Similarly, the function that provides the interpretation for a λ-abstraction λx.t exists in the domain associated with the λ-abstraction's type.This is because the semantics in I of any occurrences of p in t corresponds to the semantics in I of λ #x n .ϕ, and I is a well-formed interpretation.
The intuition behind I is that whenever the clause L∨C is blocked and I |= N \{L∨C }, we have I |= N .Since adding the blocked clause preserves satisfiability, removing it preserves unsatisfiability.
Example 5.7.We will try to justify the definition of ϕ above with an example.Consider the clause set {p a, ¬ p z ∨ z ≈ a ∨ z ≈ b} and an interpretation I that maps p to the uniformly false predicate.Clearly, I is not a model of the first clause, p a. The interpretation I obtained by flipping the truth value of the literal p a in the first clause interprets p in the same way as In other words, I makes p true for arguments interpreted as equal to a and false otherwise.Intuitively, the interpretation I is flipped to satisfy the clause p a.
Next, assume instead that I interprets p as the uniformly true predicate, and consider the interpretation I obtained by flipping the truth value of ¬ p z in the second clause, ¬ p z ∨ z ≈ a ∨ z ≈ b.Then I interprets p in the same way as I interprets This means that I makes p true for arguments interpreted as equal to a or b and false otherwise.Intuitively, the interpretation I is flipped to satisfy the clause ¬ p z ∨ z ≈ a ∨ z ≈ b; whenever z ≈ a and z ≈ b, we have ¬ p z. Assuming that I |= D, we will show that D I ,ξ is true for every valuation ξ.
Let L be a literal of D of opposite polarity to L, whose atom is p #υ #t , and such that, for each j, L I,ξ is true and L I ,ξ is false.Intuitively, L is a literal whose truth value goes from true in I to false in I .We distinguish two cases: The case where such a literal L exists and the case where it does not.
Case where L does not exist: If D contains literals L of opposite polarity to L, then either L I,ξ is false and then the truth value of L I ,ξ is irrelevant or L I,ξ is true and then L I ,ξ is true.As for the occurrences of p in D that have the same polarity as L, if these were true in I, they are by construction also true in I .Finally, D contains no deep occurrences of p (by condition 2 of Definition 5.2).Since all the literals either keep their truth value or go from false to true when taking the step from I to I , we have that D I ,ξ is true.
Case where L exists: We will show that D I ,ξ = D I,ξ even if L has gone from true in I to false in I under ξ.Since I |= D, D I ,ξ will then be true.
Since I flips the truth value of L , by construction of I , this flipping must be triggered by C. Hence, there must exist a valuation ξ such that τ i I,ξ = υ i I,ξ and s j I,ξ = t j I,ξ for every i, j.Let ξ be the valuation that coincides with ξ on C's free variables and with ξ on D's free variables.Let D = L ∨ D .
Since C is blocked by L in N , all binary flat L-resolvents of C with clauses from N are tautologies (by condition 4 of Definition 5.2).In particular, consider the binary flat L-resolvent of C and D of the form n j=1 s j ≈ t j ∨ C ∨ D σ, where σ is the most general unifier of #τ ?= #υ .This binary flat L-resolvent, which must exist by the five conditions of Definition 5.1, is a tautology, and it must be satisfied by I under ξ.
By definition of ξ , s j ≈ t j I,ξ must be false, and since the terms #s , #t do not contain p (by condition 2 of Definition 5.2), s j ≈ t ij I ,ξ must be false as well.Moreover, by construction of I , the only way for the interpretation of p #τ #s n in I under ξ to differ from that in I under ξ is if C I,ξ is false, and since C contains only occurrences of p of opposite polarity to L (by conditions 2 and 3 of Definition 5.2), C I ,ξ must still be false after we flipped L to make it true.
Finally, since both s j ≈ t j I,ξ and C I ,ξ are false and the binary flat L-resolvent of C and D is a tautology, D σ must be true in I under every valuation.Since σ is a most general unifier and ξ assigns the same semantics to #τ and #υ , effectively "unifying" them, we also have that D I ,ξ is true and hence D I ,ξ is true.Thus D I ,ξ is true, as desired.
Lemma 5.9.Let N be a clause set and C be a clause contained in N .If C is blocked by a literal in N , then N \ {C} is satisfiable if and only if N is satisfiable.
Proof.The "if" direction is trivial.For the other direction, let N consist of all clauses from N \ {C} with their type and term variables renamed so that they share no variables with C. Let I be a model of N .By Lemma 5.8, I is a model of each D ∈ N .
We also need to show that I is a model of C. Specifically, we must show that C I ,ξ is true for any valuation ξ.Let C = L ∨ C .If C I ,ξ is true, we are done.Otherwise, first suppose L is positive.Then ξ provides the necessary witnesses for the quantifier in the definition of ϕ in Definition 5.6, making the interpretation of p by I true in that case, as in the first part of Example 5.7.Hence L I ,ξ is true, and thus C I ,ξ is true.Next, suppose L is negative.Then ξ provides a counterexample to the The procedure is confluent and hence yields a unique result.This is easy to see because removing a blocked clause will only make more clauses blocked; it can never "unblock" a clause.
Theorem 5.11.The result of applying BCE to a clause set N is satisfiable if and only if N is satisfiable.
Proof.This follows by iteration of Lemma 5.9.

Quasipure Literal Elimination
Pure literal elimination (PLE) is one of the simplest optimizations implemented in SAT solvers.It is a special case of variable elimination [SP04, CS00]: If a given variable always occurs with the same polarity in a problem, the solver can assign it that polarity without loss of generality, making all the clauses that contain it tautologies.PLE consists of recursively deleting all such clauses.PLE's generalization to first-order logic considers literals (¬) p( #s ), where the arguments #s are ignored by the analysis; only the polarity is considered.The same idea carries over to higher-order logic.
Example 6.1.Consider the clause set N = {p x ∨ q a x, p (f x), ¬ q a a}.Since p occurs only positively in N , PLE removes the two first clauses.At that point, q occurs only negatively in the remaining singleton clause set and can be removed as well.The result is the empty set, which is obviously satisfiable, indicating that N is satisfiable.As model of N , we can take an interpretation I that makes all p-literals true and all q-literals false.
Example 6.2.Consider the clause set N = {p a, ¬ p x ∨ p (f x)}.PLE does not apply because p occurs with both polarities.Yet we notice that p occurs positively in both clauses, and hence that the same reasoning as in Example 6.1 applies: We can satisfy both clauses by making p-literals true.Using I from Example 6.1, we have I |= N .Example 6.3.Consider the clause set N = {pa, qx∨p(f x), ¬ q (f a), ¬ p x∨¬ q (h p (p b))}.PLE does not apply because p and q occur with both polarities.In addition, p also occurs unapplied and deep within a term.Yet each clause contains either a positive p-literal or a negative q-literal.Thus I |= N , where I is as in Example 6.1.The additional literals are harmless.Examples 6.2 and 6.3 suggest that pure literals are a needlessly restrictive criterion in first-and higher-order logic.We propose a generalization to "quasipure literals."Although we present the criterion in a higher-order setting, it is equally applicable for first-order logic.(In contrast, it is uninteresting for propositional logic, because the only clauses with the same predicates, or rather variables, with opposite polarities are tautologies, and these would be deleted before pure literal elimination is attempted.)Definition 6.4.A polarity map is a function that maps each predicate symbol in Σ to a polarity (+ or −).A set P of predicate symbols is quasipure in a clause set N with a polarity map m if for every clause in N that contains an element of P , there exists a predicate symbol p ∈ P such that the clause contains a p-literal with polarity m p .The set P is quasipure in N if there exists a polarity map m such that P is quasipure in N with m.
In Example 6.1, {p, q} is quasipure in N with m p = + and m q = −.In Example 6.2, {p} is quasipure in N with m p = +.In Example 6.3, {p, q} is quasipure in N with m p = + and m q = −.For this last example, it is crucial to consider p and q together; neither of the singletons {p} and {q} is quasipure in N .Definition 6.5.A predicate symbol p is quasipure in a clause set N with polarity s ∈ {+, −} if there exists a set P of predicate symbols with p ∈ P and a polarity map m such that m p = s and P is quasipure in N with m.The symbol p is quasipure in N if there exists a polarity m p ∈ {+, −} such that p is quasipure in N with m p .A literal L = (¬) p . . . is quasipure in N if p is quasipure in N with L's polarity.
Notice that a predicate symbol that does not occur in a clause set is trivially quasipure in that clause set.
Deleting a clause containing a quasipure literal might create new opportunities for quasipure literal elimination, but it never ruins existing ones.Therefore, the following nondeterministic procedure is confluent and hence yields a unique result: Definition 6.6.Given a finite clause set, quasipure literal elimination (QLE) repeatedly removes clauses containing quasipure literals until no such literals remain.
Although QLE is defined by iteration, it is always possible to remove all clauses at the same time: Lemma 6.7.Let N be a finite clause set and let N be the result of QLE.Then there exists a predicate symbol set P and a polarity map m such that P is quasipure in N and for every clause in N \ N there exists a predicate symbol q ∈ P such that the clause contains a q-literal with polarity m q .
Proof.The iterative process defining QLE gives rise to a finite sequence (P 1 , m 1 ), . . ., (P n , m n ) of predicate symbol sets and polarity maps.Without loss of generality, we assume that each P j does not contain predicate symbols that do not occur in the clause set at iteration j.Then the sets P j are clearly mutually disjoint and we can take P = P 1 ∪ • • • ∪ P n as the desired witness.As for the polarity map m, we associate each p ∈ P j with m j (p).
The key property of QLE is that it preserves unsatisfiability: Lemma 6.8.Let C ∈ N be a clause containing a quasipure literal.If N \ {C} is satisfiable, then N is satisfiable.
Proof.Let I be a model of N \ {C}.Let P be the set of predicate symbols and m the polarity map whose existence is guaranteed by Lemma 6.7.Let N 0 ⊆ N \{C} be the result of applying QLE on N .Clearly, N 0 contains no occurrences of the symbols in P .Define I based on I by redefining the semantics of each monomorphic instance p #τ : of symbol p such that m p = + or m p = −: If m p = +, interpret p #τ as the predicate that is uniformly true; otherwise, interpret p #τ as the predicate that is uniformly false.By the comprehension principle, both of these predicates are guaranteed to exist in the interpretation of the type υ 1 → • • • → υ n → o.Now I coincides with I, since N 0 contains no P symbols, and thus I is a model of N 0 .In addition, I is a model of N , because each clause in N \ N 0 contains a quasipure literal, which is satisfied by I .Definition 6.6 suggests a naive, nondeterministic procedure for discovering and eliminating quasipure predicate symbols: Choose a predicate symbol p and a polarity m p , and take P = {p}.If the predicate symbol occurs with the wrong polarity in a clause (¬) p . . .∨ (¬) q 1 . . .∨ • • • ∨ (¬) q n . . .∨ C, try to extend the set P with one of the (¬) q i 's and the polarity map m accordingly, and continue recursively with q i .In Section 7, we will see a more efficient approach based on a SAT encoding.

Implementation
We implemented the elimination techniques described in Sections 3 to 6 in the Zipperposition prover.For HLBE, PE, and BCE, which had been studied by Vukmirović et al., we could directly adapt their code [VBH23, Section 6].The data structure and algorithms they described and implemented could be generalized to handle polymorphic higher-order logic.For QLE, we developed our own code.
Zipperposition is a higher-order prover that implements the λ-superposition calculus [BBTV21], a generalization of standard superposition to classical rank-1 polymorphic higherorder logic-the logic described in Section 2. The prover is highly competitive: It won in the higher-order theorem division of the CADE ATP Systems Competition (CASC) [SD22] in 2020, 2021, and 2022.
By default, Zipperposition immediately clausifies the initial problem as much as possible; then it optionally invokes preprocessing elimination techniques.If inprocessing is enabled, the prover also invokes the elimination techniques at regular intervals from within the saturation loop.Immediate clausification performs well in practice, but an even more successful strategy is to delay clausification, interleaving clausification with superpositionstyle calculus rules [VBB + 22, Section 4].Then it makes little sense to apply preprocessing elimination techniques; inprocessing seems more appropriate.7.1.Hidden-Literal-Based Elimination.HLBE relies on matching.In our setting, it needs to consider type variables and higher-order terms.Our implementation uses an efficient approximation of higher-order matching, which recognizes λy.y a as an instance of λy.y x, but not a as an instance of y a (with y := λx.x).The same approximated matching algorithm is used in Zipperposition to efficiently recognize subsumed clauses.This weaker matching reduces the applicability of HLBE, but it does not compromise its soundness.7.2.Predicate Elimination.Compared with HLBE, more work was needed to make predicate elimination cope with polymorphism and higher-order logic.For polymorphism, the previous code simply did not consider polymorphic predicates as predicates.Predicates needed to have a type declaration of the form τ For SPE, the type arguments of eliminated predicate symbols must be unified, as per Definition 4.4.For DPE, the type arguments must be distinct type variables.In addition, for DPE, we must check that the predicate is polymorphism-safe.
Adding support for higher-order logic required the definition of singular predicates, which is used by both SPE and DPE, to check that the predicate symbol to eliminate does not occur deep in the clauses that define the symbol.In addition, for DPE, we need to synthesize a λ-abstraction to replace any deep occurrences of the predicate outside the definition set.7.3.Blocked Clause Elimination.Adding support for polymorphism to BCE was straightforward: We simply ensured that type arguments are unified when computing flat resolvents and added a polymorphism-safety check.
To support higher-order logic, we added a check that the p-literal on which the clause is resolved in the only p-literal of that polarity (corresponding to condition 3 of Definition 5.2).We also disabled the code that computed n-ary resolvents for n > 2. Finally, we added code to compute the list of all deep predicate symbols q and made sure clauses are never blocked on a q-literal.These mechanisms come into play only if some higher-order construct is detected in the input problem; otherwise, the first-order formulation of BCE is used.
In the presence of equality in the logic, BCE relies on a congruence closure algorithm to detect valid clauses [KSS + 17, Section 6.1].In our implementation, we rely on a first-order congruence closure algorithm, which can handle higher-order constructs but does not take advantage of them.For example, resolving p a ∨ ¬ q a against ¬ p b ∨ q b on the p-literal yields the clause a ≈ b ∨ ¬ q a ∨ q b.Our congruence closure algorithm can detect the validity of such a clause.On the other hand, because the algorithm views λ-abstractions as black boxes, it fails to recognize a ≈ b ∨ ¬ q (λx.x a) ∨ q (λx.x b) as valid.7.4.Quasipure Literal Elimination.A simple and efficient implementation of quasipure literal elimination uses a SAT solver.Let N be a finite clause set.Without loss of generality, we can assume that Σ is finite.The signature of the generated SAT problem consists of the variables p + , p − for each predicate symbol p in Σ, where p s means "p (possibly together with other predicate symbols) is quasipure with polarity s."The SAT problem consists of the following clauses: (1) For each clause in N containing n predicate literals, headed by q 1 , . . ., q n and with respective polarities s 1 , . . ., s n , generate n clauses of the form where −s flips the polarity s.Such clauses ensure that whenever a literal (¬) q i . . .has the wrong polarity according to the current variable assignment, one of the other predicate literals must be quasipure.
(2) For each clause in N containing n predicate literals, headed by q 1 , . . ., q n and with respective polarities s 1 , . . ., s n and containing a deep occurrence of p (in an argument to a q j or in a functional literal), generate the two clauses These clauses ensures that whenever p occurs deep and is nonetheless considered quasipure, one of the predicate literals must be quasipure.(3) For each predicate symbol p in Σ, generate the clause ¬ p + ∨ ¬ p − .It ensures that a single polarity is assigned to a quasipure predicate symbol.(4) Generate the clause p where {p 1 , . . ., p n } are the predicate symbols in Σ.It tells the SAT solver to look for a nontrivial solution, in which at least one predicate symbol is quasipure.From a satisfying assignment, we can easily read off a predicate symbol set and a polarity map.The process can be iterated until we reach a maximal solution, at which point the SAT solver returns a verdict of "unsatisfiable." It is unclear whether this problem is NP-complete.Given the nondeterministic nature of the naive procedure, we suspect that it is, but we have not found a reduction from 3-SAT.Thus, it is unclear whether our use of a SAT solver is fully satisfactory from a theoretical point of view, even though it works well in practice.

Evaluation
We evaluate the techniques presented above by running Zipperposition [BBTV21] on various benchmarks in various configurations.We consider seven benchmark sets: -S0 : a randomly selected subset of 1000 higher-order monomorphic (TH0) problems from the Sledgehammer-generated Seventeen benchmark suite [DVBW22] in the base configuration, in the language fragment called TH0 − in the Seventeen paper; -S1 : a randomly selected subset of 1000 higher-order polymorphic (TH1) problems from the Seventeen benchmark suite in the base configuration, in the language fragment called TH1 − in the Seventeen paper; -TH0 : a randomly selected subset of 1000 higher-order monomorphic (TH0) problems from the TPTP [Sut17] version 8.0.0; -TH1 : a randomly selected subset of 1000 higher-order polymorphic (TH1) problems from the TPTP version 8.0.0; -CF : a predefined set of 1000 first-order untyped (CNF and FOF) problems from the TPTP; -TF0 : all 389 first-order monomorphic (TF0) problems without arithmetic from the TPTP; -TF1 : all 678 first-order polymorphic (TF1) problems without arithmetic from the TPTP.The first four benchmark sets are used to determine how much our techniques can help on higher-order problems.Among these, S1 and TH1 exercise polymorphism.As for the remaining three, they are included for comparison; they show how well the techniques work on first-order problems.The benchmark sets contain some problems known to be unprovable, which we use to check soundness of the techniques.
We consider 12 Zipperposition configurations, all derived from the portfolio of time slices that was used at the 2022 edition of CASC.This portfolio does not use any of our techniques.Even on first-order problem, it applies the higher-order λ-superposition calculus.The 12 configurations are as follows: -None: the baseline, corresponding to the portfolio used at CASC; -X-pre: the baseline modified to use technique X ∈ {PE, BCE, PLE, QLE} as a preprocessor in all the time slices; -X-in: the baseline modified to use technique X ∈ {HLBE, PE, BCE, PLE, QLE} as an inprocessor in all the time slices; -All-pre: the baseline modified to use all of PE, BCE, and QLE as preprocessors in all the time slices; -All-in: the baseline modified to use all of HLBE, PE, BCE, and QLE as inprocessors in all the time slices.In addition, we define the virtual configuration Union, consisting of the virtual portfolio of all other 12 configurations.All problems that are solved in at least one of the 12 configurations are considered solved by Union, and only those.
The experiments were carried out on StarExec Miami [SST14] servers equipped with Intel Xeon E5-2620 v4 CPUs clocked at 2.10 GHz.We used CPU and wallclock time limits of 120 s.The raw results are available online. 2  Figure 1 reports how many problems were solved for each combination of benchmark set and configuration.The last row of the table presents the total of the seven rows above it.Bold singles out the best configuration (other than Union) for each benchmark set.
The results are sobering.We see substantial gains on the untyped first-order benchmarks, but the gains are much more modest, if actually present, on the typed first-order and the higher-order benchmarks.A possible explanation is that there is less clausal structure in a higher-order problem.Most of Zipperposition's time slices clausify the problem lazily, meaning that little information is visible to our techniques, especially when used as preprocessors.Another possible explanation might be that the higher-order Seventeen and TPTP benchmarks look quite different from the untyped first-order TPTP benchmarks, and our techniques are less applicable.For example, the higher-order TPTP problems tend to be much smaller than their first-order counterparts.Moreover, we selected only subsets of the TPTP benchmarks-an evaluation on entire benchmark suites might yield different results.
The picture is more positive if we look at the Union column of the table.Clearly, in a portfolio setting, with enough time, the new techniques can make a useful contribution.
We also notice that inprocessing often performs worse than preprocessing.This corroborates the findings of Vukmirović et al. [VBH23].An explanation might be the heavy cost of running the techniques multiple time, during proof search.In addition, PE, BCE, PLE, and QLE rely on a global analysis of the clause set and tend to become less applicable as the clause set grows.
Finally, we see that PLE and QLE help, especially on first-order problems.Unexpectedly, PLE generally outperforms the more general QLE.

Conclusion
We presented four SAT-inspired techniques for transforming higher-order problems with the aim of making them more amenable to automatic proof search.Three of the techniques

Example 3. 1 .
Consider the literal c and the clause set N = {¬ a ∨ b, ¬ b ∨ c}.Then b is a hidden literal: Since b implies c according to N , we have that b ∨ c and c have the same truth value in models of N .Similarly, since a implies c (by transitivity), a is also a hidden literal.Thus, hidden literal elimination would reduce the clause a ∨ b ∨ c to c.
For the proof of (3), the argument is similar toKhasidashvili  and Korovin's [KK16, Theorem 1].It relies on the presence of the flat resolvents N + p p N − p in the result set.Let D = ¬ p #υ #u ∨ D be a clause in N − p .If D I,ξ is true, then clearly D I ,ξ is true.Otherwise, D I ,ξ is false, and ¬ p #υ #u I ,ξ is either true or false.In the true case, D I ,ξ is true, as desired.As for the remaining case, it is impossible for the following reason.If ¬ p #υ #u I ,ξ were false, this would mean p #υ #u I ,ξ is true.By definition of I , this would then mean • of C and D must be false in I under ξ, and since it does not contain p, it would be false in I under ξ as well, contradicting the hypothesis that I satisfies it.As Khasidashvili and Korovin observed, eliminating all singular predicates indiscriminately can dramatically increase the number of clauses in the problem.To prevent this explosion, Vukmirović et al. proposed the following criterion.Let K tol ∈ N be a tolerance parameter.The application of SPE fromN to N is allowed if λ(N ) < λ(N ) + K tol or µ(N ) < µ(N ) or |N | < |N | + K tol ,where λ(N ) is the number of literals in N and µ(N ) is the sum, for all clauses C ∈ N , of the square of the number of unique variables in C.
Definition 4.12.Let G be a clause set and p be a predicate symbol.The set G is a definition set for p if (1) p is singular for G;(2) G consists of clauses of the form (¬) p #α #x ∨ C up to variable renaming, where #α are distinct type variables and #x are distinct term variables;(3) the type variables in C are all among #α; (4) the term variables in C are all among #x ;(5) all clauses in G + p p G − p are tautologies; and (6) E( #ι , #c ) is unsatisfiable, where the environment E( #α, #x ) consists of all subclauses C of any (¬) p #α #x ∨ C ∈ G, #ι is a tuple of distinct nullary type constructors substituted in for #α, and #c is a tuple of distinct fresh symbols substituted in for #x .
we have that C I,ξ must be true.This in turn makes the righthand side ϕ false.Otherwise, p #α #x I,ξ is true.Then for each clause ¬ p #α #x ∨ C ∈ G, we have that C I,ξ must be true.By condition 6, there must exist a clause p #α #x ∨ D ∈ G such that D I,ξ is false.This means that ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ D I,ξ is true and hence the entire disjunction ϕ is true, as desired.Now let we have that ϕ is true.This means that there exists a clause D = p #α #x ∨ D ∈ G such that D I,ξ is false.By condition 5, the resolvent C ∨ D of C and D must be a tautology.Hence C is true and thus C is true, as desired.
Lemma 4.17.Let G be a definition set for p and R be an arbitrary clause set.If (G, R) (G, R ), then G ∪ R and G ∪ R are equivalent.Proof.The proof is essentially as in the first-order case [VBH23, Lemma 4.11].Lemma 4.18.Let G be a definition set for p with associated definition p

Definition 5. 1 .
Let C = L ∨ C and D = L ∨ D be clauses such that (1) the atom of L is p #τ #s n ; (2) the atom of L is p #υ #t n ; (3)the literal L is of opposite polarity to L; (4) C and D have no (type or term) variables in common; and (5) σ is the most general unifier of #τ ?= #υ .The clause n j=1 s j ≈ t j ∨ C ∨ D σ is a binary flat L-resolvent of C and D.

Example 5. 4 .
The next example is also based on Keisl et al. [KSS + 17, Example 4]: C = p x y ∨ p y x, D = ¬ p x y ∨ ¬ p y x, and N = {C, D}.The set N is unsatisfiable, because C entails p x x and D entails ¬ p x x.On the other hand, D alone is satisfiable.Hence, removing C from N does not preserve unsatisfiability, and therefore C should not be considered blocked.With Definition 5.2, C correctly cannot be blocked on a p-literal by condition 3, because of the presence of another p-literal in the clause.With Kiesl et al.,this condition is missing, but since they consider all n-ary resolvents, the nontautological resolvent p x x is computed.In both cases, C is correctly considered not blocked.Example 5.5.Let C = pa ∨ pb ∨ ¬q, D = ¬px ∨ q, and N = {C, D}.With Definition 5.2, condition 3 prevents C from being considered blocked.In contrast, the clause is considered blocked by Kiesl et al.We will now show that removing a blocked clause from a clause set preserves the set's unsatisfiability.Our strategy is loosely inspired byKiesl et  al. [KSS + 17, Section 4].

Lemma 5. 8 .
Let N be a clause set and C be a clause contained in N such that C has no variables in common with N \{C}.Assume C is blocked by L in N .Let I be an interpretation and I be the interpretation obtained by flipping the truth value of L. For every D ∈ N \ {C}, if I |= D, then I |= D. Proof.Let C = L ∨ C where L = (¬) p #τ #s n (as per condition 1 of Definition 5.1).
quantifier in the definition of ϕ, making the interpretation of p by I false in that case, as in the second part of Example 5.7.Hence L I ,ξ is true, and thus C I ,ξ is true.Since I |= N ∪ {C}, we have that N is satisfiable.Definition 5.10.Given a finite clause set, blocked clause elimination (BCE) repeatedly removes blocked clauses until no such clauses remain.
The symbol p is singular for a clause set N if p is singular for every clause contained in N .
4.19.Let G be a definition set for p and R be a clause set with no occurrences of p. Then G ∪ R is satisfiable if and only if R is satisfiable.
Proof.The proof is essentially as in the first-order case [VBH23, Lemma 4.12].Theorem 4.20.The result of applying DPE to a finite clause set N is satisfiable if and only if N is satisfiable.Proof.Let p be a predicate symbol and G ⊆ N be the definition set used by DPE.Let R = N p \G.The core of DPE is the computation of