Herbrandized modified realizability

Realizability notions in mathematical logic have a long history, which can be traced back to the work of Stephen Kleene in the 1940s, aimed at exploring the foundations of intuitionistic logic. Kleene's initial realizability laid the ground for more sophisticated notions such as Kreisel's modified realizability and various modern approaches. In this context, our work aligns with the lineage of realizability strategies that emphasize the accumulation, rather than the propagation of precise witnesses. In this paper, we introduce a new notion of realizability, namely herbrandized modified realizability. This novel form of (cumulative) realizability, presented within the framework of semi-intuitionistic logic is based on a recently developed star combinatory calculus, which enables the gathering of witnesses into nonempty finite sets. We also show that the previous analysis can be extended from logic to (Heyting) arithmetic.


Introduction
Notions of realizability have a rich history, with the first generation dating back to the 40s, with the pioneering Kleene's realizability (1945) [11] and Kreisel's modified realizability (1962) [13].These realizability strategies, closely connected with the Brouwer-Heyting-Kolmogorov foundational interpretation of intuitionistic logic developed in the early 1900s, aim to explicitly reveal the constructive content of proofs, decide disjunctions, and offer precise witnesses for existential statements.Later, a second generation of realizability strategies emerged, shifting the focus from precise witnesses to bounds for those witnesses.Examples of such realizability strategies include the bounded modified realizability (BMR) [8] and the confined modified realizability (CMR) [10], which draw inspiration from earlier works of Ulrich Kohlenbach, Fernando Ferreira, and Paulo Oliva.In 1996, Kohlenbach introduced the monotone functional interpretation [12], and in 2005, Ferreira and Oliva introduced the bounded functional interpretation [9].[Although with different approaches] Both strategies differ from the well-known Gödel's functional (Dialectica) interpretation since they do not rely on precise witnesses but instead on majorizing functionals.BMR and CMR apply the concept of majorizability in all finite types to the realizability method, also delivering bounds instead of precise realizers.
In 2017, a new type of combinatory calculus was introduced, incorporating star types [7] that enable the formation of sets of potential witnesses.The focus can now shift from bounds for witnesses to finite sets of possible witnesses.Based on this calculus, a cumulative/herbrandized functional interpretation was developed within the framework of classical first-order predicate logic, drawing on the corresponding Shoenfield version of the Dialectica interpretation.This cumulative interpretation followed in the footsteps of a previous work of Benno van den Berg, Eyvind Briseid and Pavol Safarik [2] in the context of nonstandard arithmetic.For a comparison between this later approach and the one pursued in [7], see [3].Another cumulative interpretation based on (this time denumerable) sets can be found in [1].
Based on the above prior research, this paper shows how the star combinatory calculus can serve as the basis for a novel modified realizability approach, namely the herbrandized modified realizability, within the domains of semi-intuitionistic logic and Heyting arithmetic.

