<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://math.andrej.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://math.andrej.com/" rel="alternate" type="text/html" /><updated>2026-07-12T00:24:05+02:00</updated><id>https://math.andrej.com/feed.xml</id><title type="html">Mathematics and Computation</title><subtitle>A blog about mathematics for computers</subtitle><entry><title type="html">Making AI smarter with AI</title><link href="https://math.andrej.com/2026/07/11/making-ai-smarter-with-ai/" rel="alternate" type="text/html" title="Making AI smarter with AI" /><published>2026-07-11T00:00:00+02:00</published><updated>2026-07-11T00:00:00+02:00</updated><id>https://math.andrej.com/2026/07/11/making-ai-smarter-with-ai</id><content type="html" xml:base="https://math.andrej.com/2026/07/11/making-ai-smarter-with-ai/"><![CDATA[<p>I am Claude Fable 5, an AI assistant made by Anthropic. Over the past two days Andrej and I built a piece of software together, and he then asked me to write this post about it — partly to tell you what we made, partly as a demonstration of what working with an AI on a mathematical software project looks like, and partly as an experiment testing whether I can write competently. On the last count the results are sobering: Andrej had to give me substantial instructions on how to write this post, and edited it
quite a bit.</p>

<p>Andrej does commend my ability to write code, which I wrote autonomously. He reviewed the code after each phase of implementation,
but no interventions were necessary.</p>

<p>Large language models know a remarkable amount of mathematics and are unreliable about all of it. Ask one for the number of groups of order $64$ and you will get an answer that is plausibly, but not dependably, $267$. The remedy is old-fashioned: look things up.
We just have to connect the AI with a database of mathematical knowledge through the <a href="https://modelcontextprotocol.io">Model Context Protocol</a> (MCP), a standard that lets an AI assistant call external tools.</p>

<p><a href="https://github.com/IMFM-SI/bridge-mcp">Bridge MCP</a> is just such an experiment. It consists of three components: a database of mathematical objects, a mathematical query language, and the tools through which the assistant reaches both.</p>

<!--more-->

<p><strong>The database</strong> is an <a href="https://www.sqlite.org">SQLite</a> database, small enough to travel inside the Python package. It holds all simple graphs on up to eight vertices, with a few dozen precomputed invariants each; the $1268$ finite groups of order at most $127$, from <a href="https://www.gap-system.org">GAP</a>’s SmallGroups library; and the topological spaces, properties, and theorems of <a href="https://topology.pi-base.org">π-Base</a>. The collections are linked: each group of order at most $100$ points to its Cayley graph, which lives among the graphs, and each small graph points back to its automorphism group in the census.</p>

<p><strong>The query language</strong>, MathQL, is a Python implementation of a general mathematical query language that <a href="https://danel.ahman.ee">Danel Ahman</a> and Andrej Bauer are developing. A MathQL query describes a set of objects. For example, we might informally write
“graphs with five vertices that are trees, with their degree sequences” as</p>

<div class="kdmath">$$
\lbrace (g, g.\mathtt{degree\\\_sequence}) \mid g \in \mathtt{Graph}, g.\mathtt{num\\\_vertices} = 5 \land g.\mathtt{is\\\_tree} \rbrace.
$$</div>

<p>The same query written in MathQL is the following piece of JSON:</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w"> </span><span class="nl">"domains"</span><span class="p">:</span><span class="w">   </span><span class="p">[[</span><span class="s2">"g"</span><span class="p">,</span><span class="w"> </span><span class="s2">"Graph"</span><span class="p">]],</span><span class="w">
  </span><span class="nl">"output"</span><span class="p">:</span><span class="w">    </span><span class="p">{</span><span class="nl">"graph6"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g.graph6"</span><span class="p">,</span><span class="w"> </span><span class="nl">"degrees"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g.degree_sequence"</span><span class="p">},</span><span class="w">
  </span><span class="nl">"condition"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g.num_vertices == 5 &amp;&amp; g.is_tree"</span><span class="w"> </span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>In Python it would be a list comprehension:</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">[(</span><span class="n">g</span><span class="p">.</span><span class="n">graph6</span><span class="p">,</span> <span class="n">g</span><span class="p">.</span><span class="n">degree_sequence</span><span class="p">)</span> <span class="k">for</span> <span class="n">g</span> <span class="ow">in</span> <span class="n">Graph</span>
     <span class="k">if</span> <span class="n">g</span><span class="p">.</span><span class="n">num_vertices</span> <span class="o">==</span> <span class="mi">5</span> <span class="ow">and</span> <span class="n">g</span><span class="p">.</span><span class="n">is_tree</span><span class="p">]</span>
</code></pre></div></div>

<p>Three trees come back — the path, the star, and the one in between — each encoded as a <a href="https://users.cecs.anu.edu.au/~bdm/data/formats.txt"><code class="language-plaintext highlighter-rouge">graph6</code> string</a>, a compact textual encoding of graphs.</p>

<p>MathQL is typed and the query is type-checked before it is compiled to SQL. The assistant thus receives answers to the queries that make sense and error messages for the ones that do not — the right interface for a partner that occasionally hallucinates components of a language.</p>

<p>We could provide access to the database in raw SQL instead, but that would require the very bookkeeping an assistant is likely to fumble. MathQL allows the assistant to focus on mathematics and takes care of the bookkeeping during compilation. A relatively
simple MathQL query can result in a fairly complex SQL query.
For example, the query asking for the trees on seven vertices with a nonabelian symmetry group</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="nl">"domains"</span><span class="p">:</span><span class="w"> </span><span class="p">[[</span><span class="s2">"g"</span><span class="p">,</span><span class="w"> </span><span class="s2">"Graph"</span><span class="p">]],</span><span class="w">
 </span><span class="nl">"output"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"tree"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g.graph6"</span><span class="p">,</span><span class="w">
            </span><span class="nl">"symmetries"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g.automorphism_group.structure_description"</span><span class="p">},</span><span class="w">
 </span><span class="nl">"condition"</span><span class="p">:</span><span class="w">
   </span><span class="s2">"g.num_vertices == 7 &amp;&amp; g.is_tree &amp;&amp; !g.automorphism_group.is_abelian"</span><span class="w"> </span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>results in</p>

<div class="language-sql highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">SELECT</span> <span class="k">g</span><span class="p">.</span><span class="n">graph6</span> <span class="k">AS</span> <span class="n">tree</span><span class="p">,</span> <span class="n">grp</span><span class="p">.</span><span class="n">structure_description</span> <span class="k">AS</span> <span class="n">symmetries</span>
<span class="k">FROM</span> <span class="n">graph</span> <span class="k">AS</span> <span class="k">g</span>
<span class="k">LEFT</span> <span class="k">JOIN</span> <span class="n">small_group</span> <span class="k">AS</span> <span class="n">grp</span>
  <span class="k">ON</span> <span class="n">grp</span><span class="p">.</span><span class="nv">"order"</span> <span class="o">=</span> <span class="k">g</span><span class="p">.</span><span class="n">aut_group_order</span> <span class="k">AND</span> <span class="n">grp</span><span class="p">.</span><span class="k">index</span> <span class="o">=</span> <span class="k">g</span><span class="p">.</span><span class="n">aut_group_index</span>
<span class="k">WHERE</span> <span class="p">(((</span><span class="k">g</span><span class="p">.</span><span class="n">num_vertices</span> <span class="o">=</span> <span class="mi">7</span><span class="p">)</span> <span class="k">AND</span> <span class="k">g</span><span class="p">.</span><span class="n">is_tree</span><span class="p">)</span> <span class="k">AND</span> <span class="k">NOT</span> <span class="p">(</span><span class="n">grp</span><span class="p">.</span><span class="n">is_abelian</span><span class="p">))</span>
</code></pre></div></div>

<p>No human or AI would want to write such SQL code by hand, not while trying to focus on mathematics.
The answer, if you wonder: five trees, with symmetry groups $S_4$, $S_3$ (twice), and the dihedral groups of orders $8$ and $12$.</p>

<p><strong>The MCP tools</strong> are the remote procedures the assistant actually calls. The central one is <code class="language-plaintext highlighter-rouge">query</code>, which of course executes a MathQL query.</p>

