<!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>The Naproche Project Controlled Natural Language Proof Checking of Mathematical Texts</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>M. Cramer</string-name>
          <email>cramer@math.uni-bonn.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>P. Koepke</string-name>
          <email>koepke@math.uni-bonn.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>D. Ku¨hlwein</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>B. Schr¨oder</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>J. Veldman</string-name>
          <email>veldman@math.uni-bonn.de</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Outline of the Naproche Project</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>The Semi-Formal Language of Mathematics</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Bonn and University of Duisburg-Essen</institution>
        </aff>
      </contrib-group>
      <fpage>2</fpage>
      <lpage>6</lpage>
      <abstract>
        <p>The Naproche project1 (NAtural language PROof CHEcking) studies the semiformal language of mathematics (SFLM) as used in journals and textbooks from the perspectives of linguistics, logic and mathematics. A central goal of Naproche is to develop and implement a controlled natural language (CNL) for mathematical texts which can be transformed automatically into equivalent first order formulas by methods of computational linguistics. Since parts of mathematical texts are strictly formal, we expect that a mathematical CNL can cover many aspects of SFLM. Further work in the project is directed towards automatic manipulation and proof checking of CNL texts and the translation of extensive mathematical theories into the Naproche CNL. As an example of the semi-formal language of mathematics (SFLM), we cite a proof for the theorem “√2 is irrational ” from Hardy-Wright's introduction to number theory [2].</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>– They combine natural language expressions with mathematical symbols and
formulas, which can syntactically function like noun phrases or
sub-propositions.
– Constructions which are hard to disambiguate are generally avoided.
– Mathematical symbols can be used for disambiguation, e.g. by use of
variables instead of anaphoric pronouns.
– Assumptions can be introduced and retracted. For example, the proof cited
above is a proof by contradiction: At the beginning, it is assumed that √2
is rational. The claims that follow are understood to be relativised to this
assumption. Finally the assumption leads to a contradiction, and is retracted
to conclude that √2 is irrational.
– Mathematical texts are highly structured. At a global level, they are
commonly divided into building blocks like definitions, lemmas, theorems and
proofs. Inside a proof, assumptions can be nested into other assumptions, so
that the scopes of assumptions define a hierarchical proof structure.
– Definitions add new symbols and expressions to the vocabulary and fix their
meaning.
– Proof steps are commonly justified by referring to results in other texts, or
previous passages in the same text. So there are intertextual and intratextual
references.
3</p>
    </sec>
    <sec id="sec-2">
      <title>The Naproche CNL</title>
      <p>The Naproche CNL is currently a small subset of SFLM which includes some of
the above mentioned characteristics of SFLM.</p>
      <p>A Naproche text is structured by structure markers: Theorem, Lemma, Proof
and Qed. A theorem is presented after the structure marker Theorem, and its
proof follows between the structure markers Proof and Qed.</p>
      <p>First order formulas can be combined with natural language expressions to
form statements, definitions and assumptions.</p>
      <p>Assumptions are always opened by an assumption trigger (e.g. let, consider,
assume that . . . ), and closed by a sentence starting with thus or by a Qed.
Definitions always start with define. Assertions are made by statements starting
with a statement trigger (then, hence, therefore, so, . . . ) followed by a first order
formula or a naturally predicated term. Additionally, negation, quantification
and implication may be expressed in natural language.</p>
      <p>The proof cited above can be reformulated in the Naproche CNL as follows:
Theorem. √2 is irrational.</p>
      <p>Proof.</p>
      <p>Assume that √2 is rational. Then there are integers a, b such that a2 =
2b2 and (a, b) = 1. Hence a2 is even. Therefore a is even. So there is an
integer c such that a = 2c. Then 4c2 = 2b2 and 2c2 = b2. So b is even.
Contradiction. Qed.</p>
      <p>This is the actual graphical appearance of the text, since Naproche uses the
mathematical WYSIWYG editor TeXmacs.</p>
    </sec>
    <sec id="sec-3">
      <title>Proof Representation Structures</title>
      <p>
        Texts written in the Naproche CNL are translated into Proof Representation
Structures or PRSs (see [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]). PRSs are Discourse Representation Structures
(DRSs, [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]), which are enriched in such a way as to represent the distinguishing
characteristics of SFLM discussed in section 2.
      </p>
      <p>A PRS has five constituents: An identification
number, a list of discourse referents, a list of
mathematical referents, a list of textual referents and an
ordered list of conditions. Similar to DRSs, we can
display PRSs as “boxes” (Figure 1).</p>
      <p>Mathematical referents are the terms and
formulas which appear in the text. As in DRSs, discourse
referents are used to identify objects in the domain
of the discourse. However, the domain contains two
kinds of objects: mathematical objects like numbers
or sets, and the symbols and formulas which are
used to refer to or make claims about mathematical Fig. 1. A PRS with
objects. Discourse referents can identify objects of identification number
either kind. i, discourse referents</p>
      <p>PRSs have identification numbers, so that they d1, ..., dn, mathematical
can be referred to at some later point. The textual referents m1, ..mk,
condireferents indicate the intratextual and intertextual tions c1, ..., cl and textual
references. referents r1, ..rp</p>
      <p>Just as in the case of DRSs, PRSs and PRS