Overview:
The paper is structured as follows.In the next section we recall the star combinatory calculus and its nice proof-theoretic properties.In Section 3 we introduce the herbrandized modified realizability in the semi-intuitionistic context and establish the corresponding soundness and characterization theorems.We finish the paper with some final notes, including the possibility of extending the previous analysis to the Heyting arithmetic context.
Each type represents a class of objects.As usual, informally the type σ → τ represents the functionals from objects of type σ to objects of type τ .The intended meaning of σ * is the type of all finite non-empty subsets of objects of type σ.Remark 1.Any type is of the form with ρ the type G or a star type.We follow the convention of associating → to the right, abbreviating the above type by For each functional symbol f of L, with arity n Additionally, we have the logical constants or combinators: (ii) For each type σ, there exists a countable infinite number of variables of type σ (usually denoted by x, y, z . ..).Variables are terms; (iii) If t is a term of type σ → τ and q is a term of type σ, then tq is a term of type τ .
The fact that the term t has type σ is sometimes denoted by t σ or t : σ.
Concerning the intended meaning of the star constants above: s σ t represents a set with a unique element t; ∪ σ tq represents the union of the sets t and q and σ,τ tq for t : σ * and q : σ → τ * represents the union w∈t qw.
A term is said to be normal if it is not possible to apply any one-step reduction on the term.A term t is said to be strongly normalizable if there is no infinite chain of one-step reductions starting from t.
The star combinatory calculus has the following three key properties, whose proofs can be found on [7].Theorem 1.The star combinatory calculus has the strong normalization property.Theorem 2. The star combinatory calculus has the Church-Rosser property, that is, each term has a unique normal form.Definition 3. A term t of star type is said to be set-like if it is constructed from terms of the form sq and the constant ∪.Theorem 3. If t is a normal closed term of star type, then t is set-like.
For each type ρ, we have an equality symbol = ρ and a membership symbol ∈ ρ .
An atomic formula is a formula of the form ⊥, t ρ = ρ q ρ , t ρ ∈ ρ q ρ * or R(t A formula is said to be ∃-free if it does not contain any unbounded existential quantifiers ∃x.
We use the following abbreviations: The theory IL ω * that we are about to introduce is intuitionistic logic in all finite types.First we start by listing what we call the IL axioms and rules (following the formalization in [1]).

Axioms of IL:
A where t is a term free for x in A and A[t/x] denotes the formula obtained from A after replacing each instance of x by t.

Rules of IL:
In the following rules, x does not occur free in B.
The theory IL ω * is an extension of IL (in the language of all finite types) with the following axioms and axiom schemes: (i) Axioms for = ρ : where A is an atomic formula and A ′ is obtained from A replacing some instances of x by y.
From the equalities of the conversions and the axioms for equality, we conclude that reduction implies equality.Lemma 1.Let t be a closed term of type ρ * .Then there are closed terms q 1 , . . ., q n of type ρ such that Since reduction implies equality and due to the axioms of equality, we only need to show the case when t is in normal form, that is, when t is set-like.The proof follows by induction on the complexity of t.If t is sq, by the axiom for s, we can take the term q.If t is ∪rs, we apply the induction hypothesis.Let r 1 , . . ., r m be the terms associated to r and s 1 , . . ., s l be the terms associated to s.Then, by the axiom for ∪: Given that terms are derived solely from constants and variables through the operation of application, we naturally achieve what is commonly referred to as combinatorial completeness.Theorem 4 (Combinatorial Completeness).For each term t σ and variable x ρ there exists a term of type ρ → σ, denoted by λx.t, whose variables are those of t except x, such that for all term s of type ρ: For ease of reading, we denote sx by {x}, ∪xy by x ∪ y and xy by w∈x yw.
Let σ be the type ρ 1 → . . .→ ρ n → τ * (with n ≥ 0) and a, b be terms of type σ.The following abbreviations will also be useful:

The herbrandized modified realizability
In this section, we define the new realizability notion (the herbrandized modified realizability) within IL ω * and prove the corresponding soundness and characterization theorems.Definition 6.Given a formula A, we define A HR as a formula, with the free variables of A, of the form: where A HR is a ∃-free formula.The definition is by induction on the complexity of A: If A is atomic, A HR :≡ A HR :≡ A.
If A HR ≡ ∃x A HR (x) and B HR ≡ ∃u B HR (u): . By induction on the logical structure of the formulas, it can be shown that, for any formula A, the variables x in A HR ≡ ∃x A HR (x) are of end-star type.
Theorem 5 (Monotonicity).For any formula A with A HR ≡ ∃x A HR (x): Proof.The proof is by induction on the logical structure of the formula.For atomic formulas the result is trivial.The induction step in the cases A ∧ B, A ∨ B, ∃z ∈ t A(z) and ∀z ∈ t A(z) follows from the induction hypothesis.
Case A → B We assume U ⊑ U ′ and ∀x(A HR (x) → B HR (U x)).We need to show that ∀x(A HR (x) → B HR (U ′ x)).Take x such that A HR (x).By hypothesis, we get B HR (U x).We note that from U ⊑ U ′ we get U x ⊑ U ′ x.By induction hypothesis, we have that B HR (U ′ x).Thus ∀x(A HR (x) → B HR (U ′ x)).
Case ∀z A(z) We assume X ⊑ X ′ and ∀z A HR (z, Xz).We need to show ∀z A HR (z, X ′ z).This follows from the induction hypothesis, noting that X ⊑ X ′ implies Xz ⊑ X ′ z.
Case ∃z A(z) We assume Z ⊑ Z ′ , x ⊑ x ′ and ∃z ∈ Z A HR (z, x).We need to show ∃z ∈ Z ′ A HR (z, x ′ ).Take z such that z ∈ Z and A HR (z, x).Since Z ⊑ Z ′ , we have that z ∈ Z ′ .From the induction hypothesis we get A HR (z, x ′ ).Thus ∃z ∈ Z ′ A HR (z, x ′ ).
Consider the following Choice and Independence of Premises Principles: We use the tuple notation combined with the lambda notation as per the following example: if x denotes the tuple of x i , then λx, y.x denotes the tuple of λx, y.x i .
The proof is by induction on the deduction of the formula.
Case A → A ∧ A We need terms t X ′ , t X ′′ such that: We take t X ′ := t X ′′ := λx.x.Case A ∨ A → A We need terms t X ′′ such that: We take t We take t X ′ := λx, u.x.
Case A → A ∨ B We need terms t X ′ , t U such that: We take t X ′ := λx.x.For t U we take an arbitrary closed term of adequate type, which exists due to combinatorial completeness and the existence of a constant of type G.
The case A ∨ B → B ∨ A is analogous to the above.Case ⊥ → A We need terms t x such that: We take arbitrary closed t x .Case ∀z A → A(t) We need terms t X ′′ such that: We take t X ′′ := λX ′ .X ′ t.

Case
A, A → B B By induction hypothesis, we obtain closed terms t x , t U such that: We need terms t u such that B HR (t u ) We take t u := t U t x .
Case A → B, B → C A → C By induction, we have closed terms t U , t P such that: We need terms s P such that: We take s P := λx.t P (t U x).
To realize A → (B → C) we need closed terms t P such that: These two formulas are equivalent in IL ω * , therefore the terms which realize A∧B → C are exactly those which realize A → (B → C).
We take t X := λz ′ , x.x.Case AC ω * : ∀z∃w A(z, w) → ∃W ∀z∃w ∈ W z A(z, w) We need terms t W ′′ , t X ′′ such that: where A is an ∃-free formula.We need terms t Z ′ , t U such that We take t Z ′ := λw ′ , u.{w ′ }, t U := λw ′ , u.u.The formulas in T ∃ verify themselves.
Theorem 7 (Characterisation Theorem).For any formula A: Proof.The proof is by induction on the logical structure of the formula.The result is immediate for ∃-free formulas.For the induction step, we use the induction hypothesis immediately, for instance, in order to show A ∧ B ↔ (A ∧ B) HR we show that A HR ∧ B HR ↔ (A ∧ B) HR .The equivalence for the cases A ∧ B, A ∨ B, ∃z A(z) and ∃z ∈ t A(z) is evidently a consequence of the logical rules; for instance, for A ∧ B, we just drag the quantifiers inside and outside.
For the remaining cases, the right to left implication is also consequence of the logical rules.
We focus on the reciprocal.

Case ∀z A(z)
We are going to show that ∀z∃x A HR (z, x) → ∃X ′ ∀z A HR (z, X ′ z).
From ∀z∃x A HR (z, x), applying AC ω * we obtain ∃X∀z∃x ∈ Xz A HR (z, x).By monotonicity we have ∃X∀z A HR (z, x∈Xz x).Thus ∃X ′ ∀z A HR (z, X ′ z).

Case ∀z ∈ t A(z)
We are going to show that ∀z ∈ t∃x A HR (z, x) → ∃x∀z ∈ t A HR (z, x).Using collection (Lemma 2, involving AC ω * and IP * ∃ ), we get ∃w∀z ∈ t∃x ∈ w A HR (z, x).Take x ′ := x∈w x.Then, by monotonicity, we get A HR (z, x ′ ) for all z ∈ t.
where z, w are the only free variables of A, then there exist closed terms r such that Proof.We have: Using Soundness, we get terms t, r such that, for arbitrary z ∃w ∈ rz A HR (z, w, tz) thus ∃x∃w ∈ rz A HR (z, w, x) which is just (∃w ∈ rz A(z, w)) HR .By the Characterization Theorem, we obtain ∃w ∈ rz A(z, w) for arbitrary z.

Corollary 2. If
IL ω * + AC ω * + IP * ∃ + T ∃ ⊢ ∀z∃w A(z, w) where A is an ∃-free formula whose only free variables are z, w, then there exist closed terms r such that IL ω * + T ∃ ⊢ ∀z∃w ∈ rz A(z, w) Proof.We have: Using Soundness, we get terms r such that Remark 8. We also have the previous results in the absence of the variables z.Due to Lemma 1, we conclude the following: where x is the only free variable of A, then there exist closed terms t 1 , . . ., t n such that where A is an ∃-free formula whose only free variable is x, then there exist closed terms t 1 , . . ., t n such that 4 Final Notes

Atomic versus ∃-free
The axiom scheme for equality, on page 5, was formulated with A an atomic formula.
As is well known, this atomic formulation is enough to ensure we have the result for any formula A within the system.Instead of using atomic formulas, we could have presented the scheme with A an ∃-free formula.From our interpretation perspective, the ∃-free formulas are still computationally empty.

The translation of the universal quantification
Note that, in the case of the bounded modified realizability (•) br [8], the translation of the universal quantification needs to be more evolved, namely (∀zA(z)) br :≡ ∃X ∀a∀z ≤ * aA br (z, Xa) Monotonicity explains this need, because one has to ensure that which is the case if z is monotone, i.e., if z ≤ * z, thus the need to consider monotone majorants a such that z ≤ * a.In the case of the herbrand modified realizability we can deal with z itself since X ⊑ Y → Xz ⊑ Y z

The star calculus on arithmetic
The possibility of extending the star calculus to the arithmetic setting keeping the strong normalization and the Church-Rosser properties was already discussed in [5] but without proofs of such results.We present here such proofs.We denote the ground type as N , intending it to represent natural numbers; and we consider the following constants from the language of arithmetic: 0 of type N , S of type N → N and R σ of type N → σ → (σ → N → σ) → σ.Note that σ can be of star type.
We assign the following conversions to the new constants above: R σ 0qr q (q : σ, r : σ → N → σ) R σ (St)qr r(Rtqr, t) (t : N, q : σ, r : σ → N → σ) We are going to show, adapting the proof in [7] based on Tait's reducibility technique [15,16], that the star calculus in the extended (arithmetical) context remains strongly normalizable.First some definitions.Definition 7. Given a term t of type σ * , we define a finite set of terms of type σ, the surface elements of t, which we denote by SM(t), by induction on the complexity of t as follows: (i) If t is of the form s(q) then SM(t) is {q}; (ii) If t is of the form ∪qr, then SM(t) is SM(q) ∪ SM(r); (iii) In any other case, SM(t) is ∅.Definition 8.The set Red σ of the reducible terms of type σ is defined recursively in the complexity of the type σ as follows: (i) t ∈ Red N :≡ t is strongly normalizable; (ii) t ∈ Red σ→τ :≡ for all q, if q ∈ Red σ then tq ∈ Red τ ; (iii) t ∈ Red σ * :≡ t is strongly normalizable and if, for any term obtained by reduction of t, its surface elements are reducible.
The proofs of lemmas 1, 2, 3 and 4 presented in [7] on pages 526-527, are already applicable in the new context.We just recall here the statement of two of those results: Lemma 3. If t ∈ Red σ , then t is strongly normalizable; Lemma 4. If t is a reducible term and t q, then q is reducible.Theorem 8.All terms in the star combinatory calculus for arithmetic are reducible.
Proof.Following the proof in [7], we only need to show that the arithmetical constants are reducible.It is clear that 0 ∈ Red N .We have that if t is a reducible term of type N (i.e., strongly normalizable), then St ∈ Red N .Thus S ∈ Red N →N .
Following Remark 1, we assume that σ is σ 1 → • • • → σ n → ρ, with ρ star type or N .We just need to prove that R σ is reducible.
Let t ∈ Red N , q ∈ Red σ , r ∈ Red σ→N →σ and t 1 , . . ., t n with t i ∈ Red σi .We show that Rtqrt 1 • • • t n ∈ Red ρ .Since t is strongly normalizable, there exist finite normal forms of t, which we here denote t (1) , . . ., t (k) .Each t (i) is of the form S • • • St * with µ i (t) instances of S at the beginning of the term, where t * is not of the form St ′ * .We define µ(t) := max i µ i (t).The proof is by induction on µ(t).
If t 0 ≡ R0qr, t 1 ≡ q, t 2 ≡ R0q ′ r then we take t 3 ≡ q ′ .Theorem 10.If t is a closed normal term of type N then t is a numeral n, i.e., it is of the form S • • • S0.
Proof.Closed terms are of the form at 1 • • • t m where t i are closed terms and a is a constant.After the proof in [7], we only need to verify if R σ t 1 • • • t m can be a closed normal term of type N .The only possibility would be R σ tqrt 1 • • • t n (where σ is By an inductive argument we may suppose that t is a numeral.Therefore R σ tqrt 1 • • • t n is not normal. Thus, the recursor does not contribute for the closed normal terms of type N , being those the terms S • • • S0 with a finite (possible zero) number of S's.
Theorem 11.If t is a closed normal term of star type ρ * , then t is set-like and SM(t) is a finite non-empty set of closed normal terms of type ρ.
Proof.The proof, by induction on the term t, that t is set-like, i.e., t is of the form sr or ∪t 1 t 2 , can be found in [5].The last assertion of the theorem follows immediately, noticing that: i) SM(sr) = {r}, and being sr a closed normal term of type ρ * , then r has to be a closed normal term of type ρ, ii) SM(∪t 1 t 2 ) = SM(t 1 ) ∪ SM(t 2 ), following the result by induction hypothesis.
The star combinatory calculus within the arithmetic framework was also used in [4,6] in the context of herbrandized functional interpretations for (respectively classical and semi-intuitionistic) second-order arithmetic.