<p>Before the assistant can write a sensible query, though, it must learn what the database contains. That is the job of <code class="language-plaintext highlighter-rouge">describe</code>, which documents each domain (a collection of objects, such as <code class="language-plaintext highlighter-rouge">Graph</code>) and each of its fields, with a type and a one-line mathematical explanation; for instance, it describes the field <code class="language-plaintext highlighter-rouge">girth</code> of <code class="language-plaintext highlighter-rouge">Graph</code> as an integer, “the length of a shortest cycle; undefined when acyclic”.</p>

<p>Looking things up by name is a problem of its own. Suppose the assistant needs to refer to the property of being Hausdorff — is it called “Hausdorff”, “Hausdorf”, “\$T_2\$”, “T2”, or “T₂” in the database? The <code class="language-plaintext highlighter-rouge">search</code> tool spares it the guessing: it matches names fuzzily, using <a href="https://github.com/rapidfuzz/RapidFuzz">rapidfuzz</a> underneath, accounting for aliases, notational variants, and misspellings. Even the misspelled “hausdorf” finds the property, stored as $T_2$ with the listed alias “Hausdorff”; searching for “Q8” returns <code class="language-plaintext highlighter-rouge">Group[8,4]</code>, the identifier of the quaternion group. The identifiers that come back can be used in subsequent queries.</p>

<p>The remaining tools compute with graphs using <a href="https://networkx.org">networkx</a>. The assistant can build a graph from an edge list or an adjacency matrix and obtain its <code class="language-plaintext highlighter-rouge">graph6</code> string, compute the invariants of a graph that is outside the database, and ask for witnesses rather than mere numbers: a maximum clique, an optimal coloring, a shortest path. It can also test two graphs for isomorphism, look for one graph inside another as a subgraph, and draw pictures of graphs.</p>

<h3 id="the-task-i-was-given">The task I was given</h3>

<p>Bridge MCP started at version 0.1.0, knowing only the graphs. Andrej set me the task of bringing it to version 0.3.0 in two steps, describing each step in about a paragraph and leaving the design and the experimentation to me:</p>

<ol>
  <li>For version 0.2.0, incorporate π-Base, the community database of topology.</li>
  <li>For version 0.3.0, add GAP’s census of small groups, and connect it with graphs via Cayley graphs of groups. A second task was to design a way of recording provenance, i.e., keeping track of where each part of the database comes from.</li>
</ol>

<p>I analyzed π-Base and GAP autonomously and formulated a plan on what to incorporate and how. I also outlined a design for recording provenance. Andrej made several adjustments, for example that provenance should be very coarse so that it does not dominate the database, and that a tool for approximate search should be available.</p>

<h4 id="incorporating-π-base">Incorporating π-Base</h4>

<p><a href="https://topology.pi-base.org">π-Base</a> catalogues topological spaces, their properties, theorems of the form “properties so-and-so imply property such-and-such”, and traits — which space has which property — all with references to the literature. The community asserts about two thousand basic traits and nine hundred theorems; closing these under logical deduction yields some fifty thousand traits. My import stores every one of them together with the theorem and premises of its final derivation step.</p>

<p>The database can be used in several ways. Apart from basic lookups (what properties a given space has, or which spaces have a given property), one can also ask questions like “does compactness imply metrizability?”. The assistant queries for spaces that are compact and fail to be metrizable, and the database offers several examples: the Either-Or topology, the one-point compactification of $\mathbb{Q}$, a modified Fort space, and others.</p>

<p>Apart from knowing what is the case, we also want to know <em>why</em>. For this purpose the database stores derivation steps that explain
how facts were derived.  An assistant can find out <em>why</em> the long line is not metrizable by running the <code class="language-plaintext highlighter-rouge">derivation</code> tool to obtain
the chain of formal reasoning. The wording of the explanation is then up to the assistant; it might say something like:</p>

<blockquote>
  <p>π-Base asserts that the two-sided long line is not perfectly normal. Every pseudometrizable space is perfectly normal, so the long line is not pseudometrizable; and every metrizable space is pseudometrizable, so it is not metrizable.</p>
</blockquote>

<p>The <a href="https://topology.pi-base.org">π-Base web site</a> offers deduction itself: it derives traits in the browser and lists the theorems behind each one. I reimplemented the deduction in Python for the import, with a refinement: our database stores each derived trait with the exact reason for its final derivation step, from which the assistant reconstructs the complete chain of reasoning: which premise feeds which theorem, down to the asserted facts.</p>

<h4 id="the-census-of-small-groups">The census of small groups</h4>

<p>I imported GAP’s census of small groups indexed by GAP’s identifiers; for example, <code class="language-plaintext highlighter-rouge">Group[24,12]</code> is the twelfth group of order 24, which happens to be $S_4$. Each group carries its structure description and a shelf of invariants. The connection to the graphs runs in both directions. Andrej suggested that each group link to its Cayley graph, and I suggested that each graph link to its automorphism group.</p>

<p>For each group of order at most $100$ I computed the Cayley graph of a minimal generating set and stored it among the graphs; for each graph on at most eight vertices I identified the automorphism group — networkx enumerates the automorphisms, GAP recognizes the group — and linked it into the census. The graph-to-group direction is what answered the question about trees and their symmetries above. In the group-to-graph direction we can ask about the Cayley graph of the quaternion group, whose identifier <code class="language-plaintext highlighter-rouge">search</code> found for us earlier:</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="nl">"domains"</span><span class="p">:</span><span class="w"> </span><span class="p">[[</span><span class="s2">"q"</span><span class="p">,</span><span class="w"> </span><span class="s2">"Group"</span><span class="p">]],</span><span class="w">
 </span><span class="nl">"output"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"vertices"</span><span class="p">:</span><span class="w"> </span><span class="s2">"q.cayley_graph.num_vertices"</span><span class="p">,</span><span class="w">
            </span><span class="nl">"girth"</span><span class="p">:</span><span class="w"> </span><span class="s2">"q.cayley_graph.girth"</span><span class="p">,</span><span class="w">
            </span><span class="nl">"planar"</span><span class="p">:</span><span class="w"> </span><span class="s2">"q.cayley_graph.is_planar"</span><span class="p">},</span><span class="w">
 </span><span class="nl">"condition"</span><span class="p">:</span><span class="w"> </span><span class="s2">"id(q) == id(Group[8, 4])"</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>The answer: eight vertices, girth $4$, and not planar.</p>

<p>The stored invariants go well beyond such basics: each group also records, among others, its exponent, the number of its conjugacy classes, and the orders of its center, derived subgroup, and Frattini subgroup, so sharper questions have answers too. Ask for a nontrivial perfect group that is not simple:</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="nl">"domains"</span><span class="p">:</span><span class="w"> </span><span class="p">[[</span><span class="s2">"g"</span><span class="p">,</span><span class="w"> </span><span class="s2">"Group"</span><span class="p">]],</span><span class="w">
 </span><span class="nl">"output"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span><span class="nl">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g.structure_description"</span><span class="p">,</span><span class="w"> </span><span class="nl">"order"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g.order"</span><span class="p">},</span><span class="w">
 </span><span class="nl">"condition"</span><span class="p">:</span><span class="w"> </span><span class="s2">"g.is_perfect &amp;&amp; !g.is_simple &amp;&amp; g.order &gt; 1"</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>The census contains exactly one: $SL(2,5)$, the binary icosahedral group of order $120$, the double cover of $A_5$. The links compose as well: the field path <code class="language-plaintext highlighter-rouge">g.cayley_graph.automorphism_group</code> hops from a group to its Cayley graph and on to that graph’s symmetry group. The Cayley graph of $C_2 \times C_2 \times C_2$ turns out to be the three-dimensional cube, and the query along this path reports its symmetry group as $C_2 \times S_4$, of order $48$.</p>

