<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Proof-search in Hilbert calculi</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mauro Ferrari</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Camillo Fiorentini</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guido Fiorino</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DI, Univ. degli Studi di Milano</institution>
          ,
          <addr-line>Via Comelico, 39, 20135 Milano</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>DISCO, Univ. degli Studi di Milano-Bicocca</institution>
          ,
          <addr-line>Viale Sarca, 336, 20126, Milano</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>DiSTA</institution>
          ,
          <addr-line>Univ. degli Studi dell'Insubria, Via Mazzini, 5, 21100, Varese</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>The Hilbert calculus Hc</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>It is well-known [7] that the standard formalizations of classical and intuitionistic logic based on Hilbert calculi, sequent calculi and natural deduction are equivalent. In spite of this, proof-search has been mainly developed around the notion of sequent calculi almost neglecting the cases of natural deduction and Hilbert calculi. This is primarily motivated by the fact that the latters lack the \deep symmetries" of sequent calculi which can be immediately exploited to control and reduce the search space (see, e.g., [2,3,6] for an accurate discussion). However, as we have shown in [3], in the case of natural deduction it is possible to design proof-search procedures with structural properties and complexity comparable with those based on sequent calculi. In this paper we begin an analogous investigation concerning Hilbert calculi. In particular, we consider the f!; :g-fragment of the Hilbert calculus for Classical Propositional Logic de ned in [5] and we describe a terminating proof-search procedure for it. We consider the propositional language L of Classical Propositional Logic (CPL) based on a denumerable set of propositional variables V and the connectives ! and :. The logical connectives ^ and _ can be introduced by setting A ^ B = :(A ! :B) and A _ B = :A ! B. A literal is a formula of the form p or :p with p 2 V; the set of literals is denoted by Lit. We call Hc the Hilbert calculus for CPL introduced by Kleene in [5]. Logical axioms of Hc are:</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>(Ax1)
(Ax2)
(Ax3)
(Ax4)</p>
      <p>
        A ! (B ! A)
