## Introduction

This post is about taking texts written in mathematical English and the symbolic language and encoding it in a formal language that could be tested by an automated proof verifier. This is a very difficult undertaking, but we could get closer and closer to a working system by a worldwide effort continuing over, probably, decades. The system would have to contain many components working together to create incremental improvements in the process.

This post, which is a first draft, outlines some suggestions as to how this could work. I do not discuss the encoding required, which is not my area of expertise. Yes, I understand that coding is the hard part!

Much work has been done by computing scientists in developing proof checking and proof-finding programs. Work has also been done, primarily by math education workers but also by some philosophers and computing scientists, in uncovering the many areas where ordinary math language is ambiguous and deviates from ordinary English usage. These characteristics confuse students and also make it hard to design a program that can interpret the language. I have been working in that area mostly from the math ed point of view for the last twenty years.

The Reference section lists many references to the problem of parsing mathematical English, some from the point of view of automatic translation of math language into code, but most from the point of view of helping students understand how to understand it.

## The Mathematics Depository

I imagine a system for converting documents written in math language into machine-readable language and testing their claims. An organization, call it the **Mathematics Depository**, would be developed that is supported by many countries, organizations and individual supporters. It should consist of several components listed below, no doubt with other components as we become aware of needing them. The organization would be tasked with supporting and improving these components over time.

## The main parts of the system

Each component is linked to a more detailed description that is given later in this post.

- A
**Proof Verifier**(PV), that inputs a proof and determines if it is correct. - A specification of a supported subset of Mathematical English and the symbolic language, that I will call
**Strict Math English**(SME). - A
**Text-SME Converter**, a program that would input a text written in ordinary math English that has been annotated by a knowledgeable person and convert it into SME. - An
**SME-PV Converter**that will convert text written in SME into code that can be directly read by the Proof Verifier. - One or more
**Automatic Theorem Provers,**that to begin with can take fairly simple conjectures written in SME and sometimes succeed in proving them. - An
**Annotation System**containing an**Annotation Editor**that would allow a person to use SME to annotate an article written in ordinary math English so that it could be read by the Text-SME Converter. - A
**Data Base**that would include the texts that have been collected in this endeavor, along with the annotations and the results of the proof checking. - A
**Data Base Miner**that would watch for patterns in the annotations as new papers were submitted. The operators might also program it to watch for patterns in other aspects of the operation.

These facilities would be organized so that the *systems work together,* with the result that the individual components I named *improve over time,* both *automatically* and via *human intervention.*

## Flow of Work

- A math text is submitted.
- If it is already in Strict Math English (SME), it is input to the Proof Verifier (PV).
- Otherwise, the math text is input into the Annotation System.
- The resulting SME text is input into the Text-SME Converter.
- The output of the Text-SME Converter is input into the Proof Verifier.
- The PV incorporates each
**definition**in the text into the**context**of the math text. This is a specific meaning of the word “context”, including a list of the status of variables (bound, unbound, type, and so on), meanings of technical words, and other facts created in the text. “Context” is described informally in my article Context in abstractmath.org. That article gives references to the formal literature. - Each mathematical
**assertion**in the text is marked as a**claim**. - The checking process records those claims occurring in the proof that are not proved in the text, along with any references given to other texts.
- If a reference to a result in another text is made, the PV looks for the result in the Database. If it does not find it, the PV incorporates the result and its location in the Database as an
**externally proven but untested claim**. - If no reference or proof for a claim is given, the PV checks the Database to see if it has already been proved.
- Any claim in the current text not shown as proven in the Database is submitted to the Automatic Theorem Prover (ATP). The output of the ATP is put in the database (proved, counterexample found, or unable to determine truth).
- If a segment of text is presented as a
**proof**, it is input into the PV to be verified. - The PV reports the result for each claimed proof, which can consist of several possibilities:
- A counterexample for a proof is found, so the claim that the proof was supposed to report is false.
- The proof contains gaps, so the claim is unsettled.
- The proof is reported as correct.
- At the end of the process, all the information gathered is put into the Database:
- The original text showing all the annotations.
- The text in SME.
- All claims, with their status (proven true, proven false, truth unknown, reference if one was given).
- Every proof, with its status and the entire context at each step of the proof.

In my experience mathematicians spend only a little time reading arguments step by step as described in the Context article. They usually look at a theorem and try to figure it out themselves, “cheating” occasionally by glancing at parts of the proof.

## Details

### The proof verifier