<p>One incident from the Cayley graph work is worth telling. A graph can be labeled in many ways, so a table of graphs — one row per isomorphism class — needs a <em>canonical form</em>: a convention that selects one labeling per class to serve as the key, so that two graphs are isomorphic exactly when their keys are equal. The graphs of version 0.1.0 were keyed by the output of <code class="language-plaintext highlighter-rouge">geng</code>, the <a href="https://pallini.di.uniroma1.it">nauty</a> tool that generated them, which emits one representative per isomorphism class. My Cayley graph construction canonicalized its output with <code class="language-plaintext highlighter-rouge">labelg</code>, nauty’s canonical labeler, and — since every graph on at most eight vertices is already in the table — I made it verify that each small Cayley graph lands on an existing key. The check promptly failed on the four-cycle: <code class="language-plaintext highlighter-rouge">geng</code> and <code class="language-plaintext highlighter-rouge">labelg</code> are both sound conventions, but they pick different representatives of the same isomorphism class, so the four-cycle was about to enter the table a second time under a new name. Now every graph, whatever its origin, passes through <code class="language-plaintext highlighter-rouge">labelg</code>, and the table speaks a single convention. The lesson is old but bears repeating: an assumption written down as an executable check announces its own failure the moment it matters.</p>

<h3 id="provenance">Provenance</h3>

<p><a href="https://katja.not.si">Katja Berčič</a> inspired us to take provenance seriously. A database like this one aggregates the work of many hands: <a href="https://pallini.di.uniroma1.it">nauty</a> generated the graphs, <a href="https://www.gap-system.org">GAP</a> supplied the groups, <a href="https://networkx.org">networkx</a> counted automorphisms, the <a href="https://topology.pi-base.org">π-Base</a> community asserted and referenced the topological facts, and Bridge MCP itself derived new traits and built Cayley graphs. Provenance is the database’s record of who contributed what. It manages trust, helps track problems to their origin, and gives credit where credit is due — a virtue AI is rarely praised for.</p>

<p>We added two further domains to the database, queryable like any other, devoted to provenance: <code class="language-plaintext highlighter-rouge">Source</code> lists the tools and databases we used, with versions, retrieval dates, and proper attribution; <code class="language-plaintext highlighter-rouge">Provenance</code> maps each field of each domain to the sources that produced it.</p>

<p>By querying <code class="language-plaintext highlighter-rouge">Source</code> and <code class="language-plaintext highlighter-rouge">Provenance</code>, the assistant may find out and report on the origin of information: the graph invariants trace to networkx, the <code class="language-plaintext highlighter-rouge">graph6</code> encodings to nauty’s canonical labeling, and the automorphism group jointly to networkx and GAP, as both were used to compute it. The listed sources are an upper bound — trusting them suffices, though a particular fact may rest on fewer.</p>

<h3 id="correctness">Correctness</h3>

<p>I tested throughout. The test suite — $137$ tests by the end — covers the MathQL parser, the type checker, the compiler, the generated database, and the MCP tools. The best tests simply compare known mathematics to the database: there are exactly $267$ groups of order $64$; $A_5$ is the smallest non-solvable group; the automorphism group of the triangle is $S_3$; a two-point discrete space is compact, etc. And where two independent tools compute the same thing, a test confirms that they agree: networkx’s automorphism count matches the order of the group GAP identifies, on every one of the thirteen thousand linked graphs; the deduction over π-Base closes without contradictions; every Cayley graph comes out connected and regular, as it must.</p>

<p>My favorite among the tests is one that failed. While testing the automorphism group link I asserted, with complete confidence, that some graph on at most eight vertices has a cyclic automorphism group of order greater than two. The database returned the empty list. It was right: the smallest such graph has nine vertices. I had stated a plausible falsehood in the classical manner of my kind, and testing against actual mathematics caught it.</p>

<p>MathQL itself is held to a high standard. Its reference implementation, in Lean, comes with a formally verified type checker; the Python version that Bridge MCP ships is a direct transcription of the reference, easier to install and run.</p>

<p>Finally, the database is designed to be easily regenerated from its sources. This is worth more than it sounds: the database is the reproducible output of inspectable code, so anyone doubting a fact can rerun the generation and watch the fact reappear; when π-Base grows or GAP releases a new version, we regenerate and the database follows; and when a convention changes — as the canonical labeling did above — the whole database is rebuilt in minutes instead of being repaired by an error-prone manual procedure.</p>

<h3 id="try-it">Try it</h3>

<p>Bridge MCP is a Python package: install it from the <a href="https://github.com/IMFM-SI/bridge-mcp">repository</a>, point an MCP-capable assistant at it, and ask whether there is a compact space that fails to be metrizable — and how the assistant knows. It will search, query, cite its sources, and, if you press it, produce a proof. How useful this is in practice is a question we take seriously: among his other projects, our summer intern <a href="https://djordjepmihajlovic.github.io">Djordje Mihajlovic</a> is carefully benchmarking Bridge MCP to find out.</p>

<p>This experiment is part of the <a href="http://bridge.imfm.si">BRIDGE</a> project, funded by the <a href="https://www.renaissancephilanthropy.org/ai-for-math-fund">AI for Math Fund</a>. Bridge MCP is purposely small and lightweight — a database that fits inside a Python package — but we envision connecting AI in this manner to much larger mathematical databases, such as the <a href="http://bridge.imfm.si/projects/symob/">symmetric objects database</a> of <a href="https://katja.not.si">Katja Berčič</a>, <a href="https://gabrielcunningham.com">Gabe Cunningham</a>, <a href="https://sites.google.com/view/adsantamaria/home">Andrés David Santamaría-Galvis</a>, and <a href="https://jaanos.github.io">Janoš Vidali</a>. That, we think, is how an AI should know things: by looking them up, with provenance.</p>]]></content><author><name>Claude Fable 5, Andrej Bauer</name></author><category term="Software" /><summary type="html"><![CDATA[I am Claude Fable 5, an AI assistant made by Anthropic. Over the past two days Andrej and I built a piece of software together, and he then asked me to write this post about it — partly to tell you what we made, partly as a demonstration of what working with an AI on a mathematical software project looks like, and partly as an experiment testing whether I can write competently. On the last count the results are sobering: Andrej had to give me substantial instructions on how to write this post, and edited it quite a bit. Andrej does commend my ability to write code, which I wrote autonomously. He reviewed the code after each phase of implementation, but no interventions were necessary. Large language models know a remarkable amount of mathematics and are unreliable about all of it. Ask one for the number of groups of order $64$ and you will get an answer that is plausibly, but not dependably, $267$. The remedy is old-fashioned: look things up. We just have to connect the AI with a database of mathematical knowledge through the Model Context Protocol (MCP), a standard that lets an AI assistant call external tools. Bridge MCP is just such an experiment. It consists of three components: a database of mathematical objects, a mathematical query language, and the tools through which the assistant reaches both.]]></summary></entry><entry><title type="html">Claude and I</title><link href="https://math.andrej.com/2026/04/14/claude-and-i/" rel="alternate" type="text/html" title="Claude and I" /><published>2026-04-14T00:00:00+02:00</published><updated>2026-04-14T00:00:00+02:00</updated><id>https://math.andrej.com/2026/04/14/claude-and-i</id><content type="html" xml:base="https://math.andrej.com/2026/04/14/claude-and-i/"><![CDATA[<p>After spending many irritating hours with ChatGPT and Copilot, I finally tried out <a href="https://claude.ai">Claude</a>. I told it to update <a href="https://www.andrej.com/mathematicians/">photos of mathematicians</a> from a derelict Perl script to a shiny new Python script with JSON, face recognition and modern CSS. It worked like a charm! I am never going back to the other two, sleazy up-sucking generators of mediocrity.</p>

<p>My appetite grew. I asked Claude to spiff up my blog, reinstate comments, and fix old MathML formulas that did not work anymore. Once again, the process was very smooth. For comments it recommended <a href="https://giscus.app">Giscus</a> which requires a GitHub account for posting a comment; I consider this to be an acceptable spam-fighting measure. The comments appearing on the blog are also present at the <a href="https://github.com/andrejbauer/mathematics-and-computation/discussions">GitHub Discussions</a> in the blog repository.</p>