conditions have to be defined recursively: Let A, B be
PRSs, X, X1, . . . , Xn discourse referents and Y a
mathematical referent. Then
– for any n-ary predicate p (e.g. expressed by adjectives and noun phrases in
predicative use and verbs in SFLM), p(X1, . . . , Xn) is a condition.
– holds(X) is a condition representing the claim that the formula referenced
by X is true.
– math id(X, Y ) is a condition which binds a discourse referent to a
mathematical referent (a formula or a term).
– A is a condition.
– ¬A is a condition, representing a negation.
– A := B is a condition, representing a definition.
– A ⇒ B is a condition, representing an assumption (A) and the set of claims
made inside the scope of this assumption (B).
– contradiction is a condition, representing a contradiction.</p>
      <p>Note that contrary to the case of DRSs, a bare PRS can be a direct condition
of a PRS. This allows to represent in a PRS the structure of a text divided into
building blocks (definitions, lemmas, theorems, proofs) by structure markers.
The hierarchical structure of assumptions is represented by nesting conditions
of the form A ⇒ B: A contains an assumption, and B contains the representation
of all claims made inside the scope of that assumption.</p>
      <p>
        The algorithm creating PRSs from CNL
proceeds sequentially: It starts with the
empty PRS. Each sentence or structure
marker in the discourse updates the PRS
according to an algorithm similar to a standard
DRS construction algorithm but taking the
nesting of assumptions into account. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
      </p>
      <p>The PRS constructed from the example
proof is shown on the right (abbreviated and
without the empty reference slots).</p>
    </sec>
    <sec id="sec-4">
      <title>5 Translating PRSs into First</title>
    </sec>
    <sec id="sec-5">
      <title>Order Logic</title>
      <p>
        PRSs, like DRSs, have a canonical translation
into first order logic and can be processed
further by logical tools. This translation is
performed in a way similar to the DRS to
firstorder translation described in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. For
example, the discourse referents normally trigger
existential quantifiers, but in a PRS
condition of the form A ⇒ B the discourse
referents of A trigger universal quantifiers. There
are two main differences between PRS to first-oder translation and DRS to
firstorder translation that need discussion:
– The math id-conditions are not translated into subformulas of the first-order
translation. A math id-condition which binds a discourse referent to a term
triggers a substitution of that discourse referent by that term in the
translation of subsequent conditions. A math id-condition which binds a discourse
referent to a formula causes a subsequent holds-condition with that discourse
referent to be translated by that formula.
– Definition conditions are also not translated into subformulas of the
translation. Instead, a condition of the form A := B triggers a substitution of the
relation symbol it defines by the first-order translation of B in subsequent
conditions.
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Results</title>
      <p>
        We created a program, the Naproche system, which can parse an earlier version of
the Naproche CNL, create the appropriate PRSs, and check them for correctness
using automated theorem provers. The Burali-Forti paradox, a well known
mathematical theorem, as well as several basic statements in group theory, were
formulated in the Naproche CNL, and checked for correctness using the Naproche
system.
Claus Zinn wrote his PhD thesis about informal mathematical discourse [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
He used an extended version of DRSs, which he also called Proof Representation
Structures, to represent the meaning of a text. The PRS definitions of Naproche
and Zinn are different.
      </p>
      <p>
        We are collaborating with the VeriMathDoc project [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], which is developing
a mathematical assistant system that naturally supports mathematicians in the
development, authoring and publication of mathematical work.
      </p>
      <p>We shall extend the Naproche controlled natural language to include a rich
mathematical formula language and many argumentative mathematical phrases
and constructs. Once the Naproche CNL is sufficiently extensive and powerful,
we shall reformulate and check proofs from various areas of mathematics in a
way “understandable” to men and machines.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Blackburn</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bos</surname>
          </string-name>
          , J.:
          <article-title>Representation and Inference for Natural Language Volume II: Working with Discourse Representation Structures (</article-title>
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Hardy</surname>
            ,
            <given-names>G. H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wright</surname>
            ,
            <given-names>E. M.:</given-names>
          </string-name>
          <article-title>An Introduction to the Theory of Numbers (Fourth Edition,</article-title>
          <year>1960</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Kamp</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reyle</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          : From Discourse to Logic:
          <article-title>Introduction to Model-theoretic Semantics of Natural Language</article-title>
          , Kluwer Academic Publisher (
          <year>1993</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Kolev</surname>
          </string-name>
          , N.:
          <article-title>Generating Proof Representation Structures for the Project Naproche</article-title>
          , Magister thesis (University of Bonn,
          <year>2008</year>
          ), http://naproche.net/downloads. shtml
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. Ku¨hlwein, D.:
          <article-title>A short introduction to Naproche v0.1</article-title>
          , http://naproche.net/ downloads.shtml
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Ku¨hlwein, D.:
          <article-title>A calculus for Proof Representation Structures</article-title>
          , Diploma thesis (University of Bonn,
          <year>2008</year>
          ), http://naproche.net/downloads.shtml
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>7. VeriMathDoc website: http://www.ags.uni-sb.de/∼afiedler/verimathdoc/</mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Zinn</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          : Understanding Informal Mathematical Discourse,
          <source>PhD thesis</source>
          at the University of Erlangen (
          <year>2004</year>
          ), http://citeseer.ist.psu.edu/233023.html
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>