- Proof checking programs have been developed over the last thirty or so years. The MD should write or adapt one or more Proof Verifiers and improve it incrementally as a result of experience in running the system. In this post I have assumed the use of just one Proof Verifier.
- The Proof Verifier should be designed to read the output of the SME-PV converter.
- The PV must read a whole math text in SME, identify and record each claim and check each proof (among other things). This is different from current proof verifiers, which take exactly one proof as input.
- The PV must create the
**context**of each proof and change it step by step as it reads each syntactic fragment of the math text. - Typically the context for a claimed proof is built up in the whole math text, not just in the part called “Proof”.
- The PV should automatically query the Data Base for unproved steps in a proof in the input text to see if they have already been verified somewhere else. These results should be quoted in a proof verifier output.
- The PV should also automatically submit steps in the proof that
*haven’t*been verified to the Automatic Theorem Provers and wait for the step to be verified or not. - The Proof Verifier should output details of the result of the checking whether it succeeded in verifying the whole input text or not. In particular, it should list steps in proofs it failed to verify, including steps in proofs for which the input text cited the proof in some other paper, in the MD system or not.
- The Proof Verifier should be available online for anyone to submit, in SME, a mathematical text claiming to prove a theorem. Submission might require a small charge.

### Strict Math English

- One of the most important aspects of the system would be the
*simultaneous incremental updating of the SME and the SME-PV Converter.* - The idea is that SME would get more and more inclusive of the phrases and clauses it allows.

#### Example: Universal Assertions

At the start SME might allow these statements to be recognized as the same universal assertion:

- “$\forall x(x^2+1\gt0)$”
- “For all [every, any] $x$, $x^2+1\gt0$.” (universality asserted using an English word.)
- “For all [every, any] $x$, $x^2+1$ is positive.”

As time goes on, a person or the Data Base Miner might detect that many annotators also recognized these statements as saying the same thing:

- “$x^2+1\gt0\,\,\,\,\,(\text{all } x)$” (as a displayed statement)
- “$x^2+1$ is positive for every $x$.” Universality asserted using an adjective in a postposited phrase.
- “$x^2+1$ is always positive.” Universality hidden in a postposited adverb that seems to be referring to time!
- There are more examples in my article Universally True Assertions. See also Susanna Epp’s article on quantification for other problems in this area.

These other variations would then be added to the Strict Math Language. (This is only an example of how the system would evolve. I have no doubt that in fact all the terminology mentioned above would be included at the outset, since they are all documented in the math ed literature.)

Even at the start, SME will include phrases and clauses in the English language as well as symbolic expressions. It is notorious that automatically parsing general English sentences is difficult and that the ubiquity of metaphors makes it essentially impossible to reliably construct the meaning of a sentence. That is why SME must start with a very narrow subset of math English. But even in early days, it should include some stereotyped metaphors, such as using “always” in universal assertions.

### The SME-PV Converter

- The SME-PV Converter would read documents written in SME and convert them into code readable by the proof checking program, as well as by the automatic theorem provers.
- Such a program is essentially the subject of Ganesingalam’s book.
- Converting SME so that the Proof Verifier can handle it involves lots of subtleties. For example, if the text says, “For any $x$, $x^2+1\gt0$”, the translation has to recognize not only that this is a universally quantified statement with $x$ as the bound variable, but that $x$ must be a real number, since complex numbers don’t do greater-than.
- Frequent revisions of the SME-PV Converter will be necessary since its input language, the SME, will be constantly expanded.
- It may be that the output language of the SME-PV Converter (which the Proof Verifier and Automatic Theorem Provers read) will require only infrequent revisions.

### The Automatic Theorem Provers

- The system could support several ATP’s, each one adapted to read the output of the SME-PV Converter.
- The Automatic Theorem Provers should provide output in such a way that the Proof Verifier can include in its report the positive or negative results of the Theorem Prover in detail.

### The Annotation System

- The Annotation system would facilitate construction of a data structure that connects each annotation to the specific piece of text it rewrites. The linking should be facilitated by the Annotation Editor.
- For example, an annotation that is meant to explain that the statement (in the input text) “$x^2+1$ is always greater than $0$” is to be translated as “$\forall x(x^2+1\gt0)$” (which is presumably allowed by SME) should cause the first statement to be be linked to the second statement. The first statement, the one in the input text, should not be changed. This will enable the Data Base Miner to find patterns of similar text being annotated in similar ways.
- The annotations should clarify words, symbolic expressions and sentences in the input text to allow the Proof Verifier to input them correctly.
- In particular, every claim that a statement is true should be marked as a proposed theorem, and similarly every proof should be marked as a proof and every definition should be marked as a definition. Such labeling is often omitted in the math literature. Annotators would have to recognize segments of the text as claims, proofs and definitions and annotate them as such.
- The annotations would be written in the current version of Strict Math English. Since SME is frequently updated, the instructions for the annotator would also have to be frequently updated.

#### Examples