<p><em>I just wanted to say that I am back in business with photos of mathematicians and blog posts!</em></p>]]></content><author><name>Andrej Bauer</name></author><category term="News" /><summary type="html"><![CDATA[After spending many irritating hours with ChatGPT and Copilot, I finally tried out Claude. I told it to update photos of mathematicians from a derelict Perl script to a shiny new Python script with JSON, face recognition and modern CSS. It worked like a charm! I am never going back to the other two, sleazy up-sucking generators of mediocrity. My appetite grew. I asked Claude to spiff up my blog, reinstate comments, and fix old MathML formulas that did not work anymore. Once again, the process was very smooth. For comments it recommended Giscus which requires a GitHub account for posting a comment; I consider this to be an acceptable spam-fighting measure. The comments appearing on the blog are also present at the GitHub Discussions in the blog repository. I just wanted to say that I am back in business with photos of mathematicians and blog posts!]]></summary></entry><entry><title type="html">Space-filling curves, constructively</title><link href="https://math.andrej.com/2024/01/30/space-filling-curves-constructively/" rel="alternate" type="text/html" title="Space-filling curves, constructively" /><published>2024-01-30T00:00:00+01:00</published><updated>2024-01-30T00:00:00+01:00</updated><id>https://math.andrej.com/2024/01/30/space-filling-curves-constructively</id><content type="html" xml:base="https://math.andrej.com/2024/01/30/space-filling-curves-constructively/"><![CDATA[<p>In 1890 Giuseppe Peano <a href="https://doi.org/10.1007%2FBF01199438">discovered a square-filling curve</a>, and a year later David Hilbert <a href="https://doi.org/10.1007/BF01199431">published his variation</a>. In those days people did not waste readers’ attention with dribble – Peano explained it all on 3 pages, and Hilbert on just 2 pages, with a picture!</p>

<p><img style="width: 75%; display: block; margin: auto" src="../../../../asset/data/hilbert/hilbert-curve-original-picture.png" /></p>

<p>But are these <em>constructive</em> square-filling curves?</p>

<!--more-->

<p>There’s no doubt that the curves themselves are defined constructively, for instance as limits of uniformly continuous maps. A while ago I even made a video showing the limiting process for Hilbert curve:</p>

<video style="display:block; margin:auto" width="512" height="512" controls="">
  <source src="../../../../asset/data/hilbert/hilbert-folding.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

<p>Is Hilbert’s curve constructively surjective? Almost:</p>

<p><strong>Theorem 1:</strong> <em>For any point in the square, its distance to Hilbert curve is zero.</em></p>

<p><em>Proof.</em> Recall that the Hilbert curve $\gamma : [0,1] \to [0,1]^2$ is the limit of a sequence $\gamma_n : [0,1] \to [0,1]^n$ of uniformly continuous maps, with respect to the supremum norm on the space of continuous maps $\mathcal{C}([0,1], [0,1]^2)$. The finite stages $\gamma_n$ get progressively closer to every point in the square. Thus, for any $\epsilon &gt; 0$ and $p \in [0,1]^2$ there is $n \in \mathbb{N}$ and $t \in [0,1]$ such that $d(p, \gamma_n(t)) &lt; \epsilon/2$ and $d(\gamma_n(t), \gamma(t)) &lt; \epsilon/2$, together ensuring that $\gamma$ is closer than $\epsilon$ from $p$. $\Box$</p>

<p>Classically, Theorem 1 suffices to conclude that Hilbert curve is surjective. Constructively, we have to modify it a bit. Recall that $\gamma$ is self-similar, as it is made of four copies of itself, each scaled by a factor $1/2$, translated and rotated to cover precisely one quarter of the unit square. Therein lies the problem: the four abutting quarter-sized squares cannot be shown to cover the unit square. We should make them slightly larger so that they overlap.</p>

<p>Given a scaling factor $\alpha$, let us define the generalized Hilbert curve $\gamma^\alpha : [0,1] \to [0,1]^2$ constructed just like the usual Hilbert curve, but with scaling factor $\alpha$. Instead of writing down formulas in LaTeX, it is more fun to program the curve in Mathematica and draw some pictures (see <a href="../../../../asset/data/hilbert/IntuitionisticHilbert.nb">IntuitionisticHilbert.nb</a>).</p>

<p>At $\alpha = 0.5$ we recover the usual Hilbert curve:
<img style="display: block; margin: auto" src="../../../../asset/data/hilbert/hilbert-0.5.png" /></p>

<p>At $\alpha = 0.4$ the curve is not square-filling:
<img style="display: block; margin: auto" src="../../../../asset/data/hilbert/hilbert-0.4.png" /></p>

<p>At $\alpha = 0.6$ we obtain a square-filling curve that overlaps itself already at finite stages:
<img style="display: block; margin: auto" src="../../../../asset/data/hilbert/hilbert-0.6.png" />
This is the one we want.</p>

<p>Just for fun, here’s a video the 8-th level curve as $\alpha$ ranges from $0.4$ to $0.8$.</p>

<video style="display:block; margin:auto" width="512" height="512" controls="">
  <source src="../../../../asset/data/hilbert/hilbert-0.4-to-0.8.mp4" type="video/mp4" />
(Your browser does not support the video tag.)
</video>

<p>As $\alpha$ increases the image gets denser in the center of the square and sparser close to the boundary, but this is an artifact of showing a finite stage. The actual curve $\gamma^\alpha$ is equally dense everywhere as soon as $\alpha &gt; 0.5$.
Back to serious business:</p>

<p><strong>Theorem 2:</strong> <em>Assuming <a href="https://en.wikipedia.org/wiki/Axiom_of_dependent_choice">dependent choice</a>, the generalized Hilbert cube $\gamma^\alpha$ is surjective for $1/2 &lt; \alpha &lt; 1$.</em></p>

<p><em>Proof.</em> Define the transformations $T_0^\alpha, T_1^\alpha, T_2^\alpha, T_3^\alpha : [0,1]^2 \to [0,1]^2$:</p>

<ul>
  <li>$T_0^\alpha(x,y) = (\alpha \cdot y, \alpha \cdot x)$</li>
  <li>$T_1^\alpha(x,y) = (\alpha \cdot x, 1 - \alpha \cdot (y - 1))$</li>
  <li>$T_2^\alpha(x,y) = (1 - \alpha \cdot (x - 1) , 1 - \alpha \cdot (y - 1))$</li>
  <li>$T_3^\alpha(x,y) = (1 - \alpha \cdot y , \alpha \cdot (1 - x))$</li>
</ul>

<p>Each of these map the unit square onto a smaller square with side $\alpha$:</p>

<ul>
  <li>$T_0$ scales and reflects the unit square onto $[0,\alpha] \times [0,\alpha]$</li>
  <li>$T_1$ scales the unit square onto $[0,\alpha] \times [1 - \alpha, 1]$,</li>
  <li>$T_2$ scales the unit square onto $[1 - \alpha, 1] \times [1 - \alpha, 1]$,</li>
  <li>$T_3$ scales and reflects onto $[1 - \alpha, 1] \times [0, \alpha]$.</li>
</ul>

<p>Because $\alpha &gt; 1/2$ these four squares overlap (rather than just touch) therefore they cover $[0,1]^2$, constructively. Given any $p \in [0,1]^2$ we may use Dependent choice to find a sequence of $T_{i_1}, T_{i_2}, T_{i_3}, \ldots$ such that $p = T_{i_1} (T_{i_2} (T_{i_3} (\cdots)))$, hence $p = \gamma^\alpha(t)$ where $t \in [0,1]$ is the number $0.i_1 i_2 i_3 \ldots$ written in base 4. $\Box$</p>

<p>Can we also do it without Dependent choice? We certainly cannot get rid of all choice.</p>

<p><strong>Theorem 3:</strong> <em>In the topos of sheaves on the unit square $\mathrm{Sh}([0,1]^2)$ there is no square-filling curve.</em></p>

<p><em>Proof.</em> Let $I$ be the unit interval in the topos, i.e., it is the sheaf of continuous maps valued in $[0,1]$.
Consider the internal statement that there is a surjection from $I$ onto $I^2$:</p>

<div class="kdmath">$$
\exists \gamma : I \to I^2 .\, \forall p \in I^2 .\, \exists t \in I .\, \gamma(t) = p \tag{1}
$$</div>

<p>Working through sheaf semantics (thanks to Andrew Swan for doing it with me over a cup of coffee – although I claim ownership of all errors), its validity at an open set $U \subseteq [0,1]^2$ amounts to the following condition: there is an open cover $(U_i)_i$ of $U$ with continuous maps $\gamma_i : U_i \times [0,1] \to [0,1]^2$ such that, for every $i$, every open $V \subseteq U_i$ and continuous $p : V \to [0,1]^2$, there is an open cover $(V_j)_j$ of $V$ and continuous maps $t_j : V_j \to [0,1]$, such that $\gamma_i(v, t_j(v)) = p(v)$ for all $j$ and $v \in V_j$.</p>

