<!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>Leveraging Information Contained in Theory Presentations</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Yasmine Sharoda sharodym@mcmaster.ca</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Supervisors: Jacques Carette</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>William Farmer</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Computing and Software, McMaster University</institution>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>ion consider units in which one can define sorts, typed symbols (optionally providing their definitions) and axioms stating the properties of the defined sorts and symbols. We use the term theory presentation to refer to this abstract unit. The theory of this abstraction has been well-studied under the name universal algebra [5]. Our goal is to identify what knowledge can be automatically generated from theory presentations. We want to provide a library of algorithms to generate this knowledge. This way, we provide tool support for library development and formalization tasks by removing some of the boilerplate associated with defining constructs that can be automatically generated. Not only does generating these new pieces save time and effort for the developer, but, more importantly, leverages the information contained in the theory graph by establishing new connections between the theories. A theory graph is a collection of theories and theory morphisms. We want to be able to generate the new pieces of knowledge and the morphisms connecting them to the graph. We describe our contributions as • Evaluating the status of current popular libraries of mathematics, in terms of modularity and reusability. • Compiling a list of constructions that can be automatically generated from the syntax of a theory presentation.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Copyright © by the paper’s authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
In: C. Kaliszyk, E. Brady, J. Davenport, W.M. Farmer, A. Kohlhase, M. Kohlhase, D. Müller, K. Pąk, and C. Sacerdoti Coen (eds.):
Joint Proceedings of the FMM and LML Workshops, Doctoral Program and Work in Progress at the Conference on Intelligent
Computer Mathematics 2019 co-located with the 12th Conference on Intelligent Computer Mathematics (CICM 2019), Prague,
Czech Republic, July 8–12, 2019, published at http://ceur-ws.org
We are interested in syntactically manipulating theory presentations, in their most abstract form. To achieve a
high level of abstraction, we use Mmt [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] as a data description language (DDL). Mmt is a foundation independent
framework for managing mathematical knowledge. Knowledge is structured as a theory graph. Being foundation
independent, it avoids the commitment to any specific logical foundation and allows the translation between the
different ones. This makes it appealing to our research work as it enables us to abstract over language details,
explore the minimal logic in which the different pieces of knowledge can be generated, and explore whether these
pieces can be formalized in other logics.
      </p>
      <p>After generating the different pieces of knowledge, we want to be able to translate them into different formal
systems. Considering systems with very different foundations, like Isabelle/HOL and Agda. The first is based
on HOL, while the second is based on dependent type theory. They have different representations of theories,
yet the information contained in them is the same. For example, a Monoid theory consists of a sort, a point,
a binary operation and three axioms. These pieces do not change based on the logic, but the way they are
formalized does. We are interested in automating the generation of theories in different formal systems. For this,
we aim to develop a feature model exploring the similarities and differences between the different systems. This
feature model will be used to design generators from our abstract model to the different systems. This way, the
information is generated once, and translated automatically to different representations.</p>
      <p>
        Evaluation
We use the MathScheme library [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to test our implementation of combinators to generate information. The
library contains over 1000 axiomatic theories, defined by using the combinators introduced in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and structured
as a theory graph. To be able to use the library, we translate it into Mmt. The combinators used to build
the library are interpreted as diagram level combinators [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Theories in the library have different foundations.
Some theories are based on simple logics, like equational logic, but others are based on more expressive1 ones,
like dependent type theory.
      </p>
      <p>In conclusion, we aim at supporting the development of libraries by generating some related construction that
can be made available by syntactic manipulation of theory presentations. As an outcome of our work, a user
should be able to write something like
B o o l e a n A l g e b r a := T h e o r y {</p>
      <p>U : type ;
* : ( U , U ) -&gt; U ;
+ : ( U , U ) -&gt; U ;
- - &gt; : ( U , U ) -&gt; U ;
0 : U ;
1 : U ;
c o m p l : U -&gt; U ;
a x i o m u n i p o t e n t _ - - &gt; _1 : f o r a l l x : U . ( x - - &gt; x ) = (1);
....
}
g e n e r a t e ( termLang , s i m p l i f y )
and then ask the system to evaluate simplify ((x * y) + 1) without any extra effort to define the term
language or simplification rules.
1By expressivity we mean practical expressivity, in terms that information is expressed in a practical and convenient way</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Jacques</given-names>
            <surname>Carette</surname>
          </string-name>
          , William M Farmer,
          <string-name>
            <given-names>Filip</given-names>
            <surname>Jeremic</surname>
          </string-name>
          , Vincent Maccio,
          <string-name>
            <surname>Russell O'Connor</surname>
          </string-name>
          , and
          <string-name>
            <surname>Quang</surname>
            <given-names>M Tran.</given-names>
          </string-name>
          <article-title>The mathscheme library: Some preliminary experiments</article-title>
          .
          <source>arXiv preprint arXiv:1106</source>
          .
          <year>1862</year>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Jacques</given-names>
            <surname>Carette</surname>
          </string-name>
          and
          <string-name>
            <surname>Russell O'Connor.</surname>
          </string-name>
          <article-title>Theory presentation combinators</article-title>
          .
          <source>In International Conference on Intelligent Computer Mathematics</source>
          , pages
          <fpage>202</fpage>
          -
          <lpage>215</lpage>
          . Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Michael</given-names>
            <surname>Kohlhase</surname>
          </string-name>
          , Florian Rabe, and
          <string-name>
            <given-names>Vyacheslav</given-names>
            <surname>Zholudev</surname>
          </string-name>
          .
          <article-title>Towards MKM in the large: Modular representation and scalable software architecture</article-title>
          .
          <source>In International Conference on Intelligent Computer Mathematics</source>
          , pages
          <fpage>370</fpage>
          -
          <lpage>384</lpage>
          . Springer,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Florian</given-names>
            <surname>Rabe</surname>
          </string-name>
          and
          <string-name>
            <given-names>Yasmine</given-names>
            <surname>Sharoda</surname>
          </string-name>
          .
          <article-title>Diagram combinators in mmt</article-title>
          .
          <source>In International Conference on Intelligent Computer Mathematics</source>
          . Springer,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Wolfgang</given-names>
            <surname>Wechler</surname>
          </string-name>
          .
          <article-title>Universal algebra for computer scientists</article-title>
          , volume
          <volume>25</volume>
          <source>of eatcs monographs on theoretical computer science</source>
          ,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>