Alexander Bentkamp
email: bentkamp@ios.ac.cn

Jasmin Blanchette
email: j.c.blanchette@vu.nl

Sophie Tourret
email: sophie.tourret@loria.fr

Petar Vukmirović
email: petar.vukmirovic2@gmail.com

Superposition for Higher-Order Logic

Keywords: superposition calculus, higher-order logic, refutational completeness

We recently designed two calculi as stepping stones towards superposition for full higher-order logic: Boolean-free λ-superposition and superposition for first-order logic with interpreted Booleans. Stepping on these stones, we finally reach a sound and refutationally complete calculus for higher-order logic with polymorphism, extensionality, Hilbert choice, and Henkin semantics. In addition to the complexity of combining the calculus's two predecessors, new challenges arise from the interplay between λ-terms and Booleans. Our implementation in Zipperposition outperforms all other higher-order theorem provers and is on a par with an earlier, pragmatic prototype of Booleans in Zipperposition.

ready to assemble a superposition calculus for full higher-order logic. The filiation of our new calculus from Bachmair and Ganzinger's standard first-order superposition is as follows:

Standard superposition Bachmair and Ganzinger [START_REF] Bachmair | Rewrite-based equational theorem proving with selection and simplification[END_REF] (Sup) Superposition with ← → and delayed CNF Ganzinger and Stuber [START_REF] Ganzinger | Superposition with equivalence reasoning and delayed clause normal form transformation[END_REF] (← →Sup)

Superposition with Booleans Nummelin et al. [START_REF] Nummelin | Superposition with first-class Booleans and inprocessing clausification[END_REF] (oSup)

Boolean-free λ-free superposition Bentkamp et al. [START_REF] Bentkamp | Superposition for lambda-free higher-order logic[END_REF] (λfSup)

Boolean-free λ-superposition Bentkamp et al. [START_REF] Bentkamp | Superposition with lambdas[END_REF] (λSup)

Boolean λ-superposition This article (oλSup)

Our goal was to devise an efficient calculus for higher-order logic. To achieve it, we pursued two objectives. First, the calculus should be refutationally complete. Second, the calculus should coincide as much as possible with its predecessors oSup and λSup on the respective fragments of higher-order logic (which in turn essentially coincide with Sup on first-order logic). Achieving these objectives is the main contribution of this article. We made an effort to keep the calculus simple, but often the refutational completeness proof forced our hand to add conditions or special cases.

Like oSup, our calculus oλSup operates on clauses that can contain Boolean subterms, and it interleaves clausification with other inferences. Like λSup, oλSup eagerly βη-normalizes terms, employs full higher-order unification, and relies on a fluid subterm superposition rule (FLUIDSUP) to simulate superposition inferences below applied variables-i.e., terms of the form y t 1 . . . t n for n ≥ 1.

In addition to the issues discussed previously and the complexity of combining the two approaches, we encountered the following main challenges.

First, because oSup contains several superposition-like inference rules for Boolean subterms, our completeness proof requires dedicated fluid Boolean subterm hoisting rules (FLUIDBOOLHOIST, FLUIDLOOBHOIST), which simulate Boolean inferences below applied variables, in addition to FLUIDSUP, which simulates superposition inferences.

Second, due to restrictions related to the term order that parameterizes superposition, it is difficult to handle variables bound by unclausified quantifiers if these variables occur applied or in arguments of applied variables. We solve the issue by replacing such quantified terms ∀y. t or ∃y. t by equivalent terms (λy.

t) ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λy. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) or (λy. t) ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ (λy. ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥
) in a preprocessing step. We leave all other quantified terms intact so that we can process them more efficiently.

Third, like other higher-order calculi that support Booleans, our calculus must include some form of primitive substitution [START_REF] Andrews | On connections and higher-order logic[END_REF][START_REF] Benzmüller | LEO-II-A cooperative automatic theorem prover for higher-order logic[END_REF][START_REF] Huet | A mechanization of type theory[END_REF][START_REF] Steen | The higher-order prover Leo-III[END_REF]. For example, given the clauses a ̸ ≈ b and

z a ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ z b ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, it is crucial to find the substitution {z → λv. v ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
a}, which does not arise through unification. Primitive substitution accomplishes this by blindly substituting logical connectives and quantifiers; here it would apply {z → λv.

y v ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y ′ v}
to the second clause, where y and y ′ are fresh variables. In the context of superposition, this is problematic because the instantiated clause is subsumed by the original clause and could be discarded. Our solution is to immediately clausify the introduced logical symbol, yielding a clause that is no longer subsumed.

The core of this article is the proof of refutational completeness. To keep it manageable, we structure it in three levels. The first level proves completeness of a calculus in first-order logic with Booleans, essentially relying on the completeness of oSup. The second level lifts this result to a ground version of our calculus by transforming the first-order model constructed in the first level into a higher-order model, closely following λSup. The third level lifts this result further to the nonground level by showing that each ground inference on the second level corresponds to an inference of our calculus or is redundant. This establishes refutational completeness of our calculus.

We implemented our calculus in the Zipperposition prover and evaluated it on TPTP and Sledgehammer benchmarks. The new Zipperposition outperforms all other higher-order provers and is on a par with an ad hoc implementation of Booleans in the same prover by Vukmirović and Nummelin [START_REF] Vukmirović | Boolean reasoning in a higher-order superposition prover[END_REF].

This article is structured as follows. Section 2 introduces syntax and semantics of higherorder logic and other preliminaries of this article. Section 3 presents our calculus, proves it sound, and discusses its redundancy criterion. Section 4 contains the detailed proof of refutational completeness. Section 5 discusses our implementation in Zipperposition. Section 6 presents our evaluation results.

An earlier version of this article is contained in Bentkamp's PhD thesis [START_REF] Bentkamp | Superposition for higher-order logic[END_REF], and parts of it were presented at CADE-28 [START_REF] Bentkamp | Superposition for full higher-order logic[END_REF]. This article extends the conference paper with more explanations and detailed soundness and completeness proofs. We phrase the redundancy criterion in a slightly more general way to make it more convenient to use in our completeness proof. However, we are not aware of any concrete examples where this additional generality would be useful in practice. We also present a concrete term order fulfilling our abstract requirements as well as additional evaluation results.

Logic

Our logic is higher-order logic (simple type theory) with rank-1 polymorphism, Hilbert choice, Henkin semantics, and functional and Boolean extensionality. It closely resembles Gordon and Melham's HOL [START_REF]Introduction to HOL: A Theorem Proving Environment for Higher Order Logic[END_REF] and the TPTP TH1 standard [START_REF] Kaliszyk | TH1: The TPTP typed higher-order form with rank-1 polymorphism[END_REF].

Although standard semantics is commonly considered the foundation of the HOL systems, also Henkin semantics is compatible with the notion of provability employed by the HOL systems. By admitting nonstandard models, Henkin semantics is not subject to Gödel's first incompleteness theorem, allowing us to claim refutational completeness of our calculus.

On top of the standard higher-order terms, we install a clausal structure that allows us to formulate calculus rules in the style of first-order superposition. It does not restrict the flexibility of the logic because an arbitrary term t of Boolean type can be written as the clause t ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤.

Syntax

We use the notation ān or ā to stand for the tuple (a 1 , . . . , a n ) or product a 1 × • • • × a n , where n ≥ 0. We abuse notation by applying an operation on a tuple when it must be applied elementwise; thus, f (ā n ) can stand for ( f (a 1 ), . . . , f (a n )), f (a 1 ) × • • • × f (a n ), or f (a 1 , . . . , a n ), depending on the operation f . As a basis for our logic's types, we fix an infinite set V ty of type variables. A set Σ ty of type constructors with associated arities is a type signature if it contains at least one nullary Boolean type constructor o and a binary function type constructor →. A type, usually denoted by τ or υ, is inductively defined to either be a type variable α ∈ V ty or have the form κ(τ n ) for an n-ary type constructor κ ∈ Σ ty and types τn . We write κ for κ() and τ → υ for →(τ, υ). A type declaration is an expression Π ᾱm . τ (or simply τ if m = 0), where all type variables occurring in τ belong to ᾱm .

To define our logic's terms, we fix a type signature Σ ty and a set V of term variables with associated types, written as x : τ or x. We require that there are infinitely many variables for each type.

A term signature is a set Σ of (function) symbols, usually denoted by a, b, c, f, g, h, each associated with a type declaration, written as f : Π ᾱm . τ. We require the presence of the logical symbols

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ : o; ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ : o → o; ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧, ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨, → → → → → → → → → → → → → → → → → → → → → → → → → : o → o → o; ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ : Πα. (α → o) → o; and ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈, ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ : Πα. α → α → o.
Moreover, we require the presence of the Hilbert choice operator ε : Πα. (α → o) → α. The logical symbols are printed in bold to distinguish them from the notation used for clauses below. Although ε is interpreted in our semantics, we do not consider it to be a logical symbol. The reason is that our calculus will enforce the semantics of ε by an axiom, whereas the semantics of the logical symbols will be enforced by inference rules. In the following, we also fix a term signature Σ. A type signature and a term signature form a signature.

We will define terms in three layers of abstraction: raw λ-terms, λ-terms, and terms; where λ-terms will be α-equivalence classes of raw λ-terms and terms will be βη-equivalence classes of λ-terms.

We write t : τ for a raw lambda term t of type τ. The set of raw λ-terms and their associated types is defined inductively as follows. Every x : τ ∈ V is a raw λ-term of type τ. If f : Π ᾱm . τ ∈ Σ and ῡm is a tuple of types, called type arguments, then f⟨ ῡm ⟩ (or simply f if m = 0) is a raw λ-term of type τ{ ᾱm → ῡm }. If x : τ and t : υ, then the λ-expression λx. t is a raw λ-term of type τ → υ. If s : τ → υ and t : τ, then the application s t is a raw λ-term of type υ. Using the spine notation [START_REF] Cervesato | A linear spine calculus[END_REF], raw λ-terms can be decomposed in a unique way as a nonapplication head t applied to zero or more arguments: t s 1 . . . s n or t sn (abusing notation). For the symbols

≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ and ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈,
we will typically use infix notation and omit the type argument. A raw λ-term s is a subterm of a raw λ-term t, written t = t[s], if t = s, if t = (λx. u[s]), if t = (u[s]) v, or if t = u (v[s]) for some raw λ-terms u and v. A proper subterm of a raw λ-term t is any subterm of t that is distinct from t itself. A variable occurrence is free in a raw λ-term if it is not bound by a λ-expression. A raw λ-term is ground if it is built without using type variables and contains no free term variables.

The α-renaming rule is defined as (λx. t) -■ → α (λy. t{x → y}), where y does not occur free in t and is not captured by a λ-binder in t. Two terms are α-equivalent if they can be made equal by repeatedly α-renaming their subterms. Raw λ-terms form equivalence classes modulo α-equivalence, called λ-terms. We lift the above notions on raw λ-terms to λ-terms.

A substitution ρ is a function from type variables to types and from term variables to λ-terms such that it maps all but finitely many variables to themselves. We require that it is type-correct-i.e., for each x : τ ∈ V, xρ is of type τρ. The letters θ, ρ, σ are reserved for substitutions. Substitutions α-rename λ-terms to avoid capture; for example, (λx. y){y → x} = (λx ′ . x). The composition ρσ applies ρ first: tρσ = (tρ)σ. The notation σ[ xn → sn ] denotes the substitution that replaces each x i by s i and that otherwise coincides with σ.

The βand η-reduction rules are specified on λ-terms as (λx. t) u -■ → β t{x → u} and (λx. t x) -■ → η t. For β, bound variables in t are implicitly renamed to avoid capture; for η, the variable x may not occur free in t. Two terms are βη-equivalent if they can be made equal by repeatedly βand η-reducing their subterms. The λ-terms form equivalence classes modulo βη-equivalence, called βη-equivalence classes or simply terms.

We use the following nonstandard normal form: The βηQ η -normal form t ↓ βηQ η of a λterm t is obtained by applying -■ → β and -■ → η exhaustively on all subterms and finally applying the following rewrite rule Q η exhaustively on all subterms:

Q⟨τ⟩ t -■ → Q η Q⟨τ⟩ (λx. t x)
where t is not a λ-expression. Here and elsewhere, Q stands for either

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ or ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃.
We lift all of the notions defined on λ-terms to terms: Convention 1 When defining operations that need to analyze the structure of terms, we use the βηQ η -normal representative as the default representative of a βη-equivalence class. Nevertheless, we will sometimes write ↓ βηQ η for clarity.

Many authors prefer the η-long β-normal form [START_REF] Huet | A unification algorithm for typed lambda-calculus[END_REF][START_REF] Jouannaud | Rewrite orderings for higher-order terms in eta-long beta-normal form and recursive path ordering[END_REF][START_REF] Mayr | Higher-order rewrite systems and their confluence[END_REF], but in a polymorphic setting it has the drawback that instantiating a type variable with a functional type can lead to η-expansion. Below quantifiers, however, we prefer η-long form, which is enforced by the Q η -rule. The reason is that our completeness theorem requires arguments of quantifiers to be λ-expressions.

A literal is an equation s ≈ t or a disequation s ̸ ≈ t of terms s and t. In both cases, the order of s and t is not fixed. We write s ≈ t for a literal that can be either an equation or a disequation. A clause L 1 ∨ • • • ∨ L n is a finite multiset of literals L j . The empty clause is written as ⊥.

Our calculus does not allow nonequational literals. These must be encoded as

t ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or t ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
We even considered excluding negative literals by encoding them as [START_REF] Ganzinger | Superposition with equivalence reasoning and delayed clause normal form transformation[END_REF]. However, this approach would make the conclusion of the equality factoring rule (EFACT) too large for our purposes. Regardless, the simplification machinery will allow us to reduce negative literals of the form

(s ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ t) ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, following ← →Sup
t ̸ ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ and t ̸ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ to t ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and t ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥

, thereby eliminating redundant representations of literals.

A complete set of unifiers on a set X of variables for two terms s and t is a set U of unifiers of s and t such that for every unifier θ of s and t there exists a member σ ∈ U and a substitution ρ such that xσρ = xθ for all x ∈ X. We let CSU X (s, t) denote an arbitrary (preferably, minimal) complete set of unifiers on X for s and t. We assume that all σ ∈ CSU X (s, t) are idempotent on X-i.e., xσσ = xσ for all x ∈ X. The set X will consist of the free variables of the clauses in which s and t occur and will be left implicit. To compute CSU(s, t), Huet-style preunification [START_REF] Huet | A mechanization of type theory[END_REF] is not sufficient, and we must resort to full unification procedures [START_REF] Jensen | Mechanizing ω-order type theory through unification[END_REF][START_REF] Vukmirović | Efficient full higher-order unification[END_REF].

Semantics

A type interpretation I ty = (U, J ty ) is defined as follows. The universe U is a collection of nonempty sets, called domains. We require that {0, 1} ∈ U. The function J ty associates a function J ty (κ) : U n → U with each n-ary type constructor κ, such that J ty (o) = {0, 1} and for all domains D 1 , D 2 ∈ U, the set J ty (→)(D 1 , D 2 ) is a subset of the function space from D 1 to D 2 . The semantics is standard if J ty (→)(D 1 , D 2 ) is the entire function space for all D 1 , D 2 . A type valuation ξ is a function that maps every type variable to a domain. The denotation of a type for a type interpretation I ty and a type valuation ξ is recursively defined by α ξ I ty = ξ(α) and κ(τ) ξ I ty = J ty (κ)( τ ξ I ty ). A type valuation ξ can be extended to be a valuation by additionally assigning an element ξ(x) ∈ τ ξ I ty to each variable x : τ. An interpretation function J for a type interpretation I ty associates with each symbol f : Π ᾱm . τ and domain tuple Dm ∈ U m a value J(f, Dm ) ∈ τ ξ I ty , where ξ is a type valuation that maps each α i to D i . We require that

(I1) J(⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) = 1 (I2) J(⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) = 0 (I3) J(∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧)(a, b) = min {a, b} (I4) J(∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨)(a, b) = max {a, b} (I5) J(¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬)(a) = 1 -a (I6) J(→ → → → → → → → → → → → → → → → → → → → → → → → →)(a, b) = max {1 -a, b} (I7) J(≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈, D)(c, d) = 1 if c = d and 0 otherwise (I8) J(̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈, D)(c, d) = 0 if c = d and 1 otherwise (I9) J(∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, D)( f ) = min { f (a) | a ∈ D} (I10) J(∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃, D)( f ) = max { f (a) | a ∈ D} (I11) f (J(ε, D)( f )) = max { f (a) | a ∈ D} for all a, b ∈ {0, 1}, D ∈ U, c, d ∈ D, and f ∈ J ty (→)(D, {0, 1}).
The comprehension principle states that every function designated by a λ-expression is contained in the corresponding domain. Loosely following Fitting [18, Sect. 2.4], we initially allow λ-expressions to designate arbitrary elements of the domain, to be able to define the denotation of a term. We impose restrictions afterwards using the notion of a proper interpretation, enforcing comprehension.

A λ-designation function L for a type interpretation I ty is a function that maps a valuation ξ and a λ-expression of type τ to an element of τ ξ I ty . A type interpretation, an interpretation function, and a λ-designation function form an interpretation I = (I ty , J, L).

For an interpretation I and a valuation ξ, the denotation of a term is defined as

x ξ I = ξ(x), f⟨τ m ⟩ ξ I = J(f, τm ξ I ty ), s t ξ I = s ξ I ( t ξ I ), and λx. t ξ I = L(ξ, λx. t).
For ground terms t, the denotation does not depend on the choice of the valuation ξ, which is why we sometimes write t I for t ξ I .

An interpretation I is proper if λx. t ξ I (a) = t ξ[x →a] I
for all λ-expressions λx. t and all valuations ξ. If a type interpretation I ty and an interpretation function J can be extended by a λ-designation function L to a proper interpretation (I ty , J, L), then this L is unique [START_REF] Fitting | Types, Tableaus, and Gödel's God[END_REF]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 its clauses are true. A proper interpretation I is a model of a clause set N, written I |= N, if N is true in I for all valuations ξ.

Skolem-Aware Interpretations

Some of our calculus rules introduce Skolem symbols-i.e., symbols representing objects mandated by existential quantification. We define a Skolem-extended signature that contains all Skolem symbols that could possibly be needed by the calculus rules.

Definition 2 Given a term signature Σ, let the Skolem-extended term signature Σ sk the smallest signature that contains all symbols from Σ and a symbol sk Π ᾱ. ∀ x. ∃z. t z : Π ᾱ. τ → υ for all types υ, variables z : υ, terms t : υ → o over the signature (Σ ty , Σ sk ), where ᾱ are the free type variables occurring in t and x : τ are the free term variables occurring in t in order of first occurrence. Interpretations as defined above can interpret the Skolem symbols arbitrarily. For example, an interpretation I does not necessarily interpret the symbol

sk ∃z. z≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈a as a I . Therefore, an inference producing (sk ∃z. z≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ a) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ from ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨ι⟩ (λz. z ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ a) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ is unsound w.r.t. |=.
As a remedy, we define Skolem-aware interpretations as follows:

Definition 3 We call a proper interpretation over a Skolem-extended signature Skolem-aware if for all Skolem symbols

I |= (∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨υ⟩ (λz. t z)) ≈ t (sk Π ᾱ. ∀ x. ∃z. t z ⟨ ᾱ⟩ x)
, where ᾱ are the free type variables and x are the free term variables occurring in t in order of first occurrence. An interpretation is a Skolem-aware model of a clause set N, written I | ≈ N, if I is Skolem-aware and I |= N.

The Calculus

The inference rules of our calculus oλSup have many complex side conditions that may appear arbitrary at first sight. They are, however, directly motivated by our completeness proof and are designed to restrict inferences as much as possible without compromising refutational completeness.

The oλSup calculus closely resembles λSup, augmented with rules for Boolean reasoning that are inspired by oSup. As in λSup, superposition-like inferences are restricted to certain first-order-like subterms, the green subterms. Our completeness proof allows for this restriction because it is based on a reduction to first-order logic.

Definition 4 (Green subterms and positions) A green position of a λ-term is a finite sequence of natural numbers defined inductively as follows. For any λ-term t, the empty sequence ε is a green position of t. For all symbols

f ∈ Σ \ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃},
types τ, and λ-terms ū, if p is a green position of u i , then i.p is a green position of f⟨τ⟩ ū.

The green subterm of a λ-term at a given green position is defined inductively as follows. For any λ-term t, t itself is the green subterm of t at green position ε. For all symbols

f ∈ Σ \ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃},
types τ, and λ-terms ū, if t is a green subterm of u i at some green position p for some i, then t is the green subterm of f⟨τ⟩ ū at green position i.p.

For positions in clauses, natural numbers are not appropriate because clauses and literals are unordered. A green position in a clause C is a tuple L.s.p where L = s ≈ t is a literal in C and p is a green position in s. The green subterm of C at green position L.s.p is the green subterm of s at green position p. A green position is top level if it is of the form L.s.ϵ.

We write s| p to denote the green subterm at position p in s. A position p is at or below a position q if q is a prefix of p. A position p is below a position q if q is a proper prefix of p.

For example, the green subterms of f (g

(¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ p)) (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ (λx. q)) (y a) (λx. h b) are the term itself, g (¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ p), ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ p, p, ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ (λx. q),
y a, and λx. h b.

Definition 5 (Green contexts)

We write s u p to denote a λ-term s with the green subterm u at position p and call s p a green context; We omit the subscript p if there are no ambiguities.

The notions of green positions, subterms, and context are lifted to βη-equivalence classes via the βηQ η -normal representative.

Preprocessing

