1 #+TITLE: Functional models of mathematical reasoning
2 #+AUTHOR: Joseph Corneli and Raymond Puzio
3 #+EMAIL: contact@planetmath.org
4 #+DATE: May 27, 2017 for Thursday 1 June, 2017 deadline
5 #+DESCRIPTION: Outline and draft of 12 page paper on math text analysis for FARM workshop at ICFP 2017
6 #+KEYWORDS: arxana, hypertext, inference anchoring theory
8 #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
9 #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
10 #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
11 #+EXPORT_SELECT_TAGS: export
12 #+EXPORT_EXCLUDE_TAGS: noexport
15 #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://metameso.org/~joe/solarized-css/build/solarized-light.css" />
16 #+BIBLIOGRAPHY: farm-refs plain
17 #+LATEX_HEADER: \usepackage[backend=bibtex,sorting=none]{biblatex}
18 #+LATEX_HEADER: \addbibresource{farm-refs}
19 #+STARTUP: showeverything
23 Functional Programming has emerged as a mainstream software
24 development paradigm, and its artistic and creative use is booming. A
25 growing number of software toolkits, frameworks and environments for
26 art, music and design now employ functional programming languages and
27 techniques. FARM is a forum for exploration and critical evaluation of
28 these developments, for example to consider potential benefits of
29 greater consistency, tersity, and closer mapping to a problem domain.
31 FARM encourages submissions from across art, craft and design,
32 including textiles, visual art, *music*, 3D sculpture, animation, GUIs,
33 video *games*, 3D printing and architectural models, choreography,
34 *poetry*, and even VLSI layouts, GPU configurations, or
35 *mechanical engineering designs*. *Theoretical foundations*, *language design*,
36 *implementation issues*, and *applications* in industry or the arts are
37 all within the scope of the workshop. The language used need not be
38 purely functional (“mostly functional” is fine), and may be manifested
39 as a domain specific language or tool. Moreover, submissions focusing
40 on questions or issues about the use of functional programming are
47 ``To get to the moon, we needed crashes and endless fiddling.'' Gabriel and Goldman, "Mob Software: The Erotic Life of Code" \cite{gabriel2000mob}
50 ** 0.1 CONTEXT OF APPLICATION
51 - modelling mathematical dialogues, people don't just write their things in metamath
52 - people may make different expository choices
53 - mathematical text contains argumentation an narrative in addition to logic and calculations ([[1.2][1.2]])
55 - push to make everything formal (QED, Tarski, LCF) [[1.1][1.1]]
56 - push to make everything understandable (Alexander)
58 - each different user will have a different "way in", depending on their background knowledge ([[3.2][3.2]])
59 - how to get behind the scenes to see why?
60 - how to tailor a given formal content to a given reader?
61 ** 0.4 SOLUTION (STRATEGY)
62 - focus on expressivity
63 - focus on representing process
64 - formalization and efficiency are important, but will be left for later.
66 - objective: understand mathematics as people do it (literary criticism, rhetoric, argumentation)
67 - objective: learn from these methods to build new mathematical texts
68 - build on intuitive diagrams
69 - build on the idea of parsing natural language (complementary to Mohan's work)
70 ** 0.6 RESOLUTION of FORCES
71 - outcome: sharing diagrams with people who can use them
72 - potential: draw new diagrams
73 - philosophical: bridging 'two cultures' (proof checkers and artists/designers/hackers)
75 * 1 THEORETICAL FOUNDATIONS Informal mathematical language is more general, and the reasoning involved may be abductive, inductive, or heuristic. :RAY:
77 Even though a mathematical result and its proof involve strict logic,
78 the process of formulating, motivating proving and explaining go
79 beyond strict formality. (Pierce, Lautman)
81 ** <<1.1>> 1.1 Examples of actual texts (different registers)
83 *** TODO Pull up examples from real texts.
85 - E.g. Artin's Galois theory book
86 - E.g. Gowers's "Eventually this is something a computer can solve"
88 ** <<1.2>> 1.2 A formal language doesn't do anything with this ("Proofs and Prologues")
90 - (Conclusion from inductive reasoning in 1.1.)
94 Since our purpose is to understand mathematical reasoning as practiced
95 by mathematicians, we will begin by studying examples of mathematical
96 texts. We would like to characterize the use of language
97 gramatically and rhetorically, describe the logic and argumentation
98 structures used so as to develop our formalism for representing
99 mathematical knowledge in an informed matter. For the purposes of
100 illustration, we will examine four short texts:
102 - *MPM* :: Mini-polymath thread 11.
104 - *GCP* :: Timothy Gowers - What is the 500th digit of
105 $(\sqrt{2}+\sqrt{3})^{2012}$?
107 - *AGT* :: Section II.H, ``Normal Extensions'' of ``Galois Theory'' by
110 - *HHS* :: Section 22, ``Adjoints'' of ``Introduction to Hilbert Space''
113 One of the first features which leaps to the eye when reading these
114 texts is that much of the text is written in a fashion which employs a
115 precise technical vocabulary, logical idioms, and symbolic notation to
116 state mathematical propositions. We will refer to this as the /formal
117 register/ of mathematical discourse. Here are two typical instances
118 from our sample texts:
120 - If, conversely, $\varphi$ is a bounded linear functional, then
121 there exists a unique operator $A$ such that $\varphi (x,y) = (Ax,
122 y)$ for all $x$ and $y$. (HHS, statement of theorem 1)
124 - The intermediate field $B$ is a normal extension of $F$ if and only
125 if the subgroup $G_B$ is a normal subgroup of $G$. (AGT, statement
128 Semantically, such statements are assumed to be equivalent to symbolic
129 expressions in formal logic (in whatever formal system one is
130 working). For the examples above, the following might be formal
133 &\varphi \in \mathrm{BLF} \Rightarrow (\exists ! A) (\forall x,y)
134 \varphi (x,y) = (Ax,y) \\
135 &\mathrm{norm\_ext} (B, F) \Leftrightarrow \mathrm{norm\_subgp} (G_B,
139 While statements in the formal register are an important part of
140 mathematical writing, a text consisting only of formal statements
141 would be frustrating to read because, while it might contain all the
142 technical information, it would offer no guidance to the reader as to
143 where the statements came from, why they are interesting, and how to
144 go about understanding them.[fn:lamport-reviewer:Lamport \cite[p.~20]{lamport2012write21st} quotes a referee who had read one of his structured proofs (see Section [[2.3][2.3, below]]): "The proofs ... are lengthy, and are presented in a style which I find very tedious. I think the readers ... are going to be more interested in understanding the techniques and how they can apply them, than they will be in reading the formal proofs. A problem with the proofs is that they do not clearly distinguish the trivial manipulations from the nontrivial or surprising parts. ... My feeling is that informal proof sketches ... to explain the crucial ideas in each result would be more appropriate."] To offer this
145 guidance, a mathematical text will also contain expository statements
146 such as the following:
148 + We begin the proper business of this section by showing that the
149 connection between linear transformations and bilinear functionals
150 goes quite deeper than these superficial remarks. (HHS, first
153 + We come now to a theorem known as the /Fundamental Theorem of Galois
154 Theory/ which gives the relation between the structure of a
155 splitting field and its group of automorphisms. (AGT, right before
156 statement of theorem 16)
158 + Is it possible to prove that any point and any line will do? (MPM)
160 + Can we do this for $x+y$? For $e$? Rationals with small denominator?
163 The /expository register/ has several salient features which work
164 together and which distinguish it from the formal register.
166 While the subject matter of expository statements is also mathematical
167 objects and propositions, the language is not only descriptive, but
168 also narrative and argumentative. For instance, the phrases ``we
169 begin'' and ``we come now'' in the first two examples are indicative
170 of a narrative structure; the former serves to introduce and motivate
171 the theory of adjoint operators in terms of a few observations and the
172 latter motivates the theorem by describing its purpose in general
173 terms. The third example is argumentative, asking whether an earlier
174 proposal might be generalizable.
176 Whereas in formal logic, only the strictest deductive reasoning is
177 allowed, mathematical exposition also makes use of inductive and
178 abductive reasoning, and even looser reasoning by analogy. For
179 instance, the fourth example illustrates an inductive mode of
180 reasoning in which the questioner is looking for a general result of
181 which the problem posed would be a special case. In the first
182 example, an analogy is being set up between the remarks which precede
183 that statement and the propositions which follow it.
185 A related point is that, whereas formal statements only make use of
186 the truth values and predicates of formal logic, the expository
187 register also makes use of looser judgements of plausibility and
188 heuristics. For instance, in the first example, the adjectives
189 ``superficial'' and ``deeper'' appear. Terms such as these are not
190 formally definable but refer to approximate notions which inform
193 Allowing such loose notions and non-deductive reasoning serves an
194 important purpose because, quite often, the exact deduction of some
195 result might be lengthy and/or opaque. When that happens, it is
196 helpful to the reader to augment the formal reasoning with informal
197 reasoning which is shorter and easier to understand. Moreover, it
198 not infrequently happens that such informal reasoning can serve to
199 guide the construction of a formal proof, as in GCP and MPM.
201 Finally, the expository register is metamathematical, discussing not
202 only objects and propositions, but also inference and proofs. For
203 instance, the third example asks about the provability of a
204 statement. Furthermore, this is not just strict metamathematics, but
205 also may involve approximate and heuristic elements. In particular,
206 when setting out to prove a theorem, one may first assess different
207 possible proof strategies using heuristic notions such as difficult
208 vesrus easy or by making analogies with techniques used to
209 successfully prove similar results.
211 In this essay, our main focus will be to construct a theory of
212 mathematical exposition which will account for the features noted
213 above and provide a semantics for utterances in the expository
214 register which can be implemented and queried algorithmically. Our
215 focus here will be on the representation and what can be done with it
216 as opposed to parsing natural language. This is a matter of
217 specialization, not of trivializing the latter. We also note that
218 there has been progress by Mohan in parsing the formal register and
219 will later note that there exist natural language parsers for related
220 AI problems in order to suggest that it is plausible that one could
223 ** Urban explorer metaphor
225 As a way of illustrating the formal and expository registers, we offer
226 the following analogy. Instead of mathematical objects and
227 propositions, consider locations and buildings in a city. Instead of
228 inferences, roads and paths and, instead of theoroes, neighborhoods
231 Now consider guides to that city. A basic feature of a guide is
232 description --- ``The exchange building is built of red brick and has
233 a gabled roof''; ``The memorial fountain is made of white marble and
234 has a stream of water coming out of the lion's mouth into an octagonal
235 basin filled with goldfish.'' This corresponds to the formal
236 register. The most utilitarian form of a guidance is a list of
237 directions --- ``Go straight three blocks, turn left, go another two
238 blocks. In the middle of the third block, there will be a building
239 with yellow clapboard siding.'' This kind of statement corresponds to
240 formal mathematical proofs.
242 However, there is much more to city guides than just straightforward
243 descriptions and directions. They may contain value judgements ---
244 ``For a more scenic view, take this detour''; ``To avoid nasty taxi
245 traffic, go under the intersection through the tunnel.'' While a
246 straightforward set of directions might suffice for a business person
247 passing through town, for someone with more leisure a single route or
248 tree-like transportation map may be dissatisfying since that person
249 would like to learn about all the different ways around together with
250 their historical, cultural, and aesthetic associations. A newcomer
251 might appreciate a book which not only says what there is and how to
252 get there, but also provides a higher level guidance as to what are
253 some prominant landmarks and important sites and have things laid out
254 in some order that makes it possible to assimilate information
255 gradually rather than be barraget with everything at once. Three
256 comrades going out for a night together might start out by having a
257 debate on which way to go is the best, weighing different concerns
258 such as travel time versus convenience. This is like the expository
261 Since a city is not a tree \cite{alexander1964city}, any guide to it which lays things out
262 in a straightforward tree-like fashion will necessarily leave things
263 out and be of limited use. Likewise, for math, in order to go beyond
264 the superficial, we will want some more rhizomatic sort of
265 description which enables one to wander along a dérive along quirky
268 * 2 LANGUAGE DESIGN The presentation here will describe a strategy we have been developing for representing mathematical dialogues and other informal texts. :JOE:
270 Bundy has argued that finding the right representation is the key to
271 successful reasoning \cite[p.~16]{Bundy20130194}. Since we cannot
272 simply build on formal theorem proving for our current purposes, we
273 need to look further afield for foundations. We are concerned in
274 particular with building representations \emph{of} reasoning
275 \cite{corneli2017towards}. This helps guide our search for useful
276 paradigms. McCarthy \cite{mccarthy2008well} posited several high-level
277 features of a "language of thought", highlighting in particular the
278 ways in which such a language would not be like spoken language:
281 - Much mental information is represented in parallel and is processed in parallel.
282 - Reference to states of the senses and the body has to be done by something like pointers. Natural languages use descriptions, because one person can’t give another a pointer to his visual cortex. (A robot might tell another robot, “Look through my eyes, and you’ll see it.”)
283 - We don’t think in terms of long sentences.
284 - Much human thought is contiguous with the thought of the animals from which we evolved.
285 - For robots, logic is appropriate, but a robot internal language may also include pointers.
286 - A language of thought must operate on a shorter time scale than speech does. A batter needs to do at least some thinking about a pitched ball, and a fielder often needs to do quite a bit of thinking about where to throw the ball. Pointers to processes while they are operating may be important elements of its sentences.
289 While we won't directly accommodate all of these features, but we can
290 find languages that deal with several of them.
292 ** <<2.1>> 2.1 Inference Anchoring Theory + Content (IATC)
294 Our modelling approach builds on /argumentation theory/; in particular
295 Inference Anchoring Theory (IAT), which was devised by Budzynska et al
296 \cite{budzynska2014model} to model the logical structure of dialogical
297 arguments. IAT has since been adapted to model mathematical arguments
298 \cite{gabi-iatc, corneli2017towards}. The primary features of this
299 adaptation are: (1) to introduce more explicit relationships between
300 pieces of mathematical content; and (2) to describe a range of
301 intermediate relations that model the way these objects fit together
302 in discourse. These include inferential structure, judgements of
303 validity or usefulness, and reasoning tactics. Later in this article
304 we will describe "IAT+Content" in more detail .
306 ** <<2.2>> 2.2 Conceptual Dependence (CD)
308 Conceptual Dependence was initially introduced as a tool for
309 understanding natural language \cite{schank1972conceptual}. However,
310 it is also used to represent knowledge about actions
311 \cite{lytinen1992conceptual,sowa2008conceptual}. The basis of the
312 theory is a set of /primitives/ which describe basic types of actions
313 such as "=PTRANS= — transfer of location" or "=MBUILD= — construction
314 of a thought or new information". Each primitive comes with a set of
315 /slots/ which accept objects of certain types. By filling in the
316 slots of a primitive, one obtains the most elementary form of a
317 /conceptual dependency graph/. By combining such basic graphs, one
318 can build up more complicated CD graphs which describe actions in
319 greater detail. Later, we will show how CD primitives can be seen to
320 be analogous to IAT performatives, and what follows from this.
322 ** <<2.3>> 2.3 Structured proofs
324 Although we are not focusing on formal proofs, at the level of
325 mathematical content we are talking about similar things: mathematical
326 objects and mathematical propositions. Formal mathematics models the
327 same universe of discourse, but the discourse itself is not
328 necessarily formal. We can derive a useful sanity check from
329 Lamport's notion of a ``structured proof'' \cite{lamport1995write}.
330 In essence, a structured proof combine a summary (or ``proof sketch'')
331 with a mode of writing out details so way that each step is made clear
332 and each assumption and assertion is a label. We emphasize that
333 structured proofs are trees. As first introduced, there were just a
334 few keywords: =assume=, =prove=, =let=, and =case=. In a more recent
335 reassessment \cite{lamport2012write21st}, Lamport states "The way I
336 now write proofs has profited by my recent experience designing and
337 using a formal language for machine-checked proofs." In line with
338 this, additional keywords =new=, =suffices=, and =pick= are imported
339 from his "Temporal Logic of Actions+" (TLA$^{+}$) language
340 \cite{lamport1999specifying} (along with a shorthand for equational
341 proofs). More recently, a second version of this language,
342 TLA$^{+2}$, has been made available, with new keywords (and now with
343 lambda expressions) \cite{lamport2014tla2}.[fn:1] Lamport's structured
344 proof is an interesting example of a ``missing link'' between informal
345 and formal mathematics. The TLA\(^+\) language seems in our opinion
346 to be reasonably well aligned with typical mathematical style. The
347 history of its development helps show which features can be considered
348 most essential. We note that in principle it should be possible to
349 coherently map to any formal mathematical language from our content
352 [fn:1] In full, TLA$^{+2}$' keywords are: =action=, =assumption=, =axiom=, =by=, =corollary=, =def=, =define=, =defs=, =have=, =hide=, =lambda=, =lemma=, =new=, =obvious=, =omitted=, =only=, =pick=, =proof=, =proposition=, =prove=, =qed=, =recursive=, =state=, =suffices=, =take=, =temporal=, =use=, =witness=.
354 * 3 IMPLEMENTATION ISSUES (REQUIREMENTS) :JOE:
356 We've already seen an *abstract* model of social creativity in
357 Lakatos, but when we try to zoom in and look at concrete details, we
358 see there are further challenges. We know that a `city is not a tree',
359 let's generalise and assert that a proof dialogue is not a tree. This
360 gives us a guiding principle.
362 ** <<3.1>> 3.1 Let's look at one of our illustrations: it's a graph, no it's a hypergraph!
364 ** <<3.2>> 3.2 Reason as a social thing (Minsky, Sperber & Mercier, Gowers 'quantum of progress' from Polymath)
366 When we introduced argumentation theory we remarked that reasoning is
367 often particularly effective in social settings
368 \cite{mercier2017enigma}. However, even when we are not engaging
369 directly with others, we reason in what are often socially-validated
370 ways. According to David Moshman \cite{moshman2004inference},
371 /inference/, /thinking/, and /reasoning/ are defined like this:
374 - *Inference*---going beyond the data---is elementary and ubiquitous.
375 - *Thinking* is the deliberate application and coordination of one’s inferences to serve one’s purposes
376 - *Reasoning* is epistemically self-constrained thinking [...] with the intent of conforming to what they deem to be appropriate inferential norms.
379 ** <<3.3>> 3.3 Lakatos stuff: How is this different from what we're doing?
381 * 4 APPLICATIONS Our latest efforts produce more detailed models of mathematical arguments. :JOE:
383 We need to model what's there and how it evolves, noting that
384 evolution is heuristic. One example Sussman gives of modelling "`how
385 to' as well as `what is'" \cite{sussman2005programming}, is a LISP
386 program that he wrote with Richard Stallman that can replicate the
387 process of analyzing a circuit \cite{sussman2011programming}. The
388 program explains /why/ it comes up with the answers it does. The "why
389 question" is perhaps even more important (and interesting) when
390 nontrivial ``creativity'' is involved in the reasoning process
391 \cite{gucklesberger2016addressing}.
394 The program could take the wiring diagram of the circuit, calculate
395 the current at some point, and recapitulate the assumptions and rules
396 that led the program to its answer.
399 ** <<4.1>> 4.1 Kinematics (IATC+CD)
400 ** <<4.2>> 4.2 Dynamics (Lytinen's stuff with goals and scripts)
402 * 5 MECHANICAL ENGINEERING DESIGNS A graphical formalism and a corresponding prototype implementation will be described. :RAY:
404 ** <<5.1>> 5.1 Import and improve technical stuff on Arxana (cf. Nemas doc)
405 ** <<5.2>> 5.2 Example
408 * 6 RELATED WORK (GAMES, POETRY): parallels between dialogues and discursive Q&A, traditional proofs. :JOE:
410 How does this look in a broader context?
412 ** <<6.1>> 6.1 prior art: board games, story stuff; table that compares between.
413 ** <<6.2>> 6.2 Alexander: "a city is not a tree"; compare Lamport
417 In order to build a computational theory of the expository register,
418 we will draw upon several well-studied topics in AI which deal with
419 situations that have common features, namely the block world, board
420 games, and story comprehension (Table [[tab:comparison]]).
422 #+CAPTION: Comparison between computation in different domains
423 #+NAME: tab:comparison
424 | /Level/ | *Block World* | *Board Games* | *Story Comprehension* |
425 |-----------------------+-------------------+-----------------------+-----------------------|
426 | universe of discourse | blocks on a table | game pieces on board | everyday life |
427 | reasoning | instructions | rules & strategy | analogy |
428 | value | consistency? | prediction of winning | costs and benefits |
429 | role of disagreement | none | multiple strategies | ethical dilemmas |
434 * 7 PART TWO In our planned next steps we plan to bring in explicit type-theoretic representations of mathematical objects within a service-oriented architecture. :onhold:
436 ** <<7.1>> 7.1 There is a degree of formality in the specifications, but also informality in the heuristics.
438 * 8 MOB PROGRAMMING :onhold:
443 * 9 RELATED WORK music from corneli, pease, stefanou survey ("Chapter 6"); NNexus project; Socratic :onhold:
448 * 10 CONCLUSION :onhold: