<!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>A Simple Semi-automated Proof Assistant for First-order Modal Logics</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Tomer Libal</string-name>
          <email>tlibal@aup.edu</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>The American University of Paris</institution>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <volume>2095</volume>
      <fpage>34</fpage>
      <lpage>48</lpage>
      <abstract>
        <p>Most theorem provers and proof assistants are written in imperative or functional programming languages. Recently, the claim that higher-order logic programming languages might be better suited for this task was revisited and a new interpreter, as well as new proof assistants based on it, were introduced. In this paper I follow these results and describe a concise implementation of a prototype for a semi-automated proof assistant for first-order modal logics. The aim of this paper is to encourage the development of personal proof assistants and semi-automated provers for a variety of modal logics.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        required tasks just mentioned and offer, therefore, not only a much easier coding experience but
also an increased level of trust in its correctness. More recently, Sacerdoti-Coen, Tassi, Dunchev
and Ferruccio have developed an efficient interpreter [
        <xref ref-type="bibr" rid="ref15">16</xref>
        ] for the higher-order logic programming
language λProlog [
        <xref ref-type="bibr" rid="ref30">31</xref>
        ] and used it for the creation of several proof assistants [
        <xref ref-type="bibr" rid="ref14 ref21 ref37">15, 22, 38</xref>
        ]. They
showed that using higher-order logic programming greatly reduces the size of the program.
      </p>
      <sec id="sec-1-1">
        <title>While there are many similarities between their work and the current paper, I am interested in</title>
        <p>utilizing logic programming for the creation of many, simple and personalized proof assistants
and not for the implementation of full scale, general and complex ones.</p>
      </sec>
      <sec id="sec-1-2">
        <title>Another complexity arising in the creation of proof assistants is the need to interface between</title>
        <p>
          the users and the tool. The calculi at the core of most proof assistants do not support, out of
the box, interactive proof search. Focused sequent calculi [
          <xref ref-type="bibr" rid="ref1">2</xref>
          ] partially solve this problem by
separating proof search into two different modes. One of the modes, which can be executed
fully automatically, can be applied eagerly in order to save the user from tasks not requiring her
attention. The assistant then switches to the second mode when user interaction is required.
        </p>
        <p>The above discussion identifies two issues. First, when one wants to use a proof assistant for
modal logics, she needs to have both a good proficiency with the current ones and the ability to
embed her logic in their theories. Second, if she chooses to implement her own, the task is far
from being simple. In this paper I want to present a third alternative – implement your own
proof assistant by following a precise recipe. As we will see, the advantages of this approach
are the simplicity of the process – I exemplify that by the implementation of a proof assistant
for first-order modal logic which consists of less than 200 lines of code. There are also several
disadvantages, the most important of which is the need to have a proof calculus based on focused
sequents. Another disadvantage is the required λProlog skill. It should be noted though, that
the vast majority of the code requires only proficiency in Prolog.</p>
        <p>
          The technique demonstrated in this paper, of using a focused calculus together with
higherorder logic programming, is based on the work by Miller and his group towards proof certification
[
          <xref ref-type="bibr" rid="ref11 ref12 ref28">29, 13, 12</xref>
          ]. Given that proof certification can be considered as a restriction of interactive
proof search where the interaction is done between the proof certificate and the program, this
paper attempts to generalize the approach to arbitrary interaction including the interaction
between a user and a program. At the same time, using higher-order logic programming
towards the creation of proof assistants is one of the purposes of the group behind the ELPI
interpreter [
          <xref ref-type="bibr" rid="ref14 ref21 ref37">15, 22, 38</xref>
          ]. Their work is focused on the implementation and extension of fully
fledged proof assistants.
        </p>
        <p>
          My main aim though, is the application of this approach to the creation of proof assistants
in domains where proof automation is lacking, such as in modal logic and in fields such as
law [
          <xref ref-type="bibr" rid="ref36">37</xref>
          ]. I propose that by using λProlog and focusing, any user can implement and customize
her theorem prover to meet her needs. The proof assistant for first-order modal logics described
in this paper is based on the existence of a focused sequent calculus for this logic. I have
therefore obtained such a calculus by the combination of two existing ones. The next section
focuses on its presentation. The following section then introduces the other technology I use –
higher-order logic programming. I then describe the implementation of a proof assistant for
first-order modal logic based on these technologies and give examples of usage and extension. I
finish with a short conclusion and mention some possible future work.
2
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Focused sequent calculus for first-order modal logics</title>
      <sec id="sec-2-1">
        <title>Theorem provers are often implemented using efficient proof calculi, like, e.g., resolution, combined with the additional use of heuristics and optimization techniques. The use of these 2</title>
        <p>
          techniques together with required operations such as unification and search leads to a lower
degree of trust. On the other hand, traditional proof calculi, like the sequent calculus, rely on
less meta-theory and enjoy a higher degree of trust but are quite inefficient for proof search. In
order to use the sequent calculus as the basis of automated deduction, much more structure
within proofs needs to be established. Focused sequent calculi, first introduced by Andreoli [
          <xref ref-type="bibr" rid="ref1">2</xref>
          ]
for linear logic, combine the higher degree of trust of sequent calculi with a more efficient proof
search. They take advantage of the fact that some of the rules are “invertible”, i.e., can be
applied without requiring backtracking, and that some other rules can “focus” on the same
formula for a batch of deduction steps.
        </p>
        <p>
          In this paper, I will combine two different focused sequent calculi in order to obtain a
sound and complete system for first-order modal logic for K with constant domains and rigid
designation. This means that each quantified variable denotes the same element in all worlds
and in addition, that the domain for quantification in each world is the same. Please refer
to [
          <xref ref-type="bibr" rid="ref8">9</xref>
          ] for more information. The existence of focused systems for some other modal logics [
          <xref ref-type="bibr" rid="ref26">27</xref>
          ]
suggests that the approach described in this paper can be extended. The syntax for first-order
modal formulas contains atomic predicates P (t1, . . . , tn), the usual first-order connectives and
quantifiers as well as the modal operators 2 and ♦. The first system I will use is the focused
first-order sequent calculus (LKF) system defined in [
          <xref ref-type="bibr" rid="ref25">26</xref>
          ]. I will combine it with the focused
sequent calculus for propositional modal logic for K defined in [
          <xref ref-type="bibr" rid="ref32">33</xref>
          ]. This calculus is based on
labeled sequents.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>The basic idea behind labeled proof systems for modal logic is to internalize elements of the</title>
        <p>
          corresponding Kripke semantics into the syntax. The LMF system defined in [
          <xref ref-type="bibr" rid="ref32">33</xref>
          ] is a sound
