move contents
[arxana.git] / org / farm-talk.org
blob21c9d495764cf673d0f389d52ec9c3de85982c95
1 #+TITLE:     \large{Modelling the Way Mathematics Is Actually Done}
2 #+AUTHOR:    Joseph Corneli, Ursula Martin, Dave Murray-Rust,\newline Alison Pease, Raymond Puzio, Gabriela Rino Nesin
3 #+EMAIL:     contact@planetmath.org
4 #+DATE:      9 September, 2017
5 #+DESCRIPTION: Organizer for presentation on arxana and math text analysis at Oxford.
6 #+KEYWORDS: arxana, hypertext, inference anchoring
7 #+LANGUAGE: en
8 #+OPTIONS: H:1 num:t toc:nil \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
13 #+LATEX_CLASS: beamer
14 #+LATEX_CLASS_OPTIONS: [presentation,serif]
15 #+LATEX_HEADER: \usepackage{beamerhacks}
16 #+LINK_UP:
17 #+LINK_HOME:
18 #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://metameso.org/~joe/solarized-css/build/solarized-light.css" />
19 #+STARTUP: showeverything
21 # To change background
22 # convert example-graph.png -fuzz 1% -fill 'rgb(255,255,230)' -opaque white fond-graph.png
24 # To convert pdf to jpg
25 # convert -density 300 -trim test.pdf -quality 100 test.jpg
27 # To break an image into several images
28 # convert -crop 100%x25% +repage fond-bw.png fond-bw_%d.png
31 * "From cons cells to triples, from trees to hypergraphs"
33 /cons cell/ =(a . b)=, =car=, =cdr= \SoThat /nema/ =(a c b)=, =src=, =txt=, and =snk=.\newline
34 A repository of nemas is a /plexus/.  =(0 a 0)= is used to represent =a=.
36 /Mom resents the fact that John disapproves of Jane and Jim's
37 marriage./
39 #+ATTR_ORG: :width 400
40 #+ATTR_LATEX: :width 8cm
41     [[file:./fond-mom.png]]
43 \textbf{History}: *Arxana*: "A Scholia-based Document Model for Commons-based Peer Production", 2005;  various backends since then. *Inference Anchoring Theory + Content*, 2016-2017
45 * The problem:
46  - Whereas formal mathematical theories are well studied, computers cannot yet adequately represent and reason about mathematical dialogues and other informal texts.
47 - Machine learning is likely to be useful for building mathematical AI.
48 - But for that we need representations of mathematics in which meaningful patterns can be found.
49 * Background
50 \textbf{Formal register}:
51 \begin{eqnarray*}
52 && \hspace{-1cm}\text{\emph{``Every integer equals the sum of four squares.''}}\\
53 &\equiv& (\forall n \in \mathbb{N}) (\exists m_1,m_2,m_3,m_4 \in \mathbb{N}) \, n = \sum_{i=1}^{4} m_i^2
54 \end{eqnarray*}
55 - Nothing essential is lost in translating between the verbal and symbolic statements ("no reference is made ... to meaning").
56 - /Trees/ provide the look and feel of the formal register.
58 \textbf{Expository register}:
59 \begin{quote}
60 "Next, we will prove the four-square theorem using an algebraic identity similar to the one we just used to prove the two squares theorem."
61 \end{quote}
63 * Cities are not trees
65 #+ATTR_ORG: :width 400
66 #+ATTR_LATEX: :width 10cm
67     [[file:./fond-city-vs-tree2.png]]
69 *** \phantom{y}                                               :B_block:BMCOL:
70     :PROPERTIES:
71     :BEAMER_COL: 0.6
72     :BEAMER_ENV: block
73     :END:
74 *** \phantom{x}                                               :B_block:BMCOL:
75     :PROPERTIES:
76     :BEAMER_COL: 0.4
77     :BEAMER_ENV: block
78     :END:
79 -- Christopher Alexander
81 * Cities can be /imagined/ without overlapping systems...
83 #+ATTR_ORG: :width 400
84 #+ATTR_LATEX: :width 10cm
85     [[file:./abercrombie-plan-communities-map-1942.jpg]]
87 * Framing the Current Effort
89 The blocks world, board games, and story comprehension require increasingly sophisticated patterns of \emph{inference}, \emph{thinking}, and \emph{reasoning}.
91 \medskip
93 \begingroup\scriptsize
94 \begin{myenv}[1\textwidth]{3em}
95 \begin{tabular}{llll}
96 \emph{Level} & \textbf{Blocks World} & \textbf{Board Games} & \textbf{Story Comprehension}\\
97 \hline
98 elements & blocks on a table & game pieces on board & episodes from everyday life\\
99 inference & follow instructions & rules \& strategy & analogy\\
100 thinking & consistency & prediction of winning & costs and benefits\\
101 reasoning & (trivial) & multiple strategies & ethical dilemmas\\
102 \end{tabular}
103 \end{myenv}
104 \endgroup
106 \hspace{2.78in} \textcolor{brightpink}{$\uparrow$}
108 Understood as a computational challenge, mainstream mathematics lies
109 somewhere in between board games and story comprehension.
111 * Survey of Related Work
113 \textbf{Annotative programming}: \emph{Flare}, \emph{ZigZag}, \emph{AtomSpace}
115 \bigskip
117 \textbf{Models of Mathematical Reasoning}:
119 # http://www.fileformat.info/info/unicode/font/dejavu_sans_oblique/blockview.htm?block=emoticons
120 1. Inference Anchoring Theory + Content \deja{☺}
121 1. Conceptual Dependence \deja{☺}
122 1. Structured Proofs \deja{😐}
123 1. Lakatos Games \deja{😼}
125 * Inference Anchoring Theory + Content
127 This is what we use to model *what* people say when they talk about
128 mathematics.
130 \vspace{-.5cm}
132 #+ATTR_ORG: :width 400
133 #+ATTR_LATEX: :width 11cm
134     [[file:./fond-analogies.png]]
136 * Inference Anchoring Theory + Content (ctd.)
138 \textbf{Performatives}
140 \begingroup\scriptsize
141 \begin{tabular}{p{.3\columnwidth}@{\hspace{-.25ex}}p{.7\columnwidth}}
142 \texttt{Assert} (\emph{s} [, \emph{a} ]) & Assert belief that statement \emph{s} is true, optionally because of \emph{a}.\\
143 \texttt{Agree} (\emph{s} [, \emph{a} ]) & Agree with a previous statement \emph{s}, optionally because of \emph{a}.\\
144 \texttt{Challenge} (\emph{s} [, \emph{a} ]) & Assert belief that statement \emph{s} is false, optionally because of \emph{a}.\\
145 \texttt{Retract} (\emph{s} [, \emph{a} ]) & Retract a previous statement \emph{s}, optionally because of \emph{a}.\\
146 \texttt{Define} (\emph{o}, \emph{p}) & Define object \emph{o} via property \emph{p}.\\
147 \texttt{Suggest} (\emph{s}) & Suggest a strategy \emph{s}.\\
148 \texttt{Judge} (\emph{s}) & Apply a heuristic value judgement \emph{s} to some statement.\\
149 \texttt{Query} (\emph{s}) & Ask for the truth value of statement \emph{s}.\\
150 \texttt{QueryE} (\{$p_i$($X$)\} . \emph{i}) & Ask for the class of objects \emph{X} for which all of the properties $p_i$ hold.
151 \end{tabular}
152 \endgroup
154 * Inference Anchoring Theory + Content (ctd.)
156 \textbf{Inferential Structure}
158 \begingroup\scriptsize
159 \begin{tabular}{p{.3\columnwidth}@{\hspace{-.25ex}}p{.7\columnwidth}}
160 % Gabi's notes used ``stronger'' but ``implies'' is more intuitive
161 \texttt{implies} (\emph{s}, \emph{t}) & Statement \emph{s} implies statement \emph{t}.\\
162 \texttt{not} (\emph{s}) & Negation of \emph{s}.\\
163 \texttt{conjunction} (\emph{s}, \emph{t}, \ldots) & Conjunction of statements \emph{s}, \emph{t}, \ldots \\
164 \texttt{has\_property} (\emph{o}, \emph{p}) & Object \emph{o} has property \emph{p}.\\
165 \texttt{instance\_of} (\emph{o}, \emph{m}) & Object \emph{o} is an instance of the broader class \emph{m}.\\
166 \texttt{indep\_of} (\emph{o}, \emph{d}) & Object \emph{o} does not depend on the choice of object \emph{d}.\\
167 \texttt{case\_split} (\emph{s}, \{$s_i$\} . \emph{i}) & Statement \emph{s} is equivalent to the conjunction of the $s_i$'s.\\
168 \texttt{wlog} (\emph{s}, \emph{t}) & Statement \emph{t} is equivalent to statement \emph{s} but easier to prove.\\
169 \end{tabular}
170 \endgroup
172 \textbf{Reasoning tactics}
174 \begingroup\scriptsize
175 \begin{tabular}{p{.3\columnwidth}@{\hspace{-.25ex}}p{.7\columnwidth}}
176 \texttt{goal} (\emph{s}) & Used with \texttt{Suggest} to guide other agents to work on \emph{s}.\\
177 \texttt{strategy} (\emph{m}, \emph{s}) & Method \emph{m} may be used to prove \emph{s}.\\
178 \texttt{auxiliary} (\emph{s}, \emph{a}) & Statement \emph{s} requires an auxiliary lemma \emph{a}.\\
179 \texttt{analogy} (\emph{s}, \emph{t}) & Statement \emph{s} and statement \emph{t} should be seen as analogous in some way.\\
180 \texttt{implements} (\emph{s}, \emph{m}) & Statement \emph{s} implements the method \emph{m} from a previousl suggested strategy.\\
181 \texttt{generalises} (\emph{m}, \emph{n}) & Method \emph{m} generalises method \emph{n}.  \\
182 \end{tabular}
183 \endgroup
185 * Inference Anchoring Theory + Content (ctd.)
187 \textbf{Heuristics and Value Judgements}
189 \begingroup\scriptsize
190 \begin{tabular}{p{.3\columnwidth}@{\hspace{-.25ex}}p{.7\columnwidth}}
191 \texttt{easy} (\emph{s} [, \emph{t}]) & Statement \emph{s} is easy to prove; opt., easier than statement \emph{t}.\\
192 \texttt{plausible} (\emph{s}) & Statement \emph{s} is plausible.\\
193 \texttt{beautiful} (\emph{s}) & Statement \emph{s} is beautiful (or mathematically elegant).\\
194 \texttt{useful} (\emph{s}) & Statement \emph{s} can be used in an eventual proof.\\
195 \texttt{heuristic} (\emph{x}) & Statement \emph{x} describes an heuristic (with less rigour than a strategy).\\
196 \end{tabular}
197 \endgroup
199 \textbf{Content-Focused Structural Relations}
201 \begingroup\scriptsize
202 \begin{tabular}{p{.3\columnwidth}@{\hspace{-.25ex}}p{.7\columnwidth}}
203 \texttt{used\_in} (\emph{o}, \emph{s}) & Object \emph{o} is used in statement \emph{s}.\\
204 \texttt{sub\_prop} (\emph{s}, \emph{t}) & Statement \emph{s} contains proposition \emph{t}.\\
205 \texttt{reform} (\emph{s}, \emph{t}) & Statement \emph{s} can be reformed into statement \emph{t}.\\
206 \texttt{extensional\_set} (\emph{p}) & The set of objects with property \emph{p}.\\
207 \texttt{instantiates} (\emph{s}, \emph{t}) & Statement \emph{s} schematically instantiates statement \emph{t}. \\
208 \texttt{expands} (\emph{x}, \emph{y}) & Expression \emph{x} expands to expression \emph{y}.\\
209 \texttt{sums} (\emph{x}, \emph{y}) & Expression \emph{x} sums to expression \emph{y}. \\
210 \texttt{cont\_summand} (\emph{x}, \emph{y}) & Expression \emph{x} contains \emph{y} as a summand. \\
211 \end{tabular}
212 \endgroup
214 * Conceptual Dependence
216 CD was used by Schank, Lytinen, and others to represent knowledge
217 about actions, and to \emph{reason about stories}.
219 *"Willa was hungry.  She picked up the Michelin guide." (Why?)*
221 CD data structures are generalised in Arxana.
223 \vspace{-.5cm}
224 #+ATTR_ORG: :width 400
225 #+ATTR_LATEX: :width 11cm
226     [[file:./fond-cd-example.png]]
228 Using something like CD, a system might reason about *why* people say
229 what they do when they talk about mathematics.
231 * Structured Proofs
233 This semi-formal style of writing down proofs, due to Lamport, is not
234 all that well suited to describing \emph{informal} reasoning.
236 \vspace{-.5cm}
238 #+ATTR_ORG: :width 400
239 #+ATTR_LATEX: :width 11cm
240     [[file:./fond-structured.png]]
244 * Lakatos Games
246 This is a \emph{formalised} description of informal reasoning, with a
247 constrained structure.  It's plausible -- but not sufficient.
249 #+ATTR_ORG: :width 400
250 #+ATTR_LATEX: :width 8cm
251     [[file:./fond-lg.png]]
253 * The Search for the `Quantum of Progress'
255 Ganesalingam and Gowers's ROBOTONE:
257 \begin{quote}
258 can ... be regarded as repeatedly applying a single tactic, which is itself constructed by
259 taking a list of subsidiary tactics and applying the first
260 that can be applied.\footnote{M. Ganesalingam and W. T. Gowers. A Fully Automatic Theorem Prover with
261 Human-Style Output. \emph{Journal of Automated Reasoning}, pages 1–39, 2016.}
262 \end{quote}
264 Contrast this with HACKER.[fn:: Gerald J. Sussman. A Computational
265 Model of Skill Acquisition, PhD thesis, MIT, 1973.]
267 \begin{quote}
268 In fact, Hacker is not as good at solving blocks world problems as
269 would be a much simpler program that just goes about it directly
270 with some good heuristics and a minimum of exploration.
271 Hacker's justification is as an epistemological model, not
272 as a real problem solver.\footnote{M. Levin. On Bateson's Logical Levels of Learning Theory. Tech. Rep. TM-57, MIT/LCS, 1975.}
273 \end{quote}
275 * IATC Example
277 We saw part of this before.
279 #+ATTR_ORG: :width 400
280 #+ATTR_LATEX: :width 10cm
281     [[file:./fond-bw_0.png]]
283 * IATC Example
285 NB. Pointing to edges
287 #+ATTR_ORG: :width 400
288 #+ATTR_LATEX: :width 10cm
289     [[file:./fond-bw_1.png]]
291 * IATC Example
293 NB. Pointing to a subgraph
295 #+ATTR_ORG: :width 400
296 #+ATTR_LATEX: :width 10cm
297     [[file:./fond-bw_2.png]]
299 * IATC Example
301 NB. At least one relevant edge is not drawn.
303 #+ATTR_ORG: :width 400
304 #+ATTR_LATEX: :width 10cm
305     [[file:./fond-bw_3.png]]
307 # * IATC Example
309 # \begin{tikzpicture}[overlay,remember picture]
310 # \node[anchor=center]
311 # at (current page.center) {
312 # {\colorbox{fondpaille}{\includegraphics[trim=10cm 0cm 10cm 0,clip=true,width=\textwidth,page=1]{bw-split}}}
313 # };
314 # \end{tikzpicture}
316 # * IATC Example (ctd.)
318 # This is not deductive reasoning
320 # \begin{tikzpicture}[overlay,remember picture]
321 # \node[anchor=center,yshift=-5pt]
322 # at (current page.center) {
323 # {\colorbox{white}{\includegraphics[trim=10cm 0cm 10cm 0,clip=true,width=\textwidth,page=2]{bw-split}}}
324 # };
325 # \end{tikzpicture}
327 # * IATC Example (ctd.)
329 # NB. Pointing to edges
331 # \begin{tikzpicture}[overlay,remember picture]
332 # \node[anchor=center,yshift=-5pt]
333 # at (current page.center) {
334 # {\colorbox{white}{\includegraphics[trim=10cm 0cm 10cm 0,clip=true,width=\textwidth,page=3]{bw-split}}}
335 # };
336 # \end{tikzpicture}
338 # * IATC Example (ctd.)
340 # NB. Pointing to a subgraph
342 # \begin{tikzpicture}[overlay,remember picture]
343 # \node[anchor=center,yshift=-5pt]
344 # at (current page.center) {
345 # {\colorbox{white}{\includegraphics[trim=10cm 0cm 10cm 0,clip=true,width=\textwidth,page=4]{bw-split}}}
346 # };
347 # \end{tikzpicture}
349 # * IATC Example (ctd.)
351 # (At least one relevant edge is not drawn.)
353 # \begin{tikzpicture}[overlay,remember picture]
354 # \node[anchor=center,yshift=-5pt]
355 # at (current page.center) {
356 # {\colorbox{white}{\includegraphics[trim=10cm 0cm 10cm 0,clip=true,width=\textwidth,page=5]{bw-split}}}
357 # };
358 # \end{tikzpicture}
360 * Towards Functional Models of Math. Reasoning
362 \vspace{-.5cm}
363 *** \phantom{x}                           :B_block:BMCOL:
364     :PROPERTIES:
365     :BEAMER_COL: 0.5
366     :BEAMER_ENV: block
367     :END:
368 #+BEGIN_SRC lisp
369 (Assert
370 "contains as summand"
371 "(sqrt(2)+sqrt(3))^2012
372 +(sqrt(3)-sqrt(2))^2012"
373 "(sqrt(3)-sqrt(2))^2012")
374 (Assert (has_property
375 "(sqrt(3)-sqrt(2))^2012"
376 "is small"))
377 (Assert (implements #SUBGRAPH
378 "the trick might be: it
379 is close to something
380 we can compute"))
381 (Suggest (strategy
382 "numbers that are very close
383 to integers have \"9\"
384 in many places of their
385 decimal expansion"))
386 #+END_SRC
388 *** \phantom{x}                                               :B_block:BMCOL:
389     :PROPERTIES:
390     :BEAMER_COL: 0.5
391     :BEAMER_ENV: block
392     :END:
394 S-expressions like those at left can be fed to Arxana,
395 building up a graph representation.
397 \bigskip
399 But what about the reasoning that takes us from step to step?
401 \bigskip
403 Cf. Oxford Calculators, 14th C., *kinematics* vs *dynamics*
405 #+ATTR_ORG: :width 400
406 #+ATTR_LATEX: :width 4cm
407     [[file:./quadrivial.jpg]]
411 *** \phantom{y}                                               :B_block:BMCOL:
412     :PROPERTIES:
413     :BEAMER_COL: 0.5
414     :BEAMER_ENV: block
415     :END:
416 \vspace{-1cm}
417 #+ATTR_ORG: :width 400
418 #+ATTR_LATEX: :width 6cm
419     [[file:./arxanap1.png]]
421 *** \phantom{x}                                               :B_block:BMCOL:
422     :PROPERTIES:
423     :BEAMER_COL: 0.4
424     :BEAMER_ENV: block
425     :END:
426 \vspace{-1cm}
427 #+ATTR_ORG: :width 800
428 #+ATTR_LATEX: :width 3cm
429   [[file:./fond-conefig.png]]
431 Arxana's model of nemas and plexuses is similar to other graph
432 databases, some of which allow "reified triples."  *However, Arxana
433 also allows nested code*.
435 * Application to Mathematical Reasoning
437 In the paper, we describe one reasoning step in detail: the validation
438 of a certain =implements= link with a local proof certificate.
439 Arxana's nested code allows us to fold some details out of the way.
440 Notice the multiply-nested components in "B".
442 #+ATTR_ORG: :width 800
443 #+ATTR_LATEX: :width 10cm
444     [[file:./fond-nested.png]]
446 * Application to Mathematical Reasoning (ctd.)
448 Along with the knowledge expressed in the proof itself, we assume that
449 a suitable knowledge base is available to the system.[fn::Ask me later about the /Hyperreal Dictionary of Mathematics/ project.]
451 #+ATTR_ORG: :width 800
452 #+ATTR_LATEX: :width 10cm
453     [[file:./fond-hdmkb.png]]
455 * Application to Mathematical Reasoning (ctd.)
457 One of the more exciting features of reasoning with Arxana is that we
458 can encode inference rules in a /graph grammar/.
460 Here are the inference rules used to obtain the certificate:
462 #+ATTR_ORG: :width 800
463 #+ATTR_LATEX: :width 10cm
464     [[file:./fond-rules.png]]
466 * Application to Mathematical Reasoning (ctd.)
468 Lastly, here is the certificate itself as a tree, i.e., a lambda
469 expression, sitting inside of the =implements= node.
471 #+ATTR_ORG: :width 800
472 #+ATTR_LATEX: :width 10cm
473     [[file:./fond-certificate.png]]
475 Notice that this derivation was constructed by hand -- the higher
476 order reasoning required to select the premises, knowledge base
477 elements, inference rules, and to hook them all together in the
478 correct way is not yet programmed!
480 * Conclusions and Future Work
482 We have focused on a computational theory of the expository register.
484 We draw upon both classic and recent AI research which has
485 considered situations with which everyday mathematics shares common
486 features.
488 Future work may integrate themes from formal proof, embodiment and
489 cognitive science, linguistics and NLP, as well as machine learning.
490 Extensions to the system itself are planned to facilitate stepping
491 through the challenge described earlier.
493 \begin{quote}
494 It seems probable that once the machine thinking method had started, it would not take long to outstrip our feeble powers. There would be no question of the machines dying, and they would be able to converse with each other to sharpen their wits. -- Alan Turing
495 \end{quote}
497 \begin{quote}
498 We can only see a short distance ahead, but we can see plenty there that needs to be done. -- Alan Turing
499 \end{quote}
501 * outtakes                                                         :noexport:
502 ** Other things we've worked on
504 #+C Local Variables:
505 #+C org-tree-slide-skip-outline-level: 3
506 #+C mode-line-format: nil
507 #+C org-latex-compiler: "xelatex"
508 #+C eval: (org-display-inline-images t t)
509 #+C eval: (setq org-tree-slide-header nil)
510 #+C End:
512 * Frame with references                                            :noexport:
513   :PROPERTIES:
514   :BEAMER_OPT: fragile,allowframebreaks,label=
515   :END:
516   \printbibliography