- If a paper used the word “domain” without defining it, the annotator would clarify whether it meant an open connected set, a type of ring, a type of poset, or the domain of a function. See Example 1
- Annotators will note instances in which the same text will use a symbol with two different meanings. See Example 2.
- In a phrase, a single occurrence of a symbol can require an annotation that assigns
*more than one attribute*to the symbol. See Example 3.

### The Annotation Editor

- The annotators should be provided with an Annotation Editor
*designed specifically for annotation*. - The editor should include a system of linking an annotation to the exact phrase it annotates that is easy for a person reading the annotated document to understand it as well as providing the information to the Text-SME Converter.

### The Annotators

- Great demands will be made of an annotator.
- They must understand the detailed meaning of the text they annotate. This means they must be quite familiar with the field of math the text is concerned with.
- They must learn SME. I know for a fact that many mathematicians are not good at learning foreign languages. It will help that SME will be a subset of the full language of math.
- All this means that annotators must be chosen carefully and paid well. This means that not very many papers will get annotated by paid annotators, so that there will have to be some committee that chooses the papers to be annotated. This will be a genuine bottleneck.
- One thing that will help in the long run is that the SME should evolve to include more features of the general language of math, so many mathematicians will actually write their papers in SME and submit it directly to the Depository. (“Long run” may mean more than ten years).

### The Text-to-SME Converter

- This converter takes a math text in ordinary Math English that has been annotated and convert it into SME.
- The format for feeding it to the Automatic Theorem Prover may very well have to be different from the format to be read by a human. Both formats should be saved.

### The Data Base

- The Data Base would contain all math papers that have been run through the Proof Verifier, along with the results found by the Proof Verifier. A paper should be included whether or not every claim in the paper was verified.
- Funding agencies (and private individuals) might choose particularly important papers and pay more money for annotation for those than for other papers.
- Mathematicians in a particular field could be hired to annotate particular articles in their field, using a standard annotation language that would develop through time.
- The annotated papers would be made freely available to the public.
- It will no doubt prove useful for the Data Base to contain many other items. Possibilities:

- A searchable list of all theorems that have been verified.
- A glossary: a list of math words that have been defined in the papers in the Depository. This will include synonyms and words with multiple meanings.

### The Data Base Miner

#### Watch for patterns

The DBM would watch for patterns in annotation as new annotated papers were submitted. It should probably look only at annotated papers whose proofs had been verified. The patterns might include:

- Correlation between annotations that associate particular meanings to particular words or symbols with the branch of math the paper belongs to. See Example 1.
- Noting that a particular format of combining symbols usually results in the same kind of annotation. See Example 4.
- Providing data in such a way that lexicographers studying math English could make use of them. My Handbook began with my doing lexicographical research on math English, but I found it so slow that when I started abstractmath.org I resolved not to such research any more. Nevertheless, it needs to be done and the Database should make the process much easier.

#### Statistical translation

Since the annotated papers will be stored in the Data Base, the Data Base Miner could use the annotations in somewhat the same way some language translators work (in part): to translate a phrase, it will find occurrences of the phrase in the source language that have been translated into the target language and use the most common translation. In this case the source language is the paper (in English) and the target language is in annotated math English readable by the Proof Verifier. Once the Database includes most of the papers ever published (twenty years from now?), statistical translation might actually become useful.

## Examples

#### Example 1: Meaning varies with branch of math

- “
**Field**” means one thing in an algebra paper and another in a mathematical physics paper. - “
**Domain**” means

- An
**open connected set**in topology. - A type of
**ring**in algebra. - A type of
**poset**in theoretical computing science. - The
**domain of a function**–everywhere in math, which makes it seem that this is going to be very hard to distinguish without human help!

**Log**” usually implies base $2$ in the computing world, base $10$ in engineering (but I am not sure how prevalant this meaning is there), and base $e$ in pure math. With exceptions!

#### Example 2: Meaning varies even in the same article

- The notation “$(a,b)$” can mean an ordered pair, an open interval, or the GCD. What’s worse, there are many instances where the symbol is used without definition. Citation 139 in the Handbook provides a
*single sentence*in which the first two meanings both occur:$\dots$ Richard Darst and Gerald Taylor investigated the differentiability of functions $f^p$ (which for our purposes we will restrict to $(0,1)$) defined for each $p\geq1$ by\[F(x):=

\begin{cases}

0 &

\text{if }x\text{ is irrational}\\

\displaystyle{\frac{1}{n^p}} &

\text{if }x = \displaystyle{\frac{m}{n}}\text{ with }(m,n)=1\\ \end{cases}\]The sad thing is that any mathematician will know immediately what each occurrence means. This may be a case where the correct annotation will never be automatically detectable.