and complete system for a variety of propositional modal logics. Fig. 1 presents the combined
system, LMF1.
        </p>
        <p>Sequents in LMF1 have the form G ` Θ ⇓ x : B or G ` Θ ⇑ Γ, where the relational set (of the
sequent) G is a set of relational atoms, x : B is a labeled formula (see below) and Θ and Γ are
multisets of labeled formulas.</p>
        <p>Formulas in LMF1 which are expressed in negation normal form, can have either positive or
negative polarity and are constructed from atomic formulas, whose polarity has to be assigned,
and from logical connectives whose polarity is pre-assigned. The choice of polarization does not
affect the provability of a formula, but it can have a big impact on proof search and on the
structure of proofs: one can observe, e.g., that in LKF the rule for ∨− is invertible while the one
for ∨+ is not. The connectives ∧−, ∨−, 2 and ∀ are of negative polarity, while ∧+, ∨+, ♦ and ∃
are of positive polarity. A composed formula has the same polarity of its main connective. In
order to polarize literals, we are allowed to fix the polarity of atomic formulas in any way we see
fit. We may ask that all atomic formulas are positive, that they are all negative, or we can mix
polarity assignments. In any case, if A is a positive atomic formula, then it is a positive formula
and ¬A is a negative formula: conversely, if A is a negative atomic formula, then it is a negative
formula and ¬A is a positive formula. The basic entities of the calculus are labelled formulas –
x : F – which attach to each formula F a label x which denotes the world F is true in.</p>
        <p>Deductions in LKF are constructed by synchronous and asynchronous phases. A synchronous
phase, in which sequents have the form G ` Θ ⇓ x : B, corresponds to the application of
synchronous rules to a specific positive formula B under focus (and possibly its immediate
positive subformulas). An asynchronous phase, in which sequents have the form G ` Θ ⇑ Γ,
consists in the application of invertible rules to negative formulas contained in Γ (and possibly
their immediate negative subformulas). Phases can be changed by the application of the release
rule. In order to simplify the implementation and the representation, I have excluded the cut
rule from the calculus. The admissibility of this rule in LKF means that while proofs might be</p>
        <sec id="sec-2-2-1">
          <title>Asynchronous introduction rules</title>
        </sec>
        <sec id="sec-2-2-2">
          <title>Synchronous introduction rules</title>
        </sec>
        <sec id="sec-2-2-3">
          <title>Identity rule</title>
        </sec>
        <sec id="sec-2-2-4">
          <title>Structural rules</title>
          <p>G ` Θ ⇑ x : A, Γ G ` Θ ⇑ x : B, Γ</p>
          <p>G ` Θ ⇑ x : A ∧− B, Γ</p>
          <p>−
∧K</p>
          <p>G ` Θ ⇑ x : A, x : B, Γ −</p>
          <p>G ` Θ ⇑ x : A ∨−B, Γ ∨K
G ∪ {xRy} ` Θ ⇑ y : B, Γ</p>
          <p>G ` Θ ⇑ x : B, Γ</p>
          <p>K</p>
          <p>G ` Θ ⇑ x : [y/z]B, Γ</p>
          <p>G ` Θ ⇑ x : ∀z.B, Γ
G ` Θ ⇓ x : A G ` Θ ⇓ x : B</p>
          <p>G ` Θ ⇓ x : A ∧+ B</p>
          <p>+
∧K</p>
          <p>G ` Θ ⇓ x : [t/z]B</p>
          <p>G ` Θ ⇓ x : ∃z.B</p>
          <p>G ` Θ ⇓ x : Bi
G ` Θ ⇓ x : B1 ∨+B2
∨+, i ∈ {1, 2}</p>
          <p>G ∪ {xRy} ` Θ ⇓ y : B
G∪{xRy} ` Θ ⇓ x : ♦B</p>
          <p>♦K
G ` x : ¬B, Θ ⇓ x : B
initK
∀K
∃K
G ` Θ, x : B ⇑ Γ
G ` Θ ⇑ x : B, Γ
storeK</p>
          <p>G ` Θ ⇑ x : B
G ` Θ ⇓ x : B
releaseK</p>
          <p>G ` x : B, Θ ⇓ x : B</p>
          <p>G ` x : B, Θ ⇑ ·
decideK
In decideK , B is positive; in releaseK , B is negative; in storeK , B is a positive formula or a
negative literal; in initK , B is a positive literal. In K and ∀K , y is different from x and z and
does not occur in Θ, Γ, G.
harder to find, completeness is not impaired.</p>
          <p>
            In order to prove the soundness and completeness of LMF1, we need to define a translation of
first-order modal formulas into first-order logic and prove that the translated formula is provable
in LKF iff the original formula is provable in LMF1. The translation STx() is similar to the
one in [
            <xref ref-type="bibr" rid="ref8">9</xref>
            ] and extends the standard translation (see, e.g., [
            <xref ref-type="bibr" rid="ref6">7</xref>
            ]) with a treatment for quantifiers.
          </p>
        </sec>
      </sec>
      <sec id="sec-2-3">
        <title>Treatment of polarities is omitted from the definition below since it does not affect provability.</title>
      </sec>
      <sec id="sec-2-4">
        <title>This translation provides a bridge between first-order modal logic and first-order classical logic:</title>
        <p>STx(P (y1, . . . , yn))</p>
        <p>STx(¬A)
STx(A ∨ B)
STx(∀yP (y))
=
=
=
=</p>
        <p>P (x, y1, . . . , yn)</p>
        <p>¬STx(A)
STx(A) ∨ STx(B)
∀ySTx(P (y))</p>
        <p>STx(A ∧ B)</p>
        <p>STx( A)</p>
        <p>STx(♦A)
STx(∃yP (y))
=
=
=
=</p>
        <p>
          STx(A) ∧ STx(B)
∀y(R(x, y) ⊃ STy(A))
∃y(R(x, y) ∧ STy(A))
∃ySTx(P (y))
where x is a free variable denoting the world in which the formula is being evaluated. The
first-order language into which modal formulas are translated is usually referred to as first-order
correspondence language [
          <xref ref-type="bibr" rid="ref6">7</xref>
          ]. It consists of a binary predicate symbol R and an (n + 1)ary
predicate symbol P for each nary predicate P in the modal language. When a modal operator is
translated, a new fresh variable is introduced. It is easy to show that for any modal formula A,
any model M and any world w, we have that M, w |= A if and only if M |= STx(A)[x ← w].
        </p>
      </sec>
      <sec id="sec-2-5">
        <title>Using the translation, we can state the soundness and completeness proposition. It is intuitively correct given the results for similar calculi but a proof will clearly be added in the future. 4</title>
        <p>Ξ0, G ∪ {xRy} ` Θ ⇓ y : B</p>
        <p>♦(Ξ, ♦B, y, Ξ0)