Our completeness theorem requires that quantified variables do not appear in certain higherorder contexts. Quantified variables in these higher-order contexts are problematic because they have no clear counterpart in first-order logic and our completeness proof is based on a reduction to first-order logic. We use preprocessing to eliminate such problematic occurrences of quantifiers.

Definition 6 The rewrite rules ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ≈ and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ≈ , which we collectively denote by Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ , are defined on λ-terms as ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ -■ → ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀≈ λy. y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨τ⟩ -■ → ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃≈ λy. y ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ (λx. ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)
where the rewritten occurrence of Q⟨τ⟩ is unapplied, has an argument that is not a λexpression, or has an argument of the form λx. v such that x occurs free in a nongreen position of v.

If either of these rewrite rules can be applied to a given term, the term is

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -reducible; otherwise, it is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
We lift this notion to βη-equivalence classes via the βηQ η -normal representative. A clause or clause set is

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal if all contained terms are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
For example, the term λy.

∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨ι → ι⟩ (λx. g x y (z y) (f x)) is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. A term may be Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ - reducible because a quantifier appears unapplied (e.g., g ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨ι⟩); a quantified variable occurs applied (e.g., ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨ι → ι⟩ (λx. x a)); a quantified variable occurs inside a nested λ-expression (e.g., ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ (λx. f (λy. x)))
; or a quantified variable occurs in the argument of a variable, either a free variable (e.g.,

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ (λx. z x)) or a bound variable (e.g., λy. ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨ι⟩ (λx. y x)). We can also characterize Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality as follows: Lemma 7 Let t be a term with spine notation t = s ūn . Then t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal if and only if ūn are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal and
(i) s is of the form Q⟨τ⟩, n = 1, and u 1 is of the form λy. u ′ such that y occurs free only in green positions of u ′ ; or (ii) s is a λ-expression whose body is

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal; or (iii) s is neither of the form Q⟨τ⟩ nor a λ-expression.
Proof This follows directly from Definition 6.

⊓ ⊔

In the following lemmas, our goal is to show that

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality is invariant under βηQ η - normalization-i.e., if a λ-term t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, then so is t ↓ βηQ η . However, Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality is not invariant under arbitrary βη-conversions. Clearly, a β-expansion can easily introduce Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -reducible terms, e.g., c ← ■ -β (λx. c) (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩). Lemma 8 If t and v are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal λ-terms, then t v is a Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal λ-term.
Proof We prove this by induction on the structure of t. Let s ūn = t be the spine notation of t. By Lemma 7, ūn are

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normal and one of the lemma's three cases applies. Since t is of functional type and

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal,
s cannot be of the form Q⟨τ⟩, excluding case (i). Cases (ii) and (iii) are independent of ūn , and hence appending v to that tuple does not affect the

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality of t. ⊓ ⊔ Lemma 9 If t is a Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal λ-term and ρ is a substitution such that xρ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal for all x, then tρ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
Proof We prove this by induction on the structure of t. Let s ūn = t be its spine notation. Since

t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, by Lemma 7, u n are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
normal and one of the following cases applies: Case (i): s is of the form Q⟨τ⟩, n = 1, and u 1 is of the form λy. u ′ such that y occurs free only in green positions of u ′ . Since our substitutions avoid capture, yρ = y and y does not appear in xρ for all other variables x. It is clear from the definition of green positions (Definition 4) that since y occurs free only in green positions of u ′ , y also occurs free only in green positions of u ′ ρ. Moreover, by the induction hypothesis,

u 1 ρ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Hence, tρ = Q⟨τρ⟩ (u 1 ρ) = Q⟨τρ⟩ (λy. u ′ ρ) is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Case (ii): s is a λ-expression whose body is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Then tρ = (λy. s ′ ρ) (ū n ρ) for some Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal λ-term s ′ . By the induction hypothesis, s ′ ρ and ūn ρ are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. There- fore, tρ is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Case (iii): s is neither of the form Q⟨τ⟩ nor a λ-expression. If s is of the form f⟨τ⟩ for some f ̸ ∈ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃}, then tρ = f⟨τρ⟩ (ū n ρ). By the induction hypothesis, ūn ρ are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, and therefore tρ is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Otherwise, s is a variable x and hence tρ = xρ (ū n ρ). Since xρ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal by assumption and ūn ρ are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal by the induction hypothesis, it follows from (repeated application of) Lemma 8 that tρ is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
⊓ ⊔ Lemma 10 Let t be a λ-term of functional type that does not contain the variable x.

If λx. t x is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, then t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Proof Since λx. t x is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, t x is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Let s ūn = t. Since t x is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal and
x is not a λ-expression, s cannot be a quantifier by Lemma 7. Cases (ii) and (iii) are independent of ūn , and hence removing x from that tuple does not affect

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality. Thus, t x being Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal implies that t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
⊓ ⊔ Lemma 11 Let t be a λ-term and x a variable occurring free only in green positions of t. Let t ′ be a term obtained via a βηQ η -normalization step from t. Then x occurs free only in green positions of t ′ .

Proof By induction on the structure of t. If x does not occur free in t, the claim is obvious. If t = x, there is no possible βηQ η -normalization step because for these steps the head of the rewritten term must be either a λ-expression or a quantifier. So we now assume that x does occur free in t and that t ̸ = x. Then, by the assumption that x occurs free only in green positions, t must be of the form f⟨τ⟩ ū for some

f ∈ Σ \ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃}
, some types τ and some λ-terms ū. The βηQ η -normalization step must take place in one of the ū, yielding ū′ such that t ′ = f⟨τ⟩ ū′ . By the induction hypothesis, x occurs free only in green positions of ū′ and therefore only in green positions of t ′ . ⊓ ⊔

Lemma 12 Let t be Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normal and let t ′ be obtained from t by a βηQ η -normalization step. If it is an η-reduction step, we assume that it happens not directly below a quantifier. Then t ′ is also

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
Proof By induction on the structure of t. Let s ūn = t. By Lemma 7, ūn are

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal,

and one of the following cases applies:

Case (i): s is of the form Q⟨τ⟩, n = 1, and u 1 is of the form λy. v such that y occurs free only in green positions of v. Then the normalization cannot happen at t, because s is of the form Q⟨τ⟩ and u 1 is a λ-expression already. It cannot happen at u 1 by the assumption of this lemma. So it must happen in v, yielding some λ-term v ′ . Then t = s (λy.

v ′ ). The λ-term v ′ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal by the induction hypothesis and hence (λy. v ′ ) is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
Since y occurs free only in green positions of v, by Lemma 11, y occurs free only in green positions of v ′ . Thus,

t ′ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
Cases (ii) and (iii): s is a λ-expression whose body is

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal;
or s is neither of the form Q⟨τ⟩ nor a λ-expression.

If the βηQ η -normalization step happens in some u i , yielding some λ-term

u ′ i , then u ′ i is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal by the induction hypothesis. Thus, t ′ = s u 1 • • • u i-1 u ′ i u i+1 • • • u n is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ - normal.
Otherwise, if s = λx. v and the βηQ η -normalization step happens in v, yielding some

λ-term v ′ , then v ′ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal by the induction hypothesis. Thus, t ′ = (λx. v ′ ) ūn is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
Otherwise, the βηQ η -normalization step happens at s ūm for some m ≤ n, yielding some λ-term v ′ . Then

t ′ = v ′ u m+1 • • • u n . The λ-terms s and ūm are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal
and by repeated application of Lemma 8, s ūm is also Lemma 9 (for β-reductions) or Lemma 10 (for η-reductions). The normalization step cannot be a Q η -normalization because s is not a quantifier. Since ūn are also

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. The λ-term v ′ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal by
Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, by repeated application of Lemma 8, t[v ′ ] = v ′ u m+1 • • • u n is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. ⊓ ⊔ A direct consequence of this lemma is that Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normality is invariant under βηQ ηnormalization, as we wanted to show:

Corollary 13 If t is a Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal λ-term, then t ↓ βηQ η is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
As mentioned above, the converse does not hold. Therefore, following our convention,

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality is defined on terms (i.e., βη-equivalence classes) via βηQ η -normal forms. It follows that Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
normality is well-behaved under applications of terms as well:

Lemma 14 If t and v are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal terms where t is of functional type, then t v is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Proof Since Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality is defined via βηQ η -normal forms, we must show that if t ↓ βηQ η and v↓ βηQ η are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, then t v↓ βηQ η is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. By Lemma 8, (t ↓ βηQ η ) (v↓ βηQ η ) is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. By Corollary 13, ((t ↓ βηQ η ) (v↓ βηQ η ))↓ βηQ η = (t v)↓ βηQ η is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. ⊓ ⊔ A preprocessor Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normalizes the input problem. It clearly terminates because each Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -step reduces the number of quantifiers. The Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normality of the initial clause set of a derivation will be a precondition of the completeness theorem. Although inferences may produce

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -reducible clauses, we do not Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normalize during the derivation process itself. Instead, Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -reducible ground instances of clauses will be considered redundant by the redundancy criterion. Thus, clauses whose ground instances are all

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -reducible can be deleted. However, there are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -reducible clauses, such as x ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ ≈ a, that nevertheless have Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normal ground instances. Such clauses must be kept because the completeness proof relies on their

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal ground instances.
In principle, we could omit the side condition of the

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
rewrite rules and eliminate all quantifiers. However, the calculus (especially, the redundancy criterion) performs better with quantifiers than with λ-expressions, which is why we restrict

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
normalization as much as the completeness proof allows. Extending the preprocessing to eliminate all Boolean terms as in Kotelnikov et al. [START_REF] Kotelnikov | A clausal normal form translation for FOOL[END_REF] does not work for higher-order logic because Boolean terms can contain variables bound by enclosing λ-expressions.

Term Orders and Selection Functions

The calculus is parameterized by a strict and a nonstrict term order, a literal selection function, and a Boolean subterm selection function. These concepts are defined below.

Definition 15 (Strict ground term order) A well-founded strict total order ≻ on ground terms is a strict ground term order if it satisfies the following criteria, where ⪰ denotes the reflexive closure of ≻:

(O1) compatibility with green contexts: s ′ ≻ s implies t s ′ ≻ t s ; (O2) green subterm property: t s ⪰ s;

(O3) u ≻ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≻ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ for all terms u ̸ = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥; (
O4) Q⟨τ⟩ t ≻ t u for all types τ, terms t, and terms u such that Q⟨τ⟩ t and u are

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal and the only Boolean green subterms of u are ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
Given a strict ground term order, we extend it to literals and clauses via the multiset extensions in the standard way [2, Sect.

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ resolves this is- sue.
A second issue is that (O4) without further restrictions would imply Q⟨τ⟩ (λy. ya) ≻ (λy. y a)(λx. Q⟨τ⟩ (λy. y a)) = Q⟨τ⟩ (λy. ya), again contradicting irreflexivity. The restriction on the Boolean green subterms of u does not apply here because the Boolean subterms of λx. Q⟨τ⟩ (λy. ya) are not green. The restriction to

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
normal terms resolves this second issue, but it forces us to preprocess the input problem.

Definition 17 (Strict term order) A strict term order is a relation ≻ on terms, literals, and clauses such that its restriction to ground entities is a strict ground term order and such that it is stable under grounding substitutions (i.e., t ≻ s implies tθ ≻ sθ for all substitutions θ grounding the entities t and s).

Definition 18 (Nonstrict term order) Given a strict term order ≻ and its reflexive closure ⪰, a nonstrict term order is a relation ≿ on terms, literals, and clauses such that t ≿ s implies tθ ⪰ sθ for all θ grounding the entities t and s.

Although we call them orders, a strict term order ≻ is not required to be transitive on nonground entities, and a nonstrict term order ≿ does not need to be transitive at all. Normally, t ⪰ s should imply t ≿ s, but this is not required either. A nonstrict term order ≿ allows us to be more precise than the reflexive closure ⪰ of ≻. For example, we cannot have y b ⪰ y a, because y b ̸ = y a and y b ̸ ≻ y a by stability under grounding substitutions (with {y → λx. c}). But we can have y b ≿ y a if b ≻ a. In practice, the strict and the nonstrict term order should be chosen so that they can compare as many pairs of terms as possible while being computable and reasonably efficient.

Definition 19 (Maximality) An element x of a multiset M is ⊵-maximal for some relation ⊵ if for all y ∈ M with y ⊵ x, we have y = x. It is strictly ⊵-maximal if it is ⊵-maximal and occurs only once in M.

Definition 20 (Literal selection function)

A literal selection function is a mapping from each clause to a subset of its literals. The literals in this subset are called selected. The following restrictions apply:

-A literal must not be selected if it is positive and neither side is

⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
-A literal L y must not be selected if y ūn , with n ≥ 1, is a ⪰-maximal term of the clause.

Definition 21 (Boolean subterm selection function) A Boolean subterm selection function is a function mapping each clause C to a subset of the green positions with Boolean subterms in C. The positions in this subset are called selected in C. Informally, we also say that the Boolean subterms at these positions are selected. The following restrictions apply:

-A subterm s y must not be selected if y ūn , with n ≥ 1, is a ⪰-maximal term of the clause.

-A subterm must not be selected if it is ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥
C| p is not ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ or ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈, the positions of all direct green subterms are ⊵-eligible. (E4) If the position p is ⊵-eligible and C| p is of the form s ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ t or s ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ t, then the position of s is ⊵-eligible if sσ ̸ ⊴ tσ and the position of t is ⊵-eligible if sσ ̸ ⊵ tσ.
If σ is the identity substitution, we leave it implicit.

We define deeply occurring variables as in λSup, but exclude λ-expressions directly below quantifiers: Definition 23 (Deep occurrences) A variable occurs deeply in a clause C if it occurs free inside an argument of an applied variable or inside a λ-expression that is not directly below a quantifier.

For example, x and z occur deeply in

f x y ≈ y x ∨ z ̸ ≈ (λw. z a) ∨ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ (λu. p y) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤,
whereas y does not occur deeply. Intuitively, deep occurrences are occurrences of variables that can be caught in λ-expressions by grounding.

Fluid terms are defined as in λSup, using the βηQ η -normal form:

Definition 24 (Fluid terms) A term t is called fluid if (1) t ↓ βηQ η is of the form y ūn where n ≥ 1, or (2) t ↓ βηQ η is a λ-expression and there exists a substitution σ such that tσ↓ βηQ η is not a λ-expression (due to η-reduction).

Case (2) can arise only if t contains an applied variable. Intuitively, fluid terms are terms whose η-short β-normal form can change radically as a result of instantiation. For example, λx. y a (z x) is fluid because applying {z → λx. x} makes the λ vanish: (λx. y a x) = y a.

Similarly, λx.f (y x) x is fluid because (λx.f (y x) x){y → λx.a} = (λx.f a x) = f a. In Section 5, we will discuss how fluid terms can be overapproximated in an implementation. The rules of our calculus are stated as follows. The superposition rule strongly resembles the one of λSup but uses our new notion of eligibility, and the new conditions 9 and 10 stem from the SUP rule of oSup:

D D ′ ∨ t ≈ t ′ C u SUP (D ′ ∨ C t ′ )σ 1. u is
′ σ = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥
, the position of the subterm u is at the top level of a positive literal.

The second rule is a variant of SUP that focuses on fluid green subterms. It stems from λSup.

D D ′ ∨ t ≈ t ′ C u FLUIDSUP (D ′ ∨ C z t ′ )σ
with the following side conditions, in addition to SUP's conditions 5 to 10:

1. u is a variable deeply occurring in C or u is fluid; 2. z is a fresh variable; 3. σ ∈ CSU(z t, u); 4. (z t ′ )σ ̸ = (z t)σ.
The ERES and EFACT rules are copied from λSup. As a minor optimization, we replace the ≿-eligibility condition of λSup's EFACT by a ≿-maximality condition and a condition that nothing is selected. The new conditions are not equivalent to the old one because positive literals of the form

u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ can be selected. C C ′ ∨ u ̸ ≈ u ′ ERES C ′ σ C C ′ ∨ u ′ ≈ v ′ ∨ u ≈ v EFACT (C ′ ∨ v ̸ ≈ v ′ ∨ u ≈ v ′ )σ For ERES: σ ∈ CSU(u, u ′ ) and u ̸ ≈ u ′ is ≿-eligible in C w.r.t. σ. For EFACT: σ ∈ CSU(u, u ′ ), uσ ̸ ≾ vσ, (u ≈ v)σ is ≿-maximal in Cσ, and nothing is selected in C.
Argument congruence-the property that t ≈ s entails t z ≈ s z-is embodied by the rule ARGCONG, which is identical with the rule of λSup:

C C ′ ∨ s ≈ s ′ ARGCONG C ′ σ ∨ sσ xn ≈ s ′ σ xn
where n > 0 and σ is the most general type substitution that ensures well-typedness of the conclusion. In particular, if s accepts k arguments, then ARGCONG will yield k conclusionsone for each n ∈ {1, . . . , k}-where σ is the identity substitution. If the result type of s is a type variable, ARGCONG will yield infinitely many additional conclusions-one for each n > k-where σ instantiates the result type of s with α 1 → • • • → α n-k → β for fresh ᾱn-k and β. Moreover, the literal s ≈ s ′ must be strictly ≿-eligible in C w.r.t. σ, and xn is a tuple of distinct fresh variables.

The following rules are concerned with Boolean reasoning and originate from oSup. They have been adapted to support polymorphism and applied variables.

C u BOOLHOIST (C ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)σ 1.
σ is a type unifier of the type of u with the Boolean type o (i.e., the identity if u is Boolean or α → o if u is of type α for some type variable α); 2. u is neither variable-headed nor a fully applied logical symbol; 3. the position of u is ≿-eligible in C; 4. the occurrence of u is not at the top level of a positive literal.

C C ′ ∨ s ≈ s ′ FALSEELIM C ′ σ 1. σ ∈ CSU(s ≈ s ′ , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤); 2. s ≈ s ′ is strictly ≿-eligible in C w.r.t. σ. C u EQHOIST (C ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ x ≈ y)σ C u NEQHOIST (C ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ x ≈ y)σ C u FORALLHOIST (C ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ y x ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)σ C u EXISTSHOIST (C ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ y x ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)σ 1. σ ∈ CSU(u, x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y), σ ∈ CSU(u, x ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ y), σ ∈ CSU(u, ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨α⟩ y), or σ ∈ CSU(u, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨α⟩ y), respectively; 2.
x, y, and α are fresh variables;

3. the position of u is ≿-eligible in C w.r.t. σ; 4. if the head of u is a variable, it must be applied and the affected literal must be of the form

u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, or u ≈ v where v is a variable-headed term. C u BOOLRW C t ′ σ 1. σ ∈ CSU(t, u) and (t, t ′
) is one of the following pairs:

(¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) (⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) (⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) (⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ → → → → → → → → → → → → → → → → → → → → → → → → → ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) (¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) (⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) (⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) (⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ → → → → → → → → → → → → → → → → → → → → → → → → → ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) (y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) (⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) (⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) (⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ → → → → → → → → → → → → → → → → → → → → → → → → → ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) (y ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ y , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) (⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) (⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) (⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ → → → → → → → → → → → → → → → → → → → → → → → → → ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)
where y is a fresh variable; 2. u is not a variable;

3. the position of u is ≿-eligible in C w.r.t. σ; 4. if the head of u is a variable, it must be applied and the affected literal must be of the

form u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, or u ≈ v where v is a variable-headed term. C u FORALLRW C y (sk Π ᾱ. ∀ x. ∃z. ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬yσ z ⟨ ᾱ⟩ x) σ C u EXISTSRW C y (sk Π ᾱ. ∀ x. ∃z. yσ z ⟨ ᾱ⟩ x) σ 1. σ ∈ CSU(∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨β⟩y, u) and σ ∈ CSU(∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨β⟩y, u)
, respectively, where β is a fresh type variable, y is a fresh term variable, ᾱ are the free type variables and x are the free term variables occurring in yσ in order of first occurrence; 2. u is not a variable;

3. the position of u is ≿-eligible in C w.r.t. σ; 4. if the head of u is a variable, it must be applied and the affected literal must be of the

form u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, or u ≈ v where v is a variable-headed term; 5. for FORALLRW, the indicated occurrence of u is not in a literal u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, and for EXISTSRW, the indicated occurrence of u is not in a literal u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
In principle, the subscript of the Skolems above could be normalized using Boolean tautologies to share as many Skolem symbols as possible. This is an extension of our calculus that we did not investigate any further. Like SUP, also the Boolean rules must be simulated in fluid terms. The following rules are Boolean counterparts of FLUIDSUP:

C u FLUIDBOOLHOIST (C z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ x ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)σ 1. u is fluid; 2. z and x are fresh variables; 3. σ ∈ CSU(z x, u); 4. (z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)σ ̸ = (z x)σ; 5. xσ ̸ = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and xσ ̸ = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥; 6. the position of u is ≿-eligible in C w.r.t. σ. C u FLUIDLOOBHOIST (C z ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ x ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)σ Same conditions as FLUIDBOOLHOIST, but ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ is replaced by ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ in condition 4.
In addition to the inference rules, our calculus relies on two axioms, below. Axiom (EXT), from λSup, embodies functional extensionality; the expression diff⟨α, β⟩ abbreviates

sk Πα β. ∀z y. ∃x. z x̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ̸ ≈y x ⟨α, β⟩. Axiom (CHOICE) characterizes the Hilbert choice operator ε. z (diff⟨α, β⟩ z y) ̸ ≈ y (diff⟨α, β⟩ z y) ∨ z ≈ y (EXT) y x ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ y (ε⟨α⟩ y) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ (CHOICE)

Rationale for the Rules

Most of the calculus's rules are adapted from its precursors. SUP, ERES, and EFACT are already present in Sup, with slightly different side conditions. Notably, as in λfSup and λSup, SUP inferences are required only into green contexts. Other subterms are accessed indirectly via ARGCONG and (EXT). The rules BOOLHOIST, EQHOIST, NEQHOIST, FORALLHOIST, EXISTSHOIST, FALSE-ELIM, BOOLRW, FORALLRW, and EXISTSRW, concerned with Boolean reasoning, stem from oSup, which was inspired by ← →Sup. Except for BOOLHOIST and FALSEELIM, these rules have a condition stating that "if the head of u is a variable, it must be applied and the affected literal must be of the form

u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, or u ≈ v
where v is a variable-headed term." The inferences at variable-headed terms permitted by this condition are our form of primitive substitution [START_REF] Andrews | On connections and higher-order logic[END_REF][START_REF] Huet | A mechanization of type theory[END_REF], a mechanism that blindly substitutes logical connectives and quantifiers for variables z with a Boolean result type.

Example 25 Our calculus can prove that Leibniz equality implies equality (i.e., if two values behave the same for all predicates, they are equal) as follows:

a ̸ ≈ b z a ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ z b ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ EQHOIST (x a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y a) ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ x b ≈ y b BOOLRW ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ w a b b ≈ w b a b FALSEELIM ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ w a b b ≈ w b a b FALSEELIM w a b b ≈ w b a b SUP a ̸ ≈ a ERES ⊥ The clause z a ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ z b ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤
describes Leibniz equality of a and b; if a predicate z holds for a, it also holds for b. The clause a ̸ ≈ b is the negated conjecture. The EQHOIST inference, applied on z b, illustrates how our calculus introduces logical symbols without a dedicated primitive substitution rule. [START_REF] Andrews | On connections and higher-order logic[END_REF][START_REF] Benzmüller | LEO-II-A cooperative automatic theorem prover for higher-order logic[END_REF][START_REF] Huet | A mechanization of type theory[END_REF][START_REF] Steen | The higher-order prover Leo-III[END_REF] would apply an explicit primitive substitution rule instead, yielding essentially

Although ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ does not appear in the premise, we still need to apply EQHOIST on z b with CSU(z b, x 0 ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y 0 ) = {{z → λv. x v ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y v, x 0 → x b, y 0 → y b}}. Other calculi
(x a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y a) ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ (x b ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y b) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤.
However, in our approach this clause is subsumed and could be discarded immediately. By hoisting the equality to the clausal level, we bypass the redundancy criterion.

Next, BOOLRW can be applied to

x a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y a with CSU(x a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y a, y 0 ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y 0 ) = {{x → λv. w a v v, y → λv. w v a v, y 0 → w a a a}}. The two FALSEELIM steps remove the ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ literals.
Then SUP is applicable with the unifier {w → λx 1 x 2 x 3 . x 2 } ∈ CSU(b, w a b b), and ERES derives the contradiction. This mechanism resembling primitive substitution is not the only way our calculus can instantiate variables with logical symbols. Often, the correct instantiation can also be found by unification with a logical symbol that is already present:

Example 26

The following derivation shows that there exists a function y that is equivalent to the conjunction of p x and q x for all arguments x:

∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨ι⟩ (λy. ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ (λx. y x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p x ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q x))) ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ EXISTSHOIST ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ (λx. y ′ x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p x ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q x)) ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ FORALLRW ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ (y ′ (sk y ′ ) ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p (sk y ′ ) ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q (sk y ′ ))) ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ BOOLRW ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ FALSEELIM ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ FALSEELIM ⊥ Here, sk stands for sk ∀u. ∃v.¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ u v ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p v∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧q v)
. First, we use the rule EXISTSHOIST to resolve the existential quantifier, using the unifier {α → ι, z → λy.

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ (λx. y x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p x ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q x))} ∈ CSU(∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨ι⟩ (λy. ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ (λx. y x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p x ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q x))), ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨α⟩ z)
for fresh variables α, y ′ , and z. Then FORALLRW skolemizes the universal quantifier, using the unifier