(A ! B) ! ((A ! (B ! C)) ! (A ! C))
(A ! B) ! ((A ! :B) ! :A)
::A ! A
The only rule of Hc is MP (Modus Ponens ): from A ! B and A infer B. Let
be a set of formulas and A a formula. A deduction of A from assumptions is
a nite sequence of formulas hA1; : : : ; Ani such that An = A and, for every Ai
in the sequence, one of the following conditions holds:
(a) Ai 2 (namely, Ai is an assumption);
(b) Ai is an instance of a logical axiom;
(c) Ai is obtained by applying MP to Aj and Ak, with j &lt; i and k &lt; i.
(
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ) DMP(A ! B; A) : A ! B; A ` B;
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) D::E(A) : ::A ` A;
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) DEF(A; B) : A; :A ` B;
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) DEF!(A; K) : :A ! K; :A ! :K ` A;
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) DEF!:(A; K) : A ! K; A ! :K ` :A.
tu
By D : ` A we mean that D is a deduction of A from assumptions . By Fm(D)
we denote the set of formulas occurring in the sequence D. In the following
proposition we introduce some deductions:
Proposition 1. For every formula A, B and K, the following deductions can
be constructed:
Let D and E be two deductions, where E = hA1; : : : ; Ani. The concatenation of
D and E, denoted by D E, is de ned as follows:
{ let E0 be obtained by removing from E the formulas Aj such that 1 j &lt; n
and Aj is in D; then, D E is the concatenation of the sequences D and E0.
One can easily check that:
Lemma 1. Let D : ` A and E : ` B. Then, D E : [ ( n Fm(D)) ` B
and Fm(D E) = Fm(D) [ Fm(E). tu
A distinguishing feature of Hilbert calculi is that there are no rules to close
assumptions. Thus, to prove the Deduction Lemma we have to rearrange a
deduction D of A; ` B, as shown in next lemma.
      </p>
      <p>Lemma 2 (Deduction Lemma). Let D : A; ` B. Then, there exists a
deduction EDL(D) : ` A ! B such that, for every C 2 Fm(D), A ! C 2
Fm(EDL(D)). tu</p>
      <p>In the next lemma we introduce the deductions E:E(D) and EI:(D).
Lemma 3.</p>
      <p>(i) Let D : :A;</p>
      <p>E:E(D) :
(ii) Let D : A;</p>
      <p>EI:(D) :</p>
      <p>` K such that :K 2 Fm(D). Then, there exists a deduction
` A.</p>
      <p>` K such that :K 2 Fm(D). Then, there exists a deduction
` :A.</p>
      <p>
        Proof. We prove Point (i). By the Deduction Lemma, there exists a deduction
EDL(D) : ` :A ! K such that :A ! :K 2 Fm(D). Let us consider the
derivation DEF!(A; K) : :A ! K; :A ! :K ` A de ned in Proposition 1.(
        <xref ref-type="bibr" rid="ref4">4</xref>
        ).
We can set E:E(D) = EDL(D) DEF!(A; K) which, by Lemma 1, is a deduction
of ` A. The de nition of the deduction EI:(D) of Point (ii) is similar using
DEF!:(A; K) instead of DEF!(A; K).
tu
      </p>
      <p>A (classical) interpretation I is a subset of V; the validity of a formula A
in I, denoted by I j= A, is de ned as usual. Given a set of formulas , I is a
model of , denoted by I j= , i I j= C, for every C 2 . A set of literals is
consistent if it does not contain a complementary pair of literals fp; :pg. Given
a consistent set of literals , the interpretation \ V is a model of .</p>
    </sec>
    <sec id="sec-2">
      <title>The procedure Hp</title>
      <p>We present the procedure Hp to search for a deduction in Hc. Let be a set of
formulas, let A be a formula or the special symbol ?. We de ne the procedure
Hp satisfying the following properties:
(H1) If A 2 L, Hp( ; A) returns either a deduction D :</p>
      <p>[ f:Ag.
(H2) Hp( ; ?) returns either a deduction D :
or a model of .</p>
      <p>
        ` A or a model of
` K such that :K 2 Fm(D)
In Proposition 2 we prove that Hp is correct, namely, properties (H1) and (H2)
hold. The procedure is presented in Fig. 1. In the presentation of Hp, we
use a high-level formalism, discarding inessential details. The computation of
Hp( ; A) is de ned by cases on and A. The rst case among (
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ){(9)
matching the values of and A is executed; if none of the conditions in (
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ){(9) holds,
case (10) is performed. We implicitly assume that the recursive calls are correct.
      </p>
      <p>The rest of this section is devoted to the proof of correctness of Hp. Given
a formula A, we denote by V(A) the set of propositional variables occurring in
A and by jAj the number of symbols occurring in A. Given a nite set of
formulas, we set:</p>
      <p>V( ) =
[ V(A)
A2
j j = X jAj</p>
      <p>A2</p>
      <p>
        Lit( ) =
\ Lit
Let 1 and 2 be two nite sets of formulas and let A1 and A2 be either
formulas or ?. We de ne the ordering relation ( 1; A1) ( 2; A2) i the following
conditions hold (where j?j = 1):
(
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ) V( 1 [ fA1g) V( 2 [ fA2g);
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) either Lit(
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ) ) Lit(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) or Lit(
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ) = Lit(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) and j 1j + jA1j &lt; j 2j + jA2j.
One can easily prove that is well-founded, namely: every -chain of the form
( 2; A2) ( 1; A1) ( 0; A0) has nite length. Indeed, by Point (
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ) of the
de nition of , along a -chain no new propositional variable is added, hence
we cannot apply Point (
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) in nitely many times. In particular, the length of
every chain starting with ( ; A) (and hence the number of nested recursive calls
of Hp) is bounded by O(j j + jAj).
      </p>
      <p>
        Proposition 2 (Correctness of Hp). The procedure Hp is correct.
Proof. Let us consider the call Hp( ; A). We have to prove that Hp( ; A)
satis es properties (H1) and (H2). One can easily check that every recursive call
Hp( 0; A0) performed in the computation of Hp( ; A) satis es ( 0; A0) ( ; A).
In particular, note that no new variables are added, hence V( 0 [ fA0g)
V( [ fAg); moreover, literals are never deleted from the set of assumptions,
hence Lit( 0) Lit( ). Since the relation is well-founded, we can assume by
(
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ) If A is an instance of a logical axiom or A 2 .
      </p>
      <p>
        Return the deduction only consisting of A.
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) If there exists B such that fB; :Bg .
      </p>
      <p>If A = ?, return the deduction h:B; Bi : ` B.</p>
      <p>
        If A 6= ?, return the deduction DEF(B; A) : ` A.
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) If there exists B ! C such that fB ! C; Bg .
      </p>
      <p>Let D1 = Hp( ( n fB ! Cg) [ fCg ; A).</p>
      <p>If D1 is an interpretation, then return D1.</p>
      <p>
        Otherwise, return the deduction DMP(B ! C; B) D1 : ` A.
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) If there exists B such that ::B 2
      </p>
      <p>Let D1 = Hp( ( n f::Bg) [ fBg ; A).</p>
      <p>If D1 is an interpretation, then return D1.</p>
      <p>
        Otherwise, return the deduction D::E(B) D1 : ` A.
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) If A = p with p 2 V and :p 62 .
      </p>
      <p>Let D1 = Hp( [ f:pg; ?).</p>
      <p>If D1 is an interpretation, then return D1.</p>
      <p>
        Otherwise, D1 is a deduction of :p; ` K with :K 2 Fm(D1);
return the deduction E:E(D1) : ` p.
(
        <xref ref-type="bibr" rid="ref6">6</xref>
        ) If A = B ! C.
      </p>
      <p>Let D1 = Hp( [ fBg; C).</p>
      <p>If D1 is an interpretation, then return D1.</p>
      <p>
        Otherwise, D1 is a deduction of B; ` C;
return EDL(D1) : ` B ! C.
(
        <xref ref-type="bibr" rid="ref7">7</xref>
        ) If A = :B.
      </p>
      <p>Let D1 = Hp( [ fBg; ?).</p>
      <p>If D1 is an interpretation, then return D1.</p>
      <p>Otherwise, D1 is a deduction of B; ` K with :K 2 Fm(D1);
return the deduction EI:(D) : ` :B.</p>
      <p>
        Remark 1. Hereafter A = ? or (A 2 V and :A 2
).
is a consistent set of literals and (A = ? or :A 2
induction hypothesis that Hp( 0; A0) satis es (H1) and (H2). Using the
induction hypothesis, the correctness of Hp easily follows. Note that, if none of the
cases (
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ){(
        <xref ref-type="bibr" rid="ref7">7</xref>
        ) is matched, then the property in Remark 1 holds. Thus, in case (8),
if A 2 V and D1 is an interpretation, by the induction hypothesis D1 j= n fKg.
By Remark 1 :A 2 , hence D1 j= :A as well. If none of the cases (
        <xref ref-type="bibr" rid="ref1 ref8">1</xref>
        ){(9) is
matched, then Remark 2 holds; thus, in Case (10) is a consistent set of literals,
hence \ V is a model of . tu
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Future work</title>
      <p>In this paper we have presented a work in progress on the design of terminating
proof-search procedures for Hilbert calculi. Here we only discuss the f!;
:gfragment of the Hilbert calculus [5] for CPL. We have implemented the
procedure Hc de ned in Sec. 2 in Prolog, extending it to the full language 1. In
the full language, the main problems arise from disjunctive goals and from the
relationships between the implicative and negated assumptions and the goal to
be proved. To get a complete strategy, we have to introduce some \reasoning by
absurd" steps and some care is needed to avoid in nite loops.</p>
      <p>The main drawback is that in general the obtained proofs are very huge. For
instance, the deduction of :(p ! q) ! p consists of 53 formulas and involves
very large instances of the axioms. This comes from the fact that the number
of lines of E DL(D) is three times the number of lines of D. To reduce the size of
deductions, we plan to develop techniques similar to those used in [4]. We also
aim at investigating the extension to Intuitionistic Propositional Logic, using
the machinery in [4] to get termination. Further possible extensions regard the
intermediate logics, by exploiting the ltration techniques introduced in [1].</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>A.</given-names>
            <surname>Avellone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Miglioli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Moscato</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Ornaghi</surname>
          </string-name>
          .
          <article-title>Generalized tableau systems for intermediate propositional logics</article-title>
          . In D. Galmiche, editor,
          <source>TABLEAUX 1997</source>
          , volume
          <volume>1227</volume>
          <source>of LNAI</source>
          , pages
          <volume>43</volume>
          {
          <fpage>61</fpage>
          . Springer-Verlag,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>M. D'Agostino</surname>
          </string-name>
          .
          <article-title>Classical natural deduction</article-title>
          . In S.N. Artemov et al., editor,
          <source>We Will Show Them!</source>
          , pages
          <fpage>429</fpage>
          {
          <fpage>468</fpage>
          .
          <string-name>
            <surname>College</surname>
            <given-names>Publications</given-names>
          </string-name>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M.</given-names>
            <surname>Ferrari</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Fiorentini</surname>
          </string-name>
          .
          <article-title>Proof-search in natural deduction calculus for classical propositional logic</article-title>
          . In H. De Nivelle, editor,
          <source>TABLEAUX 2015</source>
          , volume
          <volume>9323</volume>
          <source>of LNCS</source>
          , pages
          <volume>237</volume>
          {
          <fpage>252</fpage>
          . Springer International Publishing,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>M.</given-names>
            <surname>Ferrari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Fiorentini</surname>
          </string-name>
          , and
          <string-name>
            <surname>G. Fiorino.</surname>
          </string-name>
          <article-title>An evaluation-driven decision procedure for G3i</article-title>
          .
          <source>ACM Transactions on Computational Logic (TOCL)</source>
          ,
          <volume>6</volume>
          (
          <issue>1</issue>
          ):8:
          <issue>1</issue>
          {8:
          <fpage>37</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>S.C.</given-names>
            <surname>Kleene</surname>
          </string-name>
          . Introduction to Metamathematics. Van Nostrand, New York,
          <year>1952</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>W.</given-names>
            <surname>Sieg</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Byrnes</surname>
          </string-name>
          .
          <article-title>Normal natural deduction proofs (in classical logic)</article-title>
          .
          <source>Studia Logica</source>
          ,
          <volume>60</volume>
          (
          <issue>1</issue>
          ):
          <volume>67</volume>
          {
          <fpage>106</fpage>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>A.S.</given-names>
            <surname>Troelstra</surname>
          </string-name>
          and
          <string-name>
            <given-names>H.</given-names>
            <surname>Schwichtenberg</surname>
          </string-name>
          .
          <source>Basic Proof Theory</source>
          , volume
          <volume>43</volume>
          of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 2nd edition,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>1 The Prolog prototype is available at https://drive.google.com/open?id= 0ByzJsfKRVFPMVUE2VzBtN2xpUEU</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>