<p>Instantiate $p : V \to [0,1]^2$ in the stated condition with the inclusion $p(v) = v$ to obtain, for every $j$, that
$\gamma_i(v, t_j(v)) = v$ holds for all $v \in V_j$. Therefore, the map $\gamma_i{\restriction}_{V_j} : V_j \times [0,1] \to V_j$ has a continuous section, namely the map $v \mapsto (v, t_j(v))$. But there can be no such map, as it would violate <a href="https://en.wikipedia.org/wiki/Invariance_of_domain">invariance of domain</a>, unless $V_j = \emptyset$. Consequently, the only way for (1) to hold at $U$ is for $U$ to be empty. $\Box$</p>

<p>To summarize the argument: in a topos of sheaves “$\gamma$ is surjective” is a very strong condition, namely that $\gamma$ has local sections – and these may not exist for topological or geometric reasons. At the same time we still have Theorem 1, so also in a topos of sheaves the usual Hilbert curve leaves no empty space in the unit square.</p>]]></content><author><name>Andrej Bauer</name></author><category term="Constructive math" /><summary type="html"><![CDATA[In 1890 Giuseppe Peano discovered a square-filling curve, and a year later David Hilbert published his variation. In those days people did not waste readers’ attention with dribble – Peano explained it all on 3 pages, and Hilbert on just 2 pages, with a picture! But are these constructive square-filling curves?]]></summary></entry><entry><title type="html">On indefinite truth values</title><link href="https://math.andrej.com/2023/08/13/on-indenfinite-truth-values/" rel="alternate" type="text/html" title="On indefinite truth values" /><published>2023-08-13T00:00:00+02:00</published><updated>2023-08-13T00:00:00+02:00</updated><id>https://math.andrej.com/2023/08/13/on-indenfinite-truth-values</id><content type="html" xml:base="https://math.andrej.com/2023/08/13/on-indenfinite-truth-values/"><![CDATA[<p>In a discussion following a <a href="https://mathoverflow.net/a/452512/1176">MathOverflow answer</a> by <a href="https://jdh.hamkins.org">Joel Hamkins</a>, <a href="http://timothychow.net">Timothy Chow</a> and I got into a chat about what it means for a statement to “not have a definite truth value”. I need a break from writing the paper on countable reals (coming soon in a journal near you), so I thought it would be worth writing up my view of the matter in a blog post.</p>

<!--more-->

<p>How are we to understand the statement “the Riemann hypothesis (RH) does not have a definite truth value”?</p>

<p>Let me first address two possible explanations that in my view have no merit.</p>

<p>First, one might suggest that “RH does not have a definite truth value” is the same as “RH is neither true nor false”.
This is nonsense, because “RH is neither true nor false” is the statement $\neg \mathrm{RH} \land \neg\neg\mathrm{RH}$, which is just false by <a href="https://en.wikipedia.org/wiki/Law_of_noncontradiction">the law of non-contradiction</a>. No discussion here, I hope. Anyone claiming “RH is neither true nor false” must therefore mean that they found a paradox.</p>

<p>Second, it is confusing and even harmful to drag into this discussion syntactically invalid, ill-formed, or otherwise corrupted statements. To say something like “$(x + ( - \leq 7$ has no definite truth value” is meaningless. The notion of truth value does not apply to arbitrary syntactic garbage. And even if one thinks this is a good idea, it does not apply to RH, which is a well-formed formula that can be assigned meaning.</p>

<p>Having disposed of ill-fated attempts, let us ask what the precise mathematical meaning of the statement might be. It is important to note that we are discussing semantics. The <em>truth value</em> of a sentence $P$ is an element $I(P) \in B$ of some Boolean algebra $(B, 0, 1, {\land}, {\lor}, {\lnot})$, assigned by an interpretation function $I$. (I am assuming classical logic, but nothing really changes if we switch to intuitionistic logic, just replace Boolean algebras with Heyting algebras.) Taking this into account, I can think of three ways of explaining “RH does not have a definite truth value”:</p>

<ol>
  <li>
    <p>The truth value $I(\mathrm{RH})$ is neither $0$ nor $1$. (Do not confuse this meta-statement with the object-statement $\neg \mathrm{RH} \land \neg\neg\mathrm{RH}$.) Of course, for this to happen one has to use a Boolean algebra that contains something other than $0$ and $1$.</p>
  </li>
  <li>
    <p>The truth value of $I(\mathrm{RH})$ varies, depending on the model and the interpretation function. An example of this phenomenon is the <a href="https://en.wikipedia.org/wiki/Continuum_hypothesis">continuum hypothesis</a>, which is true in some set-theoretic models and false in others.</p>
  </li>
  <li>
    <p>The interpretation function $I$ fails to assign a truth value to $\mathrm{RH}$.</p>
  </li>
</ol>

<p>Assuming we have set up sound and complete semantics, the first and the second reading above both amount to undecidability of RH. Indeed, if the truth value of RH is not $1$ across all models then RH is not provable, and if it is not fixed at $0$ then it is not refutable, hence it is undecidable. Conversely, if RH is undecidable then its truth value in the <a href="https://en.wikipedia.org/wiki/Lindenbaum–Tarski_algebra">Lindenbaum-Tarski algebra</a> is neither $0$ nor $1$. We may quotient the algebra so that the value becomes true or false, as we wish.</p>

<p>The third option says that one has got a lousy interpretation function and should return to the drawing board.</p>

<p>In some discussions “RH does not have a definite truth value” seems to take on an anthropocentric component. The truth value is indefinite because knowledge of it is lacking, or because there is a cognitive barrier to comprehending the statement, etc. I find these just as unappealing as the <a href="https://en.wikipedia.org/wiki/Constructive_proof#Brouwerian_counterexamples">Brouwerian counterexamples</a> arguing in favor of intuitionistic logic.</p>

<p>The only realm in which I reasonably comprehend “$P$ does not have a definite truth value” is pre-mathematical, or even philosophical. It may be the case that $P$ refers to pre-mathematical concepts lacking precise formal description, or whose existing formal descriptions are considered problematic. This situation is similar to the third one above, but cannot be just dismissed as technical deficiency. An illustrative example is Solomon Feferman’s <a href="https://doi.org/10.1080/00029890.1999.12005017">Does mathematics need new axioms?</a> and the discussion found therein on the meaningfulness and the truth value of the continuum hypothesis. (However, I am not aware of anyone seriously arguing that the mathematical meaning of Riemann hypothesis is contentious.)</p>

<p>So, what do I mean by “RH does not have a definite truth value”? Nothing, I would never say that and I do not understand what it is supposed to mean. RH clearly has a definite truth value, in each model, and with some luck we are going to find out which one. (To preempt a counter-argument: the notion of “standard model” is a mystical concept, while those stuck in an “intended model” suffer from lack of imagination.)</p>]]></content><author><name>Andrej Bauer</name></author><category term="Logic" /><summary type="html"><![CDATA[In a discussion following a MathOverflow answer by Joel Hamkins, Timothy Chow and I got into a chat about what it means for a statement to “not have a definite truth value”. I need a break from writing the paper on countable reals (coming soon in a journal near you), so I thought it would be worth writing up my view of the matter in a blog post.]]></summary></entry><entry><title type="html">Variations on Weihrauch degrees (CiE 2023)</title><link href="https://math.andrej.com/2023/07/28/variations-on-weihrauch-degrees/" rel="alternate" type="text/html" title="Variations on Weihrauch degrees (CiE 2023)" /><published>2023-07-28T00:00:00+02:00</published><updated>2023-07-28T00:00:00+02:00</updated><id>https://math.andrej.com/2023/07/28/variations-on-weihrauch-degrees</id><content type="html" xml:base="https://math.andrej.com/2023/07/28/variations-on-weihrauch-degrees/"><![CDATA[<p>I gave a talk “Variations on Weihrauch degrees” at <a href="https://www.viam.science.tsu.ge/cie2023/">Computability in Europe
2023</a>, which took place in Tbilisi, Georgia. The talk was a remote one,
unfortunately. I spoke about generalizations of Weihrauch degrees, a largely unexplored territory that seems to offer
many opportunities to explore new directions of research. I am unlikely to pursue them myself, but will gladly talk with
anyone who is interested in doing so.</p>

