Schema Complexity in Propositional-Based Logics

: The essential structure of derivations is used as a tool for measuring the complexity of schema consequences in propositional-based logics. Our schema derivations allow the use of schema lemmas and this is reﬂected on the schema complexity. In particular, the number of times a schema lemma is used in a derivation is not relevant. We also address the application of metatheorems and compare the complexity of a schema derivation after eliminating the metatheorem and before doing so. As illustrations, we consider a propositional modal logic presented by a Hilbert calculus and an intuitionist propositional logic presented by a Gentzen calculus. For the former, we discuss the use of the metatheorem of deduction and its elimination, and for the latter, we analyze the cut and its elimination. Furthermore, we capitalize on the result for the cut elimination for intuitionistic logic, to obtain a similar result for Nelson’s logic via a language translation.


Introduction
One of the main concerns of proof theory is related to the complexity of symbolic proofs, as stated by David Hilbert in [1], namely in finding criteria for simplicity in mathematical proofs. This topic, started by Gerhard Gentzen (see [2]), has been under intensive research by many authors, namely concerning the general structure of proofs, normal forms and their relevant properties (see [3][4][5][6][7][8][9][10][11][12]). For an extensive overview of different possible complexity measure, the reader is invited to consult [12].
In [13], we addressed the problem of measuring the complexity of derivations in FOL by using as measure the size of the derivations as well as the length of each step (in the terminology of [12,14], with respect to Frege systems, we discuss s D (η); that is the minimum number of symbols in a schema derivation for η). In [13], two derivations can have the same complexity, except for some non-essential details; that is, they share the same schema derivation. Thus, both should have the same complexity, measured by the complexity of the schema derivation. The adopted view of complexity of a formula is related to Kolmogorov's notion of the complexity of a description [15,16].
Herein, we address the role of schema lemmas and schema metatheorems in the complexity of schema derivations, as recognized in [12]. We concentrate on schema derivations in the context of propositional-based logics. These schema derivations give the foundation for the complexity measure. We allow the use of schema lemmas in schema derivations. The complexity of a schema derivation is not affected by the number of times that the same lemma is applied. This approach can be used both for Hilbert calculi and Gentzen calculi. This is illustrated with a Hilbert calculus for modal logic as well as by a Gentzen calculus for intuitionistic logic.
After the initial set-up, we focus on the application of metatheorems. Given the complexity of a schema derivation where a metatheorem was applied, we show how to use it to obtain a bound on the complexity of a schema derivation where the metatheorem is not used. We discuss the case of the metatheorem of deduction in a Hilbert calculus and the case of cut in a Gentzen calculus. Examples are provided for both cases for modal logic and intuitionistic logic, respectively.
The paper is organized as follows. In Section 2, we define the schema calculus, in particular, the Hilbert and Gentzen calculi. For the Gentzen calculi, we typify the connectives according to their arity and semantic behaviors in order to accommodate what we call regular Gentzen calculi. Moreover, we set up the Hilbert schema calculus for modal logic and the Gentzen calculus for intuitionistic logic. In Section 3, we define schema proof, schema derivation, and schema lemma. We also introduce the notion of schema derivation using schema lemmas. Examples are provided. Section 4 is dedicated to schema derivation complexity and how the use of lemmas relates to complexity. In Section 5, we define schema metatheorem and in particular the metatheorem of deduction for a Hilbert calculus and the cut metatheorem for a Gentzen calculus. We have results on the elimination of such metatheorems and how the schema complexity is affected by the respective elimination. We conclude in Section 6 with some remarks on future work.

Schema Calculus
We introduce the notion of schema calculus for propositional-based logics (that is, logics without quantifiers) where we can forget some details and concentrate on the structure of derivations. In doing so, many derivations have the same schema. Our schema notions are general enough to accommodate Hilbert and Gentzen schema calculi as special cases.
Let Ξ be a denumerable set of schema variables (schema variables can be instantiated in a particular formula producing another formula). A propositional-based signature is a family where C k is the set of operators of arity k for k ∈ N. The set SL C of schema formulas or the schema language over C is inductively defined as follows: When there is no ambiguity, we can skip the subscript in SL C . We denote by SL S4 the schema language over C S4 and by SL J the schema language over C J .