Heyting Arithmetic HA ω *
Although the herbrandized modified realizability was introduced in Section 3 within the realm of logic, specifically semi-intuitionistic logic, it can also be applied within the Heyting arithmetic context.
With that in view, consider the star combinatory calculus in the language of arithmetic described in subsection 4.3.Consider also the universal axioms for the successor S and the recursor R (as in [18] or [14]) and the (unrestricted) induction axiom scheme: A(0) ∧ ∀n(A(n) → A(Sn)) → ∀n A(n).
We denote by HA ω * the theory consisting of IL ω * (in the language of arithmetic) with the above arithmetical axioms.
The soundness theorem has an arithmetical extension.Theorem 12 (Soundness, arithmetical extension).Let A be a formula with free variables a.Let T ∃ be a set of ∃-free formulas.If y) and IP * ∃ : (B(x) → ∃y A(y)) → ∃w(B(x) → ∃y ∈ w A(y)) where B is an ∃-free formula.The theory IL ω * + AC ω * + IP * ∃ proves the following Collection Principle: Lemma 2 (Collection).IL ω * + AC ω * + IP * ∃ ⊢ ∀x ∈ y∃z A(x, z) → ∃w∀x ∈ y∃z ∈ w A(x, z) Theorem 6 (Soundness).Let A be a formula with free variables a.Let T ∃ be a set of ∃-free formulas.If IL ω * + AC ω * + IP * ∃ + T ∃ ⊢ A(a) then there exist closed terms t such that IL ω * + T ∃ ⊢ A HR (a, ta) Proof.Fix A HR ≡ ∃x A HR (x), B HR ≡ ∃u B HR (u) and C HR ≡ ∃p C HR (p).

2
Background: star combinatory calculus Definition 1.The types are inductively generated as follows: (i) The ground type (G) is a type; (ii) If σ and τ are types, σ → τ is a type; If A and B are formulas and x is a variable, then A ∨ B, A ∧ B, A → B, ∀x A and ∃x A are formulas.(iii) If A and B are formulas, x is a variable of type ρ and t is a term of type ρ * where x ρ does not occur, then ∀x ∈ t A, ∃x ∈ t A are formulas.[∀x ∈ t and ∃x ∈ t are called bounded quantifications.] s/x] where t[s/x] is the term obtained replacing in t every occurrence of x by s.Remark 3. In fact, we get (λx.t)st[s/x].Definition 5. A type is said to be end-star if it is of the form ρ 1