{β → ι, z ′ → λx. y ′ x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p x ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q x)} ∈ CSU(∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨β⟩ z ′ , ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩ (λx. y ′ x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p x ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q x))
) for fresh variables β and z ′ . The Skolem symbol takes y ′ as argument because it occurs free in λx.

y ′ x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p x ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q x).
Then BOOLRW applies because the terms y ′ (sk y ′ ) and p (sk

y ′ ) ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q (sk y ′ ) are unifiable and thus y ′ (sk y ′ ) ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (p (sk y ′ ) ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ q (sk y ′ )) is unifiable with y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y.
Finally, two FALSEELIM inferences lead to the empty clause.

Like in λSup, the FLUIDSUP rule is responsible for simulating superposition inferences below applied variables, other fluid terms, and deeply occurring variables. Complementarily, FLUIDBOOLHOIST and FLUIDLOOBHOIST simulate the various Boolean inference rules below fluid terms. Initially, we considered adding a fluid version of each rule that operates on Boolean subterms, but we discovered that FLUIDBOOLHOIST and FLUIDLOOBHOIST suffice to achieve refutational completeness.

Example 27

The following clause set demonstrates the need for the rules FLUIDBOOL-HOIST and FLUIDLOOBHOIST:

h (y b) ̸ ≈ h (g ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) ∨ h (y a) ̸ ≈ h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) a ̸ ≈ b
The set is unsatisfiable because the instantiation {y → λx. g

(x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ a)} produces the clause h (g (b ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ a)) ̸ ≈ h (g ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) ∨ h (g (a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ a)) ̸ ≈ h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤), which is unsatisfiable in conjunction with a ̸ ≈ b.
The literal selection function can select either literal in the first clause. ERES is applicable in either case, but the unifiers {y → λx.

g ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥} and {y → λx. g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤}
do not lead to a contradiction. Instead, we need to apply FLUIDBOOLHOIST if the first literal is selected or FLUIDLOOB-HOIST if the second literal is selected. In the first case, the derivation is as follows:

a ̸ ≈ b h (y b) ̸ ≈ h (g ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) ∨ h (y a) ̸ ≈ h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) FLUIDBOOLHOIST h (z ′ b ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) ̸ ≈ h (g ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) ∨ h (z ′ a (x ′ a)) ̸ ≈ h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ∨ x ′ b ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ERES h (g (x ′ a)) ̸ ≈ h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ∨ x ′ b ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ EQHOIST h (g (x ′′ a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ x ′′′ a)) ̸ ≈ h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ∨ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ x ′′ b ≈ x ′′′ b SUP h (g (a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ x ′′′ a)) ̸ ≈ h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ∨ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ a ̸ ≈ x ′′′ b BOOLRW h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ̸ ≈ h (g ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ∨ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ a ̸ ≈ a ERES ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ a ̸ ≈ a ERES ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ FALSEELIM ⊥
The FLUIDBOOLHOIST inference uses the unifier {y → λu.

z ′ u (x ′ u), z → λu.z ′ b u, x → x ′ b} ∈ CSU(z x, y b).
We apply ERES to the first literal of the resulting clause, with unifier {z ′ → λuv.

g v} ∈ CSU(h (z ′ b ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥), h (g ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)).
Next, we apply EQHOIST with the unifier {x ′ → λu.

x ′′ u ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ x ′′′ u, w → x ′′ b, w ′ → x ′′′ b} ∈ CSU(x ′ b, w ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ w ′ )
to the literal created by FLUIDBOOLHOIST, effectively performing a primitive substitution. The resulting clause can superpose into a ̸ ≈ b with the unifier {x ′′ → λu. u} ∈ CSU(x ′′ b, b). The two sides of the interpreted equality in the first literal can then be unified, allowing us to apply BOOLRW with the unifier {y → a, x ′′′ → λu. a} ∈ CSU(y

≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y, a ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ x ′′′ b).
Finally, applying ERES twice and FALSEELIM once yields the empty clause.

Remarkably, none of the provers that participated in the CASC-J10 competition can solve this two-clause problem within a minute. Satallax finds a proof after 72 s and LEO-II after over 7 minutes. The CASC-28 version of our new Zipperposition implementation solves it in 3 s.

Soundness

All of our inference rules and axioms are sound w.r.t. | ≈ and the ones that do not introduce Skolem symbols are also sound w.r.t. |=. Any derivation using our inference rules and axioms is satisfiability-preserving w.r.t. both |= and | ≈ if the initial clause set does not contain sk symbols. The preprocessing is sound w.r.t. both |= and | ≈:

Theorem 28 (Soundness and completeness of Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normalization) Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normalization
∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ ξ I = λy. y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ξ I and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨τ⟩ ξ I = λy. y ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ (λx. ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) ξ I
for all types τ, proper interpretations I = (I ty , J, L), and all valuations ξ. Let f be a function from τ ξ I ty to {0, 1}. Then

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ ξ I ( f ) = J(∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, τ ξ I ty )( f ) = min { f (a) | a ∈ τ ξ I ty } = 1 if f is constantly 1 0 otherwise
By the definition of proper interpretations (Sect. 2.2), we have

λy. y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ξ I ( f ) = y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ξ[y → f ] I = 1 if y ξ[y → f ] I = λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ξ[y → f ] I 0 otherwise
Thus, it remains to show that y

ξ[y → f ] I = λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ξ[y → f ] I
if and only if f is constantly 1. This holds because by the definition of term denotation, y

ξ[y → f ] I = f and because λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ξ[y → f ] I (a) = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ξ[x →a, y → f ] I = 1 by properness of the interpretation, for all a ∈ τ ξ I ty . The case of ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ is analogous. ⊓ ⊔
To show soundness of the inferences, we need the substitution lemma for our logic:

Lemma 29 (Substitution lemma) Let I = (I ty , J, L) be a proper interpretation. Then

τρ ξ I ty = τ ξ ′ I ty and tρ ξ I = t ξ ′ I
for all terms t, all types τ, and all substitutions ρ, where ξ ′ (α) = αρ ξ I ty for all type variables α and ξ ′ (x) = xρ ξ I for all term variables x.

Proof Analogous to Lemma 18 of λSup [START_REF] Bentkamp | Superposition with lambdas[END_REF].

⊓ ⊔

It follows that a model of a clause is also a model of its instances:

I is a model of C u σ as well. Since σ ∈ CSU(∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨β⟩ y, u), we have C u σ = C ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨β⟩ y σ. Thus, to show that I is also a model of the conclusion C y (sk Π ᾱ. ∀ x. ∃z.¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ yσ z ⟨ ᾱ⟩ x) σ, it suffices to show that I |= ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨βσ⟩ (yσ) ≈ yσ (sk Π ᾱ. ∀ x. ∃z.¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ yσ z ⟨ ᾱ⟩ x)
. This follows directly from the definition of Skolem-awareness (Definition 3), which states that

I |= (∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨βσ⟩ (λz. ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ yσ z)) ≈ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ yσ (sk Π ᾱ. ∀ x. ∃z. ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ yσ z ⟨ ᾱ⟩ x)
For EXISTSRW, we can argue analogously. For (EXT), we must show that any Skolem-aware model I is a model of axiom (EXT) z (diff⟨α, β⟩ z y) ̸ ≈ y (diff⟨α, β⟩ z y) ∨ z ≈ y. By the definition of Skolem-awareness, we have

I |= (∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨α⟩ (λx. z x ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ y x)) ≈ (λx. z x ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ y x) (diff⟨α, β⟩ z y). Thus, if the first literal of (EXT) is false in I for some valuation ξ, then 0 = (λx. z x ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ y x) (diff⟨α, β⟩ z y) ξ I = ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨α⟩ (λx. z x ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ y x) ξ I = max{ λx. z x ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ y x ξ I (a) | a ∈ α ξ I } = max{ z x ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ y x ξ[x →a] I | a ∈ α ξ I }
It follows that there exists no a ∈ α ξ I such that z x To transform the model I = (I ty , J, L) into a skolem-aware model I ′ = (I ′ ty , J ′ , L ′ ), we redefine the interpretation of the Skolem symbol sk Π ᾱ. ∀ x. ∃z. t z : Π ᾱ. τ → υ as follows. Given some domains D, let ξ( ᾱ) = D. Then define J ′ (sk Π ᾱ. ∀ x. ∃z. t z , D) = λ x. ε⟨υ⟩ t ξ I and L ′ (ξ, λx.s) = L(ξ, λx.s ′ ) where s ′ is obtained from s by replacing each occurrence of a subterm sk Π ᾱ. ∀ x. ∃z. t z ⟨ ῡ⟩ by (λ x. ε⟨υ⟩ t){ ᾱ → ῡ}. This modification of I yields a new interpretation I ′ , which is still a model of N because N does not contain any sk symbols. Moreover, it is a Skolem-aware model of N because our redefinition ensures

I ′ |= (∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨υ⟩ (λz. t z)) ≈ t (sk Π ᾱ. ∀ x.

The Redundancy Criterion

As in λfSup and λSup, the redundancy criterion and the completeness proof distinguish three levels of logics. We have a higher-order level H, a

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normal ground higher-order level GH, and a ground monomorphic first-order level GF with an interpreted Boolean type. We use T H , T GH , and T GF to denote the respective sets of terms, Ty H , Ty GH , and Ty GF to denote the respective sets of types, and C H , C GH , and C GF to denote the respective sets of clauses. We will define a grounding function G that connects levels H and GH and an encoding F that connects levels GH and GF. Schematically, the three levels are connected as follows:

H higher-order GH ground Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal higher-order
GF ground first-order with interpreted Booleans F G

Redundancy of Clauses

In first-order superposition, a clause is considered redundant if all its ground instances are entailed by ≺-smaller ground instances of other clauses. In essence, this will also be our definition, but we will use a special grounding function G and the entailment notion of the GF level.

Let (Σ ty , Σ) be the signature of level H. The level GH has the same signature but is restricted to ground

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal
terms and clauses. For the GF level, we employ the logic of oSup [START_REF] Nummelin | Superposition with first-class Booleans and inprocessing clausification[END_REF]. Its signature (Σ ty , Σ GF ) is defined as follows. The type constructors Σ ty are the same in both signatures, but → is an uninterpreted type constructor on GF and not to be confused with the arrow used for type declarations in the logic of oSup [START_REF] Nummelin | Superposition with first-class Booleans and inprocessing clausification[END_REF], which we will avoid in this article due to the ambiguity. For each ground instance f⟨ ῡ⟩ :

τ 1 → • • • → τ n → τ of a symbol f ∈ Σ,
we introduce a first-order symbol f ῡ j ∈ Σ GF with argument types τj and result type τ j+1 → • • • → τ n → τ, for each j. This is done for both logical and nonlogical symbols. Moreover, for each ground term λx. t, we introduce a symbol lam λx. t ∈ Σ GF of the same type. The symbols

⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 , ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 , ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ 1 , ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ 2 , ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ 2 , → → → → → → → → → → → → → → → → → → → → → → → → → 2 , ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ τ 2 , and ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ τ
2 are identified with the corresponding first-order logical symbols.

Definition 34 (The grounding function G on terms and clauses) Given a clause C ∈ C H , let its ground instances G(C) be the set of all clauses in C GH of the form Cθ for some grounding substitution θ such that for all free variables x occurring in C, the only Boolean green subterms of

xθ are ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
Restricting the grounding to the Boolean terms

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ allows condition O4 to consider only terms u with Boolean subterms ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
This is crucial because without the restriction no suitable term order would exist. The approach resembles basic superposition [START_REF] Bachmair | Basic paramodulation and superposition[END_REF] where the redundancy criterion only considers ground instances that are irreducible w.r.t. an arbitrary term rewriting system. A disadvantage of basic superposition is that its redundancy criterion severely restricts the simplification machinery because the irreducible terms are unknown during a derivation. In our setting, however, we know that

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥
will be normal forms of the term rewriting system used in the completeness proof. Thus we can restrict grounding to the Boolean terms

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ without compromising the simplification machinery.
Since we have defined all clauses in C GH to be

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, the ground instances G(C) of a clause are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal as well. The clauses in C GH being Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal
F (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ (λx. t)) = ∀x. F (t) F (∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨τ⟩ (λx. t)) = ∃x. F (t) F (x) = x F (λx. t) = lam λx. t F (f⟨ ῡ⟩ sj ) = f ῡ j (F ( sj ))
using ↓ βηQ η representatives of terms. The encoding F is extended to map from C GH to C GF by mapping each literal and each side of a literal individually.

Although we define F only on ground terms, the encoding of variables

F (x) = x is necessary for variables bound by ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃. Since the terms T GH are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normal, these variables occur neither applied nor inside λ-expressions.

The mapping F is clearly bijective. Using the inverse mapping, the order ≻ can be transferred from T GH to T GF and from C GH to C GF by defining t ≻ s as F -1 (t) ≻ F -1 (s) and C ≻ D as F -1 (C) ≻ F -1 (D). The property that ≻ on clauses is the multiset extension of ≻ on literals, which in turn is the multiset extension of ≻ on terms, is maintained because F -1 maps the multiset representations elementwise.

A key property of F is that there is a bijection between green subterms on GH and subterms on GF that are not below quantifiers: Lemma 36 Let s, t ∈ T GH . If p is a green position in t or a position in F (t) that is not below a quantifier, we have F (t s p ) = F (t)[F (s)] p . In other words, s is a green subterm of t at position p if and only if F (s) is a subterm of F (t) at position p that is not below a quantifier.

Proof Analogous to Lemma 3.17 of λfSup [START_REF] Bentkamp | Superposition for lambda-free higher-order logic[END_REF].

⊓ ⊔

Lemma 37

The relation ≻ on T GF is a term order in the sense of oSup. That is, it is a well-founded strict order ≻ on ground terms such that 1. compatibility with contexts holds, but not necessarily below quantifiers; 2. the subterm property holds, but not necessarily below quantifiers; 3. totality holds;

4. u ≻ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 ≻ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 for any term u ∈ T GF that is not ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 or ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 ; and 5. Qx. t ≻ t{x → u} for any term u ∈ T GF whose only Boolean subterms are ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
Proof Transitivity and irreflexivity follow directly from transitivity and irreflexivity of ≻ on T GH . Well-foundedness, compatibility with contexts, subterm property and totality can be shown analogously to Lemma 3.19 of λfSup [START_REF] Bentkamp | Superposition for lambda-free higher-order logic[END_REF], using Lemma 36. ⊓ ⊔

That ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥
Each of the three levels has an entailment relation |=. A clause set N 1 entails a clause set N 2 , denoted by N 1 |= N 2 , if all models of N 1 are also a models of N 2 . For H and GH, we use higher-order models; for GF, we use first-order models with interpreted Booleans as defined by oSup [START_REF] Nummelin | Superposition with first-class Booleans and inprocessing clausification[END_REF]. We write

N 1 |= F N 2 to abbreviate F (N 1 ) |= F (N 2 ) and N 1 |= G N 2 to abbreviate G(N 1 ) |= G(N 2 ).
On the H level, we additionally define Skolem-aware entailment, denoted by N 1 | ≈ N 2 , to hold if all Skolem-aware models of a clause set N 1 ⊆ C H are also models of a clause set N 2 ⊆ C H .

We define the sets of redundant clauses w.r.t. a clause set as follows:

-Given C ∈ C GF and N ⊆ C GF , let C ∈ GFRed C (N) if {D ∈ N | D ≺ C} |= C. -Given C ∈ C GH and N ⊆ C GH , let C ∈ GHRed C (N) if F (C) ∈ GFRed C (F (N)). -Given C ∈ C H and N ⊆ C H , let C ∈ HRed C (N) if for every D ∈ G(C), we have D ∈ GHRed C (G(N)) or there exists C ′ ∈ N such that C ⊐ C ′ and D ∈ G(C ′ ).
The tiebreaker ⊐ can be an arbitrary well-founded partial order on C H , natural candidates being restrictions of (ill-founded) strict subsumption [START_REF] Bentkamp | Superposition with lambdas[END_REF]Sect. 3.4].

Redundancy of Inferences

Standard simplification rules and most other optimizations can be justified by clause redundancy. For a few other prover optimizations (e.g., simultaneous superposition [START_REF] Benanav | Simultaneous paramodulation[END_REF]), a notion of inference redundancy is required. For first-order superposition, an inference is considered redundant if for each of its ground instances, a premise is redundant or the conclusion is entailed by clauses smaller than the main premise. For most inference rules, our definition follows this idea, using specific ground instances and |= F for entailment; other rules need nonstandard notions of inference redundancy. Each of the three levels has an associated inference system HInf , GHInf , and GFInf . For H, it is the inference system HInf consisting of the rules described above. We view axioms (EXT) and (CHOICE) as premiseless inference rules EXT and CHOICE, respectively. We fix the selection functions HLitSel and HBoolSel globally.

The system GHInf is parameterized by selection functions and a witness function, which are defined as follows. The witness function will be used to provide appropriate Skolem terms that witness the existence of terms fulfilling the given predicate.

In our completeness proof, the choice of the GH level selection and witness functions will depend on the saturated clause set in the limit of the derivation. Since we do not know this clause set during the derivation, we need to consider all possible parameters in our redundancy criterion: Definition 40 (Set of parameter triples Q) Let Q be the set of parameters triples (GHLitSel, GHBoolSel, GHWit) where GHLitSel and GHBoolSel are GH level selection functions and GHWit is a witness function.

We write GHInf q with q = (GHLitSel, GHBoolSel, GHWit) ∈ Q to specify the inference system for a given set of parameters. The rules of GHInf q include SUP, ERES, EFACT, BOOLHOIST, FALSEELIM, EQHOIST, NEQHOIST, and BOOLRW with the restriction that all references to ≿ are replaced by ⪰.

In addition, GHInf q contains the rules GFORALLHOIST, GEXISTSHOIST, GARGCONG, GEXT, and GCHOICE, which enumerate ground terms in the conclusion where their HInf counterparts use fresh variables. They enumerate all terms u ∈ T GH such that the only Boolean

green subterms of u are ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥. Let T ⋆
GH be the set of all such terms u. Then these rules are stated as follows:

C ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ v p GFORALLHOIST C ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ v u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ C ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨τ⟩ v p GEXISTSHOIST C ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ v u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ where p is ⪰-eligible in C and u ∈ T ⋆ GH . C ′ ∨ t ≈ s GARGCONG C ′ ∨ t ū ≈ s ū where t ≈ s is strictly ⪰-eligible in C ′ ∨ t ≈ s and u i ∈ T ⋆
GH . The rules GEXT and GCHOICE are premiseless and their conclusions are the infinitely many G-instances of (EXT) and (CHOICE), respectively. Moreover, GHInf q contains the following two rules, which use the witness function GHWit instead of Skolem terms:

C ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ v p GFORALLRW C v GHWit(C, p) p C ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨τ⟩ v p GEXISTSRW C v GHWit(C, p) p where p is ⪰-eligible in C; for GFORALLRW, F (C ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ p ) is not a tautology; and for GEXISTSRW, F (C ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p ) is not a tautology.
The inference systems GHInf q are indeed inference systems on C GH -i.e., if the premises are in C GH , the conclusions are in C GH , too. The conclusions are obviously ground. They are

also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal: Lemma 41 If the premises of a GHInf q inference are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, then the conclusion is also Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
Proof The conclusions of GEXT and GCHOICE are

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal because G maps into C GH , which is restricted to Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal clauses. The definition of Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality (Definition 6
) clearly only depends on the contained quantifier-headed subterms. As long as no new quantifier-headed subterms are added, a clause set cannot become

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -reducible.
The inference rules ERES, EFACT, and FALSEELIM do not introduce any subterms that were not already present in the premises. The inference rules SUP, BOOLHOIST, EQHOIST, NEQHOIST, BOOLRW only introduce new subterms by replacing a green subterm of a

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ - normal term by another Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal term.
Since green positions are never below quantifiers, these rules also do not add new quantifier-headed subterms.

For the inference rules GFORALLHOIST, GEXISTSHOIST, GARGCONG, GFORALLRW, and GEXISTSRW, we can use Lemma 14 to show that the conclusions are

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. ⊓ ⊔
The inference system GFInf is parameterized by an analogous parameter triple (GFLitSel, GFBoolSel, GFWit). Using the bijection F , we can translate a parameter triple q of GHInf to a parameter triple F (q) of GFInf . Let GFInf F (q) be the inference system containing the inferences isomorphic to GHInf q obtained by F , except for GARGCONG, GEXT, and GCHOICE. This is essentially identical to the ground inference system of oSup [START_REF] Nummelin | Superposition with first-class Booleans and inprocessing clausification[END_REF].

We extend the functions F and G to inferences:

Notation 42 Given an inference ι, we write prems(ι) for the tuple of premises, mprem(ι) for the main (i.e., rightmost) premise, and concl(ι) for the conclusion.

Definition 43 (The encoding F on inferences) Given an inference ι ∈ GHInf that is not a GARGCONG, GEXT, or GCHOICE inference, let F (ι) ∈ GFInf denote the inference defined by prems(F (ι)) = F (prems(ι)) and concl(F (ι)) = F (concl(ι)).

Definition 44 (The grounding function G on inferences) Given a parameter triple q ∈ Q and an inference ι ∈ HInf , we define the set G q (ι) of ground instances of ι to be all inferences ι ′ ∈ GHInf q such that prems(ι ′ ) = prems(ι)θ and concl(ι ′ ) = concl(ι)θ for some grounding substitution θ.

Thus, G maps FLUIDSUP to SUP, FLUIDBOOLHOIST to BOOLHOIST, FORALLRW to GFOR-ALLRW, EXISTSRW to GEXISTSRW, FORALLHOIST to GFORALLHOIST, EXISTSHOIST to GEXISTSHOIST, ARGCONG to GARGCONG, EXT to GEXT, CHOICE to GCHOICE, and inferences of other HInf rules to inferences of the identically named rules in GHInf . For FLUIDLOOBHOIST, which needs not be grounded to prove refutational completeness, we let G q (ι) = undef . Although the rules FLUIDBOOLHOIST and FLUIDLOOBHOIST are dual to each other, their redundancy criteria are asymmetric because only FLUIDBOOLHOIST has a counterpart in GHInf , namely BOOLHOIST. We define the sets of redundant inferences w.r.t. a given clause set as follows:

-Given ι ∈ GFInf q and N ⊆ C GF , let ι ∈ GFRed q

I (N) if prems(ι) ∩ GFRed C (N) ̸ = ∅ or {D ∈ N | D ≺ mprem(ι)} |= concl(ι). -Given ι ∈ GHInf q and N ⊆ C GH , let ι ∈ GHRed q I (N) if -ι is GARGCONG, GEXT, or GCHOICE and concl(ι) ∈ N ∪ GHRed C (N); or -ι is any another inference and F (ι) ∈ GFRed F (q) I (F (N)). -Given ι ∈ HInf and N ⊆ C H , let ι ∈ HRed I (N) if -ι is a FLUIDLOOBHOIST inference and G(concl(ι)) ⊆ G(N) ∪ GHRed C (G(N))
or ι is any other inference and G q (ι) ⊆ GHRed I (G(N)) for all q ∈ Q.

Some authors prefer not to define inferences with a redundant premise as redundant, but in our proof of refutational completeness, this will be crucial for the lifting lemma of FORALLRW and EXISTSRW.

A clause set N is saturated w.r.t. an inference system and the inference component Red I of a redundancy criterion if every inference from clauses in N is in Red I (N).

Simplification Rules

The redundancy criterion (HRed I , HRed C ) is strong enough to support most simplification rules implemented in Schulz's first-order prover E [33, Sects. 2.3.1 and 2.3.2], although some require minor adaptions. To describe the adaptions, we introduce the notion of blue subterms, which include all green subterms but also some subterms below quantifiers.

Definition 45 (Blue subterms and positions) Blue subterms and positions are inductively defined as follows. A blue position is a tuple of natural numbers. For any λ-term t, the empty tuple ε is a blue position of t, and t is the blue subterm of t at position ε. For all symbols

f ∈ Σ \ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃}, if t is
a blue subterm of u i at position p, then i.p is a blue position of f⟨τ⟩ ū, and t is the blue subterm of f⟨τ⟩ ū at position i.p. If t is a blue subterm of u at position p, then 1.p is a blue position of Q⟨τ⟩ (λx. u) and t is the blue subterm of Q⟨τ⟩ (λx. u) at position 1.p.