Definition 1. A schema calculus over C is a tuple
DL is a set of schema deductive assertions (or the schema deductive language); • µ : SL → DL is an injective translation map; • sAx ⊆ DL is a finite set of schema axioms; • sD ⊆ ℘ fin (DL) × DL is a finite set of schema derivation rules; • sP ⊆ ℘ fin (DL) × DL is a finite set of schema proof rules; such that sD ⊆ sP where ℘ fin (DL) is the set of all finite subsets of DL.
We will present a rule ({τ 1 , . . . , τ n }, τ) as follows: and an axiom τ as τ The schema deductive language is relevant when dealing with calculi where the deductive unit is not the formula. This is the case, for instance, with sequent calculi where the deductive unit is the sequent. When the deductive unit is the formula, then DL coincides with SL. This is the case in Hilbert calculi. The distinction between schema derivation rules and schema proof rules is needed in order to cope, for example, with the use of necessitation in modal logic.
Herein, we focus only on two kinds of schema calculi: Hilbert schema calculi and Gentzen schema calculi. Namely, we consider as working examples the Hilbert schema calculus for modal logic S4 and the Gentzen schema calculus for intuitionistic logic J. A sAx S4 H is composed by the following axiom schemas: sAx1 H is composed by the following schema derivation rule: H as well as the schema proof rule: A Gentzen schema calculus D G is a schema calculus such that • DL is the set of all sequents; sAx G includes ξ → ξ where a sequent is a pair ({η 1 , . . . , η m }, {η 1 , . . . , η n }) of finite multisets of schema formulas presented as η 1 , . . . , η m → η 1 , . . . , η n .

Definition 2.
A Gentzen calculus D G over C is regular whenever the rules for each c ∈ C n and n ≥ 1 are either of the type where 0 ≤ ≤ n. In the first type of rules, we assume that if = 0 then in R c the premise is Π 1 → Π 2 , ξ 1 , . . . , ξ n and in rule L c the premises of the left hand side are omitted. Furthermore, if = n then in rule R c the premise is ξ 1 , . . . , ξ n , Π 1 → Π 2 , and in rule L c the premises on the right hand side are omitted. The same conventions apply to the second type of rules.
for ξ, ξ 1 , ξ 2 ∈ Ξ and Π is an SL J multiset. Observe that sD J G is a regular Gentzen schema calculus because rules for ⊃ are of type (i) with n = 2 and = 1, rules for ∧ are of type (ii) with n = = 2, and rules for ∨ are of type (iii) with n = 2.
In general, a cut rule is either of the form A Gentzen schema calculus is cut-free if it does not include the cut rule. Below, we will discuss a result that states that we can always work with a cut-free Gentzen schema calculus provided that this calculus is regular.

Schema Derivation and Lemmas
Given a schema calculus, we can define what are schema proofs and schema derivations. As expected, every schema derivation is a schema proof, but not the other way around. Definition 3. Let D = (DL, µ, sAx, sD, sP) be a schema calculus and ∆ ∪ {τ} ⊆ DL. We say that τ is schema provable from ∆ in D, written whenever there is a finite sequence ω = ω 1 . . . ω n in DL such that: • ω n is τ; • for each j = 1, . . . , n either ω j ∈ ∆; -or ω j is an instance of a schema axiom in sAx; -or ω j is an instance of the conclusion of a schema rule r in sP and the instances of the premises of r occur in positions contained in {1, . . . , j−1}. The sequence ω is a schema proof of τ from ∆. We say that τ is schema provable whenever τ is schema provable from the empty set.
We now extend the notion of schema proof to formulas in the schema language SL.
When Θ is empty then η is a schema theorem.