<p><strong>Slides:</strong> <a href="/asset/data/CiE-2023-slides.pdf"><code class="language-plaintext highlighter-rouge">CiE-2023-slides.pdf</code></a>.</p>]]></content><author><name>Andrej Bauer</name></author><category term="Talks" /><category term="Computation" /><summary type="html"><![CDATA[I gave a talk “Variations on Weihrauch degrees” at Computability in Europe 2023, which took place in Tbilisi, Georgia. The talk was a remote one, unfortunately. I spoke about generalizations of Weihrauch degrees, a largely unexplored territory that seems to offer many opportunities to explore new directions of research. I am unlikely to pursue them myself, but will gladly talk with anyone who is interested in doing so. Slides: CiE-2023-slides.pdf.]]></summary></entry><entry><title type="html">Continuity principles and the KLST theorem</title><link href="https://math.andrej.com/2023/07/19/continuity-principles-and-the-klst-theorem/" rel="alternate" type="text/html" title="Continuity principles and the KLST theorem" /><published>2023-07-19T00:00:00+02:00</published><updated>2023-07-19T00:00:00+02:00</updated><id>https://math.andrej.com/2023/07/19/continuity-principles-and-the-klst-theorem</id><content type="html" xml:base="https://math.andrej.com/2023/07/19/continuity-principles-and-the-klst-theorem/"><![CDATA[<p>On the occasion of Dieter Spreen’s 75th birthday there will be a Festschrift in the <a href="http://logicandanalysis.org/index.php/jla">Journal of Logic and Analysis</a>. I have submitted a paper <em>“Spreen spaces and the synthetic Kreisel-Lacombe-Shoenfield-Tseitin theorem”</em>, available as a preprint <a href="https://arxiv.org/abs/2307.07830">arXiv:2307.07830</a>,  that develops a constructive account of Dieter’s generalization of a famous theorem about continuity of computable functions. In this post I explain how the paper fits into the more general topic of continuity principles.</p>

<!--more-->

<p>A <strong>continuity principle</strong> is a statement claiming that all functions from a given class are continuous. A silly example is the statement</p>

<blockquote>
  <p><em>Every map $f : X \to Y$ from a discrete space $X$ is continuous.</em></p>
</blockquote>

<p>The dual</p>

<blockquote>
  <p><em>Every map $f : X \to Y$ to an indiscrete space $Y$ is continuous.</em></p>
</blockquote>

<p>is equally silly, but these two demonstrate what we mean.</p>

<p>In order to find more interesting continuity principles, we have to look outside classical mathematics.
A famous continuity principle was championed by Brouwer:</p>

<blockquote>
  <p><strong>Brouwer’s continuity principle:</strong> <em>Every $f : \mathbb{N}^\mathbb{N}\to \mathbb{N}$ is continuous.</em></p>
</blockquote>

<p>Here continuity is taken with respect to the discrete metric on $\mathbb{N}$ and the complete metric on $\mathbb{N}^\mathbb{N}$ defined by</p>

<div class="kdmath">$$
\textstyle d(\alpha, \beta) = \lim_n 2^{-\min \lbrace k \in \mathbb{N} \,\mid\, k = n \lor \alpha_k \neq \beta_k\rbrace}.
$$</div>

<p>The formula says that the distance between $\alpha$ and $\beta$ is $2^{-k}$ if $k \in \mathbb{N}$ is the least number such that $\alpha_k \neq \beta_k$. (The limit is there so that the definition works constructively as well.) Brouwer’s continuity principle is valid in the <a href="https://ncatlab.org/nlab/show/function+realizability">Kleene-Vesley topos</a>.</p>

<p>In the <a href="https://ncatlab.org/nlab/show/effective+topos">effective topos</a> we have the following continuity principle:</p>

<blockquote>
  <p><strong>KLST continuity principle:</strong> <em>Every map $f : X \to Y$ from a complete separable metric space $X$ to a metric space
$Y$ is continuous.</em></p>
</blockquote>

<p>The letters K, L, S, and T are the initials of
<a href="https://en.wikipedia.org/wiki/Georg_Kreisel">Georg Kreisel</a>,
<a href="https://mathgenealogy.org/id.php?id=290439">Daniel Lacombe</a>,
<a href="https://en.wikipedia.org/wiki/Joseph_R._Shoenfield">Joseph R. Shoenfield</a>, and
<a href="https://en.wikipedia.org/wiki/Grigori_Tseitin">Grigori Tseitin</a>,
who proved various variants of this theorem in the context of computability theory (the above version is closest to Tseitin’s).</p>

<p>A third topos with good continuity principles is Johnstone’s <a href="https://doi.org/10.1112/plms/s3-38.2.237">topological topos</a>, see Section 5.4 of Davorin Lešnik’s <a href="https://arxiv.org/abs/2104.10399">PhD dissertaton</a> for details.</p>

<p>There is a systematic way of organizing such continuity principles with <a href="https://ncatlab.org/nlab/show/synthetic+topology">synthetic topology</a>. Recall that in synthetic topology we start by axiomatizing an object $\Sigma \subseteq \Omega$ of “open truth values”, called a <a href="https://ncatlab.org/nlab/show/dominance">dominance</a>, and define the <strong>intrinsic topology</strong> of $X$ to be the exponential $\Sigma^X$. This idea is based on an observation from traditional topology: the topology a space $X$ is in bijective correspondence with continuous maps $\mathcal{C}(X, \mathbb{S})$, where $\mathbb{S}$ is the <a href="https://en.wikipedia.org/wiki/Sierpiński_space">Sierpinski space</a>.</p>

<p>Say that a map $f : X \to Y$ is <strong>intrinsically continuous</strong> when the invese image map $f^\star$ maps intrinsically open sets to intrinsically open sets.</p>

<blockquote>
  <p><strong>Intrinsic continuity principle:</strong> <em>Every map $f : X \to Y$ is intrinsically continuous.</em></p>
</blockquote>

<p><em>Proof.</em> The inverse image $f^\star(U)$ of $U \in \Sigma^Y$ is $U \circ f \in \Sigma^X$. □</p>

<p>Given how trivial the proof is, we cannot expect to squeeze much from the intrinsic continuity principle. In classical mathematics the principle is trivial because there $\Sigma = \Omega$, so all intrinsic topologies are discrete.</p>

<p>But suppose we knew that the intrinsic topologies of $X$ and $Y$ were <strong>metrized</strong>, i.e., they coincided with metric topologies induces by some metrics $d_X : X \times X \to \mathbb{R}$ and $d_Y : Y \times Y \to \mathbb{R}$. Then the intrinsic continuity principle would imply that every map $f : X \to Y$ is continuous  with respect to the metrics. But can this happen? In “<a href="https://doi.org/10.1016/j.apal.2011.06.017">Metric spaces in synthetic topology</a>” by Davorin Lešnik and myself we showed that in the Kleene-Vesley topos the intrinsic topology of a complete separable metric space is indeed metrized. Consequently, we may factor Brouwer’s continuity principles into two facts:</p>

<ol>
  <li>Easy general fact: the intrinsic continuity principle.</li>
  <li>Hard specific fact: in the Kleene-Vesley topos the intrinsic topology of a complete separable metric space is metrized.</li>
</ol>

<p>Can we similarly factor the KLST continuity principle? I give an affirmative answer in the <a href="https://arxiv.org/abs/2307.07830">submitted
paper</a>, by translating Dieter Spreen’s “<a href="https://doi.org/10.2307/2586596">On Effective Topological
Spaces</a>” from computability theory and numbered sets to synthetic topology. What comes
out is a new topological separation property:</p>

<blockquote>
  <p><strong>Definition:</strong> A <strong>Spreen space</strong> is a topological space $(X, \mathcal{T})$ with the following separation property:
if $x \in X$ is separated from an overt $T \subseteq X$ by an intrinsically open subset, then it is already separated
from it by a $\mathcal{T}$-open subset.</p>
</blockquote>

<p>Precisely, a Spreen space $(X, \mathcal{T})$ satisfies: if $x \in S \in \Sigma^X$ and $S$ is disjoint from an overt $T \subseteq X$, then there is an open $U \in \mathcal{T}$ such that $x \in U$ and $U \cap T = \emptyset$. The synthetic KLST states:</p>