For example, the blue subterms of f (g

(¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ p)) (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ (λx. q)) (y a) (λx. h b
) are all of the green subterms and q. The notions of blue positions and subterms are lifted to βη-equivalence classes via the βηQ η -normal representative.

Deletion of duplicated literals, deletion of resolved literals, syntactic tautology deletion, negative simplify-reflect, and clause subsumption adhere to our redundancy criterion. Positive simplify-reflect and equality subsumption are supported by our criterion if they are applied on blue subterms. Semantic tautology deletion can be applied as well, but we must use the entailment relation |= F . Rewriting of positive and negative literals (demodulation) can only be applied on blue subterms. Moreover, for positive literals, the rewriting clause must be smaller than the rewritten clause-a condition that is also necessary with the standard first-order redundancy criterion but not always fulfilled by Schulz's rule. As for destructive equality resolution, even in first-order logic the rule cannot be justified with the standard redundancy criterion, and it is unclear whether it preserves refutational completeness.

As a representative example, we show how demodulation into green contexts can be justified. Demodulation into blue contexts and the other simplification rules can be justified similarly.

Lemma 46 Demodulation into green contexts is a simplification:

t ≈ t ′ C s tσ ≈ s ′ ∨ C ′ DEMOD t ≈ t ′ s t ′ σ ≈ s ′ ∨ C ′
where tσ ≻ t ′ σ and C ≻ (t ≈ t ′ )σ. It adheres to our redundancy criterion-i.e., the deleted premise C is redundant w.r.t. the conclusions.

Proof Let N be the set consisting of the two conclusions. We must show that C ∈ HRed C (N). Let Cθ be a ground instance of C. By the definition of HRed C , it suffices to show that Cθ ∈ GHRed C (G(N)). By the definition of GHRed C , it thus suffices to show that F (Cθ) ∈ GFRed C (F (G(N))). By the definition of GFRed C , this is equivalent to proving that the clauses in F (G(N)) that are smaller than F (Cθ) entail F (Cθ).

By compatibility with green contexts and stability under substitutions of ≻, the condition Under some circumstances, certain inference rules of our calculus can be applied as simplifications-i.e., a premise can be deleted after performing them. The FALSEELIM and BOOLRW rules can be applied as a simplification if σ is the identity. If the head of

tσ ≻ t ′ σ implies that D = F ((s t ′ σ ≈ s ′ ∨ C ′ )θ) is a clause in F (G(N)) that is smaller than F (Cθ). By stability under substitutions, C ≻ (t ≈ t ′ )σ implies that E = F ((t ≈ t ′ )σθ) is another clause in F (G(N)) that
u is ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀,
FORALLHOIST and FORALLRW can both be applied and, together, serve as one simplification rule. If the head of

u is ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀
and FORALLRW cannot be applied due to its condition 5, FORALLHOIST alone serves as a simplification rule. The same holds for EXISTS-HOIST and EXISTSRW if the head of

u is ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃.
For all of these simplifications, the eligibility conditions can be ignored.

If σ is the identity, the rule BOOLHOIST can also be applied as a simplification in combination with the following rule to the same subterm u:

C u LOOBHOIST C ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥
Again, the eligibility condition can be ignored, and u can even be a fully applied logical symbol as long as it is not

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.

Clausification

Like oSup, our calculus does not require the input problem to be clausified during the preprocessing, and it supports higher-order analogs of the three inprocessing clausification methods introduced by Nummelin et al. Inner delayed clausification relies on our core calculus rules to destruct logical symbols. Outer delayed clausification adds the following clausification rules to the calculus:

s ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ C POSOUTERCLAUS oc(s,C) s ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ C NEGOUTERCLAUS oc(¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬s,C) s ≈ t ∨ C EQOUTERCLAUS s ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ t ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ C s ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ t ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ C s ̸ ≈ t ∨ C NEQOUTERCLAUS s ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ t ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ C s ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ t ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ C
The double bars identify simplification rules (i.e., the conclusions make the premise redundant and can replace it). The first two rules require that s has a logical symbol as its head, whereas the last two require that s and t are Boolean terms other than

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
The function oc distributes the logical symbols over the clause C-e.g., oc(s

→ → → → → → → → → → → → → → → → → → → → → → → → → t, C) = {s ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ t ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ∨ C}, and oc(¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬(s ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ t), C) = {s ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ C, t ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ C}.
It is easy to check that our redundancy criterion allows us to replace the premise of the OUTERCLAUS rules with their conclusion. Nonetheless, we apply EQOUTERCLAUS and NEQOUTERCLAUS as inferences because the premises might be useful in their original form.

Besides the two delayed clausification methods, a third inprocessing clausification method is immediate clausification. This clausifies the input problem's outer Boolean structure in one swoop, resulting in a set of higher-order clauses. If unclausified Boolean terms rise to the top during saturation, the same algorithm is run to clausify them. This method can be made to adhere to our redundancy criterion as well, although advanced clausification techniques such as the Tseitin transformation [START_REF] Tseitin | On the complexity of derivation in propositional calculus[END_REF] and miniscoping [START_REF] Nonnengart | Computing small clause normal forms[END_REF] sometimes violate the criterion. The observations described for oSup [START_REF] Nummelin | Superposition with first-class Booleans and inprocessing clausification[END_REF]Sect. 6] essentially apply to our calculus as well.

Unlike delayed clausification, immediate clausification is a black box and is unaware of the proof state other than the Boolean term it is applied to. Delayed clausification, on the other hand, clausifies the term step by step, allowing us to interleave clausification with the strong simplification machinery of superposition provers. It is especially powerful in higher-order contexts: Examples such as

y p q ̸ ≈ (p ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ q
) can be refuted directly by equality resolution, rather than via more explosive rules on the clausified form.

A Concrete Term Order

We define a concrete order ≻ λ that fulfills the properties of a strict term order as defined in Definition 17 to show that the requirements can indeed be fulfilled and to provide a concrete order for implementations of our calculus.

Given a signature (Σ ty , Σ), we encode types and terms as terms over the untyped first-order signature

Σ ty ⊎ {f k | f ∈ Σ, k ∈ N} ⊎ {lam, ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ′ 1 , ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ′ 1 } ⊎ {db i k | i, k ∈ N}.
The encoding introduces an identically named first-order (term) variable α for each higher-order type variable α, a first-order variable z x for each higher-order variable x, and a first-order variable z t for each fluid higher-order term t. We define the encoding in two parts. The first part is the encoding O, resembling the one defined for λSup. The auxiliary function B x (t) replaces each free occurrence of the variable x by a De Bruijn index-that is, a symbol db i where i is the number of λ-expressions surrounding the variable occurrence. The encoding O recursively encodes higher-order types into untyped first-order terms as follows: O(α) = α and O(κ(τ)) = κ(O(τ)).

Using βηQ η -normal representatives, it recursively encodes higher-order terms into untyped first-order terms as follows:

O(t) =          z t if t = x or t is fluid lam(O(τ),O(B x (u))) if t = (λx : τ. u) and t is not fluid f k (O(τ),O(ū k )) if t = f⟨τ⟩ ūk and either f ̸ ∈ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃} or k = 0 Q 1 (O(τ),O(B x (u))) if t = Q⟨τ⟩(λx : τ. u)
Via this encoding, the term order conditions (O1), (O2), and (O3) can be easily achieved. For (O4), however, we need to transform the encoded term further to ensure that the symbols

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 occur
P (t) =          α if t = α z u if t = z u lam(τ,p(u)) if t = lam(τ, u) f(P (t)) if t = f(t) and f ̸ = lam
In particular, for any higher-order type τ, we have P (O(τ)) = O(τ) because λ-expressions do not occur in types.

The function

p replaces ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 by ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ′ 1 , ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 by ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ′ 1 ,
and z u by a fresh variable z ′ u .

p(t) =                α if t = α z ′ u if t = z u ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ′ 1 (τ,p(u)) if t = ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 (τ, u) ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ′ 1 (τ,p(u)) if t = ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 (τ, u) f(p(t)) if t = f(t) and f ̸ ∈ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 , ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 }
Again, for any higher-order type τ, we have p(O(τ)) = O(τ) because the variables z u and the

constants ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 never occur in the result of applying O to types. For example, O encodes the term ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩(λx. p y y (λu. f y y (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨ι⟩(λv. u)))) into the first-order term ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 (ι, p 3 (z y , z y , lam(o, f 3 (z y , z y , ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 (ι, db 1 ))))) and P transforms it further into ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 (ι, p 3 (z y , z y , lam(o, f 3 (z ′ y , z ′ y , ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ′ 1 (ι, db 1 ))))).
Using the encoding O and the function P , we define our term order ≻ λ . Let ≻ kb be the transfinite Knuth-Bendix order [START_REF] Ludwig | An extension of the Knuth-Bendix ordering with LPO-like properties[END_REF] on first-order terms. The weight of

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 must be ω, the weight of ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 must be 1,
and the weights of all other symbols must be smaller than ω. The precedence > must be total and

⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 > ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 must
be the symbols of lowest precedence. We do not use subterm coefficients (i.e., all coefficients are 1), nor a symbol of weight 0. Let ≻ P be the order induced by P from ≻ kb , meaning t ≻ P s if and only if P (t) ≻ kb P (s). Let ≻ λ be the order induced by O from ≻ P , meaning t ≻ λ s if and only if O(t) ≻ P O(s). We extend ≻ λ to literals and clauses in the usual way. We will show that ≻ λ fulfills the properties of a strict term order: Lemma 47 The restriction of ≻ λ to ground terms is a strict ground term order, as defined in Definition 15.

Proof We follow the proof of Lemma 31 of Bentkamp et al. The transfinite Knuth-Bendix order ≻ kb has been shown to enjoy irreflexivity, transitivity, well-foundedness, totality on ground terms, the subterm property, and compatibility with contexts [START_REF] Ludwig | An extension of the Knuth-Bendix ordering with LPO-like properties[END_REF]. Transitivity and irreflexivity of ≻ kb imply transitivity and irreflexivity of ≻ λ , respectively. WELL-FOUNDEDNESS: If there existed an infinite chain t 1 ≻ λ t 2 ≻ λ • • • of ground terms, there would also be the chain P (O(t 1 ))

≻ kb P (O(t 2 )) ≻ kb • • • , contradicting the well-foundedness of ≻ kb .
TOTALITY: For any ground terms t and s we have P (O(t)) ≻ kb P (O(s)), P (O(t)) ≺ kb P (O(s)), or P (O(t)) = P (O(s)) by ground totality of ≻ kb . In the first two cases, it follows that t ≻ λ s or t ≺ λ s respectively. In the last case, it follows that t = s because O and P are clearly injective.

(O1): By induction on the depth of the context, it suffices to show that t ≻ λ s implies which follows directly from compatibility of ≻ kb with contexts and the induction hypothesis.

f⟨τ⟩ ū t v ≻ λ f⟨τ⟩ ū s v for all t, s, f ∈ Σ \ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃}, τ,
(O2): Let s be a term. We show that s ⪰ λ s| p by induction on p, where s| p denotes the green subterm at position p. If p = ε, this is trivial. If p = p ′ .i, we have s ⪰ λ s| p ′ by the induction hypothesis. Hence, it suffices to show that s| p ′ ⪰ λ s| p ′ .i . From the existence of the position p ′ .i, we know that s| p ′ must be of the form s| p ′ = f⟨τ⟩ ūk for some

f ∈ Σ \ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃}. Then s| p ′ .i = u i . The encoding yields P (O(s| p ′ )) = P (f k (O(τ),O(ū k ))) = f k (P (O(τ)),P (O(ū k )))
and hence P (O(s| p ′ )) ⪰ kb P (O(s| p ′ .i )) by the subterm property of ≻ kb . Hence, s| p ′ ⪰ λ s| p ′ .i and thus s ⪰ λ s| p .

(O3): Since we do not have a symbol of weight 0, and

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 have weight 1,
there cannot be any term of smaller weight. Since moreover

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 have the lowest precedence, they are the smallest terms w.r.t. ≻ kb . We have ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 ≻ kb ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 because ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 has higher precedence. Since P (O(⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)) = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 and P (O(⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)) = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 , it follows that ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ are the smallest ground terms w.r.t. ≻ λ and that ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≻ λ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤. (O4): Let Q⟨τ⟩ t and u be Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normal ground terms. We assume that the Boolean green sub-

terms of u are ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥. We must show Q⟨τ⟩ t ≻ λ t u, which is equivalent to P (O(Q⟨τ⟩ t)) ≻ kb P (O(t u)). All symbols except ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 have finite weight. Only ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 have weight ω.
Since all subterm coefficients are 1, the coefficient of ω in the weight of a given term indicates the number of occurrences of the symbols

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 in that term.
In η-expanded form, we have t = λx. s for some s. Then we have P (O(Q⟨τ⟩ t)) = Q 1 (P (O(τ)),P (O(B x (s)))) and P (O(t u)

) = P (O(s{x → u})). By Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, P (O(u)) does not contain ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 or ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ 1 . So P (O(B x (s)))) and P (O(s{x → u})) contain the same number of ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ 1 and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃
∃ ∃ ∃ ∃ ∃ 1 symbols. Hence, P (O(Q⟨τ⟩ t)) contains exactly one more of these symbols than P (O(t u)). This means that the weight of the former is larger than the weight of the latter and thus P (O(Q⟨τ⟩ t)) ≻ kb P (O(t u)). ⊓ ⊔ Lemma 48 The relation ≻ λ is a strict term order as defined in Definition 17.

Proof Given Lemma 47, it remains to show that ≻ λ is stable under grounding substitutions. Assume s ≻ λ s ′ for some terms s and s ′ . Let θ be a higher-order substitution grounding s and s ′ . We must show sθ ≻ λ s ′ θ. We will define a first-order substitution ρ grounding P (O(s)) and P (O(s ′ )) such that P (O(s))ρ = P (O(sθ)) and P (O(s ′ ))ρ = P (O(s ′ θ)). Since s ≻ λ s ′ , we have P (O(s)) ≻ kb P (O(s ′ )). The transfinite Knuth-Bendix order ≻ kb has been shown to be stable under substitutions [START_REF] Ludwig | An extension of the Knuth-Bendix ordering with LPO-like properties[END_REF]. Hence, P (O(s))ρ ≻ kb P (O(s ′ ))ρ and therefore P (O(sθ)) ≻ kb P (O(s ′ θ)) and sθ ≻ λ s ′ θ.

We define the first-order substitution ρ as αρ = αθ for type variables α, z u ρ = P (O(uθ)), and z ′ u ρ = p(O(uθ)) for terms u. Strictly speaking, the domain of a substitution must be finite, so we restrict this definition of ρ to the finitely many variables that occur in the computation of P (O(s)) and P (O(s ′ )).

Clearly, we have P (O(τ))ρ = P (O(τθ)) and p(O(τ))ρ = p(O(τθ)) for all types τ occurring in the computation of P (O(s)) and P (O(s ′ )). Moreover, P (O(t))ρ = P (O(tθ)) and p(O(t))ρ = p(O(tθ)) for all terms t occurring in the computation of P (O(s)) and P (O(s ′ )), which we show by induction on the structure of t. If t = Q⟨τ⟩ (λx. u), then