Example 3. Recall the Hilbert calculus D S4
H defined in Example 1. Let Definition 5. Let D = (DL, µ, sAx, sD, sP) be a schema calculus and ∆ ∪ {τ} ⊆ DL. We say that τ is schema derivable from ∆ in D, written whenever there is a finite sequence ω = ω 1 . . . ω n in DL such that: • ω n is τ; or ω j is an instance of a schema axiom in sAx; -or ω j is an instance of the conclusion of a schema rule r in sD and the instances of the premises of r occur in positions contained in {1, . . . , j−1}; -or ω j is schema provable.
The sequence ω is a schema derivation of τ from ∆.
We now introduce the notion of schema lemma. Definition 6. Let D = (DL, µ, sAx, sD, sP) be a schema calculus and ∆ ∪ {τ} ⊆ DL. Whenever τ is schema derivable from ∆ in D, we say that (∆, τ) is a schema lemma.
Let Λ be a set of schema lemmas and ∆ ∪ {τ} ⊆ DL. We write whenever there is a schema derivation using as schema derivation rules the rules in D and the schema lemmas in Λ. We can extend the notion of schema lemma to allow the use of schema lemmas in the schema derivation of other schema lemmas. The set Λ should be closed under dependencies of schema lemmas. Note that ∆ D,∅ τ coincides with ∆ D τ. Observe that the notion of schema provable can also be extended to encompass schema lemmas.
As expected, we extend this notion to schema formulas in SL. Let Θ ∪ {η} ⊆ SL. Then, we write Θ D,Λ η whenever there is a schema derivation of µ(Θ) D,Λ µ(η). In the following examples, we highlight the use of schema lemmas. When Λ = ∅, we write Θ D η.
and ω the sequence Hence, in ω the necessitation rule in step (4) was used over a schema theorem.
Observe that the schema lemma sHS was used twice in ω. Let ω sHS be the following schema derivation: Example 6. Recall the Gentzen calculus D J G defined in Example 2. As usual, we define ¬ ξ as an abbreviation of ξ ⊃ ⊥. Consider the following schema derivation lemmas where LW * means that the left weakening may be applied several times. We now show that where Λ = {R ¬, L ¬}. In fact, consider the schema derivation:

Schema Derivation Complexity
For defining schema complexity, we need to introduce an additional information on schema proofs and derivations. We start by considering the schema derivation complexity over DL. Then we extend the notion to schema formulas.
Given a set Λ of schema lemmas and ∆ ∪ {τ} ⊆ DL, the notation states that ω is a schema derivation of ∆ D,Λ τ using (directly or indirectly) schema lemmas in Λ. Furthermore, we denote by || · || the total number of symbols in a sequence.

Definition 7.
Let λ = ({δ 1 , . . . , δ k }, τ) be a schema lemma in D. Then, the schema complexity of λ is The schema complexity of τ given a set of schema lemmas Λ and ∆ in D is When Λ and Θ are empty sets then D D (η) is the minimum number of symbols in a derivation of η in D (this measure corresponds to s D (η) in [12]).
Observe that we count once the derivation of each lemma, even if the lemma is applied several times, directly or indirectly. Moreover, we only consider, for the complexity, the total number of symbols of the derivation of each used lemma after removing the hypotheses and the conclusion of the lemma.
We now compare the complexity of schema derivation using different sets of schema lemmas. Proposition 1. Let Θ ∪ {η} ⊆ SL and Λ and Λ sets of schema lemmas such that Λ ⊆ Λ . Then, Proof. It is enough to observe that any schema derivation using schema lemmas in Λ is also a schema derivation using schema lemmas in Λ .
In particular, for any set Λ of schema lemmas.

Example 7.
Consider the schema derivation ω for Hence, 6 ||. Note that schema lemma sHS was used twice in the schema derivation, but it only counts once for the schema derivation complexity.

Example 8. Consider the schema derivation ω for
given in Example 6 with Λ = {R ¬, L ¬}. Note that Thus, Hence, In this case, the schema lemma R ¬ has no impact on the schema derivation complexity. Moreover, although the schema lemma L ¬ was used four times, it only counts once on the schema derivation complexity.

Schema Metatheorems
A schema metatheorem over D is a pair . . , m, is a meta premise and Θ D η is the meta conclusion of the schema metatheorem.