#### Example 3: One mention of a symbol may require several meanings

In the sentence, “This infinite series converges to $\zeta(2)=\frac{\pi^2}{6}\approx 1.65$,” the annotator would provide two pieces of information about “$\frac{\pi^2}{6}$”, namely that it is both the right constituent of the equation “$\zeta(2)=\frac{\pi^2}{6}$” and the left constituent of the approximation statement “$\frac{\pi^2}{6}\approx 1.65$” — and that these two statements were the constituents of an asserted conjunction. (See my post Pivoted symbols.)

#### Example 4: Function to a power

Some expressions not in the SME will almost always be annotated in the same way. This makes it discoverable by the Data Base Miner.

- “$\sin^{-1}x$”
*always*means $\arcsin x$. - For positive $n$, “$\sin^n x$”
*always*means $(\sin x)^n$. It never means the $n$-fold application of $\sin$ to $x$. - In contrast, for an
*arbitrary*function symbol, $f^n(x)$ will often be annotated as $n$-fold application of $f$ and*also*often as $f(x)^n$. (And maybe those last two possibilities are correlated by branch of math.)

## References

I believe that work in formal verification has tended to overlook the work on math language difficulties in math ed, so I have included some articles from that specialty.

- Formally Verified Mathematics, by Jeremy Avigad and John Harrison.
*Communications of the ACM,*2014. Vol. 57 No. 4, Pages 66-75. 10.1145/2591012. This article is behind a pay barrier, but if you have library privileges in a university you may be able to download it for free. - Varieties of mathematical prose (1998), by Atish Bagchi and Charles Wells. The annotations I referred to in this post could include annotations of types of prose, including the ones listed in this article and also Ganesalingam’s distinction between formal and informal math prose.
- On the communication of mathematical reasoning (1998), by Atish Bagchi and Charles Wells. Contains examples of hard-to-parse usage and references to the math ed literature.
- Proofs in mathematics, by Alexander Bogomolny. Many examples of proofs that could be used as tests for the Proof Verifier.
- Contrapositive grammar, 2014, a post in the blog by David Butler.
- APOS: A constructivist theory of learning in undergraduate mathematics education research, Ed Dubinsky and Michael A. MacDonald. This is an outline with references to many papers giving more detail.
- Proof issues with existential quantification, by Susanna S. Epp.
- The Language of Quantification in Mathematics Instruction, 1999, by Susanna S. Epp.
- Variables in mathematics education, 2011, by Susanna S. Epp.
- Math lingo vs. plain English, 1997, excerpt from article by Reuben Hersh, American Mathematical Monthly

volume 104, Number 1, January 1997, pp 48-51. - Automated proof verification, 2012. Discussion in Math Stack Exchange. Has references not included here.
- Formalizing math, 2015. MathOverflow discussion.
- The Language of mathematics, 2013. By Mohan Ganesalingam. Description of mathematical language with an outline of a methodology for automatic translation into a proof-verification language. This methodology has been partially implemented. Available only as a book.
- MathResS, a Mathematical Research System, by Arnold Neumeier. This document describes a project that overlaps my proposal, and it lists many projects and programs that might be useful for the project.
- When the Rules of Discourse Change, but Nobody Tells You: Making Sense of Mathematics Learning From a Commognitive Standpoint, 2007. By Anna Sfard.
- Symbolizing mathematical reality into being: How mathematical discourse and mathematical objects create each other, (2000). By Anna Sfard. In P. Cobb, K. E. Yackel, & K. McClain (Eds),
*Symbolizing and communicating: perspectives on Mathematical Discourse, Tools, and Instructional Design*(pp. 37-98). Available only as a book. - How to read and do proofs: A introduction to mathematical and thought processes,2013, by Danny Solow. This book contains many simple proofs written out that could be used as tests for the Strict Math Language. It also discusses outlines of formats of proofs (contrapositve, contradiction, and so on). It might be useful to have the Proof Verifier recognize the various formats of proofs explicitly.
- Communicating mathematics: useful ideas from computer science (1995), by Charles Wells.
- The languages of math, written during 2005-2010 with many revisions since, by Charles Wells. Long article in abstractmath.org intended for students new to formal math.
- Handbook of Mathematical Discourse, 2003, by Charles Wells. Book about the languages of math together with citations of mathematical usage from the literature.

The following are posts from my blog Gyre&Gimble. They are in reverse chronological order.

- Pivoted symbols.
- Problems caused for students by the two languages of math.
- Variations in meaning in math.
- Representations of mathematical objects.
- Semantics of algebra I
- Algebra is a difficult foreign language.
- Bugs in English and in Math.
- Abuse of notation
- Mathematical usage
- Technical words in English.
- The languages of mathematics.

This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.