If t = x or if t is fluid, P (O(t))ρ = z t ρ = P (O(tθ)). If t = f⟨τ⟩ ū for f ̸ ∈ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃}
P (O(t))ρ = Q 1 (P (O(τ))ρ,P (O(B x (u)))ρ) IH = Q 1 (P (O(τθ)),P (O(B x (u)θ))) = Q 1 (P (O(τθ)),P (O(B x (uθ[x → x])))) = P (O(Q⟨τ⟩ (λx. (uθ[x → x])))) = P (O(Q⟨τ⟩ ((λx. u)θ))) = P (O(tθ))
If t = (λx : τ. u) and t is not fluid, then

P (O(t))ρ = lam(O(τ)ρ,p(O(B x (u)))ρ) = lam(P (O(τ))ρ,p(O(B x (u)))ρ) IH = lam(P (O(τθ)),p(O(B x (u)θ))) = lam(P (O(τθ)),p(O(B x (uθ[x → x])))) = P (O(λx : τθ. (uθ[x → x]))) = P (O((λx : τ. u)θ)) = P (O(tθ))
For p, we can argue analogously, using

Q ′ 1 instead of Q 1 and z ′ t instead of z t . ⊓ ⊔

Refutational Completeness

We present a proof of refutational completeness for our higher-order logic superposition calculus. The literature contains two different notions of refutational completeness: static and dynamic. They are defined as follows. For the precise definitions of inference systems and redundancy criteria, we refer to Waldmann et al. [START_REF] Waldmann | A comprehensive framework for saturation theorem proving[END_REF].

Definition 49 (Static refutational completeness) Let |= be an entailment relation, let Inf be an inference system, and let (Red I , Red C ) be a redundancy criterion. We have introduced three different notions of entailment on the H level: |= G , |=, and | ≈. With respect to |= G , static and dynamic completeness hold unconditionally. For the other two notions of entailment, we will need to add an additional precondition that ensure that the initial clause set is

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal,
which can only be stated for dynamic completeness. For | ≈, we need to require in addition that the initial clause set does not contain any sk symbols.

Outline of the Proof

Following the completeness proof of λfSup and λSup, our proof proceeds in three steps, corresponding to the three levels defined above:

1. We prove static refutational completeness of GFInf . 2. We show static refutational completeness of GHInf by transforming the model constructed on the GF level into a higher-order interpretation. 3. We lift the result to the H level by invoking the saturation framework of Waldmann et al. [START_REF] Waldmann | A comprehensive framework for saturation theorem proving[END_REF].

For the first step, since GFInf is essentially identical with oSup, we can rely on Nummelin et al.'s completeness theorem for oSup. The refutational completeness result holds for any tuple of parameters q ∈ F (Q). In addition to the refutational completeness of GFInf , the subsequent steps also depend on some properties of the constructed model, which we can easily derive from lemmas proved by Nummelin et al.

For the second step, we fix a parameter triple q ∈ Q and a set N ⊆ C GH saturated w.r.t.

GHInf q and not containing the empty clause. Then the first step guarantees us a model of F (N). Based on this model, we construct a higher-order interpretation that we show to be a model of N. In essence, the proof is analogous to the one of λSup, but additionally, we need to consider

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
normality and the logical symbols. For the third step, the main proof obligation the saturation framework leaves to us is to show that nonredundant GHInf q inferences can be lifted to corresponding HInf inferences.

For this lifting, we must choose a suitable parameter triple q ∈ Q, given a clause set N ⊆ C H saturated w.r.t. HInf and the H selection functions. In particular, we must specify the witness function to produce Skolem terms according to the given set N. Then the saturation framework guarantees static refutational completeness w.r.t.|= G . We show that this implies dynamic refutational completeness w.r.t.

|= for Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal initial clause sets.

The Ground First-Order Level

The inference system GFInf is essentially identical with (N) is the model witnessing the completeness, we retrace the last step of their completeness proof in the proof of the following theorem. This also allows us to circumvent the mismatch between the redundancy criteria. Adapted to the context of this article, their completeness theorem can be restated as follows:

Lemma 51 Let C = C ′ ∨ s ≈ t ∈ C GF produce a rule s → t ∈ R * M (i.e., the rule s → t is introduced into R * M because of C). Then s ≈ t is strictly ⪰-eligible in C and C ′ is false in R * M . Proof The literal s ≈ t is ⪰-eligible in C by (C3)
Theorem 52 (Ground first-order static refutational completeness) Let q ∈ F (Q) be a parameter triple. Then the inference system GFInf q is statically refutationally complete w.r.t.

|= and (GFRed I , GFRed C ). More precisely, if N ⊆ C GF is a clause set saturated w.r.t. GFInf q and GFRed q

I such that ⊥ ̸ ∈ N, then R * N\GFRed C (N) is a model of N.
Proof This proof is inspired by the one of Theorem 4.9 of Bachmair and Ganzinger [START_REF] Bachmair | Resolution theorem proving[END_REF]. By Lemma 31 of oSup, GFInf q fulfills the reduction property of counterexamples w.r.t. ≻. This means that for any clause set M where C is the smallest clause in M that is false in R * M , there exists an inference from M with main premise C, side premises that are true in R * M , and a conclusion that is smaller than C and false in R * M . To derive a contradiction, we assume that R * N\GFRed C (N) ̸ |= N. Then there must be a smallest clause in C ∈ N that is false in R * N\GFRed C (N) . Using M = N \ GFRed C (N), we obtain an inference ι with the above properties. Since N is saturated w.r.t. GFInf q and GFRed q I and prems(ι) ⊆ M ⊆ N, we have ι ∈ GFRed q I (N). By definition, this means prems(ι

) ∩ GFRed C (N) ̸ = ∅ or {D ∈ N | D ≺ C} |= concl(ι). Since prems(ι) ⊆ M = N \ GFRed C (N), it must be the latter. Then R * M ̸ |= {D ∈ N | D ≺ C} because R * M ̸ |= concl(ι).
This contradicts the minimality of C. ⊓ ⊔

The Ground Higher-Order Level

In this subsection, let q = (GHLitSel, GHBoolSel, GHWit) ∈ Q be a parameter triple and let N ⊆ C GH . Since all terms on the GH level are

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, in particular N is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
We assume that N is saturated w.r.t. GHInf q and GHRed q I , and that ⊥ ̸ ∈ N. Clearly, F (N) is then saturated w.r.t. GFInf F (sel) and GFRed

F (sel) I and R * F (N)\GFRed C (N) is a model of F (N)
by Theorem 52.

In the following, we abbreviate R *

F (N)\GFRed C (N) as R. Given two terms s, t ∈ T GH , we write s ∼ t to abbreviate R |= F (s) ≈ F (t), which is equivalent to F (s) R = F (t) R .
Lemma 53 For all terms t, s : τ → υ in T GH , these statements are equivalent:

1. t ∼ s; 2. t (diff t s) ∼ s (diff t s); 3. t u ∼ s u for all u ∈ T GH .
Proof Analogous to Lemma 38 of λSup, using Lemma 51 and the βηQ η -normal form. ⊓ ⊔ Lemma 54 Let s ∈ T H and let θ, θ ′ be grounding substitutions such that sθ and sθ ′ are

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, xθ ∼ xθ ′
for all variables x, and αθ = αθ ′ for all type variables α. Then sθ ∼ sθ ′ .

Proof This proof is almost identical to the one of Lemma 39 of λSup [START_REF] Bentkamp | Superposition with lambdas[END_REF]. The only difference lies in Case 4.1 that must deal with quantifiers. What follows is a copy of the beginning of this previous proof that introduces the notions relevant to deal with the extra case here.

In this proof, we work directly on λ-terms. To prove the lemma, it suffices to prove it for any λ-term s. Here, for λ-terms t 1 and t 2 , the notation t 1 ∼ t 2 is to be read as t 1 ↓ βηQ η ∼ t 2 ↓ βηQ η because F is only defined on βηQ η -normal terms.

DEFINITION We extend the syntax of λ-terms with a new polymorphic function symbol ⊕ : Πα. α → α → α. We will omit its type argument. It is equipped with two reduction rules: ⊕ t s → t and ⊕ t s → s. A β⊕-reduction step is either a rewrite step following one of these rules or a β-reduction step.

The computability path order ≻ CPO [START_REF] Blanqui | The computability path ordering[END_REF] guarantees that -⊕ t s ≻ CPO s by applying rule @▷; -⊕ t s ≻ CPO t by applying rule @▷ twice;

-(λx. t) s ≻ CPO t[x → s] by applying rule @β.
Since this order is moreover monotone, it decreases with β⊕-reduction steps. The order is also well-founded; thus, β⊕-reductions terminate. And since the β⊕-reduction steps describe a finitely branching term rewrite system, by Kőnig's lemma [START_REF] Kőnig | Über eine Schlussweise aus dem Endlichen ins Unendliche[END_REF], there is a maximal number of β⊕-reduction steps from each λ-term.

DEFINITION A λ-term is term-ground if it does not contain free term variables. It may contain polymorphic type arguments. DEFINITION We introduce an auxiliary function S that essentially measures the size of a λ-term but assigns a size of 1 to term-ground λ-terms.

S(s) =      1
if s is term-ground or is a bound or free variable or a symbol 1 + S(t) if s is not term-ground and has the form λx. t S(t) + S(u) if s is not term-ground and has the form t u

We prove sθ ∼ sθ ′ by well-founded induction on s, θ, and θ ′ using the left-to-right lexicographic order on the triple n 1 (s), n 2 (s), n 3 (s) ∈ N 3 , where n 1 (s) is the maximal number of β⊕-reduction steps starting from sσ, where σ is the substitution mapping each term variable x to ⊕ xθ xθ ′ ; n 2 (s) is the number of free term variables occurring more than once in s; n 3 (s) = S(s).

In Case 4.1 of the proof of Lemma 39 of λSup [START_REF] Bentkamp | Superposition with lambdas[END_REF], we consider a λ-term s that contains exactly one free term variable that occurs exactly once in s and s is of the form f ⟨τ⟩ t, for some symbol f, some types τ, and some λ-terms t. For any f /

∈ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃} the proof proceeds as
before, because then the definition of the encoding F coincides with the one of λSup. The remaining case to handle is thus when s is of the form Q⟨τ⟩ (λz. t).

In that case, we have F (sθ) R = Qz. F (tθ) R where Q ∈ {∀, ∃}, but θ and θ ′ are not necessarily grounding for t since t may contain the variable z that is bound in s. Thus, we cannot apply our induction hypothesis directly on t. Instead we want to apply it on t{z → u}, which we denote t u , where u ∈ T GH . It is possible to apply the induction hypothesis to obtain

t u θ ∼ t u θ ′ because -n 1 (s) = n 1 (t u
) since all β⊕-reductions in s are also in t u ; n 2 (s) = 0 = n 2 (t u ) since the same unique free term variable occurs in s and in t u ; and

-n 3 (t u ) < n 3 (s) because S(z) = S(u) = 1 implies n 3 (t u ) = n 3 (t) and hence n 3 (s) = S(Q) + S(λz. t) = 1 + 1 + S(t) = 1 + 1 + S(t u ).
Moreover, since θ and θ ′ do not capture z, and since u is Lemma 9 and similarly for θ ′ . Thus, we obtain (tθ){z → u} ∼ (tθ ′ ){z → u}.

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, t u θ = (tθ){z → u} is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal by
Now, let us consider the case where

Q = ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀:
By the definition of interpretations on the GF level, by Lemma 6 (substitution lemma) of oSup, and R being term-generated, we have

∀z. F (tθ) ξ R = min{ F (tθ) ξ[z →a] R | a ∈ U τ } = min{ F (tθ){z → v} ξ R | v ∈ T GF } = min{ F (tθ{z → u}) ξ R | u ∈ T GH }
The same holds for θ ′ . Moreover, above we deduced (tθ){z → u} ∼ (tθ ′ ){z → u} from the induction hypothesis. Thus, sθ ∼ sθ ′ , as desired in the case

Q = ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀. The case Q = ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ is analogous, with max instead of min. ⊓ ⊔
We proceed by defining a higher-order interpretation I GH = (U GH , J GH ty , J GH , L GH ) derived from R. We call this interpretation I GH because we use it to show refutational completeness of GHInf ; it is a higher-order interpretation as defined in Section 2, which can interpret ground as well as nonground terms. Let (U, J) = R, meaning that U τ is the universe of R for type τ and J is the interpretation function of R.

To illustrate the construction, we will employ the following running example. Let Σ ty = {ι, o, →} and let Σ contain f : ι → ι and a : ι, as well as the logical symbols and the choice constant ε. Then, on the GF level, the type signature is also Σ ty , and the term signature is the set Σ GF , which contains f 0 , f 1 , a 0 , subscripted versions of all logical symbols, such as

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 , ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ 0 , and ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ 1 ,

as well as symbols ε τ

i for each τ ∈ Ty GH , and a symbol lam λx. t for each λx. t ∈ T GH . We write [t] for the equivalence class of t ∈ T GF modulo R. The universes U τ are sets of such equivalence classes; for instance

[f 1 (a 0 )] ∈ U ι , [¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ 0 ] ∈ U o→o , and [lam λx. a ] ∈ U ι→ι . We assume that R is such that [a 0 ], [f 1 (a 0 )], [f 1 (f 1 (a 0 ))], .
. . are all different from each other, and therefore that U ι is infinite.

When defining the universe U GH of the higher-order interpretation, we need to ensure that it contains subsets of function spaces, since J GH ty (→)(D 1 , D 2 ) must be a subset of the function space from D 1 to D 2 for all D 1 , D 2 ∈ U GH . However, the first-order universes U τ consist of equivalence classes of terms from T GF w.r.t. the rewriting system R, not of functions.