Metatheorem of Deduction in Hilbert Like Calculi
The metatheorem of deduction is associated with implication. Since we are working in a general setting we need to make precise what is a Hilbert calculus with implication.
We say that a Hilbert schema calculus D H has implication if ⊃ ∈ C 2 and the following schema metatheorems of modus ponens (MTMP) and deduction (MTD) The schema MTD can be characterized in D H by some schema lemmas. That is, a deductive system has the MTD, provided that certain schema lemmas hold. Consider the following pairs: where ξ is a fresh schema variable.
The following result gives a necessary and sufficient condition for MTD to hold in a Hilbert schema calculus.

Proposition 2.
Let D H be a Hilbert schema calculus with ⊃ ∈ C 2 and MTMP. Then MTD holds in D H iff L1, L2, LD r are schema lemmas for every r ∈ sD H .
(←) Assume that Θ, η D H η . Let ω 1 . . . ω m be a schema derivation of η from Θ and η. We prove the result by induction on m.
(a) ω m is a schema axiom. Then consider the schema derivation: 1 η sAx 2 η ⊃ η L2:1 (b) ω m ∈ Θ is an hypothesis. Then consider the schema derivation: Then consider the schema derivation: where sThm means that η is a schema theorem (hence, has a schema proof).
(d) ω m is η. Then consider the schema derivation Step) ω m = η is an instance of the conclusion of a schema derivation rule r and the instances of the premises are ω j 1 , . . . ω j n assuming that r has n premises. Hence, Θ, η D H ω j i and so, by the induction hypothesis, Θ D H η ⊃ ω j i , for every i = 1, . . . , n. Then consider the following schema derivation: In order to avoid the overloading of the notation we omit the reference to schema lemmas L1, L2, LD r for r ∈ sD H in the meta conclusion of the MTD. Before extending the previous result to schema derivations using schema lemmas, we establish a useful result for the schema proof rules.

Proposition 3.
Let D H be a Hilbert schema calculus with ⊃ ∈ C 2 and MTMP. Assume that L1, L2, LD r for every r ∈ sD H are schema lemmas. Then, for every instance of a schema proof rule is a schema lemma, provided that η 1 , . . . , η k are schema theorems and ξ is a fresh schema variable.
Let λ = ({η 1 , . . . , η k }, η) be a pair and define λ = ({ξ ⊃ η 1 , . . . ξ ⊃ η k }, ξ ⊃ η) where ξ is a fresh schema variable. The following result is an immediate consequence of Proposition 2. Let Λ be a set of schema lemmas. We define The following result is useful for detailing how to get a schema derivation for η ⊃ η from Θ out of a schema derivation for η from Θ and η in the presence of schema lemmas.
We now show by induction on k that ω is a schema derivation for Θ D H ,Λ η ⊃ η .
(3) ω j is the conclusion of an instance ({ω j 1 , . . . , ω j n }, ω j ) of a schema proof rule r. Then, by the induction hypothesis, Θ D H ,Λ η ⊃ ω j i for i = 1, . . . , n. Hence, by construction of ω, ω is a schema derivation for Θ D H ,Λ η ⊃ η observing that if ω j i is a theorem then η ⊃ ω j i must also be a theorem for i = 1, . . . , n and, in these conditions, LP r is a schema lemma by Proposition 3.
Example 9. Note that D S4 H has implication. We now prove that D S4 H has the MTD. According to Proposition 2, it is enough to show that L1, L2, and LD sMP are schema lemmas. We only show LD sMP . For that, it is enough to observe that the sequence ω LD sMP Example 10. Recall Example 5 where Λ = {sHS}. In this case Recall also that D S4 H has implication, as shown in Example 9. Then the sequence ω MTD defined is as follows is a schema derivation for Observe that this schema derivation was obtained from the schema derivation in Example 5 using the proofs of Proposition 5 and Proposition 3. Proposition 6. Let D be a Hilbert schema calculus with implication, Λ a set of schema lemmas and ω a schema derivation for Θ, η D H ,Λ η . Then there is a constant κ, such that Proof. The first two terms of the bound of the schema complexity are a direct consequence of the proof of Proposition 5. The following expression is a bound for constant κ.