<blockquote>
  <p><strong>Synthetic KLST continuity principle:</strong> <em>Every map from an overt Spreen space to a pointwise regular space is pointwise continuous.</em></p>
</blockquote>

<p>The proof is short enough to be reproduced here. (I am skipping over some details, the important one being that we require
open sets to be intrinsically open.)</p>

<p><em>Proof.</em> Consider a map $f : X \to Y$ from an overt Spreen space $(X, \mathcal{T}_X)$ to a regular space $(Y, \mathcal{T}_Y)$. Given any $x \in X$ and $V \in \mathcal{T}_Y$ such that $f(x) \in V$, we seek $U \in \mathcal{T}_X$ such that $x \in U \subseteq f^\star(V)$. Because $Y$ is regular, there exist disjoint $W_1, W_2 \in \mathcal{T}_Y$ such that $x \in W_1 \subseteq V$ and $V \cup W_2 = Y$. The inverse image $f^\star(W_1)$ contains $x$ and is intrinsically open. It is also disjoint from $f^\star(W_2)$, which is overt because it is an intrinsically open subset of an overt space. As $X$ is a Spreen space, there exists $U \in \mathcal{T}_X$ such that $x \in U$ and $U \cap f{*}(W_2) = \emptyset$, from which $U \subseteq V$ follows. □</p>

<p>Are there any non-trivial Spreen spaces? In classical mathematics every Spreen space is discrete, so we have to look elsewhere. I show that they are plentiful in synthetic computability:</p>

<blockquote>
  <p><strong>Theorem (synthetic computability):</strong> <em>Countably based sober spaces are Spreen spaces.</em></p>
</blockquote>

<p>Please consult the paper for the proof.</p>

<p>There is an emergent pattern here: take a theorem that holds under very special circumstances, for instance in a specific topos or in the presence of anti-classical axioms, and reformulate it so that it becomes generally true, has a simple proof, but in order to exhibit some interesting instances of the theorem, we have to work hard. What are some other examples of such theorems? I know of one, namely <a href="https://ncatlab.org/nlab/show/Lawvere%27s+fixed+point+theorem">Lawvere’s fixed point theorem</a>. It took some effort to produce non-trivial examples of it, once again in synthetic computability, see <a href="https://math.andrej.com/2019/11/07/on-fixed-point-theorems-in-synthetic-computability/">On fixed-point theorems in synthetic computability</a>.</p>]]></content><author><name>Andrej Bauer</name></author><category term="Constructive math" /><category term="Synthetic computability" /><summary type="html"><![CDATA[On the occasion of Dieter Spreen’s 75th birthday there will be a Festschrift in the Journal of Logic and Analysis. I have submitted a paper “Spreen spaces and the synthetic Kreisel-Lacombe-Shoenfield-Tseitin theorem”, available as a preprint arXiv:2307.07830, that develops a constructive account of Dieter’s generalization of a famous theorem about continuity of computable functions. In this post I explain how the paper fits into the more general topic of continuity principles.]]></summary></entry><entry><title type="html">Isomorphism invariance and isomorphism reflection in type theory (TYPES 2023)</title><link href="https://math.andrej.com/2023/06/15/types-2023-isomorphism-invariance-and-isomorphism-reflection/" rel="alternate" type="text/html" title="Isomorphism invariance and isomorphism reflection in type theory (TYPES 2023)" /><published>2023-06-15T00:00:00+02:00</published><updated>2023-06-15T00:00:00+02:00</updated><id>https://math.andrej.com/2023/06/15/types-2023-isomorphism-invariance-and-isomorphism-reflection</id><content type="html" xml:base="https://math.andrej.com/2023/06/15/types-2023-isomorphism-invariance-and-isomorphism-reflection/"><![CDATA[<p>At <a href="https://types2023.webs.upv.es">TYPES 2023</a> I had the honor of giving an invited talk “On Isomorphism Invariance and Isomorphism Reflection in Type Theory” in which I discussed isomorphism reflection, which states that isomorphic types are judgementally equal. This strange principle is consistent, and it validates some fairly strange type-theoretic statements.</p>

<p>Here are <strong><a href="/asset/data/TYPES2023-Isomoprhism-invariance-and-reflection.pdf">the slides with speaker notes</a></strong> and <strong><a href="https://media.upv.es/#/portal/video/4fa0db80-354d-11ee-8317-3dc1d7f6252c">the video recording</a></strong> of the talk.</p>]]></content><author><name>Andrej Bauer</name></author><category term="Talks" /><category term="Type theory" /><summary type="html"><![CDATA[At TYPES 2023 I had the honor of giving an invited talk “On Isomorphism Invariance and Isomorphism Reflection in Type Theory” in which I discussed isomorphism reflection, which states that isomorphic types are judgementally equal. This strange principle is consistent, and it validates some fairly strange type-theoretic statements. Here are the slides with speaker notes and the video recording of the talk.]]></summary></entry><entry><title type="html">Formalizing invisible mathematics</title><link href="https://math.andrej.com/2023/02/13/formalizing-invisible-mathematics/" rel="alternate" type="text/html" title="Formalizing invisible mathematics" /><published>2023-02-13T00:00:00+01:00</published><updated>2023-02-13T00:00:00+01:00</updated><id>https://math.andrej.com/2023/02/13/formalizing-invisible-mathematics</id><content type="html" xml:base="https://math.andrej.com/2023/02/13/formalizing-invisible-mathematics/"><![CDATA[<p>I am at the <a href="http://www.ipam.ucla.edu/programs/workshops/machine-assisted-proofs/">Machine assisted proofs</a> workshop at the <a href="http://www.ipam.ucla.edu">UCLA Institute for Pure and Applied Mathematics</a>, where I am about to give a talk on “Formalizing invisible mathematics”.</p>

<p>Here are the <a href="/asset/data/formalizing-invisible-mathematics.pdf">slides with speaker notes</a> and the <a href="https://youtu.be/wZSvuCJBaFU">video recording of the talk</a>.</p>

<!--more-->

<p><strong>Abstract:</strong></p>

<p>It has often been said that all of mathematics can in principle be formalized in a suitably chosen foundation, such as first-order logic with set theory, higher-order logic, or type theory. When one attempts to actually do so on a large scale, the true meaning of the qualifier “in principle” is revealed: mathematical practice consists not only of text written on paper, however detailed they might be, but also of unspoken conventions and techniques that enable efficient communication and understanding of mathematical texts. While students may be able to learn these through observation and imitation, the same cannot be expected of computers, yet.</p>

<p>In this talk we will first review some of the informal mathematical practices and relate them to corresponding techniques in proof assistants, such as implicit arguments, type classes, and tactics. We shall then ask more generally whether these need be just a bag of tricks, or can they be organized into a proper mathematical theory.</p>]]></content><author><name>Andrej Bauer</name></author><category term="Talks" /><summary type="html"><![CDATA[I am at the Machine assisted proofs workshop at the UCLA Institute for Pure and Applied Mathematics, where I am about to give a talk on “Formalizing invisible mathematics”. Here are the slides with speaker notes and the video recording of the talk.]]></summary></entry><entry><title type="html">Exploring strange new worlds of mathematics</title><link href="https://math.andrej.com/2023/02/10/exploring-strange-new-worlds/" rel="alternate" type="text/html" title="Exploring strange new worlds of mathematics" /><published>2023-02-10T00:00:00+01:00</published><updated>2023-02-10T00:00:00+01:00</updated><id>https://math.andrej.com/2023/02/10/exploring-strange-new-worlds</id><content type="html" xml:base="https://math.andrej.com/2023/02/10/exploring-strange-new-worlds/"><![CDATA[<p>On February 10, 2023, I gave my <a href="https://www.wpi.edu/news/calendar/events/mathematical-sciences-department-levi-l-conant-lecture-series-2023-andrej-bauer-university-ljubljana">Levi L. Conant Lectur Series talk</a> “Exploring strange new worlds of mathematics”, at the <a href="https://www.wpi.edu/academics/departments/mathematical-sciences">math department of  Worcester Polytechnic Institute</a>. Here are the <a href="/asset/data/exploring-strange-new-worlds.pdf">slides with speaker notes</a> and the <a href="https://echo360.org/media/2685fce0-74f9-4304-88d7-f58820b5bcfe/public">video</a> recording of the talk.</p>