To repair this mismatch, we will define a family of functions E τ that give a meaning to the elements of the first-order universes U τ . We will define a domain D τ for each ground type τ and then let U GH be the set of all these domains D τ . Thus, there will be a one-to-one correspondence between ground types and domains. Since the higher-order and first-order type signatures are identical (including →, which is uninterpreted in GF's logic), we can identify higher-order and first-order types.

We define E τ and D τ in a mutual recursion. To ensure well definedness, we must simultaneously show that E τ is bijective. We start with nonfunctional types τ: Let D τ = U τ and let E τ : U τ -■ → D τ be the identity. Clearly, the identity is bijective. For functional types, we define

D τ→υ = φ : D τ -■ → D υ | ∃ s : τ → υ. ∀ u : τ. φ E τ F (u) R = E υ F (s u) R E τ→υ : U τ→υ -■ → D τ→υ E τ→υ ( F (s) R ) E τ F (u) R = E υ F (s u) R
To verify that this equation is a valid definition of E τ→υ , we must show that

-every element of U τ→υ is of the form F (s) R for some s ∈ T GH ; -every element of D τ is of the form E τ F (u) R for some u ∈ T GH ;
the definition does not depend on the choice of such s and u;

-E τ→υ ( F (s) R ) ∈ D τ→υ for all s ∈ T GH .
The first claim holds because R is term-generated and F is a bijection. The second claim holds because R is term-generated and F and E τ are bijections. To prove the third claim, we assume that there are other ground terms t ∈ T GH and v ∈ T GH such that

F (s) R = F (t) R and E τ F (u) R = E τ F (v) R . Since E τ is bijective, we have F (u) R = F (v) R .
Using the ∼-notation, we can write this as u ∼ v. The terms s, t, u, and v are in T GH , and thus

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈normal, allowing us to apply Lemma 54 to the term x y and the substitutions {x → s, y → u} and {x → t, y → v}. Thus, we obtain s u ∼ t v-i.e., F (s u) R = F (t v) R , indicating that the definition of E τ→υ above does not depend on the choice of s and u. The fourth claim is obvious from the definition of D τ→υ and the third claim.

It remains to show that E τ→υ is bijective. For injectivity, we fix two terms s, t ∈ T GH such that for all u ∈ T GH , we have F (s u) R = F (t u) R . By Lemma 53, it follows that F (s) R = F (t) R , which shows that E τ→υ is injective. For surjectivity, we fix an element φ ∈ D τ→υ . By definition of D τ→υ , there exists a term s such that φ

E τ F (u) R = E υ F (s u) R for all u.
Hence, E τ→υ ( F (s) R ) = φ, proving surjectivity and therefore bijectivity of E τ→υ . Below, we will usually write E instead of E τ since the type τ is determined by E τ 's first argument.

In our running example, we have

D ι = U ι = {[a 0 ], [f 1 (a 0 )], [f 1 (f 1 (a 0 ))], . . . } and E ι is the identity U ι → D ι , c → c. The function E ι→ι maps [lam λx.x ] to the identity D ι → D ι , c → c; it maps [lam λx.a ] to the constant function D ι → D ι , c → [a 0 ]; it maps [f 0 ] to the function D ι → D ι , [t] → [f 1 (t)]; and it maps [ε ι→ι 1 (lam λz. z (f a) ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ a )] to the function D ι → D ι , [t] → [ε ι→ι 2 (lam λz. z (f a) ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ a , t)].
There are many more functions in D ι→ι = E ι→ι (U ι→ι ), but still D ι→ι is a proper subset of the function space U ι → U ι because the function space is uncountably infinite, whereas T GF and hence D ι→ι is countable. Thus, the construction works only because we allow nonstandard Henkin models.

We define the higher-order universe as U GH = {D τ | τ ground}. In particular, this implies that D o = {0, 1} ∈ U GH as needed, where 0 is identified with

[⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 ] and 1 with [⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 ]. Moreover, we define J GH ty (κ)(D τ) = U κ(τ)
for all κ ∈ Σ ty , completing the type interpretation of I GH ty = (U GH , J GH ty ) and ensuring that J GH ty (o) = U o = {0, 1}. We define the interpretation function J GH for nonquantifier symbols f : Π ᾱm . τ by J GH (f, D ῡm ) = E(J(f ῡm 0 )), and for quantifiers by

J GH (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, D τ )( f ) = min{ f (a) | a ∈ D τ } and J GH (∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃, D τ )( f ) = max{ f (a) | a ∈ D τ } for all f ∈ J GH ty (→)(D τ , {0 ,
1}). In our example, we thus have

J GH (f) = E([f 0 ]), which is the function [t] → [f 1 (t)].
We must show that this definition indeed fulfills the requirements of an interpretation function (Section 2.2). By definition, we have

(I1) J GH (⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) = E( ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 R ) = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 R = 1; and (I2) J GH (⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) = E( ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 R ) = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 R = 0. Let a, b ∈ {0, 1}, u 0 = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, and u 1 = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤. Then (I3) J GH (∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧)(a, b) = E( F (∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧) R )( F (u a ) R , F (u b ) R ) = E( F (u a ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ ∧ u b ) R ) = min {a, b}; (I4) J GH (∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨)(a, b) = E( F (u a ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ ∨ u b ) R ) = max {a, b}; (I5) J GH (¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬)(a) = E( ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ 0 R )( F (u a ) R ) = E( F (¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬u a ) R ) = F (¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬u a ) R = 1 -a; and (I6) J GH (→ → → → → → → → → → → → → → → → → → → → → → → → →)(a, b) = E( F (u a → → → → → → → → → → → → → → → → → → → → → → → → → u b ) R ) = max {1 -a, b}. Let D ∈ U GH and a ′ , b ′ ∈ D.
(I7) Since E is bijective and R is term-generated, there exist ground terms u and v such that

E( F (u) R ) = a ′ and E( F (v) R ) = b ′ . Then J GH (≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈)(a ′ , b ′ ) = E( F (≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈) R )(E( F (u) R ), E( F (v) R )) = E( F (u ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ v) R ) which is 1 if a ′ = b ′ and 0 otherwise. (I8) Similarly J GH (̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈)(a ′ , b ′ ) = 0 if a ′ = b ′ and 1 otherwise. (I9) The requirement for ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ holds by definition of J GH . (I10) The requirement for ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ holds by definition of J GH . (I11) Let D τ ∈ U GH and f ∈ J ty (→)(D τ , {0, 1}). For the requirement on ε, we must show that f (J GH (ε⟨τ⟩)( f )) = max{ f (a) | a ∈ D τ }.
First, we assume that f (J GH (ε⟨τ⟩)( f )) = 0. We want to show that max{ f (a) | a ∈

D τ } = 0. Let a ∈ D τ . We have f = E( F (p) R ) for some p : τ → o and a = E( F (u) R )
for some u : τ ∈ T GH because E and F are bijective and R is term-generated. Since N is saturated, all conclusions of GCHOICE belong to N. In particular, we have

(p u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ p (ε⟨τ⟩ p) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ∈ N and hence F (p u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ p (ε⟨τ⟩ p) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) R = 1. Thus, we have max{ F (p u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) R , F (p (ε⟨τ⟩ p) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) R } = 1. Since we have f (J GH (ε⟨τ⟩)( f )) = F (p (ε⟨τ⟩ p) ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) R , our assumption implies that F (p u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) R = 1. Moreover, F (p u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) R = 1 ⇔ (F (p u)) ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ 0 R = 1 ⇔ F (p u) R = 0 ⇔ E( F (p u) R ) = 0 ⇔ E( F (p) R )(E( F (u) R )) = 0 ⇔ f (a) = 0
Since our choice of a was arbitrary, this shows that max{ f (a) | a ∈ D τ } = 0. For the other direction, we assume that max{ f (a) | a ∈ D τ } = 0. Then, by definition of max, and since J GH (ε⟨τ⟩)( f ) ∈ D τ , we have in particular f (J GH (ε⟨τ⟩)( f )) = 0. Thus, we have f

(J GH (ε⟨τ⟩)( f )) = max{ f (a) | a ∈ D τ } as required.
This concludes the proof that J GH is an interpretation function.

Finally, we need to define the designation function L GH , which takes a valuation ξ and a λ-expression λx. t as arguments. Given ξ and λx. t, we choose a grounding substitution θ such that D αθ = ξ(α) and E( F (yθ) R ) = ξ(y) for all type variables α and all variables y in λx. t. Such a substitution can be constructed as follows: We can fulfill the first equation in a unique way because there is a one-to-one correspondence between ground types and domains. Since E -1 (ξ(y)) is an element of a first-order universe and R is term-generated, there exists a ground term s such that s ξ R = E -1 (ξ(y)). Choosing one such s and defining yθ = F -1 (s)

gives us a grounding substitution θ with the desired property.

We define L GH (ξ, (λx.

t)) = E( F ((λx. t)θ) R ) if λx. t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, and otherwise L GH (ξ, (λx. t)) = L GH (ξ, (λx. t) ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ). Since F is only defined on Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal terms, we need to show that (λx. t)θ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal if λx. t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. This holds because by construction of θ all yθ are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal
and thus so is (λx. t)θ according to Lemma 9. Moreover we need to show that our definition does not depend on the choice of θ. We assume that there exists another substitution θ ′ with the properties D αθ ′ = ξ(α) for all α and E( F (yθ ′ ) R ) = ξ(y) for all variables y in λx. t. Then we have αθ = αθ ′ for all α due to the one-to-one correspondence between domains and ground types. We have F (yθ) R = F (yθ ′ ) R for all free variables y in λx. t because E is injective. By Lemma 54 it follows that F ((λx. t)θ) R = F ((λx. t)θ ′ ) R , which proves that L GH is well defined.

In our running example, for all ξ we have L GH (ξ, λx.

x) = E([lam λx. x ]), which is the identity. If ξ(y) = [a 0 ], then L GH (ξ, λx. y) = E([lam λx. a ]), which is the constant function c → [a 0 ].
This concludes the definition of the interpretation I GH = (U GH , J GH ty , J GH , L GH ). It remains to show that I GH is proper. We need a lemma:

Lemma 55 Let I be an interpretation such that λx.

t ξ I (a) = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ[x →a] I
for all λ-terms t and all valuations ξ.

Then Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
normalization preserves denotations of terms and truth of clauses w.r.t. I.

Proof We must show t ξ I = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ
I for all λ-terms t and all valuations ξ. We cannot work with βη-equivalence classes here because that would require the interpretation to be proper and thus result in a circular argument. We proceed by induction on the structure of t.

If t = λx. u, by applying our assumption on I twice and because

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normalization is idempotent, we have for all a t ξ I (a) = λx. u ξ I (a) = u ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ[x →a] I = u ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ[x →a] I = λx. (u ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ) ξ I (a) = (λx. u) ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I (a) = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I (a)
Otherwise, if t = s ū, where s is a head that is not of the form Q⟨τ⟩,

t ξ I = s ū ξ I = s ξ I ( ū ξ I ) IH = s ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I ( ū ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I ) = (s ū) ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I If t = Q⟨τ⟩ u, where t is not Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -reducible at its head, then

t ξ I = Q⟨τ⟩ u ξ I = Q⟨τ⟩ ξ I ( u ξ I ) IH = Q⟨τ⟩ ξ I ( u ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I ) = (Q⟨τ⟩ u) ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ I Otherwise we have t = Q⟨τ⟩ or t = Q⟨τ⟩ u such that t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -reducible at its head. In these cases, it suffices to show that ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ ξ I = λy. y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ξ I and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃⟨τ⟩ ξ I = λy. y ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ (λx. ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) ξ I
for all types τ and all valuations ξ. The argument we use here resembles the proof of Lemma 28, but here we cannot assume I to be proper. Let f be a function from τ ξ I ty to {0, 1}. Then

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ ξ I ( f ) = J(∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, τ ξ I ty )( f ) = min { f (a) | a ∈ τ ξ I ty } = 1 if f is constantly 1 0 otherwise
By our assumption on I, we have

λy. y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ξ I ( f ) = (y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)) ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ[y → f ] I = y ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ (λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) ξ[y → f ] I = 1 if y ξ[y → f ] I = λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ξ[y → f ] I 0 otherwise
Thus, it remains to show that y

ξ[y → f ] I = λx. ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ξ[y → f ] I if and only if f is constantly 1. This holds because y ξ[y → f ] I (a) = f (a)
and, by our assumption on I, λx.

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ξ[y → f ] I (a) = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ξ[x →a, y → f ] I = 1 for all a ∈ τ ξ I ty . The case of ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ is analogous. ⊓ ⊔
Corollary 56 Let I be an interpretation such that λx.

t ξ I (a) = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ[x →a] I
for all λ-terms t and all valuations ξ. Then I is proper.

Thus, to show that I GH is proper, it suffices to prove that λx.

t ξ I GH (a) = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ[x →a]
I GH . For quantifiers, we have the following relation between the higher-order interpretation I GH and the first-order interpretation R:

Lemma 57 Let Q ∈ {∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃} and f ∈ J GH ty (→)(D τ , {0, 1}). Then, for any term p such that Q⟨τ⟩(λx. p) is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal and such that f = E( F (λx. p) R ), J GH (Q, D τ )( f ) = E( F (Q⟨τ⟩(λx. p)) R )
Proof Let Q, f , and p be as in the preconditions of the lemma.

If Q = ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, then J GH (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀, D τ )( f ) = min{ f (a) | a ∈ D τ } = min{E τ→o ( F (λx. p) R )(E τ ( F (u) R )) | E τ ( F (u) R ) ∈ D τ } = min{E o ( F ((λx. p) u) R ) | E τ ( F (u) R ) ∈ D τ } = min{ F ((λx. p) u) R | F (u) R ∈ U τ } = min{ F (p{x → u}) R | F (u) R ∈ U τ } = min{ F (p){x → F (u)} R | F (u) R ∈ U τ }
since, by Lemma 7, x never occurs free under a λ in p

= min { F (p) ξ{x →a ′ } R | a ′ ∈ U τ } by Lemma 6 (substitution lemma) of oSup = ∀x. F (p) R = E o ( F (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ (λx. p)) R ) If Q = ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃, the proof is analogous, but uses max instead of min. ⊓ ⊔ A similar relation holds on all Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal terms: Lemma 58 Given a ground Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal λ-term t, we have t I GH = E( F (t ↓ βηQ η ) R )
Proof The proof is analogous to that of Lemma 40 of λSup, using the βηQ η -normal form instead of the βη-normal form and with a special case for quantifier-headed terms. We proceed by induction on t. Assume that s I GH = E( F (s↓ βηQ η ) R ) for all proper subterms s of t. If t is of the form f⟨τ⟩, then it cannot be a quantifier since

t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Thus, t I GH = J GH (f, D τ) = E(J(f 0 , U F (τ) )) = E( f 0 ⟨F (τ)⟩ R ) = E( F (f⟨τ⟩) R ) = E( F (f⟨τ⟩↓ βηQ η ) R ) = E( F (t ↓ βηQ η ) R ) If t is of the form t = Q⟨τ⟩ u, then u = λx. v since t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, and
Q⟨τ⟩ (λx. v) I GH = Q⟨τ⟩ I GH λx. v I GH = E o ( F (Q⟨τ⟩ (λx. v)) R )
by Lemma 57

= E o ( F ((Q⟨τ⟩ (λx. v))↓ βηQ η ) R )
by the definition of F If t is an application t = t 1 t 2 , where t 1 is of type τ → υ and t 1 is not a quantifier, then

t 1 t 2 I GH = t 1 I GH ( t 2 I GH ) IH = E τ→υ ( F (t 1 ↓ βηQ η ) R )(E τ ( F (t 2 ↓ βηQ η ) R )) = E υ ( F ((t 1 t 2 )↓ βηQ η ) R ) If t is a λ-expression, then λx. u ξ I GH = L GH (ξ, (λx. u)) = E( F ((λx. u)θ↓ βηQ η ) R ) = E( F ((λx. u)↓ βηQ η ) R )
where θ is a substitution such that D αθ = ξ(α) and E( F (xθ) R ) = ξ(x).

⊓ ⊔

We also need to employ the following lemma, which is very similar to the substitution lemma, but we must prove it here for our particular interpretation I GH because we have not shown that I GH is proper yet.

Lemma 59 (Substitution lemma) We have τρ ξ Proof By Corollary 56, it is enough to show that λx.

I GH ty = τ ξ ′ I GH ty and tρ ξ I GH = t ξ ′ I GH for all Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal λ-terms t,
t ξ I GH (a) = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ[x →a] I GH . First, we show it for all Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
F (s) R ) = a = E( F (t(θ[x → s])↓ βηQ η ) R ) by β-reduction = t(θ[x → s]) I GH by Lemma 58 = t ξ[x →a] I GH by Lemma 59 = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ξ[x →a] I GH because t is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -

normal by definition

The case where λx.

t is not Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal is reduced to the previous case because then λx. t ξ I GH (a) = L GH (ξ, (λx.t) ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ )(a) and (λx.t) ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ = λx.t ′ where t ′ = t ↓ Q≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ by definition. ⊓ ⊔ Lemma 61 I GH is a model of N. Proof Because all terms in N are Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normal, by Lemma 58, t I GH = E( F (t) R ) for all t ∈ T GH . Since E is a bijection, it follows that any literal s ≈ t ∈ C GH is true in I GH if and only if F (s ≈ t) is true in R. Hence, a clause C ∈ C GH is true in I GH if and only if F (C) is true in R. By Theorem 52 and the assumption that ⊥ / ∈ N, R is a model of F (N)-that is, for all clauses C ∈ N, F (C) is true in R. Hence, all clauses C ∈ N are true in I GH and therefore

I GH is a model of N. ⊓ ⊔
We summarize the results of this subsection in the following theorem:

Theorem 62 (Ground static completeness) Let q ∈ Q be some parameter triple. Then GHInf q is statically refutationally complete w.r.t. |= and (GHRed q I , GHRed C ). In other words, if N ⊆ C GH is a clause set saturated w.r.t. GHInf q and GHRed q I , then N |= ⊥ if and only if ⊥ ∈ N.

The construction of I GH relies on the specific properties of R. It would not work with an arbitrary interpretation. In the other direction, transforming a higher-order model into a first-order model with interpreted Booleans is easier, as the following lemma shows: Lemma 63 Given a proper higher-order interpretation I on GH, there exists an interpretation I GF on GF such that for any clause C ∈ C GH the truth values of C in I and of F (C) in I GF coincide.

Proof Let I = (I ty , J, L) be a proper higher-order interpretation on GH. Let U GF τ = τ I ty be the GF universe for the ground type τ. For a symbol f ῡ j ∈ Σ GF , let J GF (f ῡ j ) = f⟨ ῡ⟩ I (up to currying). For a symbol lam λx. t ∈ Σ GF , let J GF (lam λx. t ) = λx. t I .

The requirements on the GF-interpretation of logical symbols are fulfilled because we have similar requirements on H:

U GF o = J ty (o) = {0, 1}; J GF (⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ 0 ) = J(⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) = 1; J GF (¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ 1 )(a) = J(¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬)(a) = 1 -a;
and similarly for the other logical symbols. Thus, this defines an interpretation I GF = (U GF , J GF ) on GF.

We need to show that for any C ∈ C GH , I |= C if and only if I GF |= F (C). It suffices to show that t ξ I = F (t) ξ I GF for all terms t ∈ T GH . We prove this by induction on the structure of the βηQ η -normal form of t. If t is a λ-expression, this is obvious. If t is of the form f⟨ ῡ⟩ sj , then F (t) = f ῡ j (F ( sj )) and hence

F (t) ξ I GF = J GF (f ῡ j )( F ( sj ) ξ I GF ) = f⟨ ῡ⟩ ξ I ( F ( sj ) ξ I GF ) IH = f⟨ ῡ⟩ ξ I ( sj ξ I ) = t ξ I If t is of the form ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀
∀ ∀ ∀ ∀ ∀⟨τ⟩ (λx. s), then F (t) = ∀x. F (s) and hence

F (t) ξ I GF = min{ F (s) ξ[x →a] I GF | a ∈ U GF τ } IH = min{ s ξ[x →a] I | a ∈ τ I ty } = min{ λx. s ξ I (a) | a ∈ τ I ty } = t ξ I A similar argument applies for ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃.
Since the definition of F recurses into subterms below quantifiers, we finally need to consider the case where t is a variable x. In that case, we have F (x) = x and hence F (t) ξ

I GF = ξ(x) = t ξ I . ⊓ ⊔

The Nonground Higher-Order Level

To lift the result to the nonground level, we employ the saturation framework of Waldmann et al. [START_REF] Waldmann | A comprehensive framework for saturation theorem proving[END_REF]. Clearly, the entailment relation |= on GH qualifies as a consequence relation in the sense of the framework. We need to show that our redundancy criterion on GH qualifies as a redundancy criterion and that G qualifies as a grounding function:

Lemma 64 The pair (GHRed q I , GHRed C ) is a redundancy criterion in the sense of the saturation framework.

Proof We must prove the conditions (R1) to (R4) of the saturation framework. Adapted to our context, they state the following for all clause sets N, N ′ ⊆ C GH : For the first part of (R2), let

(R1) if N |= ⊥, then N \ GHRed C (N) |= ⊥; (R2) if N ⊆ N ′ , then GHRed C (N) ⊆ GHRed C (N ′ ) and GHRed I (N) ⊆ GHRed I (N ′ ); (R3) if N ′ ⊆ GHRed C (N), then we have GHRed C (N) ⊆ GHRed C (N \ N ′ ) and GHRed I (N) ⊆ GHRed I (N \ N ′ ); (R4) if ι ∈ GHInf and concl(ι) ∈ N, then ι ∈ GHRed I (N).
N ⊆ N ′ and C ∈ GHRed C (N), i.e., {D ∈ F (N) | D ≺ F (C)} |= F (C). We must show that {D ∈ F (N ′ ) | D ≺ F (C)} |= F (C). This is obvious because {D ∈ F (N) | D ≺ F (C)} ⊆ {D ∈ F (N ′ ) | D ≺ F (C)}.
For the second part of (R2), let N ⊆ N ′ and ι ∈ GHRed I (N). We must show that ι ∈ GHRed I (N ′ ). If ι is a GARGCONG, GEXT, or GCHOICE inference, we have concl(ι) ∈ N ∪ GHRed C (N). Using the first part of (R2), it follows that N ∪ GHRed C (N) ⊆ N ′ ∪ GHRed C (N ′ ), which implies ι ∈ GHRed I (N ′ ). If ι is some other kind of inference, we have

prems(F (ι)) ∩ GFRed C (F (N)) ̸ = ∅ or {D ∈ F (N) | D ≺ mprem(F (ι))} |= concl(F (ι)).
In the first case, prems(F (ι)) ∩ GFRed C (F (N ′ )) ̸ = ∅ because by the first part of (R2), we have GFRed C (F (N)) ⊆ GFRed C (F (N ′ )). In the second case, we have

{D ∈ F (N ′ ) | D ≺ mprem(F (ι))} |= concl(F (ι)) because N ⊆ N ′ implies {D ∈ F (N) | D ≺ mprem(F (ι))} ⊆ {D ∈ F (N ′ ) | D ≺ mprem(F (ι))}.
For the first part of (R3), let For the second part of (R3), let N ′ ⊆ GHRed C (N) and ι ∈ GHRed I (N). We must show that ι ∈ GHRed I (N \ N ′ ). If ι is a GARGCONG, GEXT, or GCHOICE inference, we have concl(ι) ∈ N ∪ GHRed C (N). Using N ′ ⊆ GHRed C (N), and by the first part of (R3), it follows that concl(ι)

N ′ ⊆ GHRed C (N) and C ∈ GHRed C (N), i.e., {D ∈ F (N) | D ≺ F (C)} |= F (C). We must show that {D ∈ F (N \ N ′ ) | D ≺ F (C)} |= F (C). Let I be a model of {D ∈ F (N \ N ′ ) | D ≺ F (C)}.
∈ N ∪ GHRed C (N) = (N \ N ′ ) ∪ GHRed C (N) ⊆ (N \ N ′ ) ∪ GHRed C (N \ N ′ ) and therefore ι ∈ GHRed I (N \ N ′ ). If ι is some other kind of inference, we have prems(F (ι)) ∩ GFRed C (F (N)) ̸ = ∅ or {D ∈ F (N) | D ≺ mprem(F (ι))} |= concl(F (ι)).
In the first case, prems(F (ι)) ∩ GFRed C (F (N \ N ′ )) ̸ = ∅ because by the first part of (R3), we have GFRed C (F (N)) ⊆ GFRed C (F (N \ N ′ )). In the second case, it suffices to show that

{D ∈ F (N \ N ′ ) | D ≺ mprem(F (ι))} |= {D ∈ F (N) | D ≺ mprem(F (ι))},
which can be shown analogously to the induction used for the first part of (R3).

For (R4), let ι ∈ GHInf and concl(ι) ∈ N. We must show that ι ∈ GHRed I (N). If ι is a GARGCONG, GEXT, or GCHOICE inference, we must show concl(ι) ∈ N ∪ GHRed C (N), which obviously holds by assumption. If ι is some other kind of inference, it suffices to show

{D ∈ F (N) | D ≺ mprem(F (ι))} |= concl(F (ι)). This holds because concl(F (ι)) ∈ F (N)
and concl(F (ι)) ≺ mprem(F (ι)).

⊓ ⊔

Lemma 65 For every q ∈ Q, the function G q is a grounding function in the sense of the saturation framework.

Proof We must prove the conditions (G1), (G2), and (G3) of the saturation framework. Adapted to our context, they state the following:

(G1) G(⊥) = {⊥}; (G2) for every C ∈ C H , if ⊥ ∈ G(C), then C = ⊥; (G3) for every ι ∈ HInf , G q (ι) ⊆ GHRed q I (G(concl(ι))).
Clearly, C = ⊥ if and only if ⊥ ∈ G(C) if and only if G(C) = {⊥}, proving (G1) and (G2). For every ι ∈ HInf , by the definition of G q (Definition 44) and by Lemma 41, we have concl(G q (ι)) ⊆ G(concl(ι)), and thus (G3) by (R4).

⊓ ⊔

To lift the completeness result of the previous subsection to the nonground calculus HInf , we employ Theorem 14 of the saturation framework, which, adapted to our context, is stated as follows.

Theorem 66 (Lifting theorem) If, for every parameter triple q ∈ Q, GHInf q is statically refutationally complete w.r.t. (GHRed q I , GHRed C ), and if for every N ⊆ C H that is saturated w.r.t. HInf and HRed I there exists a q ∈ Q such that GHInf q (G(N)) ⊆ G q (HInf (N)) ∪

GHRed q

I (G(N)), then also HInf is statically refutationally complete w.r.t. (HRed I , HRed C ) and |= G .

Proof This is almost an instance of Theorem 14 of the saturation framework. We take C H for F, C GH for G. Clearly, the entailment relation |= on GH is a consequence relation in the sense of the framework. By Lemma 64 and 65, (GHRed q I , GHRed C ) is a redundancy criterion in the sense of the framework, and G q are grounding functions in the sense of the framework, for all q ∈ Q. The redundancy criterion (HRed I , HRed C ) matches exactly the intersected lifted redundancy criterion Red ∩G,⊐ of the saturation framework. Theorem 14 of the saturation framework applies only when ⊐ = ∅. By Lemma 16 of the saturation framework, it also holds if ⊐ ̸ = ∅.

⊓ ⊔

Let N ⊆ C H be a clause set saturated w.r.t. HInf and HRed I . For the above theorem to apply, we need to show that there exists a q ∈ Q such that all inferences ι ∈ GHInf q with prems(ι) ∈ G(N) are liftable or redundant. Here, ι being liftable means that ι is a G q -ground instance of an HInf -inference from N; ι being redundant means that ι ∈ GHRed q I (G(N)). To choose the right q = (GHLitSel, GHBoolSel, GHWit) ∈ Q, we observe that each ground clause C ∈ G(N) must have at least one corresponding clause D ∈ N such that C is a ground instance of D. We choose one of them for each C ∈ G(N), which we denote by G -1 (C).

Then we choose GHLitSel and GHBoolSel such that the selections in C correspond to those in G -1 (C) in the sense of Definition 38.

To choose the witness function GHWit, let C ∈ C GH and let p be a green position of a quantifier-headed term C| p = Q⟨τ⟩ t. Let D = G -1 (C) and let θ be the grounding substitution such that Dθ = C. Let p ′ be the green position corresponding to p in D. If there exists no such position p ′ , we define GHWit(C, p) to be some arbitrary term that fulfills the order requirements of a witness function. Otherwise, let β and y be fresh variables and we extend θ to a substitution θ ′ by defining βθ ′ = τ and yθ ′ = t. Then θ ′ is a unifier of Q⟨β⟩ y and D| p ′ and hence there exists an idempotent σ ∈ CSU(Q⟨β⟩ y, D| p ′ ) such that for some substitution ρ and for all free variables x in D and for x ∈ {y, β}, we have xσρ = xθ ′ . We let GHWit(C, p) be sk Otherwise, the position p is neither selected nor at the top level. Let q be the position directly above p and q ′ be the position directly above p ′ . By the induction hypothesis, q and q ′ are eligible. If the head of Cθ p is not

Π ᾱ. ∀ x. ∃z. ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬(yσ z) ⟨ ᾱ⟩ xθ if the quantifier-headed term is a ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀-term and sk Π ᾱ. ∀ x. ∃z. (yσ z) ⟨ ᾱ⟩ xθ if the quantifier-headed term is an ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃-
⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥. The term Q⟨τ⟩ t must be Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -
≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ or ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈, then the head of C p ′ cannot be ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ or ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ either. If the head Cθ p is ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ or ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈, then C p ′ must also be ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ or ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ because the position p ′ is green. Hence, p ′ is eligible because sθ ̸ ⪰ tθ implies sσ ̸ ≿ tσ. ⊓ ⊔
In some edge cases, it is ambiguous what "the corresponding" literal is. When Cθ contains multiple occurrences of a literal that correspond to different literals in C, we must choose a selected literal if available, or else a ≿-maximal literal to make the lemma above work. In the following, we will implicitly assume that the correct literal is chosen when we refer to "the corresponding" literal.