Cut in Gentzen Like Calculi
Let D G be a regular Gentzen schema calculus with the following cut rule A possible instantiation of the Cut rule is where η is said to be the cut formula. The depth of a schema formula η is defined as follows: The depth of a cut instantiation is the depth of its cut formula. For more details on cut elimination, the reader should consult [17].
We use the following notations: S D G ,Cut d s means that there is a schema derivation of s from S in D G and cut in which all the cuts have a depth of at most d and S D G ,Cut 1 d s means that there is a schema derivation of s from S in D G and cut in which the final step is a cut of depth d, and all the other cuts have a depth of at most d − 1. In order to investigate the impact of the elimination of cuts of depth d, we need to work with more fine grained complexity measures. We denote by the complexity of the smallest schema derivation for Γ → ∆ using cuts with at most depth d. Moreover, we denote by the complexity of the smallest schema derivation for Γ → ∆ ending with an application of a cut rule of depth d and all the other cuts have depth at most d − 1. Finally, we use S D G \Cut s for denoting a cut-free schema derivation. Observe that for cut elimination we will use schema lemmas that depend on the main connective of the cut formula. Hence, we associate schema lemmas with each connective depending on its type (recall Definition 2). Let c be a connective of type (i), = 1 and n = 2. Then we define λ c as the schema lemma in D G . We denote by the complexity of the schema lemmas for C.
In the next results we assume without loss of generality that in a schema derivation the cut formulas are immediately expanded after the application of the cut. The general case would follow by an additional induction on the level of the cut.

Proposition 7.
Let D G be a regular Gentzen schema calculus (recall Definition 2) and c a connective of type (i), = 1 and n = 2. Then, the following metatheorem holds assuming that the last step of the schema derivation for Γ → ∆ on the numerator is justified by Cut with premises c(η 1 , η 2 ), Γ → ∆ and Γ → ∆, c(η 1 , η 2 ). Moreover, Proof. Let ω be a schema derivation . . .
From ω we have schema derivations for η 1 , Γ → ∆, η 2 , for η 2 , Γ → ∆ and for Γ → ∆, η 1 . Hence, there is a schema derivation of Γ → ∆ using the schema lemma: Observe that in this schema derivation, all the cuts have depth less than d. Moreover, The inequality holds since Observe that we can establish a similar result for every connective of type (i) (with = 1), (ii), (iii), and (iv) in a regular Gentzen calculus with signature C. We also provide an illustration for a connective c of type (iii) and arity 2 (the rules for disjunction in intuitionistic logic are of this kind). Let D G be a regular Gentzen schema calculus with the following cut rule and where every schema rule has premises and conclusion sequents with a unique schema formula on the right hand side. A possible instantiation of the cut rule is Let λ c i be the schema lemma Proposition 8. Let D G be a regular Gentzen schema calculus where every schema rule has as premises and conclusion sequents with a unique schema formula on the right hand side, and c a connective of type (iii) and arity 2. Then, the following metatheorem holds assuming that the last step of the schema derivation for Γ → δ on the numerator is justified by Cut with premises c(η 1 , η 2 ), Γ → δ and Γ → c(η 1 , η 2 ). Moreover, Proof. Let ω be a schema derivation From ω we have schema derivations for Γ → η i and η i , Γ → δ for i = 1, 2. Hence, there is a schema derivation of Γ → δ using the schema lemma λ c i . Observe that in this schema derivation, all the cuts have depth less than d. Furthermore, We now investigate the impact on the complexity of reducing the depths of the cut in schema derivations. Proposition 9. Let D G be a regular Gentzen schema calculus. Then, the following metatheorem holds Proof. Assume that Let ω of size m be a smallest schema derivation of Γ → ∆ in D G using cuts of at most depth d. The proof follows by induction on the number n of cuts of depth d in ω .
(Base) n = 0. Then ω is also a schema derivation for Γ → ∆ with cuts less than or equal to Consider the schema derivation ω obtained from ω by replacing the schema derivation of Γ i → ∆ i in ω by a schema derivation of Γ i → ∆ i where the cut of depth d is substituted by cuts of depth less than d for i = 1, . . . , n − 1, as given by the induction hypothesis. Then, ( †) ||ω || ≤ ||ω ||.
Observe that ω is a schema derivation of Γ → ∆ with a unique cut of depth d. That is, Then, looking at the proof of Proposition 7, we can say that there is a schema derivation ω of Γ → ∆ where all the cut rules are of depth less than d. Furthermore, ( ‡) ||ω|| ≤ ||ω ||. Finally, where ( * ) comes from the definition of D D G ,Cut d−1 .
Now we can state the cut elimination theorem.
Proposition 10. Let D G be a regular Gentzen schema calculus. Then, the following metatheorem holds, for every d ∈ N, Proof. The proof follows by induction on d.
(Base) d = 0. Immediate by definition. (Step) Assume that d ≥ 1. Hence, by the induction hypothesis, The thesis follows by Proposition 9.
Example 12. Recall Example 2 and Example 8. Then, by Proposition 10, is the complexity of the schema lemmas for ∧, ∨ and ⊃.