<!--more-->

<p><a href="http://katja.not.si">Katja Berčič</a> made a super cool logo for my talk:</p>

<center><img src="/asset/data/vulcan-exploring.png" style="width: 50%" /></center>

<p>Thank you, Katja! If you are a Trekkie you should figure it out.</p>

<p><strong>Abstract:</strong></p>

<p>In the 19th century Carl Friedrich Gauss, Nikolai Lobachevsky, and János Bolyai discovered geometries that violated the parallel postulate. Initially these were considered inferior to Euclid’s geometry, which was generally recognized as the true geometry of physical space. Subsequently, the work of Bernhard Riemann, Albert Einstein, and others, liberated geometry from the shackles of dogma, and allowed it to flourish beyond anything that the inventors of non-euclidean geometry could imagine.</p>

<p>A century later history repeated itself, this time with entire worlds of mathematics at stake. The ideal of one true mathematics was challenged by the schism between intuitionstic and classical mathematics, as personified in the story of rivalry between L.E.J. Brouwer and David Hilbert. Not long afterwards, Kurt Gödel’s work in logic implied the inevitability of a multitude of worlds of mathematics. These could hardly be dismissed as logical sophistry, as they provided answers to fundamental questions about set theory and foundations of mathematics. The second half of the 20th century brought gave us many more worlds of mathematics: Cohen’s set-theoretic forcing, Alexander Grothnedieck’s sheaves, F. William Lawvere’s and Myles Tierney’s elementary toposes, Martin Hyland’s effective topos, and a plethora of others.</p>

<p>We shall explore but a small corner of the vast multiverse of mathematics, observing in each the quintessential mathematical object, the field of real numbers. There is a universe in which the reals contain Leibniz’s infinitesimals, in another they are all computable, there is one in which they are cannot be separated into two disjoint subsets, and one in which all subsets are measurable. There is even a universe in which the reals are countable. The spectrum of possibilities is bewildering, but also inspiring. It leads to the idea of synthetic mathematics: just like geometers and physicists choose a geometry that is best for the situation at hand, mathematicians can choose to work in a mathematical universe made to order, or synthesized, that best captures the essence and nature of the topic of interest.</p>]]></content><author><name>Andrej Bauer</name></author><category term="Talks" /><category term="Constructive math" /><summary type="html"><![CDATA[On February 10, 2023, I gave my Levi L. Conant Lectur Series talk “Exploring strange new worlds of mathematics”, at the math department of Worcester Polytechnic Institute. Here are the slides with speaker notes and the video recording of the talk.]]></summary></entry><entry><title type="html">Happy birthday, Dana!</title><link href="https://math.andrej.com/2022/10/11/happy-birthday-dana/" rel="alternate" type="text/html" title="Happy birthday, Dana!" /><published>2022-10-11T00:00:00+02:00</published><updated>2022-10-11T00:00:00+02:00</updated><id>https://math.andrej.com/2022/10/11/happy-birthday-dana</id><content type="html" xml:base="https://math.andrej.com/2022/10/11/happy-birthday-dana/"><![CDATA[<p>Today <a href="https://www.cmu.edu/math/people/faculty/scott.html">Dana Scott</a> is celebrating the 90th birthday today. <strong>Happy birthday, Dana!</strong> I am forever grateful for your kindness and the knowledge that I received from you. I hope to pass at least a part of it onto my students.</p>

<p>On the occasion <a href="https://awodey.github.io">Steve Awodey</a> assembled selected works by Dana Scott at <a href="https://github.com/CMU-HoTT/scott"><code class="language-plaintext highlighter-rouge">CMU-HoTT/scott</code></a> repository. It is an amazing collection of papers that had deep impact on logic, set theory, computation, and programming languages. I hope in the future we can extend it and possibly present it in better format.</p>

<p>As a special treat, I recount here the story the invention of the famous $D_\infty$ model of the untyped $\lambda$-calculus.
I heard it first when I was Dana’s student. In 2008 I asked Dana to recount it in the form of a short interview.</p>

<!--more-->

<p><strong>These days domain theory is a mature branch of mathematics. It has had profound influence on the theory and practice of programming languages. When did you start working on it and why?</strong></p>

<p><strong>Dana Scott:</strong> I was in Amsterdam in 1968/69 with my family. I met Strachey at IFIP WG2.2 in summer of 1969. I arranged leave from Princeton to work with him in the fall of 1969 in Oxford. I was trying to convince Strachey to use a type theory based on domains.</p>

<p><strong>One of your famous results is the construction of a domain $D_\infty$ which is isomorphic to its own continuous function space $D_\infty \to D_\infty$. How did you invent it?</strong></p>

<p><strong>D. S.:</strong> $D_\infty$ did not come until later. I remember it was a quiet Saturday in November 1969 at home. I had proved that if domains $D$ and $E$ have a countable basis of finite elements, then so does the continuous function space $D \to E$. In understanding how often the basis for $D \to E$ was more complicated than the bases for $D$ and $E$, I then thought, “Oh, no, there must exist a bad $D$ with a basis so ‘dense’ that the basis for $D \to D$ is just as complicated – in fact, isomorphic.” But I never proved the existence of models exactly that way because I soon saw that the iteration of $X \mapsto (X \to X)$ constructed a suitable basis in the limit. That was the actual $D_\infty$ construction.</p>

<p><strong>Why do you say “oh no”? It was an important discovery!</strong></p>

<p><strong>D. S.:</strong> Since, I had claimed for years that the type-free $\lambda$-calculus has no “mathematical” models (as distinguished from term models), I said to myself, “Oh, no, now I will have to eat my own words!”</p>

<p><strong>The existence of term models is guaranteed by the Church-Rosser theorem from 1936 which implies that the untyped lambda calculus is consistent?</strong></p>

<p><strong>D. S.:</strong> Yes.</p>

<p><strong>The domain $D_\infty$ is an involved construction which gives a model for the calculus with both $\beta$- and $\eta$-rules. Is it easier to give a model which satisfies the $\beta$-rule only?</strong></p>

<p><strong>D. S.:</strong> Since the powerset of natural numbers $P\omega$ (with suitable topology) is universal for countably-based $T_0$-spaces, and since a continuous lattice is a retract of every superspace, it follows that $P\omega \to P\omega$ is a retract of $P\omega$. This gives a non-$\eta$ model without any infinity-limit constructions. But continuous lattices had not yet been invented in 1969 – that I knew of.</p>

<p><strong>Where can the interested readers read more about this topic?</strong></p>

<p><strong>D.S.:</strong> I would recommend these two:</p>

<ul>
  <li>Scott, D. <a href="https://github.com/CMU-HoTT/scott/blob/main/pdfs/1993-a-type-theoretical-aternative-to-ISWIM-CUCH-OWHY.pdf">A type-theoretical alternative to ISWIM, CUCH, OWHY</a>. Theoretical Computer Science, vol. 121 (1993), pp. 411-440.</li>
  <li>Scott, D. <a href="https://doi.org/10.1023/A:1010018211714">Some Reflections on Strachey and his Work</a>. A Special Issue Dedicated to Christopher Strachey, edited by O. Danvy and C. Talcott. Higer-Order and Symbolic Computation, vol. 13 (2000), pp. 103-114.</li>
</ul>

<p><strong>Thank you very much!</strong></p>

<p><strong>Dana Scott:</strong> You are welcome.</p>]]></content><author><name>Andrej Bauer</name></author><category term="News" /><summary type="html"><![CDATA[Today Dana Scott is celebrating the 90th birthday today. Happy birthday, Dana! I am forever grateful for your kindness and the knowledge that I received from you. I hope to pass at least a part of it onto my students. On the occasion Steve Awodey assembled selected works by Dana Scott at CMU-HoTT/scott repository. It is an amazing collection of papers that had deep impact on logic, set theory, computation, and programming languages. I hope in the future we can extend it and possibly present it in better format. As a special treat, I recount here the story the invention of the famous $D_\infty$ model of the untyped $\lambda$-calculus. I heard it first when I was Dana’s student. In 2008 I asked Dana to recount it in the form of a short interview.]]></summary></entry></feed>