Lemma 68 All ERES, EFACT, GARGCONG, GEXT, GCHOICE, BOOLHOIST, and FALSE-ELIM inferences are liftable.

Proof For ERES, EFACT, GARGCONG, and GEXT, the proof is as in Lemma 50 of λSup [START_REF] Bentkamp | Superposition with lambdas[END_REF]. For GCHOICE, the proof is analogous to GEXT. BOOLHOIST: Let ι ∈ GHInf be a BOOLHOIST inference with prems(ι) ∈ G(N). Then ι

is of the form Cθ u p BOOLHOIST Cθ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p ∨ u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ where G -1 (Cθ) = C.
If p corresponds to a position at or below an unapplied variable in C, u could only be ⊤

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥
, contradicting the condition of BOOLHOIST that u is not a fully applied logical symbol.

If p corresponds to a position at or below a fluid term in C, we will lift to a FLUIDBOOL-HOIST inference. Let p = p 1 .p 2 such that p 1 is the longest prefix of p that corresponds to a green position p

′ 1 in C. Let v = C| p ′ 1 .
Then v is fluid. Let z and x be fresh variables. Define a substitution θ ′ that maps the variable z to λy.(vθ) y p 2 , the variable x to vθ| p 2 , and all other variables w to wθ. Then (z x)θ ′ = (vθ) vθ| p 2 p 2 = vθ = vθ ′ . So θ ′ is a unifier of z x and v, and thus there exists an idempotent σ ∈ CSU(z x, v) such that for some substitution ρ, for all free variables y in C, and for y ∈ {x, z}, we have yσρ = yθ ′ . By the conditions of BOOLHOIST,

u ̸ = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and u ̸ = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥. Then xσ ̸ = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and xσ ̸ = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ because u = vθ| p 2 = xθ ′ = xσρ. Hence, we have (z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)θ ′ = (vθ) ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p 2 ̸ = (vθ) xθ ′ p 2 = (z x)θ ′ and thus (z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)σ ̸ = (z x)σ.
The position p 1 must be eligible in Cθ because p is eligible in Cθ and p 1 is the longest prefix of p that corresponds to a green position p ′ 1 in C. Eligibility of p 1 in Cθ implies eligibility of p ′ 1 in C by Lemma 67. Thus, there exists the following FLUIDBOOLHOIST inference ι ′ :

C v p ′ 1 FLUIDBOOLHOIST (C z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p ′ 1 ∨ x ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)σ
The inference ι is the σρ-ground instance of ι ′ and is therefore liftable. Otherwise, we will lift to a BOOLHOIST inference. Since u is not at or below a variableheaded term, there is a subterm u ′ of C at position p ′ corresponding to the subterm u of Cθ at position p. Since u is a Boolean term, there is a type unifier σ of the type of u ′ with the Boolean type. Eligibility of u in Cθ implies eligibility of u ′ in C by Lemma 67. Since the occurrence of u in Cθ is not at the top level of a positive literal, the corresponding occurrence of u ′ in C is not at the top level of a positive literal either. Thus, there exists the following BOOLHOIST inference ι ′ :

C u ′ p ′ BOOLHOIST (C ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p ′ ∨ u ′ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)σ
Then ι is a ground instance of ι ′ and is therefore liftable.

FALSEELIM: Let ι ∈ GHInf be an FALSEELIM inference with prems(ι) ∈ G(N). Then ι

is of the form Cθ = C ′ θ ∨ sθ ≈ s ′ θ FALSEELIM C ′ θ where G -1 (Cθ) = C = C ′ ∨ s ≈ s ′ and the literal sθ ≈ s ′ θ is strictly ⪰-eligible w.r.t. GHLitSel. Since sθ ≈ s ′ θ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ are unifiable and ground, we have sθ = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ and s ′ θ = ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤. Thus, there exists an idempotent σ ∈ CSU(s ≈ s ′ , ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤
) such that for some substitution ρ and for all free variables x in C, we have xσρ = xθ. Then s ≈ s ′ is strictly ≿-eligible in C w.r.t. σ. Hence, the following inference ι ′ ∈ HInf is applicable:

C ′ ∨ s ≈ s ′ FALSEELIM C ′ σ
Then ι is the σρ-ground instance of ι ′ and is therefore liftable.

⊓ ⊔

Lemma 69 All SUP inferences are liftable or redundant.

Proof The proof is as for Lemmas 52 and 53 of λSup [START_REF] Bentkamp | Superposition with lambdas[END_REF]. The proof works with the altered definition of deeply occurring variables (Definition 23) because congruence holds below quantifiers on the GF level. ⊓ ⊔ Lemma 70 All EQHOIST, NEQHOIST, GFORALLHOIST, GEXISTSHOIST, GFORALLRW, GEXISTSRW, and BOOLRW inferences from G(N) are liftable or redundant.

Proof Let ι ∈ GHInf be a EQHOIST, NEQHOIST, GFORALLHOIST, GEXISTSHOIST, GFORALLRW, GEXISTSRW, or BOOLRW inference from G(N). Let Cθ = prems(ι) where C = G -1 (Cθ) ∈ N. Let p be the position of the affected subterm in Cθ.

We distinguish two cases. We will show that ι is liftable if (A) p corresponds to a position in C that is not at or below a fluid term, or

B) p is the position of a term v in a literal v ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or v ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ in Cθ. (
Otherwise, we will show that ι is redundant.

⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥. Since uθ is a fully applied logical symbol different from ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥,
≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or u ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ or u ≈ v of C, for some variable-headed term v.
-BOOLRW: Let (t, t ′ ) be the pair used among the ones listed for BOOLRW. Then we can extend θ to the free variables in t such that the resulting substitution θ ′ is a unifier of t and u. Therefore, there exists an idempotent σ ∈ CSU(t, u) such that for some substitution ρ and for all free variables x in C, we have xσρ = xθ ′ . Thus, there is the following BOOLRW inference ι ′ ∈ HInf :

C u BOOLRW C t ′ σ
In this case, ι is the σρ-ground instance of ι ′ and is therefore liftable.

-GFORALLRW: Then uθ = ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩v and the inference ι is of the form Cθ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩v p GFORALLRW Cθ v GHWit(Cθ, p) p
for some term v and some type τ. Let β be a type variable and y a variable of type β → o. We define a substitution θ ′ mapping y to v, β to τ, and all other variables x to xθ.

Then (∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨β⟩ y)θ ′ = ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨τ⟩ v = uθ = uθ ′ and hence θ ′ is a unifier of ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨β⟩ y and u. Hence, there exists an idempotent σ ∈ CSU(∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨β⟩ y, u
) such that for some substitution ρ, for all free variables x in C, and for x ∈ {β, y}, we have xσρ = xθ ′ . Since the affected literal in Cθ is not of the form uθ

≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤, the affected literal in C cannot be of the form u ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤.
Thus, there exists the following inference ι ′ ∈ HInf :

C u FORALLRW C y (sk Π ᾱ. ∀ x. ∃z.¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬(yσ z) ⟨ ᾱ⟩ x) σ We have GHWit(Cθ, p) = sk Π ᾱ. ∀ x. ∃z. ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬ ¬(yσ z) ⟨ ᾱ⟩ xθ
by definition of the witness function, where ᾱ are the free type variables and x are the free variables occurring in yσ in order of first occurrence. Hence, ι is the σρ-ground instance of ι ′ and is therefore liftable.

-GEXISTSRW: Analogous to GFORALLRW.

-EQHOIST: Let x and y be fresh variables. Then we can extend θ to a x and y such that the resulting substitution θ ′ is a unifier of u and x

≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y. Thus, there exists an idempotent σ ∈ CSU(u, x ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ y)
such that for some substitution ρ, for all free variables z in C, and for z ∈ {x, y}, we have zσρ = zθ ′ . Hence, there is the following EQHOIST inference ι ′ ∈ HInf :

C u EQHOIST (C ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ x ≈ y)σ
Then ι is the σρ-ground instance of ι ′ and is therefore liftable. -NEQHOIST: Analogous to EQHOIST.

-GFORALLHOIST: Let α be a fresh type variable and y be a fresh variable. Then we can extend θ to y such that the resulting substitution θ ′ is a unifier of u and

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨α⟩ y. Thus, there exists an idempotent σ ∈ CSU(u, ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀⟨α⟩ y)
such that for some substitution ρ, for all free variables x in C, and for x = y, we have xσρ = xθ ′ . Thus, there is the following FORALLHOIST inference ι ′ ∈ HInf :

C u FORALLHOIST (C ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ∨ y x ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)σ
Then ι is the σρ-ground instance of ι ′ and is therefore liftable. -GEXISTSHOIST: Analogous to GFORALLHOIST.

REDUNDANT CASE: Neither condition A nor B holds. Then p corresponds to a position in C at or below a fluid term, but p is not the position of v in a literal

v ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or v ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥. Let p = p 1 .p 2 such that p 1 is the longest prefix of p that corresponds to a green position p ′ 1 in C. Let u = C| p ′ 1 .
Let z and x be fresh variables. Define a substitution θ ′ that maps the variable z to λy.(uθ) y p 2 , the variable x to uθ| p 2 , and all other variables w to wθ. Then (z x)θ ′ = (uθ) uθ| p 2 p 2 = uθ = uθ ′ . So θ ′ is a unifier of z x and u. Thus, there exists an idempotent σ ∈ CSU(z x, u) such that for some substitution ρ, for all free variables y in C, and for y ∈ {z, x}, we have yσρ = yθ ′ . For all of the inference rules, Cθ| p = uθ| p 2 cannot be ⊥

⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ or ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤. Thus, xθ ′ ̸ = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and therefore xσ ̸ = ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥, ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤. Hence, we have (z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)θ ′ = (uθ) ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p 2 ̸ = (uθ) xθ ′ p 2 = (z x)θ ′ and therefore (z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)σ ̸ = (z x)σ. Analogously, we have (z ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)σ ̸ = (z x)σ.
The position p 1 must be eligible in Cθ because p is eligible in Cθ and p 1 is the longest prefix of p that corresponds to a green position p ′ 1 in C. Eligibility of p 1 in Cθ implies eligibility of p ′ 1 in C by Lemma 67. Then there are the following inferences ι bool and ι loob from C:

C u p ′ 1 FLUIDBOOLHOIST (C z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p ′ 1 ∨ x ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)σ C u p ′ 1 FLUIDLOOBHOIST (C z ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ p ′ 1 ∨ x ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)σ
Since N is saturated w.r.t. HInf and HRed I , these inferences are in HRed I (N). We have

F ((C z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p ′ 1 ∨ x ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)θ ′ ) = F (Cθ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p ∨ Cθ| p ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤) and F ((C z ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ p ′ 1 ∨ x ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)θ ′ ) = F (Cθ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ p ∨ Cθ| p ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥) These two clauses entail F (Cθ). Since p is not the position of v in a literal v ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or v ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥,
the two clauses are also smaller than F (Cθ). Since ι bool ∈ HRed I (N), we have G q (ι bool ) ⊆ GHRed I (G(N)) and therefore the clauses F (G(N)) that are smaller than

F (Cθ ′ ) = F (Cθ) en- tail F ((C z ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ p ′ 1 ∨ x ≈ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤)θ ′ ). Similarly, since ι loob ∈ HRed I (N), we have G(concl(ι loob )) ⊆ G(N) ∪ GHRed C (G(N)). Therefore F ((C z ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ p ′ 1 ∨ x ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥)θ ′ ) is entailed by clauses in G(N)
that are smaller than or equal to itself. Thus, Cθ is redundant and therefore ι is redundant.

Here, it is crucial that we consider inferences with a redundant premise as redundant.

⊓ ⊔

By the above lemmas, every HInf inference is liftable or redundant. Using these lemmas, we can apply Theorem 66 to lift ground refutational completeness to nonground refutational completeness. Proof We want to apply Theorem 66. GHInf q is statically refutationally complete for all q ∈ Q by Theorem 62. By Lemmas 68, 69, and 70, for every saturated N ⊆ C H , there exists q ∈ G(Q) such that all inferences ι ∈ GHInf q with prems(ι) ∈ G(N) either are G q -ground instances of HInf -inferences from N or belong to GHRed q I (G(N)).

≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal clauses. Lemma 73 Let N ⊆ C H be Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Then we have N |= G ⊥ if and only if N |= ⊥.
Proof By Lemma 30, any model of N is also a model of G(N). So N |= G ⊥ implies N |= ⊥.

For the other direction, let I be a model of G(N). We must show that there exists a model of N. Let I ′ be the interpretation obtained from I by removing all domains that cannot be expressed as τ I ty for some ground type τ and by removing all domain elements that cannot be expressed as t I for some ground term t. We restrict the type interpretation function J ty , the interpretation function J, and the λ-designation function L of I accordingly. The restriction J ′ of J still maps the logical symbols correctly: For most logical symbols, this is obvious. Only

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ and ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃
′ (∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃, D ′ )( f ) = J(∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃, D)( f ). We must show that J ′ (∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃, D ′ )( f ) = max { f (a) | a ∈ D ′ }
for all f that can be expressed as t I for some ground term t. This claim can only be violated if there exist a ∈ D with f (a) = 1 and if all of them have been removed in D ′ . But we have not removed all such elements a because one of them can be expressed as ε t I where t is the ground term such that f = t I . We can argue similarly for

∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀ ∀.
Clearly, all terms have the same denotation in I ′ as in I. Thus, the truth values of ground clauses are identical in I and I ′ . Since I is proper, I ′ is also proper. Hence, I |= G(N) implies I ′ |= G(N).

It remains to show that I ′ |= N. Let C ∈ N and let ξ be a valuation for I ′ . We must show that C is true in I ′ under ξ. By assumption, C is

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.
By the construction of I ′ , there is a grounding substitution θ such that for all type variables α and all free term variables x occurring in C, we have ξ(α) = αθ We implemented our calculus in the Zipperposition prover 1 , whose OCaml source code makes it convenient to prototype calculus extensions. It has also assimilated some of E's [START_REF] Schulz | E -a brainiac theorem prover[END_REF] heuristics, which helps it achieve strong performance at the CASC competition. Like the calculus, its implementation extends the implementations of λSup and oSup. From the former, we inherit the given clause loop which supports enumerating infinitely many inference conclusions [37, Sect. 5], calculus extensions, and higher-order heuristics [START_REF] Vukmirović | Making higher-order superposition work[END_REF]. From the latter, we inherit the encoding of negative predicate literals as s ≈ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ and a basis for the implementation of FALSEELIM, BOOLRW, FORALLRW, EXISTSRW, and all HOIST rules. The implementation of oSup relies heavily on BOOLSIMP, and we keep this rule as the basis of our Boolean simplification machinery. As a result, BOOLRW can be reduced to two cases: (1) all arguments sn of u = h sn are variable-headed terms, and thus we must unify As in the implementation of λSup, we approximate fluid terms as terms that are either nonground λ-expressions or terms of the form x sn with n > 0. Two slight, accidental discrepancies are that we also count variable occurrences below quantifiers as deep and perform EFACT inferences even if the maximal literal is selected. Since we expect FLUIDBOOLHOIST and FLUIDLOOBHOIST to be highly explosive, we penalize them and all of their offspring. In addition to various λSup extensions [10, Sect. 5], we also use all the rules for Boolean reasoning described by Vukmirović and Nummelin [START_REF] Vukmirović | Boolean reasoning in a higher-order superposition prover[END_REF] except for the BOOLEF rules. The BoolEF rules have been removed from Zipperposition because they did not seem to improve the prover's performance.

Our implementation is a graceful extension of oSup. For the rules EQHOIST, NEQHOIST, FORALLHOIST, and EXISTSHOIST, if the subterm u is not variable-headed, there is an obvious most general unifier, which allows us to avoid invoking the unification procedure and to generate the conclusion directly, as in oSup.

Evaluation

We evaluate our implementation and compare it with other higher-order provers. Our experiments were performed on StarExec Miami servers equipped with Intel Xeon E5-2620 v4 CPUs clocked at 2.10 GHz. We used all 2606 TH0 theorems from the TPTP 7.3.0 library [START_REF] Sutcliffe | The TPTP problem library and associated infrastructure-from CNF to TH0, TPTP v6.4.0[END_REF] and 1253 "Judgment Day" problems [START_REF] Böhme | Sledgehammer: Judgement Day[END_REF] generated using Sledgehammer (SH) [START_REF] Paulson | Three years of experience with Sledgehammer, a practical link between automatic and interactive theorem provers[END_REF] as our benchmark set. An archive containing the benchmarks and the raw evaluation results is publicly available. 2 We divide the evaluation in two parts: evaluation of the calculus rules and comparison with other higher-order provers.

Calculus Evaluation. In this first part, we evaluate selected parameters of Zipperposition by varying only the studied parameter in a fixed well-performing configuration. This base configuration disables axioms (CHOICE) and (EXT) and the FLUID-rules. It uses the unification procedure of Vukmirović et al. [START_REF] Vukmirović | Efficient full higher-order unification[END_REF] in its complete variant-i.e., the variant that produces a complete set of unifiers. It uses none of the early Boolean rules described by Vukmirović and Nummelin [START_REF] Vukmirović | Boolean reasoning in a higher-order superposition prover[END_REF]. The preprocessor Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ is disabled as well. All of the completeness-preserving simplification rules described in Sect. 3.7 are enabled, except for the simplifying BOOLHOIST (combined with LOOBHOIST). The configuration uses immediate clausification. We set the CPU time limit to 30 s in all three experiments.

In the first experiment, we assess the overhead incurred by the FLUID-rules. These rules unify with a term whose head is a fresh variable. Thus, we expected that they needed to be tightly controlled to achieve good performance. To test our hypothesis, we simultaneously modified the parameters of these three rules. In Fig. 1, the off mode simply disables the rules, the pragmatic mode uses a terminating incomplete unification algorithm (the pragmatic variant of Vukmirović et al. [START_REF] Vukmirović | Efficient full higher-order unification[END_REF]), and the complete mode uses a complete unification algorithm.

The results show that disabling FLUID-rules altogether achieves the best performance. When the complete variant of the unification algorithm is used, inferences are scheduled in a queue designed to postpone explosive inferences [START_REF] Bentkamp | Superposition with lambdas[END_REF]Sect. 6]. In contrast, in the pragmatic variant, a terminating algorithm is employed, but still flooding the proof state with FLUID-rules conclusions severely hinders performance. Even though enabling FLUID-rules degrades performance overall, complete finds 35 proofs not found by off, and pragmatic finds 22 proofs not found by off. On Sledgehammer benchmarks, this effect is much weaker, likely because the Sledgehammer benchmarks require less higher-order reasoning: complete finds only one new proof over off, and pragmatic finds only four.

In the second experiment, we explore the clausification methods introduced at the end of Sect. 3: inner delayed clausification, which relies on the core calculus to reason about logical symbols; outer delayed clausification, which clausifies step-by-step guided by the outermost logical symbols; and immediate clausification, which eagerly applies a monolithic clausification algorithm when encountering top-level logical symbols. The modes inner and outer employ oSup's RENAME rule, which renames Boolean terms headed by logical symbols using a Tseitin-like transformation if they occur at least four times in the proof state. Vukmirović and Nummelin [START_REF] Vukmirović | Boolean reasoning in a higher-order superposition prover[END_REF] observed that outer clausification can greatly help prove higher-order problems, and we expected it to perform well for our calculus, too. The results are shown in Fig. 2. The results confirm our hypothesis: The outer mode outperforms immediate on both TPTP and Sledgehammer benchmarks. The inner mode performs worst, but on Sledgehammer benchmarks, it proves 17 problems beyond the reach of the other two. Looking at the proofs found by inner, we observed a pattern: in many cases (e.g., for the benchmarks prob_295__3252866_1, prob_296__3252872_1, prob_366__5338-318_1, prob_419__5371618_1) the problems contain axioms of the form ϕ → → → → → → → → → → → → → → → → → → → → → → → → → ψ. When such axioms are not clausified, superposition and demodulation can often reduce either ϕ or

ψ to ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ or ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥.
At this point, simplification rules will act on the resulting term, simplifying it enough that the proof can easily be found.

In the third experiment, we investigate the effect of axiom (CHOICE), which is necessary to achieve refutational completeness. To evaluate (CHOICE), we either disabled it in a configuration labeled off or set the axiom's penalty p to different values. In Zipperposition, penalties are propagated through inference and simplification rules and are used to increase the heuristic weight of clauses, postponing the selection of penalized clauses. The results are shown in Fig. 3. As expected, disabling (CHOICE), or at least penalizing it heavily, improves performance. Yet enabling (CHOICE) can be crucial: For 19 TPTP problems, the proofs are found when (CHOICE) is enabled and p = 4, but not when the rule is disabled. On Sledgehammer problems, this effect is weaker, with only two new problems proved for p = 4.