Ξ, G∪{xRy} ` Θ ⇓ x : ♦B</p>
        <p>♦K
Proposition 2.1. Given a first-order modal formula F , ` ⇓x : F is provable in LMF1 for an
arbitrary world variable x iff ` ⇓STx(F ) is provable in LKF.</p>
        <p>
          Driving the search in the focused sequent calculus
The system LMF1 offers a structure for proof search – we can eagerly follow paths which
apply asynchronous inference rules. Full proof search needs also to deal with the synchronous
inference rules, for which there is no effective automation. The ProofCert project [
          <xref ref-type="bibr" rid="ref28">29</xref>
          ], which
offers solutions to proof certification, suggests augmenting the inference rules with additional
predicates. These predicates, on the one hand, will serve as points of communication with the
implementation of the calculus (the kernel from now on) and will allow for the control and
tracking of the search. On the other hand, being added as premises to the inference rules, these
predicates do not affect the soundness of the kernel and therefore, do not impair the trust we
can place in searching over it. They can, nevertheless, harm completeness. Consider for example
an implementation of the ∃ control predicate which always returns the same witness. Clearly,
the program will fail to find a proof if it requires any other witness. In this example, a correct
implementation will prompt the user for the witness or postpone supplying it (more about that
in Sec. 4.4). The control predicates communicate with the user or prover using a data structure
which is being transferred and manipulated by the predicates. This data structure represents
the proof evidence in the proof certifier architecture discussed by Miller in [
          <xref ref-type="bibr" rid="ref28">29</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-6">
        <title>This approach is very suitable for conducting search using interactive or automated theorem</title>
        <p>
          provers as well. We can generalize the role of the data structure discussed above to represent
information between the user and the kernel. I will therefore generalize the ”proof evidence”
data structure in the proof certification architecture of Miller to a ”proof control” data structure.
In this paper, this data structure can serve as a proof evidence but it will also serve for getting
commands from the user as well as for generating a proof certificate once a proof was found. I
can now follow other works on proof certification [
          <xref ref-type="bibr" rid="ref11 ref12">12, 13</xref>
          ] and enrich each rule of LMF1 with
proof controls and additional predicates. Figure 2 gives an example of adding the control and
additional predicate (in blue) to the ♦K inference rule. Figure 3 lists all the predicates separately
from the calculus (due to lack of space). Each sequent now contains additional information in
the form of the proof control Ξ. At the same time, each rule is associated with a predicate,
such as ♦(Ξ, F, w, Ξ0). This predicate might prevent the rule from being called or guide it by
supplying such information as the witness to be used in the application of the ∃K or♦K inference
rules. The arguments in the example are the input proof control Ξ, the formula F , the world w
to which we should move next and a proof control Ξ0 which is given to the upper sequent. I call
the resulting calculus LMF a.
        </p>
      </sec>
      <sec id="sec-2-7">
        <title>One implementation choice is to use indices in order to refer to formulas in the context.</title>
        <p>In order to achieve that, the implementations of storeK and decideK rules contain additional
information which is omitted from the definition of the LMF1 calculus given in Fig. 1.</p>
        <sec id="sec-2-7-1">
          <title>Asynchronous control predicates</title>
          <p>Synchronous control predicates
∧−(Ξ, F, Ξ0, Ξ00)
∨−(Ξ, F, Ξ0)
∀(Ξ, F, Ξ0y)
(Ξ, F, Ξ0w)
∧+(Ξ, F, Ξ0, Ξ00)
∨+(Ξ, F, Ξ0, i)
∃(Ξ, F, t, Ξ0)
♦(Ξ, F, w, Ξ0)</p>
        </sec>
        <sec id="sec-2-7-2">
          <title>Identity and structural control predicates</title>
          <p>init(Ξ, l)
release(Ξ, Ξ0)
store(Ξ, C, l, Ξ0)
decide(Ξ, l, Ξ0)</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Higher-order logic programming</title>
      <sec id="sec-3-1">
        <title>The other technology I use in this paper in an attempt to build a simple but trusted proof</title>
        <p>
          assistant, is a higher-order logic programming language. λProlog [
          <xref ref-type="bibr" rid="ref30">31</xref>
          ] is an extension of Prolog
which supports binders [
          <xref ref-type="bibr" rid="ref29">30</xref>
          ] and restricted higher-order formulas [
          <xref ref-type="bibr" rid="ref31">32</xref>
          ]. Being a logic programming
language, it gives us proof search, unification, substitution and other operations which are
required in any automated or interactive theorem prover. The extensions allow for the encoding
of the meta-theory of predicate calculi, which is impossible in the first-order Prolog language.
More concretely, the syntax of λProlog has support for λ-abstractions, written x\ t for λx.t
and for applications, written (t x). Existential variables can occur anywhere inside a term and
are denoted by words starting with a capital letter. The variable w occurring in a term F can
be universally quantified by writing pi w\ F. I use the symbols some, all, box, dia, !-!
and &amp;-&amp; to denote the encoded logical connectives ”exists”, ”for all”, the modalities ”box” and
”diamond”, a negative disjunction and a negative conjunction. The implementation contains only
the negative versions of the disjunction and conjunction rules presented in Sec. 2. As discussed
there, this choice does not affect provability. β-normalization and α-equality are built-in. The
full syntax of the language can be found in Miller and Nadathur’s book ”Programming with
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Higher-Order Logic” [31].</title>
        <p>
          The implementation of λProlog on which I have tested the prover is ELPI [
          <xref ref-type="bibr" rid="ref15">16</xref>
          ] which can be
installed following instructions on Github1. ELPI offers more than just the implementation of
λProlog and includes features such as having input/output modes on predicates and support of
constraints [
          <xref ref-type="bibr" rid="ref14">15</xref>
          ]. These features are not required in the simple proof assistant I describe and are
therefore not used in the implementation. Examples of the way these features are used can be
found in the implementations of proof assistants for HOL [
          <xref ref-type="bibr" rid="ref14">15</xref>
          ] and type theory [
          <xref ref-type="bibr" rid="ref21">22</xref>
          ].
4
6
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>A proof assistant based on focusing and logic programming</title>
      <sec id="sec-4-1">
        <title>In this section, I will present the architecture and techniques used in order to obtain a minimal, trusted proof assistant for first-order modal logic. I believe that this approach can be applied for creating proof assistants for various other logics, based on the existence of suitable focused</title>
        <p>calculi. Some parts of the code are omitted from this paper for brevity. These parts mainly
deal with bootstrapping the program and are written using shell scripts. The proof assistant
implementation can be found on Github2 and Zenodo3.
4.1</p>
        <p>The kernel</p>
      </sec>
      <sec id="sec-4-2">
        <title>The first immediate advantage of using a higher-order logic programming language is the simple</title>
        <p>and direct coding of the calculus. Fig. 4, 5 and 6 show the code of the whole implementation.</p>
      </sec>
      <sec id="sec-4-3">
        <title>A comparison to Fig. 1 shows that each inference rule directly maps to a λProlog clause. The</title>
        <p>conclusion of each rule is denoted by the head of the formula while each premise is denoted by a
single conjunct in the body. The components of each head are the Cert variable, which is used
for the transformation of information between the user and the kernel as well the formula (or
formulas, in the case of a negative phase) to prove. The two phases are denoted by the function
symbols unfk and foc.</p>
        <p>We can see immediately the way the control predicates work. Before we can apply a rule,
we need first to consult with the control predicate, which in turn, may change the Cert data
structure or even falsify the call. I will refer to the implementation of these predicates in the next
section, but we can already demonstrate how they work. Consider, for example, the diamond
rule (Fig. 2 and Fig. 6). When λProlog tries to satisfy this clause, it attempts to satisfy each
of the antecedents. The first of which is a call to the implementation of the dia_ke control
predicate. The implementation is discussed in the next section but one can see that in case
the implementation of this clause fails, λProlog will fail to apply the diamond rule and it will
backtrack. One can also see that the implementation can substitute for the variable T a term.</p>
      </sec>
      <sec id="sec-4-4">
        <title>This term will then be used by the rule as the new label for the formula. This simple mechanism allows us to both control the proof search and to supply additional information (based on user input, for example).</title>
      </sec>
      <sec id="sec-4-5">
        <title>The way we store polarized formulas in the implementation of the labeled sequent calculus is</title>
        <p>by using a term of the form lform w f where w is the label (world) and f is the formula. Atoms
are polarized using the constructor p for positive atoms and n for negative ones. The example in</p>
      </sec>
      <sec id="sec-4-6">
        <title>Sec. 4.3 demonstrates the use of these constructors. Five predicates of special interest are the store, forall, exists, box and diamond. Each emphasizes the need for a higher-order logic programming language in a different way.</title>
      </sec>
      <sec id="sec-4-7">
        <title>The store shows the importance of supporting implications in the bodies of predicates.</title>
      </sec>
      <sec id="sec-4-8">
        <title>It allows us to dynamically update the λProlog database with new true predicates. We use</title>
        <p>this feature in order to both denote the context of the sequent, i.e those formulas on which
we may decide on later, and the relational set. One can also deal with this problem in the
Prolog programming language. Either by using lists for denoting the context or by using the
assert and retract predicates. Both approaches prevent us from having a direct and concise
representation of LMF1. The first due to the requirement to repeatedly manipulate and check
the list (not to mention the overhead for searching in the list). The second due to the need to
apply the system predicates manually in the correct points in the program. For example, one
should manually retract an asserted predicate once we leave the scope of the implication. These
manual manipulations can lead to unnecessary complications.</p>
        <p>The forall predicate has a condition that the variable y is a fresh variable. Dealing with
fresh variables is a recurring problem in all implementations of theorem provers. Some approaches
favor using a specific naming scheme in order to ensure that variables are fresh while others
2https://github.com/proofcert/PPAssistant
3https://zenodo.org/record/1252457
1 % decide
2 check Cert ( unfK [])
:3 decide Cert Indx Cert ’,
4 inCtxt Indx P,
5 isPos P,
6 check Cert ’ ( foc P).
7 % release
8 check Cert ( foc N)
:9 isNeg N,
10 release Cert Cert ’,
11 check Cert ’ ( unfK [N ]).
12 % store
13 check Cert ( unfK [C| Rest ])
:14 ( isPos C ; isNegAtm C),
15 store Cert C Indx Cert ’,
16 inCtxt Indx C =&gt; check Cert ’ ( unfK Rest ).
17 % initial
18 check Cert ( foc ( lform L (p A )))
:19 initial_ke Cert Indx ,
20 inCtxt Indx ( lform L (n A )).
might use an auxiliary set of used variables. Using λProlog we need just to quantify over this
variable. λProlog variable capture avoidance mechanism will ensure that this variable is fresh.</p>
      </sec>
      <sec id="sec-4-9">
        <title>Another feature of λProlog which is exhibited by this rule is higher-order application. The</title>
        <p>
          quantified formula variable B is applied to the fresh variable. In general, the application of a
variable to a term requires higher-order unification in the proof search, which is known to be
undecidable [
          <xref ref-type="bibr" rid="ref18">19</xref>
          ]. Miller has shown [
          <xref ref-type="bibr" rid="ref27">28</xref>
          ] that the application of a variable to a bound variable
require a simpler form of unification, which is not only decidable but exhibits the same properties
as the first-order unification used in Prolog.
        </p>
      </sec>
      <sec id="sec-4-10">
        <title>A more intriguing predicate though, is exists. Here we see an application of two free</title>
        <p>
          variables, B and T. Such an application is beyond the scope of the efficient unification algorithm
just mentioned. Despite that, implementations of λProlog apply sound techniques of postponing
these unification problems [
          <xref ref-type="bibr" rid="ref33">34</xref>
          ] which seem to suffice in most cases.
        </p>
      </sec>
      <sec id="sec-4-11">
        <title>Regarding the modalities, we see a close similarity between box and forall. The only difference being the addition of the new accessible world to the λProlog database, in a similar way to store. The diamond rule, which is very similar to the exists one, then also requires the existence of the specific relation in the λProlog database in order to proceed.</title>
        <p>4.2</p>
        <p>
          Interacting with the user
The previous section discussed the implementation of the calculus. For some problems, all we need
to do is to apply the kernel on a given formula. λProlog will succeed only if a proof can be found
and will automatically handle all issues related to search, substitution, unification, normalization,
etc. which are normally implemented as part of each theorem prover or proof assistant. This
gives us a very simple implementation of an automated theorem prover for first-order modal
logic. The downside is, of course, that first-order modal theorem proving is undecidable and
requires coming up with witnesses for worlds and terms, making automated theorem proving over
the sequent calculus less practical than other methods, such as resolution [
          <xref ref-type="bibr" rid="ref13">14</xref>
          ] and free-variable
tableaux [
          <xref ref-type="bibr" rid="ref9">10</xref>
          ]. The main novelty of this paper is that we can overcome this downside by using
other features of λProlog, namely the input and output functionality.
        </p>
      </sec>
      <sec id="sec-4-12">
        <title>Using the control predicates, we can notify the user of interesting rule applications, such as the addition of fresh variables, new worlds or the storing of formulas in the context. We can also 8</title>
        <p>1 % orNeg
2 check Cert ( unfK [ lform L (A !-! B) | Rest ])
:3 orNeg_kc Cert ( lform L (A !-! B)) Cert ’,
4 check Cert ’ ( unfK [ lform L A, lform L B| Rest ]).
5 % conjunction
6 check Cert ( unfK [ lform L (A &amp;-&amp; B) | Rest ])
:7 andNeg_kc Cert ( lform L (A &amp;-&amp; B)) CertA CertB ,
8 check CertA ( unfK [ lform L A | Rest ]) ,
9 check CertB ( unfK [ lform L B | Rest ]).
10 % box modality
11 check Cert ( unfK [ lform L ( box B) | Theta ])
:12 box_kc Cert ( lform L ( box B)) Cert ’,
13 pi w\ rel L w =&gt; check (Cert ’ w) ( unfK [ lform w B | Theta ] ).
14 % forall quantifier
15 check Cert ( unfK [ lform L ( all B) | Theta ])
:16 all_kc Cert ( all B) Cert ’,
17 pi w\ ( check (Cert ’ w) ( unfK [ lform L (B w) | Theta ] )).
use them in order to prompt the user for input about how to proceed in case we need to decide
on a formula from the context or pick up a witness or a world. Fig. 7 shows the implementation
of the control predicates which support these basic operations. The predicates are divided into
two groups. Those which can be applied fully automatically, which include most predicates, and
those which are applied interactively, which include the decide, diamond and exists predicates.</p>
      </sec>
      <sec id="sec-4-13">
        <title>I have simplified the implementation to include only negative conjunctions and disjunctions (see Sec. 3). The addition of the positive versions does not fundamentally change the approach presented here. In case we would like to support these two inference rules, we will have to treat them in the interactive group.</title>
        <p>The interface for a user interaction with the program is to iteratively add guidance information
to the proof control. At the beginning, the control contains no user information and the program
stops the moment such information is required. In addition, the program displays to the user
information about the current proof state such as about fresh variables which were used or new
formulas which were added to the context, together with their indices. When the program stops
due to required user information, it prompts a message to the user asking the user to supply this
information as can be seen in the implementation of the predicates decide (lines 1-3), diamond
(lines 25-32) and some (lines 42-49).</p>
      </sec>
      <sec id="sec-4-14">
        <title>The proof control I use contains 5 elements.</title>
        <p>• the proof evidence – this is used in order to display at the end to the user the generated
proof
• the list of user commands – this list, initially empty, contains the commands from the user
• an index marking the current inference rule – this index is used to store labeled formulas
in a consistent way
• the list of fresh worlds generated so far – this list is used in order to allow the user to pick
up a world The user, of course, has no access to the fresh worlds (or to any other part in
the trusted kernel) and I use a mechanism discussed below in order to allow her to supply
them
• the list of fresh variables generated so far – Similarly to the list of fresh worlds, this list is
used in order to allow the user to supply term witnesses which contain fresh variables</p>
      </sec>
      <sec id="sec-4-15">
        <title>Each of the interactive predicates contains two versions, one for prompting the user for input</title>
        <p>and the other for applying the user input. The first is applied when the user commands list (the
second argument in the controls object) is empty. The input in the case of the decide predicate
is an index of a formula in context (which should be chosen from the ones displayed earlier
by the store predicate). In the case of the diamond or some predicates, the input is the term
witness.</p>
        <p>In the case of the diamond and on some cases, also for the some inference rule, the
implementation needs to substitute fresh variables inside the term supplied by the user. I use λProlog
abstraction and β-normalization directly. The user keeps track on the number n and order
of both fresh worlds and fresh variables introduced so far and the chosen world or the term
witness is then of the form x1\ . . . xn\t where t may contain any of the bound variables, in the
case of some, or the actual chosen world, in the case of diamond. The apply_vars predicate is
responsible for applying to the terms the fresh variables in the correct order. It should be noted
that this cumbersome mechanism can be easily replaced by a naming mechanism given a more
sophisticated user interface.</p>
      </sec>
      <sec id="sec-4-16">
        <title>The indexing mechanism I use is based on trees and assign each unitary child of a parent I</title>
        <p>the index (u I) while binary children are assigned the indices (l I) and (r I) respectively.
The index of the theorem is e. Note that the indexing system is based on inferences and that
indices are assigned to formulas only upon storing them in the context. For example, if our
theorem is A &amp;-&amp; B, meaning a negative conjunction, then this formula is assigned the index
e. In the focused sequent calculus, the only inference rule which can be applied right now is
the negative conjunction and the left and right derivations keep track of the indices (l e) and
(r e). Only in case we store the formulas A or B in the following step will we assign them the
indices (l e) or (r e)</p>
      </sec>
      <sec id="sec-4-17">
        <title>I note here that the implementation is using a relatively basic user feedback. In particular,</title>
        <p>when conjunctions and branching are involved, it becomes very difficult to follow the different
branches and their respective contexts and fresh variables. I do supply a mechanism for handling
conjunctions (via the branch command), but a more user friendly implementation would need
to display this information in a better way, for example, by the use of graphical trees.
4.3</p>
        <p>An example</p>
      </sec>
      <sec id="sec-4-18">
        <title>In this section I demonstrate the execution of the prover on the Barcan formula, which is a</title>
        <p>theorem of modal logic K with constant domains and rigid terms. In order to use the assistant,
the user needs to call the prover with the theorem and an empty commands list.
$&gt;./run.sh ’((some x\ dia (n (q x))) !-! (box (all x\ (p (q x)))))’ ’[]’</p>
      </sec>
      <sec id="sec-4-19">
        <title>Since we start in a negative phase and the theorem is negative, the assistant eagerly does the following ordered steps, the first five of which are asynchronous. 10</title>
        <p>1. Applies the ∨−K inference rule</p>
      </sec>
      <sec id="sec-4-20">
        <title>2. Adds to the context the positive formula lform z some x\ dia (n (q x)) with index u e (z denotes the starting world)</title>
      </sec>
      <sec id="sec-4-21">
        <title>3. Applies the</title>
        <p>K in order to produce a fresh world
4. Applies the ∀K in order to produce a fresh variable</p>
      </sec>
      <sec id="sec-4-22">
        <title>5. Adds to the context the positive formula lform x0 (p (q x1))</title>
        <p>with index u (u (u (u e)))</p>
      </sec>
      <sec id="sec-4-23">
        <title>6. Prompts the user to input an index to decide on</title>
      </sec>
      <sec id="sec-4-24">
        <title>Using the provided simple user interface, the program now terminates and the user is</title>
        <p>expected to run it again, this time setting the list provided in the second argument to contain an
interactive command. The first interactive command is therefore, to choose the index u e. We
are now entering the synchronous phase and are asked also to supply the witness for the ∃K rule.
In this case, the witness is just the (only) fresh variable introduced earlier and we command
the assistant to choose (x\x). Still being in a synchronous phase, we are now asked to supply
the world to satisfy the ♦K rule. We choose the first (and only) previously introduced world
using (x\x). The assistant now observes that we have the negative atom lform x0 (n (q x1))
with index u (u (u (u (u (u (u (u (u e)))))))). We are now asked again to pick up an
index of a formula to decide on. We observe that the context contains the positive and negative
versions of the same atom (in the same world) and we decide on the positive version with index
u (u (u (u e))). The initK rule is automatically applied and the assistant responds with the
formal proof we have obtained.</p>
      </sec>
      <sec id="sec-4-25">
        <title>The last execution is therefore,</title>
        <p>$ &gt;./ run .sh ’(( some x\ dia (n (q x ))) !-! ( box ( all x\ (p (q x ))))) ’
’[(u e) ,(x\x) ,(x\x),u (u (u (u e )))] ’
Supporting interactive proof search still falls short from the needs of most users. Optimally, a
proof assistant would require the help of the user only for the most complex problems and will be
able to deal with simpler ones by itself. In the previous example, we had to search for the index
to decide on. But, there are finitely many options only. Can’t we let the prover try all options
by itself? In order to support a tactics language, I extend the program with an additional tactics
file. This file will contain additional implementations for the control predicates. The λProlog
interpreter will choose the right implementation according to whether the predicate is called
with a tactic command or with a command to decide on an index of a formula or a witness
1 decide_ke ( interact ( unary ( decideI I) L) [ auto | Com ] FI E1 E2) I
2 ( interact L Com (u FI) E1 E2 ).
3 dia_ke ( interact ( unary ( diaI FI) L) [ world | Com ] FI E1 E2) _ T
4 ( interact L Com (u FI) E1 E2)
:5 apply_vars T E1 T ’.
6 some_ke ( interact ( unary ( someI FI) L) [ var | Com ] FI E1 E2) _ _
7 ( interact L Com (u FI) E1 E2) :- !.
term. Fig. 9 presents the additional predicates we need to add in order to support several basic
tactics.</p>
      </sec>
      <sec id="sec-4-26">
        <title>The auto tactic, which is supplied when asked to decide on a formula, attempts to choose</title>
        <p>one according to the order they are stored in the λProlog database. Similarly, the world tactic
attempts to choose a world according to the order we have stored them in the proof control.</p>
      </sec>
      <sec id="sec-4-27">
        <title>Coming up with a witness is more complex. Unlike with deciding on a formula or selecting a</title>
        <p>world, we are now facing a possibly infinite number of options. Luckily, λProlog can again help
us with the task. We can use the language metavariables and λProlog will postpone the choice
until it can unify this variable with an appropriate term. The var tactic therefore replaces the
chosen term with such a metavariable.</p>
      </sec>
      <sec id="sec-4-28">
        <title>Using these tactics, the commands required in order to prove the theorem from the example is</title>
        <p>It should be noted though, that in the general case the simple tactics presented may not be
as easy to use. For example, when deciding using the auto command, the system will decide on
the last formula stored in the context and only if it fails later to find a proof, will it backtrack
and pick another. This scheme will therefore get very confusing if we are also prompt to input
information on the wrong branch. One can think of more advanced tactics which present to the
user all possible paths and not just one as in the current implementation.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and further work</title>
      <sec id="sec-5-1">
        <title>The aim of this paper was to investigate the applicability of a minimal proof assistant based on</title>
        <p>focusing and λProlog for interactive proof search in first-order modal logic. We have considered
also the amount of work required in order to design proof assistants for arbitrary focused systems.</p>
        <p>
          The main target audience of this approach are users who are in need of a proof assistant for
logics which do not enjoy an abundant number of tools. The next step is to try to apply this
approach to concrete domains where interactive tools are scarce, such as in deontic logic ([
          <xref ref-type="bibr" rid="ref4">5</xref>
          ]
contains some interesting recent developments). There are several other possible extensions to
this work. An important extension is the creation of a generic graphical user interface, which
can parse and display λProlog proofs and proof information. Another is the creation of a library
of basic tactics which can be applied to a variety of logics.
[1] The Coq proof assistant. https://coq.inria.fr/.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Jean-Marc Andreoli</surname>
          </string-name>
          .
          <article-title>Logic programming with focusing proofs in linear logic</article-title>
          .
          <source>J. Log. Comput.</source>
          ,
          <volume>2</volume>
          (
          <issue>3</issue>
          ):
          <fpage>297</fpage>
          -
          <lpage>347</lpage>
          ,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Gilles</given-names>
            <surname>Barthe</surname>
          </string-name>
          ,
          <article-title>Benjamin Gr´egoire, and Santiago Zanella B´eguelin. Formal certification of code-based cryptographic proofs</article-title>
          .
          <source>ACM SIGPLAN Notices</source>
          ,
          <volume>44</volume>
          (
          <issue>1</issue>
          ):
          <fpage>90</fpage>
          -
          <lpage>101</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Christoph</given-names>
            <surname>Benzmu</surname>
          </string-name>
          <article-title>¨ller and Bruno Woltzenlogel Paleo</article-title>
          .
          <article-title>Interacting with modal logics in the coq proof assistant</article-title>
          . In International Computer Science Symposium in Russia, pages
          <fpage>398</fpage>
          -
          <lpage>411</lpage>
          . Springer,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Christoph</given-names>
            <surname>Benzmu</surname>
          </string-name>
          <article-title>¨ller, Xavier Parent, and Leendert van der Torre. A deontic logic reasoning infrastructure</article-title>
          . In Russel Miller,
          <string-name>
            <given-names>Dirk</given-names>
            <surname>Nowotka</surname>
          </string-name>
          , and Florin Manea, editors, 14th Conference on Computability in Europe,
          <source>CiE</source>
          <year>2018</year>
          , Kiel, Germany,
          <source>July 30-August</source>
          ,
          <year>2018</year>
          , Proceedings. Springer,
          <year>2018</year>
          . To appear.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Christoph</given-names>
            <surname>Benzmu</surname>
          </string-name>
          <article-title>¨ller and Bruno Woltzenlogel Paleo</article-title>
          .
          <article-title>Higher-order modal logics: Automation and applications</article-title>
          . In Adrian Paschke and Wolfgang Faber, editors,
          <source>Reasoning Web</source>
          <year>2015</year>
          ,
          <article-title>number</article-title>
          9203 in LNCS, pages
          <fpage>32</fpage>
          -
          <lpage>74</lpage>
          , Berlin, Germany,
          <year>2015</year>
          . Springer. (Invited paper).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Patrick</given-names>
            <surname>Blackburn</surname>
          </string-name>
          and Johan Van Benthem.
          <article-title>Modal logic: a semantic perspective</article-title>
          .
          <source>In Studies in Logic and Practical Reasoning</source>
          , volume
          <volume>3</volume>
          , pages
          <fpage>1</fpage>
          -
          <lpage>84</lpage>
          . Elsevier,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Sylvie</given-names>
            <surname>Boldo</surname>
          </string-name>
          , Franc¸ois Cl´ement,
          <string-name>
            <surname>Jean-Christophe</surname>
            <given-names>Filliaˆtre</given-names>
          </string-name>
          , Micaela Mayero, Guillaume Melquiond, and
          <string-name>
            <given-names>Pierre</given-names>
            <surname>Weis</surname>
          </string-name>
          .
          <article-title>Formal proof of a wave equation resolution scheme: the method error</article-title>
          .
          <source>In International Conference on Interactive Theorem Proving</source>
          , pages
          <fpage>147</fpage>
          -
          <lpage>162</lpage>
          . Springer,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Torben</given-names>
            <surname>Brau</surname>
          </string-name>
          <article-title>¨ner and Silvio Ghilardi. 9 first-order modal logic</article-title>
          .
          <source>In Studies in Logic and Practical Reasoning</source>
          , volume
          <volume>3</volume>
          , pages
          <fpage>549</fpage>
          -
          <lpage>620</lpage>
          . Elsevier,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Serenella</given-names>
            <surname>Cerrito</surname>
          </string-name>
          and
          <article-title>Marta Cialdea Mayer</article-title>
          .
          <article-title>Free-variable tableaux for constant-domain quantified modal logics with rigid and non-rigid designation</article-title>
          .
          <source>In International Joint Conference on Automated Reasoning</source>
          , pages
          <fpage>137</fpage>
          -
          <lpage>151</lpage>
          . Springer,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>Boutheina</given-names>
            <surname>Chetali</surname>
          </string-name>
          and
          <string-name>
            <surname>Quang-Huy Nguyen</surname>
          </string-name>
          .
          <article-title>About the world-first smart card certificate with eal7 formal assurances</article-title>
          .
          <source>Slides 9th ICCC</source>
          , Jeju, Korea (
          <year>September 2008</year>
          ), www. commoncriteriaportal. org/iccc/9iccc/pdf B,
          <volume>2404</volume>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Zakaria</surname>
            <given-names>Chihani</given-names>
          </string-name>
          , Tomer Libal, and
          <string-name>
            <given-names>Giselle</given-names>
            <surname>Reis</surname>
          </string-name>
          .
          <article-title>The proof certifier checkers</article-title>
          .
          <source>In International Conference on Automated Reasoning with Analytic Tableaux and Related Methods</source>
          , pages
          <fpage>201</fpage>
          -
          <lpage>210</lpage>
          . Springer,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Zakaria</surname>
            <given-names>Chihani</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and Fabien</given-names>
            <surname>Renaud</surname>
          </string-name>
          .
          <article-title>A semantic framework for proof evidence</article-title>
          .
          <source>Journal of Automated Reasoning</source>
          ,
          <volume>59</volume>
          (
          <issue>3</issue>
          ):
          <fpage>287</fpage>
          -
          <lpage>330</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Marta</given-names>
            <surname>Cialdea</surname>
          </string-name>
          .
          <article-title>Resolution for some first-order modal systems</article-title>
          .
          <source>Theoretical Computer Science</source>
          ,
          <volume>85</volume>
          (
          <issue>2</issue>
          ):
          <fpage>213</fpage>
          -
          <lpage>229</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [15]
          <string-name>
            <surname>Cvetan</surname>
            <given-names>Dunchev</given-names>
          </string-name>
          , Claudio Sacerdoti Coen, and
          <string-name>
            <given-names>Enrico</given-names>
            <surname>Tassi</surname>
          </string-name>
          .
          <article-title>Implementing hol in an higher order logic programming language</article-title>
          .
          <source>In Proceedings of the Eleventh Workshop on Logical Frameworks and Meta-Languages: Theory and Practice, page 4. ACM</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Cvetan</surname>
            <given-names>Dunchev</given-names>
          </string-name>
          , Ferruccio Guidi, Claudio Sacerdoti Coen, and
          <string-name>
            <given-names>Enrico</given-names>
            <surname>Tassi</surname>
          </string-name>
          . Elpi: Fast, embeddable, \
          <article-title>lambda prolog interpreter</article-title>
          .
          <source>In Logic for Programming</source>
          ,
          <source>Artificial Intelligence, and Reasoning</source>
          , pages
          <fpage>460</fpage>
          -
          <lpage>468</lpage>
          . Springer,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>Amy</given-names>
            <surname>Felty</surname>
          </string-name>
          .
          <article-title>Implementing tactics and tacticals in a higher-order logic programming language</article-title>
          .
          <source>Journal of Automated Reasoning</source>
          ,
          <volume>11</volume>
          (
          <issue>1</issue>
          ):
          <fpage>43</fpage>
          -
          <lpage>81</lpage>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>Amy</given-names>
            <surname>Felty</surname>
          </string-name>
          and
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          .
          <article-title>Specifying theorem provers in a higher-order logic programming language</article-title>
          .
          <source>In International Conference on Automated Deduction</source>
          , pages
          <fpage>61</fpage>
          -
          <lpage>80</lpage>
          . Springer,
          <year>1988</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [19]
          <string-name>
            <surname>Warren</surname>
            <given-names>D</given-names>
          </string-name>
          <string-name>
            <surname>Goldfarb</surname>
          </string-name>
          .
          <article-title>The undecidability of the second-order unification problem</article-title>
          .
          <source>Theoretical Computer Science</source>
          ,
          <volume>13</volume>
          (
          <issue>2</issue>
          ):
          <fpage>225</fpage>
          -
          <lpage>230</lpage>
          ,
          <year>1981</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>Georges</given-names>
            <surname>Gonthier</surname>
          </string-name>
          .
          <article-title>Formal proof-the four-color theorem</article-title>
          .
          <source>Notices of the AMS</source>
          ,
          <volume>55</volume>
          (
          <issue>11</issue>
          ):
          <fpage>1382</fpage>
          -
          <lpage>1393</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [21]
          <string-name>
            <surname>Georges</surname>
            <given-names>Gonthier</given-names>
          </string-name>
          , Andrea Asperti, Jeremy Avigad, Yves Bertot, Cyril Cohen, Fran¸cois Garillot, St´ephane Le Roux, Assia Mahboubi,
          <string-name>
            <surname>Russell</surname>
            <given-names>OConnor</given-names>
          </string-name>
          , Sidi Ould Biha, et al.
          <article-title>A machine-checked proof of the odd order theorem</article-title>
          .
          <source>In International Conference on Interactive Theorem Proving</source>
          , pages
          <fpage>163</fpage>
          -
          <lpage>179</lpage>
          . Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [22]
          <string-name>
            <surname>Ferruccio</surname>
            <given-names>Guidi</given-names>
          </string-name>
          , Claudio Sacerdoti Coen, and
          <string-name>
            <given-names>Enrico</given-names>
            <surname>Tassi</surname>
          </string-name>
          .
          <article-title>Implementing type theory in higher order constraint logic programming</article-title>
          .
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [23]
          <string-name>
            <surname>Thomas</surname>
            <given-names>Hales</given-names>
          </string-name>
          , Mark Adams, Gertrud Bauer, Tat Dat Dang, John Harrison, Hoang Le Truong, Cezary Kaliszyk, Victor Magron,
          <string-name>
            <surname>Sean</surname>
            <given-names>McLaughlin</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tat Thang Nguyen</surname>
          </string-name>
          , et al.
          <article-title>A formal proof of the kepler conjecture</article-title>
          .
          <source>In Forum of Mathematics, Pi</source>
          , volume
          <volume>5</volume>
          . Cambridge University Press,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>John</given-names>
            <surname>Harrison</surname>
          </string-name>
          .
          <article-title>The HOL light theorem prover</article-title>
          . https://github.com/jrh13/hol-light/.
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>Xavier</given-names>
            <surname>Leroy</surname>
          </string-name>
          .
          <article-title>Formal verification of a realistic compiler</article-title>
          .
          <source>Communications of the ACM</source>
          ,
          <volume>52</volume>
          (
          <issue>7</issue>
          ):
          <fpage>107</fpage>
          -
          <lpage>115</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>Chuck</given-names>
            <surname>Liang</surname>
          </string-name>
          and
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          .
          <article-title>Focusing and polarization in linear, intuitionistic, and classical logics</article-title>
          .
          <source>Theor. Comput. Sci.</source>
          ,
          <volume>410</volume>
          (
          <issue>46</issue>
          ):
          <fpage>4747</fpage>
          -
          <lpage>4768</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [27]
          <string-name>
            <surname>Sonia</surname>
            <given-names>Marin</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and Marco</given-names>
            <surname>Volpe</surname>
          </string-name>
          .
          <article-title>A focused framework for emulating modal proof systems</article-title>
          .
          <source>In Advances in Modal Logic 11, proceedings of the 11th conference on ”Advances in Modal Logic</source>
          ,” held in Budapest, Hungary,
          <source>August 30 - September 2</source>
          ,
          <year>2016</year>
          , pages
          <fpage>469</fpage>
          -
          <lpage>488</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          .
          <article-title>A logic programming language with lambda-abstraction, function variables, and simple unification</article-title>
          .
          <source>Journal of logic and computation</source>
          ,
          <volume>1</volume>
          (
          <issue>4</issue>
          ):
          <fpage>497</fpage>
          -
          <lpage>536</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          .
          <article-title>A proposal for broad spectrum proof certificates</article-title>
          .
          <source>In International Conference on Certified Programs and Proofs</source>
          , pages
          <fpage>54</fpage>
          -
          <lpage>69</lpage>
          . Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          .
          <article-title>Mechanized Metatheory Revisited: An Extended Abstract</article-title>
          .
          <source>In Post-proceedings of TYPES</source>
          <year>2016</year>
          ,
          <string-name>
            <given-names>Novi</given-names>
            <surname>Sad</surname>
          </string-name>
          , Serbia,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [31]
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          and
          <string-name>
            <given-names>Gopalan</given-names>
            <surname>Nadathur</surname>
          </string-name>
          .
          <article-title>Programming with higher-order logic</article-title>
          . Cambridge University Press,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [32]
          <string-name>
            <surname>Dale</surname>
            <given-names>Miller</given-names>
          </string-name>
          , Gopalan Nadathur, Frank Pfenning, and
          <string-name>
            <given-names>Andre</given-names>
            <surname>Scedrov</surname>
          </string-name>
          .
          <article-title>Uniform proofs as a foundation for logic programming</article-title>
          .
          <source>Annals of Pure and Applied logic</source>
          ,
          <volume>51</volume>
          (
          <issue>1-2</issue>
          ):
          <fpage>125</fpage>
          -
          <lpage>157</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [33]
          <string-name>
            <given-names>Dale</given-names>
            <surname>Miller</surname>
          </string-name>
          and
          <string-name>
            <given-names>Marco</given-names>
            <surname>Volpe</surname>
          </string-name>
          .
          <article-title>Focused labeled proof systems for modal logic</article-title>
          .
          <source>In Logic for Programming</source>
          ,
          <source>Artificial Intelligence, and Reasoning</source>
          , pages
          <fpage>266</fpage>
          -
          <lpage>280</lpage>
          . Springer,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [34]
          <string-name>
            <given-names>Gopalan</given-names>
            <surname>Nadathur</surname>
          </string-name>
          .
          <article-title>A treatment of higher-order features in logic programming</article-title>
          .
          <source>Theory and Practice of Logic Programming</source>
          ,
          <volume>5</volume>
          (
          <issue>3</issue>
          ):
          <fpage>305</fpage>
          -
          <lpage>354</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          [35]
          <string-name>
            <surname>Tobias</surname>
            <given-names>Nipkow</given-names>
          </string-name>
          , Lawrence C Paulson, and Markus Wenzel. Isabelle/HOL:
          <article-title>a proof assistant for higher-order logic</article-title>
          , volume
          <volume>2283</volume>
          . Springer Science &amp; Business
          <string-name>
            <surname>Media</surname>
          </string-name>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          [36]
          <string-name>
            <given-names>Jens</given-names>
            <surname>Otten</surname>
          </string-name>
          .
          <article-title>Mleancop: A connection prover for first-order modal logic</article-title>
          .
          <source>In International Joint Conference on Automated Reasoning</source>
          , pages
          <fpage>269</fpage>
          -
          <lpage>276</lpage>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          [37]
          <string-name>
            <given-names>Livio</given-names>
            <surname>Robaldo</surname>
          </string-name>
          and
          <string-name>
            <given-names>Xin</given-names>
            <surname>Sun</surname>
          </string-name>
          .
          <article-title>Reified input/output logic: Combining input/output logic and reification to represent norms coming from existing legislation</article-title>
          .
          <source>Journal of Logic and Computation</source>
          ,
          <volume>27</volume>
          (
          <issue>8</issue>
          ):
          <fpage>2471</fpage>
          -
          <lpage>2503</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref37">
        <mixed-citation>
          [38]
          <string-name>
            <given-names>Enrico</given-names>
            <surname>Tassi</surname>
          </string-name>
          .
          <article-title>Elpi: an extension language for coq metaprogramming coq in the elpi λprolog dialect</article-title>
          .
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>