Towards semantic mathematical editing

Abstract Currently, there exists a big gap between formal computer-understandable mathematics and informal mathematics, as written by humans. When looking more closely, there are two important subproblems: making documents written by humans at least syntactically understandable for computers, and the formal verification of the actual mathematics in the documents. In this paper, we will focus on the first problem. For the time being, most authors use , , or one of its graphical front-ends in order to write documents with many mathematical formulas. In the past decade, we have developed an alternative wysiwyg system GNU , which is not based on . All these systems are only adequate for visual typesetting and do not carry much semantics. Stated in the MathML jargon, they concentrate on presentation markup, not content markup. In recent versions of , we have started to integrate facilities for the semantic editing of formulas. In this paper, we will describe these facilities and expand on the underlying motivation and design choices. To go short, we continue to allow the user to enter formulas in a visually oriented way. In the background, we continuously run a packrat parser, which attempts to convert (potentially incomplete) formulas into content markup. As long as all formulas remain sufficiently correct, the editor can then operate both on a visual or semantic level, independently of the low-level representation being used. An important related topic, which will also be discussed at length, is the automatic correction of syntax errors in existing mathematical documents. In particular, the syntax corrector that we have implemented enables us to upgrade existing documents and test our parsing grammar on various books and papers from different sources. We will provide a detailed analysis of these experiments.

[1]  de Ng Dick Bruijn,et al.  The mathematical language AUTOMATH, its usage, and some of its extensions , 1970 .

[2]  Herman Geuvers,et al.  A Document-Oriented Coq Plugin for TeXmacs , 2006 .

[3]  Luca Padovani,et al.  From Notation to Semantics: There and Back Again , 2006, MKM.

[4]  Claudio Sacerdoti Coen A User Interface for a Mathematical System that Allows Ambiguous Formulae , 2009, Electron. Notes Theor. Comput. Sci..

[5]  Neil Soiffer The design of a user interface for computer algebra systems , 1991 .

[6]  Norbert Kajler,et al.  CAS/PI: a portable and extensible interface for computer algebra systems , 1992, ISSAC '92.

[7]  A. G. Grozin TeXmacs-maxima interface , 2005, ArXiv.

[8]  Joris van der Hoeven,et al.  Transseries and Real Differential Algebra , 2006 .

[9]  A. G. Grozin TeXmacs interfaces to Maxima, MuPAD and REDUCE , 2001, ArXiv.

[10]  Gilles Kahn,et al.  Real theorem provers deserve real user-interfaces , 1992 .

[11]  Neil Soiffer,et al.  Mathematical typesetting in Mathematica , 1995, ISSAC '95.

[12]  Samuel S. Dooley,et al.  Coordinating mathematical content and presentation markup in interactive mathematical documents , 1998, ISSAC '98.

[13]  Joris van der Hoeven GNU TeXmacs , 2004, SIGS.

[14]  Leslie Lamport,et al.  Latex : A Document Preparation System , 1985 .

[15]  Donald E. Knuth,et al.  The TeXbook , 1984 .

[16]  Norbert Kajler,et al.  Environnement graphique distribue pour le calcul formel , 1993 .

[17]  Bryan Ford,et al.  Packet parsing : a practical linear-time algorithm with backtracking , 2002 .

[18]  Laurence Rideau,et al.  TEXmacs as Authoring Tool for Formal Developments , 2004, Electron. Notes Theor. Comput. Sci..

[19]  Joris Van der Hoeven GNU TeXmacs, A free, structured, wysiwyg and technical text editor , 2001 .

[20]  Stephen M. Watt,et al.  Generating T E X from mathematical content with respect to notational settings , 2006 .

[21]  Andrea Asperti,et al.  User Interaction with the Matita Proof Assistant , 2007, Journal of Automated Reasoning.

[22]  S. Basu,et al.  Algorithms in real algebraic geometry , 2003 .

[23]  Charles Steinhorn,et al.  Tame Topology and O-Minimal Structures , 2008 .

[24]  Murray Hill,et al.  Yacc: Yet Another Compiler-Compiler , 1978 .

[25]  Neil Soiffer,et al.  A Survey of User Interfaces for Computer Algebra Systems , 1998, J. Symb. Comput..

[26]  Yves Bertot,et al.  The CtCoq System: Design and Architecture , 1999, Formal Aspects of Computing.

[27]  Bryan Ford,et al.  Packrat parsing:: simple, powerful, lazy, linear time, functional pearl , 2002, ICFP '02.

[28]  Stephen M. Watt Conserving Implicit Mathematical Semantics in Conversion between TEX and MathML , 2003 .

[29]  Dimitar Misev,et al.  MathML-aware Article Conversion from LaTeX , 2009 .

[30]  Bryan Ford,et al.  Packrat Parsing: Simple, Powerful, Lazy, Linear Time , 2006, ICFP 2002.

[31]  Stephen Wolfram,et al.  Mathematica: a system for doing mathematics by computer (2nd ed.) , 1991 .

[32]  Patrick Borras,et al.  Centaur: the system , 1988, Software Development Environments.

[33]  Olivier Arsac,et al.  Design of a customizable component to display and edit formulas , 1999, ISSAC '99.