Paraconsistent Nelson's Logic
Recall Nelson's paraconsistent logic N4 ( [18,19]). We discuss how the result of the complexity of the cut elimination can be used to find an upper bound on cut elimination in N4 (using the results in [20], namely the theoremhood reduction from N4 to J + ).
Assume that ω k was obtained by rule L∨ from ω i and ω j with i, j < k. There are two possibilities. Either The first case is straightforward using L∨ on N4. For the second case, we have where i, j < k. Thus, by the induction hypothesis, Moreover, applying L∼ ∧ we get The result follows since τ(∼ (η 1 ∧ η 2 )) = τ(∼ η 1 ) ∨ τ(∼ η 2 ). The other rules are similar.

So,
where the first and the third steps are justified by ( †) and the second step is justified by Proposition 10. Furthermore, by looking into the translation of the schema derivations in both directions, we observe that no complexity is added either to the length of the derivations or the depth of the formulas in the cuts. Thus, since the structure of the derivation is essentially the same as the derivation in J and, thus, we can replicate the proof of Proposition 9.

Outlook
In the context of schema calculi for propositional-based logics, the notion of schema complexity of a schema formula was introduced. A key observation was to recognize that distinct formulas can share the same schema derivation. Another relevant observation is that different applications, of the same lemma in the same proof, should be counted only once. These observations motivated the definition of schema complexity of a schema formula.
We also investigated the use of schema metatheorems in the complexity of a schema derivation. We looked into the complexity of using the metatheorem of deduction in the context of Hilbert calculi, with the implication and complexity of using the metatheorem of cut elimination in the context of (regular) Gentzen calculi. Examples were provided for modal logic S4 and intuitionistic logic J. We also gave a bound on the cut elimination for Nelson's logic N4 by providing a translation from N4 to J + (that is, positive intuitionistic logic). The results in this work only apply to logics that, when presented by Hilbert calculi, should have implication, and when presented by sequent calculi, should have rules of the types identified in this paper. Furthermore, we did not discussed logic presented by other kinds of calculi, e.g., tableaux.
With respect to future work, it seems worthwhile to generalize Deckhow's Theorem (see [21]), i.e., given schema calculi D 1 and D 2 for the same logic, under which conditions, there is a map f : ω → f (ω) such that ω is a schema derivation for η ∈ D 1 iff f (ω) is a schema derivation for η ∈ D 2 for every formula η, and relate the respective schema complexities (see also [22]).
It is also interesting to relate the schema complexities of a formula in logics L 1 and L 2 when there is a translation from L 1 to L 2 (for instance, the standard translation from modal to first-order logic, see [23]). Moreover, it seems challenging to investigate schema complexity when combining logics [24,25]. Furthermore, it seems worthwhile to explore the relationship between schema derivation complexity and decidability as well as to explore other measures of complexity as in [12]. For the moment, we can say that if the theoremhood problem for a given logic is decidable, then the schema complexity for a given schema formula is a natural number, provided that the algorithm that testifies the decidability, when executed for the formula, returns value 1, and is infinite otherwise. Finally, we intend to analyze how these results can be extended to first-order-based logics, and see how these results can be applied in real life examples.
Author Contributions: All authors have contributed equally for the paper. All authors have read and agreed to the published version of the manuscript.