Prover Comparison. In this second part, we compare Zipperposition's performance with other higher-order provers. Like at CASC-J10, the wall-clock time limit was 120 s, the CPU time limit was 960 s, and the provers were run on StarExec Miami. We used the following versions of all systems that took part in the THF division: CVC4 1.8 [START_REF] Barrett | CVC4[END_REF], Leo-III 1.5.2 [START_REF] Steen | The higher-order prover Leo-III[END_REF], Satallax 3.5 [START_REF] Brown | Satallax: An automatic higher-order prover[END_REF], and Vampire 4.5 [START_REF] Bhayat | A combinator-based superposition calculus for higher-order logic[END_REF]. The developers of Vampire have informed us that its higher-order schedule is optimized for running on a single core. As a result, the prover suffers some degradation of performance when running on multiple cores. We evaluate both the version of Zipperposition that took part in CASC-J10 (Zip) and the updated version of Zipperposition that supports our new calculus (New Zip). Zip's portfolio of prover configurations is based on λSup and techniques described by Vukmirović and Nummelin [START_REF] Vukmirović | Boolean reasoning in a higher-order superposition prover[END_REF]. New Zip's portfolio is specially designed for our new calculus and optimized for TPTP problems. The portfolio does not contain a complete configuration, but the combination of configurations is close to complete. Leo-III, Satallax, and Zipperposition are cooperative theorem provers: They invoke a backend reasoner to finish the proof attempt. To test the performance of their calculi in isolation, we also invoked them in uncooperative mode. To assess the performance of Boolean reasoning, we used Sledgehammer benchmarks generated both with native Booleans (SH) and with an encoding into Boolean-free higher-order logic (ofSH). For technical reasons, the encoding also performs λ-lifting, but this minor transformation should have little impact on results [START_REF] Bentkamp | Superposition with lambdas[END_REF]Sect. 7].

The results are shown in Fig. 4. The updated version of New Zip beats Zip on TPTP problems but lags behind Zip on Sledgehammer benchmarks as we have yet to further explore more general heuristics that work well with our new calculus. The Sledgehammer benchmarks fail to demonstrate the superiority of native Booleans reasoning compared with an encoding, and in fact CVC4 and Leo-III perform dramatically better on the encoded Boolean problems, suggesting that there is room for tuning.

The uncooperative versions of Zipperposition show strong performance on both benchmark sets. This suggests that, with thorough parameter tuning, higher-order superposition outperforms tableaux, which had been the state of the art in higher-order reasoning for a decade. Without backend reasoners, Zipperposition proves fewer Sledgehammer problems than Vampire. We conjecture that implementing our calculus in Vampire or E would remove the need for a backend reasoner and make the calculus even more useful in practice.

Conclusion

We have created a superposition calculus for higher-order logic and proved it sound and refutationally complete. Most of the key ideas have been developed in previous work by us and colleagues, but combining them in the right way has been challenging. A key idea was to

Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈
≈ ≈ ≈ ≈ ≈ -normalize away inconvenient terms.

Unlike earlier refutationally complete calculi for full higher-order logic based on resolution or paramodulation, our calculus employs a term order, which restricts the proof search, and a redundancy criterion, which can be used to add various simplification rules while keeping refutational completeness. These two mechanisms are undoubtedly major factors in the success of first-order superposition, and it is very fortunate that we could incorporate both in a higher-order calculus. An alternative calculus with the same two mechanisms could be achieved by combining oSup with Bhayat and Reger's combinatory superposition [START_REF] Bhayat | Set of support for higher-order reasoning[END_REF]. The article on λSup [START_REF] Bentkamp | Superposition with lambdas[END_REF]Sect. 8] discusses related work in more detail.

The evaluation results show that our calculus is an excellent basis for higher-order theorem proving. In future work, we want to experiment further with the different parameters of the calculus (for example, with Boolean subterm selection heuristics) and implement it in a state-of-the-art prover such as E.

  ξ[x →a] I = z ξ I (a) and y x ξ[x →a] I = y ξ I (a) are different. Thus, z ξ I = y ξ I and hence the second literal of (EXT) must be true under I and ξ. ⊓ ⊔

  allow us to define the encoding F as follows: Definition 35 (The encoding F on terms and clauses) The encoding F : T GH → T GF is recursively defined by

  are the smallest terms follows from (O3) of Definition 15. Finally, Qx. t ≻ t{x → u} follows from (O4) of Definition 15.

Definition 38 (

 38 GH level selection functions) A GH level literal selection function GHLitSel maps each clause C ∈ C GH to a subset of its literals. A GH level Boolean subterm selection function GHBoolSel maps each clause C ∈ C GH to a subset of its green positions with Boolean subterms.We require these selection functions to have the property that for every C ∈ C GH , there exists a D ∈ C H with C ∈ G(D) for which the selections HLitSel(D), HBoolSel(D) and the selections GHLitSel(C), GHBoolSel(C) correspond in the following sense: A literal K is selected in C if and only if there exists a selected literal L in D with Lθ = K; a green position C.K.p is selected in C if and only if there exists a literal L in D with Lθ = K such that D.L.p is selected.Definition 39 (Witness function) A witness function GHWit maps a clause C ∈ C GH and a green position of a quantifier-headed term in C to a term GHWit(C, p) ∈ T GH such that Q⟨τ⟩ t ≻ t GHWit(C, p) if C| p = Q⟨τ⟩ t.

  ū, and v. This amounts to showing thatP (O(t)) ≻ kb P (O(s)) implies P (O(f⟨τ⟩ ū t v)) = P (f k (O(τ),O(ū),O(t),O(v))) =f k (P (O(τ)),P (O(ū)),P (O(t)),P (O(v))) ≻ kb f k (P (O(τ)),P (O(ū)),P (O(s)),P (O(v))) = P (f k (O(τ),O(ū),O(s),O(v))) = P (O(f⟨τ⟩ ū s v))

  normality, x occurs free only in green positions of s. Therefore, replacing x by u in s does not trigger any βηQ ηnormalizations. Thus, P (O(B x (s)))) and P (O(s{x → u})) are almost identical, except that P (O(B x (s)))) contains db i where P (O(s{x → u})) contains P (O(u)). Since the only Boolean green subterms of u are

  , then P (O(t))ρ = f k (P (O(τ))ρ,P (O(ū))ρ) IH = f k (P (O(τθ)),P (O(ūθ))) = P (O(f⟨τθ⟩ (ūθ))) = P (O(tθ))

  all τ ∈ Ty H and all grounding substitutions ρ, where ξ ′ (α) = αρ ξ I GH ty for all type variables α and ξ ′ (x) = xρ ξ I GH for all term variables x.Proof Analogous to Lemma 41 of λSup, using the βηQ η -normal form instead of the βηnormal form.⊓ ⊔Lemma 60 The interpretation I GH is proper.

  normal λ-expressions λx. t, all valuations ξ, and all values a: λx. t ξ I GH (a) = L GH (ξ, λx. t)(a) by the definition of I GH = E( F ((λx. t)θ↓ βηQ η ) R )(a) by the definition of L GH for some θ such that E( F (zθ) R ) = ξ(z) for all z and D αθ = ξ(α) for all α = E( F (((λx. t)θ s)↓ βηQ η ) R ) by the definition of E where E(

  For (R1), it suffices to show that N \ GHRed C (N) |= N. Let I be a model of N \ GHRed C (N). By Lemma 63, there exists a modelI GF of F (N \ GHRed C (N)) = F (N) \ GFRed C (F (N)). We show that I GF |= C for each clause C ∈F (N) by well-founded induction on C w.r.t. ≻. If C ̸ ∈ GFRed C (F (N)), we have already shown that I GF |= C. Otherwise, C ∈ GFRed C (F (N)) and hence {D ∈ F (N) | D ≺ C} |= C. By the induction hypothesis, it follows that I GF |= C. Thus, we have shown that I GF |= F (N). By Lemma 63, this implies I |= N.

  It suffices to show that I |= {D ∈ F (N) | D ≺ F (C)}, meaning I |= E for every E ∈ F (N) such that E ≺ F (C). We prove this by well-founded induction on E w.r.t. ≻. If E ∈ F (N \ N ′ ), the claim holds by assumption. Otherwise, E ∈ F (N ′ ) ⊆ GFRed C (F (N)); hence {D ∈ F (N) | D ≺ E} |= E and therefore I |= E by the induction hypothesis.

  term where ᾱ are the free type variables and x are the free variables occurring in D| p ′ in order of first occurrence. By definition of G (Definition 34), for all free variables x occurring in D the only Boolean green subterms of xθ are

  LIFTABLE CASES: If condition A or B holds, p corresponds to some position p ′ in C. Let u = C| p ′ . By the definition of the grounding function G (Definition 34), for all free variables x occurring in C, the only Boolean green subterms of xθ are

Lemma 71 (

 71 Static refutational completeness w.r.t. |= G ) The inference system HInf is statically refutationally complete w.r.t. |= G and (HRed I , HRed C ). In other words, if N ⊆ C H is a clause set saturated w.r.t. HInf and HRed I , then N |= G ⊥ if and only if ⊥ ∈ N.

  deserve some further explanations. For all domains D of I, we haveJ(∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃ ∃, D)( f ) = max { f (a) | a ∈ D}.For the corresponding domain D ′ ⊆ D, if it has not been removed entirely, we have just defined J

  J ′ ty and ξ(x) = xθ I ′ . Then, by Lemma 29, tθ I ′ = t ξ I ′ for all subterms t of C. Moreover, we can choose θ such that for all variables x, the only Boolean green subterms ofxθ are ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ and such that xθ is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal.If xθ contains a Boolean green subterm different from ⊤ ⊤ ⊤ ⊤ ⊥ ⊥ while preserving its denotation and thus the property that tθI ′ = t ξ I ′ for all subterms t of C. If xθ is not Q ≈ ≈ ≈ ≈ ≈ -normalize it,which preserves the denotation of terms by Lemma 55.By Lemma 9, it follows that Cθ isQ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal. Thus, Cθ ∈ G(C). Since I ′ |= G(C) and thus Cθ is true in I ′ , also C is true in I ′ under ξ because tθ I ′ = t ξ I ′ for all subterms t of C. ⊓ ⊔Using this lemma, we can derive the following theorem, which is essentially dynamic refutational completeness with the caveat that the initial clause set must beQ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal, which in practice can be fulfilled by Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normalizing the input problem in preprocessing.Theorem 74 (Dynamic refutational completeness w.r.t. |=) Let (N i ) i be a derivation w.r.t. HRed C , as per Definition 50, such thatN 0 is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normal and N 0 |= ⊥. Moreover, assume that (N i ) i is fair w.r.t.HInf and HRed I . Then we have ⊥ ∈ N i for some i.Proof This is a consequence of Lemmas 72 and 73.⊓ ⊔We can derive dynamic refutational completeness for | ≈ with additional assumptions onQ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -normality and the absence of sk-symbols. These assumptions can be fulfilled byQ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ -preprocessing and by making the sk symbols internal such that they can not be expressed by the input language of the prover.Theorem 75 (Dynamic refutational completeness w.r.t. | ≈) Let (N i ) i be a derivation w.r.t. HRed C , as defined in Definition 50, such thatN 0 is Q ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈≈ ≈ ≈ ≈ ≈ -normal, N 0 does not contain any sk symbols, and N 0 | ≈ ⊥. Moreover, assume that (N i ) i is fair w.r.t. HInf and HRed I . Then we have ⊥ ∈ N i for some i.Proof By Lemma 32, N 0 |= ⊥. Hence, Theorem 74 applies.⊓ ⊔ 5 Implementation

  s i with all combinations of ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ ⊤ and ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥; or (2) either u = s ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ ≈ t or u = s ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ ̸ ≈ t,and thus we must compute the unifiers of s and t.

Fig. 4

 4 Fig.4Evaluation of all competitive higher-order provers

  If a literal L = s ≈ t with sσ ̸ ⊴ tσ is either ⊵-eligible and negative or strictly ⊵-eligible and positive, then L.s.ε is ⊵-eligible. (E3) If the position p is ⊵-eligible and the head of

	or a variable-headed term.
	-A subterm must not be selected if it is at the top-level position on either side of a positive
	literal.
	3.3 The Core Inference Rules
	Let ≻ be a strict term order, let ≿ be a nonstrict term order, let HLitSel be a literal selection
	function, and let HBoolSel be a Boolean subterm selection function. The calculus rules
	depend on the following auxiliary notions.
	Definition 22 (Eligibility) A literal L is (strictly) ⊵-eligible w.r.t. a substitution σ in C for
	some relation ⊵ if it is selected in C or there are no selected literals and no selected Boolean
	subterms in C and Lσ is (strictly) ⊵-maximal in Cσ.
	The ⊵-eligible positions of a clause C w.r.t. a substitution σ are inductively defined as
	follows:
	(E1) Any selected position is ⊵-eligible.
	(E2)

  not fluid; 2. u is not a variable deeply occurring in C; 3. variable condition: if u is a variable y, there must exist a grounding substitution θ such that tσθ ≻ t ′ σθ and Cσθ ≺ C ′′ σθ, where C ′′ = C{y → t ′ };

	4. σ ∈ CSU(t, u);	5. tσ ̸ ≾ t ′ σ;	6. the position of u is ≿-eligible in C w.r.t. σ;
	7. Cσ ̸ ≾ Dσ;	8. t ≈ t ′ is strictly ≿-eligible in D w.r.t. σ;
	9. tσ is not a fully applied logical symbol;
	10. if t

  preserves denotations of terms and truth of clauses w.r.t. proper interpretations.

	Proof It suffices to show that

  Lemma 30 If I |= C for some interpretation I and some clause C, then I |= Cρ for all substitutions ρ. Proof Analogous to Lemma 19 of λSup [10], using Lemma 29. ⊓ ⊔ With this lemma in place, we can prove the soundness of our calculus. Some of the rules and axioms are only sound w.r.t. | ≈. Axiom (CHOICE) and all of our inference rules, except for FORALLRW and EXISTSRW, are sound w.r.t. |=. All of our axioms and inference rules are sound w.r.t. | ≈. Both of these claims hold even without the variable condition and the side conditions on fluidity, deeply occurring variables, order, and eligibility. Proof Analogous to Lemma 20 of λSup [10]. For the Boolean rules, we make use of the special requirements on interpretations of logical symbols. We elaborate on the soundness of FORALLRW, EXISTSRW, and EXT w.r.t. | ≈. For FORALLRW: Let I be a Skolem-aware model of C u . By Lemma 29,

	Theorem 31 (Soundness)

  ∃z. t z ⟨ ᾱ⟩ x). Any derivation using our inference rules and axioms is satisfiability-preserving w.r.t. both |= and | ≈ if the initial clause set does not contain sk symbols. Proof By Theorem 31, all of our inference rules and axioms are sound w.r.t. | ≈. Thus, they clearly preserve satisfiability w.r.t. | ≈. If the initial clause set of a derivation does not contain sk symbols and is satisfiable w.r.t. |=, it is also satisfiable w.r.t. | ≈ by Lemma 32. By satisfiability preservation w.r.t. | ≈, any clauses derived from this initial clause set are then satisfiable w.r.t. | ≈. By definition of | ≈ (Definition 3), the derived clauses are therefore also satisfiable w.r.t. |=. This proves satisfiability preservation w.r.t. |=. ⊓ ⊔

	⊓ ⊔
	Theorem 33 (Satisfiability preservation)

  is smaller than F (Cθ). By Lemma 36, green subterms on the GH level correspond to subterms on the GF level. Thus, {D, E} |= F (Cθ) by congruence. ⊓ ⊔ All of λSup's extensions[START_REF] Bentkamp | Superposition with lambdas[END_REF] Sect. 5] can also be used in our setting. DEMODEXT and PRUNEARG are sound w.r.t. both |= and | ≈. NEGEXT, EXTINST, and λSUP are sound w.r.t. | ≈ if the appropriate sk symbols are reused. As shown in the proof of Theorem 33, this implies that these rules are satisfiability-preserving w.r.t. |=, provided that the initial clause set does not contain sk symbols. If fresh Skolem symbols are used, the rules are satisfiability-preserving w.r.t. both |= and | ≈. DUPSUP and FLEXSUP are sound w.r.t. both |= and | ≈.

  only as translations of fully applied quantifiers in green contexts. Then we can achieve (O4) by assigning them a large weight. The function P transforms the result of O in this way by applying a function p to all subterms below lam symbols. It maps untyped first-order terms to untyped first-order terms as follows:

  Definition 50 (Dynamic refutational completeness) Let |= be an entailment relation, let Inf be an inference system, and let (Red I , Red C ) be a redundancy criterion. Let (N i ) i be a finite or infinite sequence over sets of clauses. Such a sequence is a derivation if N i \ N i+1 ⊆ Red C (N i+1 ) for all i. It is fair if all Inf -inferences from clauses in the limit inferior i j≥i N j are contained in i Red I (N i ). The inference system Inf is dynamically refutationally complete w.r.t. |= and (Red I , Red C ) if for every fair derivation (N i ) i such that N 0 |= ⊥, we have ⊥ ∈ N i for some i.

The inference system Inf is statically refutationally complete w.r.t. |= and (Red I , Red C ) if we have N |= ⊥ if and only if ⊥ ∈ N for every clause set N that is saturated w.r.t. Inf and Red I .

  Nummelin et al.'s ground oSup calculus, with the following caveats: -The conditions of EFACT superficially appear different but are equivalent. -GFInf 's last condition of FORALLRW and EXISTSRW is weaker than oSup's to simplify our presentation. Where oSup tests for general tautologies, GFInf only tests for a certain form of tautological literal. Clearly, this does not compromise the refutational completeness of GFInf . -The redundancy criterion of oSup requires that a finite subset of {D ∈ N | D ≺ C} entails C, whereas GFRed C requires that {D ∈ N | D ≺ C} entails C. Since first-order logic with Booleans is compact, the two criteria are equivalent. Similar to Bachmair and Ganzinger's construction for Sup, Nummelin et al. define the model via a term rewriting system R * M . As they explain in Definition 16 and Lemma 17, such a term rewriting system R * M can be viewed as an interpretation in GF's logic with the property that t ↔ R * M s if and only if t R *

	M M fulfills the following property: = s R * M R *	for any two ground terms t and s. The interpretation

  of oSup. It is even strictly ⪰-eligible by (C6). The subclause C ′ is false in R * M by Lemma 26 of oSup.

	⊓ ⊔
	Since Nummelin et al. prove refutational completeness, but do not explicitly state that
	R * N\GFRed C

  normal because it occurs in C ∈ C GH . Hence Q⟨τ⟩ t ≻ t GHWit(C, p) by order condition O4.With respect to this parameter triple q = (GHLitSel, GHBoolSel, GHWit), we can show that all inferences from G(N) are liftable or redundant:Lemma 67 Let Cθ ∈ C GH and C =G -1 (Cθ).Let σ and ρ be substitutions such that xσρ = xθ for all free variables in C. (This holds for example if σ is an element of a CSU corresponding to a unifier θ.) If a literal in a clause Cθ is (strictly) ⪰-eligible w.r.t. GHLitSel, then a corresponding literal in C is (strictly) ≿-eligible w.r.t. σ and HLitSel. If a green position in a clause Cθ is ⪰-eligible w.r.t. GHBoolSel and there exists a corresponding green position in C, then the corresponding position in C is ≿-eligible w.r.t. σ and HBoolSel. Proof LITERALS: If the literal in Cθ is selected w.r.t. GHLitSel, then the corresponding literal is also selected in C = G -1 (Cθ) w.r.t. HLitSel by definition of GHLitSel (Definition 38). If Lθ is (strictly) ⪰-maximal in Cθ, then Lσ is (strictly) ≿-maximal in Cσ. POSITIONS: Let p be the position in Cθ and let p ′ be the corresponding position in C. We proceed by induction over the definition of eligible positions (Definition 22). If p is selected in Cθ w.r.t. GHBoolSel, then p ′ is selected in C = G -1 (Cθ) w.r.t. HBoolSel by definition of GHBoolSel (Definition 38). Otherwise, if p is at the top level of a literal Lθ = sθ ≈ tθ, then sθ ̸ ⪯ tθ implies sσ ̸ ≾ tσ, (strict) ⪰-eligibility of Lθ implies (strict) ≿-eligibility of L w.r.t. σ (as shown above), and hence p ′ is eligible in C w.r.t. σ.

  the term u cannot be a variable. Eligibility of p in Cθ implies eligibility of p ′ in C by Lemma 67. If u is a fluid term, by conditions A and B, it must be in a literal u

  To derive a corresponding result for the entailment relation |=, we employ the following lemma, which states equivalence of Herbrand entailment |= G and Tarski entailment |= on Q

Thus, Theorem 66 applies. ⊓ ⊔ Dynamic refutational completeness is easy to derive from static refutational completeness: Lemma 72 (Dynamic refutational completeness w.r.t. |= G ) The inference system HInf is dynamically refutationally complete w.r.t. |= G and (HRed I , HRedC), as per Definition 50. Proof By Theorem 17 of the saturation framework, this follows from Lemma 71. ⊓ ⊔

https://github.com/sneeuwballen/zipperposition

https://doi.org/10.5281/zenodo.4534759

Acknowledgment. Uwe Waldmann provided advice and carefully checked the completeness proof. Visa Nummelin led the design of the oSup calculus, which was a crucial stepping stone for this work. Simon Cruanes helped us with the implementation. Martin Desharnais generated (and regenerated) the Sledgehammer benchmarks. Ahmed Bhayat explained the higher-order Vampire schedule and suggested textual improvements. Christoph Benzmüller provided us insight into the pitfalls of higher-order reasoning. Alexander Steen explained the details of Leo-III scheduling. Geoff Sutcliffe let us use StarExec Miami for our experiments. Simon Cruanes, Herman Geuvers, Mathias Fleury, Nicolas Peltier, Giles Reger, Mark Summerfield, and the anonymous reviewers suggested textual improvements. We thank them all. Bentkamp, Blanchette, and Vukmirović's research has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement No. 713999, Matryoshka). Bentkamp's research has received funding from a Chinese Academy of Sciences President's International Fellowship for Postdoctoral Researchers (grant No. 2021PT0015). Blanchette's research has received funding from the Netherlands Organization for Scientific Research (NWO) under the Vidi program (project No. 016.Vidi.189.037, Lean Forward). References