<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>Counting is Hard</title><id>https://countingishard.org/feed.xml</id><subtitle>Recent Posts</subtitle><updated>2026-01-25T11:54:07Z</updated><link href="https://countingishard.org/feed.xml" rel="self" /><link href="https://countingishard.org" /><entry><title>I want you to give better talks</title><id>https://countingishard.org/i-want-you-to-give-better-talks.html</id><author><name>Ian Price</name></author><updated>2025-10-18T12:00:00Z</updated><link href="https://countingishard.org/i-want-you-to-give-better-talks.html" rel="alternate" /><content type="html">&lt;p&gt;I’ve been feeling very burned out recently, so, rather than writing the paper I'm working on, I went to a mini-workshop on “Applied Algebra and Geometry”. This post isn’t me shitting on anyone in particular at that workshop, but it did lead to me having a weird dream where I was stuck in a really terrible Haskell talk. The end result of that is this collection of advice, maybe a bit of a rant, about academic speaking, and which I am writing mostly because I repeat this whenever someone asks me to look over their slides or sit in on a practice talk. I do not consider myself a talented public speaker; I am just someone who has been to many and has opinions.&lt;/p&gt;&lt;h2&gt;Meta-advice&lt;/h2&gt;&lt;p&gt;First, a piece of meta-advice: ask for all the advice you can get and then do whatever &lt;em&gt;you&lt;/em&gt; want. This is not contradictory. Most people, when you ask them for advice, tell you what they wish they did rather than what they actually do. This is good and noble (they are trying to save you from mistakes they made), but if you are trying to model yourself on them, it probably won’t be much use. Good artists aren’t necessarily good critics and vice versa.&lt;/p&gt;&lt;p&gt;Wait a second, you aren’t trying to model yourself after a particular speaker? Why not? If you are trying to get better at something, there is nothing wrong with copying someone else. That’s what learning is. If I could be any public speaker, it’d be &lt;a href=&quot;https://www.durham.ac.uk/staff/alec-ryrie/&quot;&gt;Alec Ryrie&lt;/a&gt;, a professor of religion at Durham University. Seriously, go &lt;a href=&quot;https://www.youtube.com/watch?v=EBrrsqhAXQI&quot;&gt;watch&lt;/a&gt; &lt;a href=&quot;https://www.youtube.com/watch?v=lxWDAazMwsE&quot;&gt;him&lt;/a&gt; &lt;a href=&quot;https://www.youtube.com/watch?v=1vLdToJ1YdM&quot;&gt;speak&lt;/a&gt;. He’s compelling, his command of his material is evident, and he tells great stories. While I’m at it, which writers do you want to copy? I refer back to Simon Peyton Jones’ &lt;a href=&quot;https://www.youtube.com/watch?v=1vLdToJ1YdM&quot;&gt;“How to write a paper”&lt;/a&gt; all the time. I like a snappy title, so I devoured &lt;a href=&quot;http://www.strictlypositive.org/publications.html&quot;&gt;Conor McBride&lt;/a&gt; and &lt;a href=&quot;https://homepages.inf.ed.ac.uk/wadler/&quot;&gt;Phil Wadler’s&lt;/a&gt; papers. If you don’t have a favourite academic writer, find one.&lt;/p&gt;&lt;p&gt;Anyway, the second half of that piece of advice was “do whatever &lt;em&gt;you&lt;/em&gt; want”. No one (except maybe your supervisor) can really make you say anything. If you disagree with the advice you are given, that is normal, and you have my permission to ignore it. However, you should have at least &lt;em&gt;thought&lt;/em&gt; about it and know why you are rejecting it. You are giving the talk, not them, so do work you would stand by.&lt;/p&gt;&lt;h2&gt;The actual advice&lt;/h2&gt;&lt;p&gt;The most important advice you probably need to hear is that &lt;strong&gt;you have too many slides and there is too much on your slides&lt;/strong&gt;. How could I possibly know that? I haven’t seen your talk, after all. Well, it’s because basically everyone has too many slides with too much on them. I think I took this advice from a particular “How to Speak” lecture (&lt;a href=&quot;https://www.youtube.com/watch?v=Unzc731iCUY&quot;&gt;go watch it&lt;/a&gt;), but it’s usually the first thing I tell people after being sent their slides or watching their practice talk. We’ve all heard &lt;a href=&quot;https://www.youtube.com/watch?v=Unzc731iCUY&quot;&gt;the Pascal quote&lt;/a&gt;. As a rule of thumb, you should &lt;strong&gt;never have more slides than minutes&lt;/strong&gt;, and if you can, average at least two minutes per slide. That’s the most important point; if you want to, you can stop reading now.&lt;/p&gt;&lt;p&gt;I think this problem stems from two sources: people don’t know what they want to say, and they watch talks by people who don’t know what they want to say. The latter isn’t entirely their fault (those probably make up at least half the talks at any conference), except that when they go to write their own, they model themselves after bad speakers (see above) because that’s what they think they have to do.&lt;/p&gt;&lt;p&gt;I’m going to be blunt here: if you don’t know what you want to say, why are you giving a talk in the first place? Right, for your career, but if that’s the case, bad presentations have their own professional consequences. They will ignore the lovely theorems you proved, and use that time to write their own talks instead of listening to yours. Maybe a seminar organiser will remember you and not invite you as a result.&lt;/p&gt;&lt;p&gt;If you had to sum up your entire talk in one slide or even a single line, could you do it? I’m not sure that I can, but I do try. Can you explain your research to a stay-at-home dad on a plane? And don’t give me “it’s too technical” or “they don’t know any category theory”, have you tried? I managed to explain containers and Weihrauch reducibility to just such a person, and if I can do that, you can too. &lt;a href=&quot;https://en.wikiquote.org/wiki/Calculus_Made_Easy&quot;&gt;“What one fool can do, another can”&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;What is the main result?&lt;/strong&gt; Can you put it at the beginning when people are still paying attention? Do it. Actually, can you make it the only thing on the slide? Oh, and make sure you repeat it at the end. &lt;a href=&quot;https://quoteinvestigator.com/2017/08/15/tell-em/&quot;&gt;“Say what you are going to say, say it, then say what you said”&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Do you need all that background?&lt;/strong&gt; Actually, back up, who is your intended audience? If you want to give a talk for specialists, make it clear at the outset, or save it for a seminar. Yes, fewer people will show up, but they won’t just be sitting there out of politeness. If you are at a conference, tailor your talk to the types of people who actually attend that kind of conference.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Can you cut half your material?&lt;/strong&gt; It’s easier than you might think. Just because you use the term &lt;a href=&quot;https://ncatlab.org/nlab/show/overt+space&quot;&gt;“overt space”&lt;/a&gt; once doesn’t mean you necessarily need a full definition; just make an offhand remark like “oh, it’s dual to compactness”. Do you really need to say “Let n be a natural number”? Is it obvious from convention or context? Do you have a paragraph of text on your slides? Would you read that entire paragraph if you were watching this talk? Could you replace it with bullet points? Actually, can you make it a diagram? You are there to give a talk, not read from your slides. Your slides should support you, not the other way around. If they can get everything they need from reading your slides, then why not just write a blog post instead?&lt;/p&gt;&lt;p&gt;Just because you have a theorem doesn’t mean you need to give the full proof. Is it really important that they see all the algebraic manipulations you are doing? Maybe it is, if the techniques used in the proof are the point of the talk. But if it isn’t, can you cut it? If you can’t cut it, can you sketch it? If your proof has four main ideas, just say those. People are coming to you for your ideas, not for rigour. If they like what they hear, they actually will read your paper.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;No one has ever complained about a talk finishing five minutes early&lt;/strong&gt;. You know how there is never any time for questions? Be the person who gives them that time. People will come up to you at the end and say how much they enjoyed having the time for a real discussion. How do I know? It happened to me at CiE.&lt;/p&gt;&lt;p&gt;Now, it’s not all cut. &lt;strong&gt;Give more examples!&lt;/strong&gt; Spend more time on examples. Tell people about all the cool work you’re building on. If you think someone will ask about something, have a “post-credits” slide that addresses it. If something is important, say so. Repeat important stuff. &lt;a href=&quot;https://www.youtube.com/watch?v=LlmTWlaWs_o&quot;&gt;Repetition legitimises&lt;/a&gt;. &lt;a href=&quot;https://www.youtube.com/watch?v=ZUAUhFtfk_k&quot;&gt;Repetition legitimises&lt;/a&gt;. Make sure no one leaves without knowing exactly what it is you did and why you think it is important.&lt;/p&gt;&lt;p&gt;Most of my advice can be summed up as follows: &lt;strong&gt;What are all the things you don’t like about listening to talks? Don’t do them!&lt;/strong&gt; Be opinionated. There is a weird conflation people have where they associate being opinionated with being an asshole. You are allowed to have opinions, just don’t be callous in expressing them. People actually do like it when you have a clear vision about what you are doing, how you are doing it and why you are doing it that way. They might disagree with you; that’s life, they are allowed to do that. Which leads me to a bunch of my own pet peeves.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/static/give-better-talks/typical-beamer-response.png&quot; alt=&quot;Screenshot from mastodon, with poster blurred. It reads &amp;quot;At whatpoint does ones occipital lobe reach a lifetime quota of processinginformation via beamer slides? I think I may have already exceeded mine&amp;quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;You don’t have to use Beamer.&lt;/strong&gt; Yes, I know all my talks are in Beamer, but that’s because I’m lazy. That’s probably why you use it too. Have you considered not using Beamer? You can just handwrite your slides, e.g., &lt;a href=&quot;https://bryceclarke.github.io/&quot;&gt;Bryce Clarke&lt;/a&gt; does this, and I always enjoy looking at their slides (&lt;a href=&quot;https://bryceclarke.github.io/talk-slides/2024-06-ACT2024.pdf&quot;&gt;example&lt;/a&gt;). At &lt;a href=&quot;https://warwick.ac.uk/fac/sci/dcs/people/dmitry_chistikov/wild25/&quot;&gt;one automata conference&lt;/a&gt; I attended this year, Beamer was the exception rather than the rule, and it was great. There was clever use of layout and spacing, and even some judicious use of animation. Hats off to everyone involved.&lt;/p&gt;&lt;p&gt;Speaking of animation, I hate Beamer overlays. I understand why you think they are useful; they allow you to control when information is displayed to the listener. I think that is overrated. For a start, if you have n bullet points, then the kth bullet point appears (n-k) times. This means that if you leave important information to the end, people are less likely to see it, especially if their attention wavers for a second, perhaps because they were making a note of something great you said. Have you considered reducing the opacity instead of making it invisible, or highlighting the current item instead? That way, all text is always visible even whe nit is not the focus. I consider this an accessibility feature.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Use a colour-blind friendly palette.&lt;/strong&gt; I am not colour-blind, but about 1 in 10 men are. You can &lt;a href=&quot;https://davidmathlogic.com/colorblind&quot;&gt;read more about colour blindness here&lt;/a&gt; or &lt;a href=&quot;https://www.color-blindness.com/coblis-color-blindness-simulator/&quot;&gt;use a simulator&lt;/a&gt; to get an idea about how someone with various types of colour blindness might see your diagram. This requires conscious effort, but it doesn’t have to be too difficult; you can find your own favourite palette (I’m partial to &lt;a href=&quot;https://www.color-hex.com/color-palette/1044488&quot;&gt;the IBM one&lt;/a&gt;) and stick with it from here on out. That said, &lt;a href=&quot;https://www.a11y-collective.com/blog/color-blind-accessibility-guidelines/#h-how-to-design-for-colour-blindness&quot;&gt;you shouldn’t really be using colour alone to distinguish something&lt;/a&gt;: make it bold, or in italics, or use different shapes for each coloured dot, or whatever.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;I think the humanities are right about referencing.&lt;/strong&gt; Having a reference on the slide in a footnote is almost certainly superior to having a citation key and a bunch of references at the end. At the very least, we should be using Harvard style [author, year] references, or similar, rather than Vancouver [1] references. This just makes it easier to tell what is being referenced as it happens, rather than having to pop it on the stack and remember at the end.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;You are allowed to have fun.&lt;/strong&gt; Make a meme, tell a joke, make references to things that happened earlier in the conference. Just because it’s your job doesn’t mean you have to take it seriously.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/static/give-better-talks/concerned-parent.png&quot; alt=&quot;Comic. Panel One: A man is looking at a computer and saying &amp;quot;My sonleft his computer open&amp;quot;. Panel two: the same man says &amp;quot;I wonder whathe looks at on the internet&amp;quot;. Panel three: The screen shows a pushoutdiagram from category theory, the man says &amp;quot;What in the world is that...&amp;quot;&quot; /&gt;&lt;/p&gt;&lt;p&gt;Finally, know your timeslot. If you are on the last day of a week-long conference, I’m sorry, but people are tired and looking forward to going home. It wasn’t your fault, but you are going to have to go easy on us.&lt;/p&gt;&lt;h2&gt;Wrapping up&lt;/h2&gt;&lt;p&gt;You might think that &lt;a href=&quot;https://www.countingishard.org/talks&quot;&gt;looking at my own slides&lt;/a&gt; would be a good idea right now, you know, to “see how it's done”. Alas, I will probably disappoint you. I’m only human after all, but I do try, and all this is what I aspire to. Feel free to drop me a line by &lt;a href=&quot;mailto:web@countingishard.org&quot;&gt;email&lt;/a&gt;, or on &lt;a href=&quot;https://mathstodon.xyz/@counting_is_hard&quot;&gt;Mastodon&lt;/a&gt;, if you have a particularly good public speaker you want to recommend.&lt;/p&gt;&lt;p&gt;Special thanks to my friend Denis for looking over this screed and helping clean up some of the more incoherent parts.&lt;/p&gt;</content></entry><entry><title>Strong Reducibility as an Adaptor</title><id>https://countingishard.org/strong-reducibility-as-an-adaptor.html</id><author><name>Ian Price</name></author><updated>2025-06-02T12:00:00Z</updated><link href="https://countingishard.org/strong-reducibility-as-an-adaptor.html" rel="alternate" /><content type="html">&lt;script src=&quot;https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js&quot; id=&quot;MathJax-script&quot; async=&quot;true&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot;&gt;
function setTooltips() {
    // https://web.archive.org/web/20180717170010/https://hiphoff.com/creating-hover-over-footnotes-with-bootstrap/
    // https://stackoverflow.com/questions/61039512/how-to-initialize-tooltips-in-bootstrap-4-with-pure-javascript-no-jquery
    var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-toggle=&quot;tooltip&quot;]'));
    var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
        var tip = new bootstrap.Tooltip(tooltipTriggerEl,{html:true, delay: {hide:1000}});
        tooltipTriggerEl.addEventListener('shown.bs.tooltip', function (event) {
            // retypeset when tooltip appears in case it has maths
            // if I were smarter, I'd figure out how to only typeset
            // the tooltip
            MathJax.typeset();
        }, false);
        return tip;
    });
};

window.MathJax = {
    tex: {
        macros: {
            dom: '\\operatorname{dom}',
            just: '\\operatorname{Just}',
            none: '\\operatorname{None}',
            maybe: '\\operatorname{Maybe}',
            im: &quot;\\operatorname{Im}&quot;,

            abs: ['\\left\\lvert{}#1\\right\\rvert', 1],
            adjoint: '\\dashv',
            cA: '\\mathcal{A}',
            cE: '\\mathcal{E}',
            cC: '\\mathcal{C}',
            nat: '\\mathbb{N}',
            baire: '\\nat^\\nat',
            iso: '\\cong',
            multiTo: '\\rightrightarrows',
            partialDefine: ':\\subseteq',
            proj: '\\pi',
            Ktwo: '{\\mathcal{K}_2}',
            Ktworec: '\\mathcal{K}_2^{\\mathrm{rec}}',
            realises: '\\Vdash',
            catname: ['\\textsf{#1}', 1],
            Asm: '\\catname{Asm}',
            Pasm: '\\catname{Pasm}',
            PasmFull: '\\Pasm(\\Ktworec, \\Ktwo)',
            Poly: '\\catname{Poly}',
            Set: '\\catname{Set}',
        },
    },
};

window.addEventListener('DOMContentLoaded', function() {
    setTooltips();
}, false);
&lt;/script&gt;&lt;noscript&gt;This post uses &lt;a href=&quot;https://www.mathjax.org/&quot;&gt;MathJax&lt;/a&gt; to correctly typeset maths, so maybe allow that in your browser? I also do some silly footnote thing.&lt;/noscript&gt;&lt;p&gt;
In the previous post, I explained how Weihrauch reducibility
could be viewed as a dependent lens. That was supposed to be the start
of a few blog posts because my supervisor thought this work probably
wasn't publishable. However, since then, we have written this up, and a
&lt;a href=&quot;https://arxiv.org/abs/2501.17250&quot;&gt;preprint is available on the Arxiv&lt;/a&gt;. Even better,
this work was accepted for
&lt;a href=&quot;https://sites.google.com/view/cie2025-computabilityineurope/home&quot;&gt;CiE&lt;/a&gt;,
as was an abstract for
&lt;a href=&quot;https://msp.cis.strath.ac.uk/types2025/&quot;&gt;TYPES&lt;/a&gt;. I might
still write some blog posts on various container constructions, but
today I want to talk about the strong (or uniform) variant of
Weihrauch Reducibility.&lt;/p&gt;&lt;p&gt;Recall from last time that we originally defined Weihrauch reducibility
by&lt;/p&gt;&lt;div text=&quot;Weihrauch Reducible&quot; id=&quot;weihrauch-red&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;Let \(X\), \(Y\), \(Z\), \(W\) be represented spaces and let \(f \partialDefine
X \multiTo Y\) , \(g \partialDefine Z \multiTo W\) be partial
multi-valued functions. Then \(f\) is &lt;em&gt;Weihrauch reducible&lt;/em&gt; to \(g\),
if there are computable partial functions \(\Phi, \Psi \partialDefine
\baire \to \baire\) such that for all \(p\) with \(\delta_X(p) \in
\dom(f)\), \(\delta_Z(\Phi(p)) \in \dom(g)\) and for all \(q\) with
\(\delta_W(q) \in g(\delta_Z(\Phi(p)))\), \(\delta_Y(\Psi(p,q)) \in
f(\delta_X(p))\).&lt;/p&gt;
&lt;/div&gt;&lt;p&gt;There is a variant of Weihrauch reducibility called “Strong
Weihrauch reducibility”, which boils down to saying that our
backwards map doesn't depend on the original input at all, i.e.,
\(\Psi(-, q)\) is constant for all \(q\). However, it isn't necessarily
clear to express this constraint categorically.&lt;/p&gt;&lt;p&gt;Fortunately, there are some very clever
people at Strathclyde, particularly Jules Hedges, who explained how
to do just this in a &lt;a href=&quot;https://www.youtube.com/watch?v=yhxwUnWKK2I&quot;&gt;seminar talk&lt;/a&gt;, using what they have termed “Dependent Adaptors”.&lt;/p&gt;&lt;h2&gt;What is a Dependent Adaptor?&lt;/h2&gt;&lt;p&gt;Okay, slow down there. First, recall from last time that we swapped
thinking about partial-multivalued functions (relations) \(R \subseteq \baire \times \baire\) for thinking in terms of families
\(\left(R_i\right)_{i \in \dom(R)}\) where \(R_i = \left\{y | x R y\right\}\) viewed as set bundles.
This is fine™,
but why not figure out what the category theory version of a relation
is in the first place and use that?&lt;/p&gt;&lt;h3&gt;Okay, what is a relation then?&lt;/h3&gt;&lt;p&gt;If you are in a category with binary products, you might just say that
a relation is a subobject or a product, but it pays to be a little
more general than this and think &lt;em&gt;internally&lt;/em&gt;. The important
information about binary relations is that
they have &lt;em&gt;two&lt;/em&gt; projections and any given element of a
relation depends uniquely on the result of both. Formally,&lt;/p&gt;&lt;div text=&quot;(Internal) Relation&quot; class=&quot;definition&quot;&gt;
&lt;p&gt; An &lt;a href=&quot;https://ncatlab.org/nlab/show/internal+relation&quot;&gt;&lt;em&gt;(internal) relation&lt;/em&gt;&lt;/a&gt; from an object \(X\) to an object \(Y\) in a
category \(\cC\) is an object \(R\) and a pair of maps \(\pi_X : R \to X\),
\(\pi_Y : R \to Y\) such that \(\pi_X\) and \(\pi_Y\) are &lt;a href=&quot;https://ncatlab.org/nlab/show/jointly+monic+morphisms&quot;&gt;jointly monic&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;In the previous post, we also wanted to restrict to surjective
functions to represent the idea that all elements of the domain should
have an answer. Originally, we said that we should work with
epimorphisms, but in the preprint, we changed our minds and decided we
should actually have pullback-preserving epimorphisms, which were
dubbed “answerable containers”. We want a similar kind of condition
on our relations. In what follows, we will work in a &lt;a href=&quot;https://ncatlab.org/nlab/show/regular+category&quot;&gt;regular category&lt;/a&gt;
and require that \(\pi_Y\) be a regular epimorphism for topology reasons.&lt;/p&gt;&lt;div text=&quot;Problem&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;In a regular category \(\cC\), an &lt;em&gt;(answerable) problem \(R : X \to Y\)&lt;/em&gt; is a relation \((R, \pi_X, \pi_Y)\) such that \(\pi_X : R \to X\) is a pullback-preserving
epimorphism and \(\pi_Y : R \twoheadrightarrow Y\) is a regular epimorphism.&lt;/p&gt;&lt;/div&gt;&lt;h3&gt;Now, can we define adaptors?&lt;/h3&gt;&lt;p&gt;Yes. \(\pi_X : R \to X\) gives us the same data as we had last time, so
we can carry over part of our definition of reducibility as before,
but now we need to extend our diagram in the opposite direction to
account for the extra regular epimorphism \(\pi_Y\).&lt;/p&gt;&lt;div text=&quot;Strongly Weihrauch Reducible&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;Given problems \(R : X \to Y\), \(S : W \to Z\) in \(\PasmFull\). Then \(R\) is
&lt;em&gt;strongly Weihrauch Reducible&lt;/em&gt;, \(R \leq_{SW} S\), if there exists arrows
\(\Phi : X \to Z\), \(\Psi : X \times_{Z} S \to Y\), \(\chi : \im \to Y\)
such that the following diagram commutes

&lt;img src=&quot;/static/strong-weihrauch-adaptor/reduction-general-case.png&quot; class=&quot;mx-auto d-block&quot; alt=&quot;Commuting Diagram for adaptors&quot; /&gt;
&lt;/p&gt;&lt;/div&gt;&lt;p&gt;Note that the arrows \(X \times_Z S \twoheadrightarrow \im \hookrightarrow Z\) come
from the (regular-epi, mono)-factorisation in a regular category.&lt;/p&gt;&lt;p&gt;The data \((\Phi, \Psi, \chi)\) that witnesses a reduction is known as a dependent adaptor.&lt;/p&gt;&lt;p&gt;To see that this is the right definition, we will need to do some
unpacking. Just as last time, we will view the problem (relation)
as the type \(R = \sum_{x:X}Y(x)\) with the obvious projections and similarly
for \(S\). Leveraging the work from last time, the left-hand side of
the diagram already gives us a regular Weihrauch reduction between \(\pi_X : R \to X\)
and \(\pi_Y : S \to Z\). So, what is \(\im\)? We want to factor the map
\(X \times_W S \to S \twoheadrightarrow W\) through its image, so let's figure
out what that map should do first. From last time, we know that the pullback
in the centre is \(\sum_{x:X} W(\Phi(x))\), so the composite map must take \((x, w)\)
to \(w\), where \(x \in X\) and \(w \in W(\Phi(x))\), and hence the image must be the
union of all \(W(\Phi(x))\).&lt;/p&gt;&lt;img src=&quot;/static/strong-weihrauch-adaptor/reduction-special-case.png&quot; class=&quot;mx-auto d-block&quot; alt=&quot;Commuting Diagram for adaptors in the special case of the previous paragraph&quot; /&gt;&lt;p&gt;The top left rectangle gives the equality \(\Psi(x, w) = \chi(w)\)
for all \(x \in X\) and \(w \in W(x)\). In other words, \(\Psi(-, w)\) is constant, which is what we wanted.&lt;/p&gt;&lt;p&gt;More formally, we can say we have a full &amp;amp; faithful functor from
strong reductions to dependent adaptors and it wouldn't take much more
  work to get an equivalence.&lt;/p&gt;&lt;div class=&quot;theorem&quot;&gt;
&lt;p&gt;The Strong Weihrauch degrees are isomorphic to the posetal reflection of
the category of answerable containers and dependent adaptors over the
category of projective represented spaces and (type 2) computable functions.
&lt;/p&gt;&lt;/div&gt;&lt;h2&gt;Is there a pattern to the definitions?&lt;/h2&gt;&lt;p&gt;This is a very astute question. I will defer a full post on this for
another day, but the short answer is that lenses come about as a
  result of taking the opposite of a fibration, see e.g. &lt;a href=&quot;https://arxiv.org/abs/1801.02927&quot;&gt;Streicher (Section 5)&lt;/a&gt;. You can see this at play in papers like
&lt;a href=&quot;https://arxiv.org/abs/1908.02202&quot;&gt;Spivak's&lt;/a&gt;. In this view, dependent lenses
arise as the opposite of the codomain fibration and dependent adaptors from the fibration
\(X \leftarrow R \twoheadrightarrow Y \mapsto X\).&lt;/p&gt;&lt;p&gt;That's all folks. I have two other posts half-written, and at some
point will talk about the work on fixed points I've been doing with my supervisor.
&lt;/p&gt;</content></entry><entry><title>Weihrauch Reducibility as a Lens</title><id>https://countingishard.org/weihrauch-reducibility-as-a-lens.html</id><author><name>Ian Price</name></author><updated>2024-09-12T12:00:00Z</updated><link href="https://countingishard.org/weihrauch-reducibility-as-a-lens.html" rel="alternate" /><content type="html">&lt;script src=&quot;https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js&quot; id=&quot;MathJax-script&quot; async=&quot;true&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot;&gt;
function setTooltips() {
    // https://web.archive.org/web/20180717170010/https://hiphoff.com/creating-hover-over-footnotes-with-bootstrap/
    // https://stackoverflow.com/questions/61039512/how-to-initialize-tooltips-in-bootstrap-4-with-pure-javascript-no-jquery
    var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-toggle=&quot;tooltip&quot;]'));
    var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
        var tip = new bootstrap.Tooltip(tooltipTriggerEl,{html:true, delay: {hide:1000}});
        tooltipTriggerEl.addEventListener('shown.bs.tooltip', function (event) {
            // retypeset when tooltip appears in case it has maths
            // if I were smarter, I'd figure out how to only typeset
            // the tooltip
            MathJax.typeset();
        }, false);
        return tip;
    });
};

window.MathJax = {
    tex: {
        macros: {
            dom: '\\operatorname{dom}',
            just: '\\operatorname{Just}',
            none: '\\operatorname{None}',
            maybe: '\\operatorname{Maybe}',

            abs: ['\\left\\lvert{}#1\\right\\rvert', 1],
            adjoint: '\\dashv',
            cA: '\\mathcal{A}',
            cE: '\\mathcal{E}',
            nat: '\\mathbb{N}',
            baire: '\\nat^\\nat',
            iso: '\\cong',
            multiTo: '\\rightrightarrows',
            partialDefine: ':\\subseteq',
            proj: '\\pi',
            Ktwo: '{\\mathcal{K}_2}',
            Ktworec: '\\mathcal{K}_2^{\\mathrm{rec}}',
            realises: '\\Vdash',
            catname: ['\\textsf{#1}', 1],
            Asm: '\\catname{Asm}',
            Pasm: '\\catname{Pasm}',
            PasmFull: '\\Pasm(\\Ktworec, \\Ktwo)',
            Poly: '\\catname{Poly}',
            Set: '\\catname{Set}',
        },
    },
};

window.addEventListener('DOMContentLoaded', function() {
    setTooltips();
}, false);
&lt;/script&gt;&lt;noscript&gt;This post uses &lt;a href=&quot;https://www.mathjax.org/&quot;&gt;MathJax&lt;/a&gt; to correctly typeset maths, so maybe allow that in your browser? Oh, and I include a gist, and do some silly footnote thing.&lt;/noscript&gt;&lt;p&gt;A short while ago, we had &lt;a href=&quot;http://cca-net.de/cca2024/&quot;&gt;CCA 2024&lt;/a&gt;
at Swansea, which I attended mostly because it was local and my
supervisor was giving a talk. The first day had a session dedicated to
the topic of Weihrauch reducibility, during which it
occurred to me that the definition of Weihrauch reducibility looked
suspiciously similar to the definition of a dependent lens and
that some of the operators on Weihrauch degrees should just
be known constructions on polynomials. She agreed, telling
me that Weihrauch problems are the polynomials in the category \(\PasmFull\) of
partitioned assemblies over the PCA \(\Ktwo\) filtered by \(\Ktworec\).&lt;/p&gt;&lt;p&gt;I've written this attempt to answer
the question: “What the hell does that even mean?”.&lt;/p&gt;&lt;p&gt;Warning, to read
this post you must be over 18 years old or accompanied by a trained
category theorist.&lt;/p&gt;&lt;h2&gt;What is Weihrauch Reducibility?&lt;/h2&gt;&lt;p&gt;Reducibility is a fundamental concept in computability and complexity
theory. A problem \(P\) is reducible to a problem \(Q\) if a solution to
\(Q\) can be used to solve \(P\). In a fire, a practical minded engineer
might grab a fire extinguisher and put it out; a computer scientist
might instead give the fire extinguisher to the engineer, thus
reducing the problem to one with a known solution.
&lt;a href=&quot;https://en.wikipedia.org/wiki/Turing_reduction&quot;&gt;A simple type
  of reduction&lt;/a&gt; is that \(P\) is reducible to \(Q\) if there
is an algorithm that decides \(P\) that may call out to \(Q\) as a
subroutine. Computer scientists have refined this reduction to allow
&lt;a href=&quot;https://en.wikipedia.org/wiki/Polynomial-time_reduction&quot;&gt;only polynomial many calls&lt;/a&gt;
to \(Q\), or even
&lt;a href=&quot;https://en.wikipedia.org/wiki/Many-one_reduction&quot;&gt;a single call to \(Q\)&lt;/a&gt;.
Today we are interested in the following definitions:&lt;/p&gt;&lt;div text=&quot;Represented Space&quot; class=&quot;definition&quot;&gt;
&lt;p&gt; A &lt;em&gt;represented space&lt;/em&gt; is a pair \((X, \delta)\) of a set \(X\) and a
surjective partial function \(\delta_X \partialDefine \baire \to X\).&lt;/p&gt;
&lt;/div&gt;&lt;div text=&quot;Weihrauch Reducible&quot; id=&quot;weihrauch-red&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;Let \(X\), \(Y\), \(Z\), \(W\) be represented spaces and let \(f \partialDefine
X \multiTo Y\) , \(g \partialDefine Z \multiTo W\) be partial
multi-valued functions. Then \(f\) is &lt;em&gt;Weihrauch reducible&lt;/em&gt;&lt;span title=&quot;This definition does appear in some papers, e.g., &amp;lt;a href=&amp;quot;http://arxiv.org/abs/2311.12676&amp;quot;&amp;gt;Lempp et al.&amp;lt;/a&amp;gt;, but is not the “usual one”, e.g., in &amp;lt;a href=&amp;quot;http://arxiv.org/abs/1707.03202&amp;quot;&amp;gt;Brattka et al.&amp;lt;/a&amp;gt; It is, however, equivalent to it using the Axiom of Choice.&quot; data-toggle=&quot;tooltip&quot; class=&quot;footnote&quot;&gt;&lt;/span&gt; to \(g\),
if there are computable partial functions \(\Phi, \Psi \partialDefine
\baire \to \baire\) such that for all \(p\) with \(\delta_X(p) \in
\dom(f)\), \(\delta_Z(\Phi(p)) \in \dom(g)\) and for all \(q\) with
\(\delta_W(q) \in g(\delta_Z(\Phi(p)))\), \(\delta_Y(\Psi(p,q)) \in
f(\delta_X(p))\).&lt;/p&gt;
&lt;/div&gt;&lt;p&gt;The upshot of the definition of Weihrauch reducible is that you have a
“forward map” \(\Phi\) that converts inputs for \(f\) to inputs for \(g\), you
solve your problem \(g\), then convert your output of \(g\) to an
output of \(f\) using a “backward map” \(\Psi\). When using the backward
map, you also get to use the original input. This is summarised in the
  diagram below.&lt;/p&gt;&lt;img src=&quot;/static/weihrauch-poly/reduction-diagram.png&quot; class=&quot;mx-auto d-block&quot; alt=&quot;Diagram showing maps Phi and Psi with arrows between domains and codomains&quot; /&gt;&lt;p&gt;If you’ve seen lenses or other bidirectional mathematical structures,
you get excited when you see things like this. However, as usual with
computer science, there is a bunch of plumbing required to make
everything fit, starting with a trip into realisability.&lt;/p&gt;&lt;h2&gt;What is a PCA?&lt;/h2&gt;&lt;p&gt;I will not be giving an in-depth treatment of Categorical
Realisability, but for an introduction to the topic, you can read
&lt;a href=&quot;https://github.com/tomdjong/MGS-categorical-realizability&quot;&gt;Tom
  de Jong's notes&lt;/a&gt; from a course
that I had the pleasure of attending at
&lt;a href=&quot;https://www.cs.le.ac.uk/events/mgs2024/&quot;&gt;MGS&lt;/a&gt; this year.&lt;/p&gt;&lt;p&gt;A PCA, or Partial Combinatory Algebra &lt;a href=&quot;https://www.youtube.com/watch?v=Be7Og9Gc_KY&quot;&gt;if you're not into the whole
brevity thing&lt;/a&gt;, is a set \(A\) of “combinators” and a partial operator
called “application”, \(\cdot \partialDefine A \times A \to A\), plus two special
combinators called \(S\) and \(K\) satisfying a few axioms. We will not
dwell on this, because we have a lot to get through, but these \(S\) and
\(K\) are the combinators you would get from a process called
&lt;a href=&quot;https://en.wikipedia.org/wiki/Combinatory_logic#Completeness_of_the_S-K_basis&quot;&gt;bracket
abstraction&lt;/a&gt; in the untyped lambda calculus. They are “combinatorially
complete” which means any term built out of application, variables,
and elements of \(A\) can be expressed solely through application and
\(K\) and \(S\).&lt;/p&gt;&lt;p&gt;There are lots of examples of PCAs, from the trivial \(\left\{\star\right\}\)
to the not-so-trivial
untyped lambda calculus. We will skip Kleene's first model to his
second model \(\Ktwo\).&lt;/p&gt;&lt;h2&gt;What is Kleene's Second Model?&lt;/h2&gt;&lt;p&gt;Kleene's Second model is the PCA that corresponds to Type 2
Computability, which is the setting for much of Computable Analysis in
general and Weihrauch Reducibility in particular. So, what is type 2
computability?&lt;/p&gt;&lt;div text=&quot;Type 2 Computable&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;A partial function \(f \partialDefine \baire \to \baire\) is &lt;em&gt;type 2
computable&lt;/em&gt; if there is a Turing machine \(M\) that given \(x \in
\dom(f)\) on its input tape, eventually writes all of \(f(x)\) to its
(write only) output tape, and \(M\) diverges otherwise.&lt;/p&gt;
&lt;/div&gt;&lt;p&gt;There are a few things to notice. First, we will usually
view these functions \(\alpha \in \baire\) as sequences of
natural numbers. Second, we are taking the whole space of functions
\(\baire\) as our input, which means that some of our inputs are not
computable; this is intentional. Finally, a consequence of this
definition is that our function is continuous, in that \(f(n)\) will be
written to the output tape after finite time after inspecting only a
finite prefix of the input.&lt;/p&gt;&lt;p&gt;To form a PCA, we want to take \(\baire\) as our set of objects and
define a multiplication map. It's a little fiddly, e.g., see section 1.4.3
of &lt;a href=&quot;https://www.cambridge.org/core/journals/bulletin-of-symbolic-logic/article/abs/jaap-van-oosten-realizability-an-introduction-to-its-categorical-side-studies-in-logic-and-the-foundations-of-mathematics-vol-152-elsevier-science-amsterdam-2008-328-pp/9680C9F0B050BADC31058F069BA6D736&quot;&gt;van Oosten's book&lt;/a&gt;, but I will provide a short explanation based on
a &lt;a href=&quot;https://mathoverflow.net/a/439062&quot;&gt;nice answer on
  mathoverflow&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Fix a function \(\alpha: \baire \to \baire\). We will instead view this
as a function \(\alpha: \baire \times \nat \to \maybe \nat\), by
uncurrying and fixing an isomorphism \(N \iso N + {\bot}\).&lt;/p&gt;&lt;p&gt;The first step is to define a partial map \(F_\alpha \partialDefine \baire \to
\maybe \nat\) by repeatedly running \(\alpha(\beta_0, \dots, \beta_n)\)
on an input sequence \(\beta \in \baire\), increasing \(n\) each time,
until we get a non-\(\none\) answer \(\just k\). If this happens, return
it; if the loop never terminates or \(\alpha\) diverges on some input,
return \(\none\). That is, we keep asking for more of \(\beta\) until we
have enough for \(\alpha\) to compute the answer.
It turns out that every continuous partial function \(\baire \to \nat\)
is equal to such an \(F_\alpha\) for some \(\alpha\).&lt;/p&gt;&lt;p&gt;Now we can define multiplication by \((\alpha \cdot \beta)(n) =
F_\alpha(n, \beta)\), provided the right side is defined for all \(n\).&lt;/p&gt;&lt;p&gt;There is a (non-runnable) Haskell pseudo-implementation provided below for the people who prefer code to prose.&lt;/p&gt;&lt;script src=&quot;https://gist.github.com/ijp/960a192ead1c24888701314ff837bf6f.js&quot;&gt;&lt;/script&gt;&lt;noscript&gt;&lt;a href=&quot;https://gist.github.com/ijp/960a192ead1c24888701314ff837bf6f.js&quot;&gt;Code on Github&lt;/a&gt;&lt;/noscript&gt;&lt;p&gt;Finally, \(\Ktworec\) is the sub-PCA of \(\Ktwo\) where all elements
\(\alpha \in \baire\) are recursive &lt;span title=&quot;In particular, \(S\) and \(K\) are recursive&quot; data-toggle=&quot;tooltip&quot; class=&quot;footnote&quot;&gt;&lt;/span&gt;&lt;span title=&quot;Another way of saying this is that \(\Ktwo\) is a filtered PCA where \(\Ktworec\) is its filter.&quot; data-toggle=&quot;tooltip&quot; class=&quot;footnote&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;What is the Category \(\PasmFull\)?&lt;/h2&gt;&lt;h3&gt;Assemblies&lt;/h3&gt;&lt;p&gt;Now that we understand PCAs, we can define the notions of assembly and tracking, then form a category from
assembly maps. The following definitions come straight from Tom's notes.&lt;/p&gt;&lt;div text=&quot;Assembly&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;An &lt;em&gt;assembly&lt;/em&gt; \(X\) over a PCA \(\cA\) is a set \(\abs{X}\) together with a
relation \(\realises_X \; \subseteq \cA \times \abs{X}\) such that
for all \(x \in \abs{X}\), there exists at least one element \(a \in \cA\) with \(a \realises_X x\).&lt;/p&gt;
&lt;/div&gt;&lt;div text=&quot;Tracks&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;For assemblies \(X\) and \(Y\), we say that an element \(t \in \cA\)
&lt;em&gt;tracks&lt;/em&gt; a function \(f : \abs{X} \to \abs{Y}\) if for all \(x \in
\abs{X}\), \(a \in A\), if \(a \realises_X x\), then \(t \cdot a\) is defined
and \(t \cdot a \realises_Y f(x)\).&lt;/p&gt;
&lt;/div&gt;&lt;div text=&quot;Assembly Map&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;An &lt;em&gt;assembly map&lt;/em&gt; from an assembly \(X\) to an assembly \(Y\) is a
function \(f : \abs{X} \to \abs{Y}\) that is tracked by some element.&lt;/p&gt;
&lt;/div&gt;&lt;p&gt;The standard analogy is to think of \(a \realises x\) as telling us
that \(a\) is an implementation of \(x\) in the PCA and that trackers
implement their respective functions in the PCA.&lt;/p&gt;&lt;p&gt;Assembly maps form a category \(\Asm(\cA)\), since the identity function can be
tracked by the element \((S \cdot K) \cdot K\), and composition of
functions is tracked by composition of trackers in a suitable sense.
Again, I defer to Tom's notes in the desire to save space and time.&lt;/p&gt;&lt;p&gt;Specialising these notions to \(\Ktwo\), we get that represented spaces
are the same thing as assemblies&lt;span title=&quot;Strictly speaking, represented spaces give rise to “modest sets”, since in a represented space the same element of \(\baire\) cannot realise two different elements of \(X\).&quot; data-toggle=&quot;tooltip&quot; class=&quot;footnote&quot;&gt;&lt;/span&gt; and an element \(\alpha \in \baire\) that
tracks a function \(f\) is a &lt;em&gt;realiser&lt;/em&gt; for it.&lt;/p&gt;&lt;p&gt;However, the category just described would not be fully faithful to
the notion of Type 2 Computability if you just instantiated it on
either \(\Ktwo\) or \(\Ktworec\). This is because, as mentioned earlier,
in Type 2 we want our computation to be performed by Turing machines,
but to allow the sequences on our input tapes to be arbitrary, and
hence possibly uncomputable. This suggests that the objects of our
category should be assemblies on \(\Ktwo\), but that our trackers
should be required to come from the sub-assembly \(\Ktworec\). This
would give us a category \(\Asm(\Ktworec, \Ktwo)\).&lt;/p&gt;&lt;h3&gt;Partitioned Assemblies&lt;/h3&gt;&lt;p&gt;The next important definition is that of a partitioned assembly. This
is simply an assembly where each element of the set is realised by a
&lt;em&gt;unique&lt;/em&gt; element of the PCA.&lt;/p&gt;&lt;p&gt;In Computable Analysis, it is common to work with \(\baire\) directly
rather than with represented sets. In this setting, you can think of
elements of \(\baire\) as coding themselves one-to-one. I'm sure it's clear how to do it, but I will do it for completeness.
Given a problem \(f \partialDefine X \multiTo Y\), we set \(X^\prime =
\dom(\delta_X)\), \(Y^\prime = \dom(\delta_X)\) and define a new problem
\(f^\prime \partialDefine X^\prime \multiTo Y^\prime\) by \((x, y) \in
f^\prime \iff (\delta_X(x), \delta_Y(y)) \in f\).&lt;/p&gt;&lt;p&gt;Further, these problems are equivalent (Weihrauch reducible to
one another) by taking the identity function as the forward map and
the second projection as the backward map.&lt;/p&gt;&lt;p&gt;Finally, we can say that \(\PasmFull\) is the category of partitioned
assemblies over \(\Ktwo\), where each map is tracked by an element of
\(\Ktworec\). Hopefully you agree by now that this is an appropriate
category for handling Weihrauch reducibility, but there is one last
snag to deal with.&lt;/p&gt;&lt;h3&gt;Weihrauch Problems are Bundles&lt;/h3&gt;&lt;p&gt;The definition of reducibility above relates partial
multi-valued functions (a.k.a. &lt;em&gt;problems&lt;/em&gt;) to each other.
However, the maps in our category are tracked &lt;em&gt;functions&lt;/em&gt;,
so they are not a good fit. What gives?&lt;/p&gt;&lt;p&gt;Another way of viewing a problem \(f \partialDefine X \multiTo Y\) is as a family
of sets \(\left(Y_x\right)_{x \in X}\) where \(Y_x = \{ y \in Y : (x, y) \in
f\}\). In the language of dependent types, we might say there is a type
family \(Y(x)\) indexed by \(X\) and form a dependent sum \(\sum_{x : X}
Y(x)\). This type has a projection function, \(\proj_X : \sum_{x : X} Y(x) \to X\)
which maps “answers” to the “instance” of the problem they solve.
Since we have defined it using dependent types, the projection map is
total and tracked, which means \(\proj_X\) is an arrow in \(\PasmFull\).
Such maps are known as &lt;a href=&quot;https://en.wikipedia.org/wiki/Bundle_(mathematics)&quot;&gt;bundles&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;One final thing to note about \(\proj_X\) is that it is not necessarily
surjective; specifically, its image is \(\dom(f)\). It is typical in computable analysis
to assume that all problem instances have solutions, but everything I will say below also
works in the non-total case.&lt;/p&gt;&lt;h2&gt;That's all very well and good but what about Lenses?&lt;/h2&gt;&lt;p&gt;When I think of lenses, I normally think of the &lt;a href=&quot;https://arxiv.org/abs/2312.00990v2&quot;&gt;\(\Poly\)&lt;span title=&quot;Sorry, functional programmers.&quot; data-toggle=&quot;tooltip&quot; class=&quot;footnote&quot;&gt;&lt;/span&gt;, the
category of polynomial functors,&lt;/a&gt; where
(dependent) lens is just another name for a natural transformation. However,
this category is defined in terms of \(\Set\) rather than \(\PasmFull\).
The good news is that &lt;a href=&quot;http://arxiv.org/abs/0906.4931&quot;&gt;Gambino &amp;amp; Kock&lt;/a&gt; worked out the theory of
polynomial functors back in 2010 for arbitrary locally cartesian closed
categories; the bad news is that &lt;a href=&quot;https://arxiv.org/abs/1404.6997v2&quot;&gt;\(\PasmFull\) is not locally
cartesian closed (only weakly so)&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;In the rest of this section, we will borrow enough of Gambino &amp;amp; Kock
to try and justify the “is a lens” claim.&lt;/p&gt;&lt;h3&gt;Polynomials&lt;/h3&gt;&lt;div text=&quot;Polynomial&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;
A &lt;em&gt;polynomial&lt;/em&gt; over a locally cartesian
closed category \(\cE\) with a terminal object is a diagram \(F\) in \(\cE\) of shape:&lt;/p&gt;

&lt;img src=&quot;/static/weihrauch-poly/polynomial.png&quot; class=&quot;mx-auto d-block&quot; alt=&quot;Commuting Diagram showing four objects in a line and three arrows between them.&quot; /&gt;
&lt;/div&gt;&lt;p&gt;The intent of this definition is to capture the concept of a \(J\)-indexed
family of polynomials in \(I\)-many variables. In the case of a single
polynomial in one variable, we can specialise this by taking \(I = J =
1\), where \(1\) is the terminal object. Thus, a polynomial is “just”
an arrow \(f : B \to A\)&lt;span title=&quot;The “category theory is useless” crowd are going to have a field day with that one.&quot; data-toggle=&quot;tooltip&quot; class=&quot;footnote&quot;&gt;&lt;/span&gt;. More specifically, taking
the dependently typed view from earlier, a problem / polynomial \(f\)
given by a type \(\sum_{a : A} B(a)\) and its projection function
\(\proj_A\).&lt;/p&gt;&lt;h3&gt;Polynomial Functors&lt;/h3&gt;&lt;p&gt;In a locally cartesian closed category, we would then go on to define
a polynomial functor
\(P_F : {\cE} / {I} \to {\cE} / {J}\) as the composite&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/static/weihrauch-poly/polynomial-functor.png&quot; class=&quot;mx-auto d-block&quot; alt=&quot;Commuting Diagram of three maps joined end to end&quot; /&gt;&lt;/p&gt;&lt;p&gt;where \(\Delta_s\) is pullback along \(s\), \(\sum_t \adjoint \Delta_t\)
is the “Dependent Sum” functor and  \(\Delta_f \adjoint \Pi_f\) is the
“Dependent Product” functor. The first adjunction is well-defined in any
 category with pullbacks. The second adjunction, on the other hand, is only
 defined in a locally cartesian-closed category. Since Pasm isn't an LCCC,
 we will skip on and not worry about what all this means. Maybe another day…&lt;/p&gt;&lt;h3&gt;Lenses&lt;/h3&gt;&lt;p&gt;So we don't have an LCCC, but we do have pullbacks in \(\PasmFull\) and
this will turn out to be enough to define lenses. First, we will blithely
skip about ten pages further along in G&amp;amp;K's paper to this lovely theorem.&lt;/p&gt;&lt;div class=&quot;theorem&quot;&gt;
&lt;p&gt;
Every strong natural transformation \(P_F \Rightarrow P_G\) between polynomial
functors is represented in an essentially unique way by a diagram like:&lt;/p&gt;
&lt;img src=&quot;/static/weihrauch-poly/morphism-full.png&quot; class=&quot;mx-auto d-block&quot; alt=&quot;Commuting Diagram for vertical-cartesian factorisation&quot; /&gt;
&lt;/div&gt;&lt;p&gt;Now, this is something we can work with. This diagram expresses that
morphisms between polynomial functors have a vertical-cartesian
factorisation system. Again, we don't need to worry too much about
what that means here except to note that a cartesian natural
transformation is one whose naturality squares are all pullbacks.&lt;/p&gt;&lt;p&gt;Now, let's simplify the diagram using \(I = J = 1\) and viewing
problems \(f \partialDefine X \multiTo Y\), \(g \partialDefine Z \multiTo W\) as bundles.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/static/weihrauch-poly/morphism-abbrev.png&quot; class=&quot;mx-auto d-block&quot; alt=&quot;Commuting Diagram for vertical cartesian factorisation, but simplified and specialised to the current case&quot; /&gt;&lt;/p&gt;&lt;p&gt;If we wanted to fill in this diagram in \(\PasmFull\) such that both
squares commute, what work would we need to do? \(\PasmFull\)
has pullbacks, so once we have an arrow \(\Phi : X \to Z\) we'd have the
bottom square. What would such a pullback look like? The construction
of pullbacks in \(\PasmFull\) is exactly like that in \(\Set\) (except for
some additional information about realisers and arrows being tracked),
so we can take \(P = \sum_{x : X} W(\Phi(x))\) with the obvious
morphisms \(\proj_X : P \to X\) and \((x, w) \mapsto (\Phi(x), w) : P \to
\sum_{z : Z} W(z)\).&lt;/p&gt;&lt;p&gt;Now that we know \(P\), we can determine what needs to be true of the
remaining arrow \(\Psi : P \to \sum_{x : X} Y(x)\) for the top square
to commute.
Let \(x \in X\), \(w \in W(\Phi(x))\), then \(\proj_X(\Psi(x, w)) =
\proj_X(x ,w) = x\), so \(\Psi(x, w) = (x, y)\) for some \(y \in Y(x)\). In
other words, \(\Psi(x, \cdot)\), is a map \(W(\Phi(x)) \to Y(x)\).&lt;/p&gt;&lt;p&gt;I claim that these \(\Phi\) and \(\Psi\) are the same as those from
&lt;a href=&quot;#weihrauch-red&quot;&gt;earlier&lt;/a&gt; but recast in the new language. First, since
we are working with partitioned assemblies, we take all the coding maps
\(\delta\) to be the identity. Next, we view a problem
\(f \partialDefine X \multiTo Y\) as a bundle \(\proj_X : \sum_{x : X} Y(x) \to Y\)
and recall that the image of \(\proj_X\) is \(\dom(f)\). Then saying that
a computable function \(\Phi : X \to Y\) takes \(x \in \dom(f)\) to
\(\Phi(x) \in \dom(g)\) is the same as saying that the lower half of
the diagram is a pullback square. Finally, the requirement that
\(y \in g(\Phi(x))\) implies that \(\Psi(x, y) \in f(x)\) is the same as
saying that \((\Phi(x), y) : \sum_{z : Z} W(z)\) implies
\((x, \Psi(x, y)) : \sum_{x : X} Y(x)\). Looking only at the second
arguments, we see that this means we require a function
\(\Psi(x, \cdot) : W(\Phi(x)) \to Y(x)\).&lt;/p&gt;&lt;p&gt;Finally, we can make the following definitions.&lt;/p&gt;&lt;div text=&quot;Problem&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;A &lt;em&gt;Weihrauch problem&lt;/em&gt; P is an epimorphism arrow in \(\PasmFull\).  An &lt;em&gt;Extended Weihrauch Problem&lt;/em&gt; in an arrow in \(\PasmFull\)&lt;/p&gt;
&lt;/div&gt;&lt;div text=&quot;Weihrauch Reducible&quot; class=&quot;definition&quot;&gt;
&lt;p&gt;
Given (extended) problems \(f : Y \to X\), \(g : W \to Z\) in \(\PasmFull\). Then f is
&lt;em&gt;Weihrauch Reducible&lt;/em&gt; to \(g\), \(f \leq_{W} g\), if there exists arrows
\(\Phi : X \to Z\), \(\Psi : W \times_{Z} X \to Y\)
such that the following diagram commutes:&lt;/p&gt;
&lt;img src=&quot;/static/weihrauch-poly/morphism-final.png&quot; class=&quot;mx-auto d-block&quot; alt=&quot;Commuting Diagram for vertical-cartesian factorisation, relabelled to function as definition&quot; /&gt;
&lt;/div&gt;&lt;h2&gt;Wrapping up&lt;/h2&gt;&lt;p&gt;So, we've managed to give another definition of Weihrauch
Reducibility, but this note is already too long, so I'll have to leave
a few things on the table. First, I haven't argued that these form
a category of problems, of which the poset of Weihrauch degrees should
be the skeleton. Second, I never showed that various
operators on degrees correspond to familiar operators on polynomials.
Lastly, I should mention my &lt;a href=&quot;http://arxiv.org/abs/2408.14999&quot;&gt;supervisors's most recent
preprint&lt;/a&gt;, where she discusses the notion of extended Weihrauch reducibility.&lt;/p&gt;&lt;p&gt;Thanks must go, firstly, to my supervisor, &lt;a href=&quot;https://www.swansea.ac.uk/staff/c.pradic/&quot;&gt;Cécilia Pradic&lt;/a&gt;, for putting up with all the
questions necessary for me to understand this topic. I
should also thank the members of the Computable Analysis group at
Swansea (Arno Pauly, Manlio Valenti, Eike Neumann), for what little I
know about Weihrauch reducibility. I would have been in a bad place to
even start this writeup if I hadn't attended Tom de Jong's Categorical
Realisability course at MGS. Finally, thanks to the people I talked to
at
&lt;a href=&quot;https://scottish-pl-institute.github.io/splv/2024-strathclyde/&quot;&gt;SPLV&lt;/a&gt;
that were interested, since otherwise I might never have bothered to
write it up.&lt;/p&gt;</content></entry><entry><title>Obligatory first post!</title><id>https://countingishard.org/obligatory-first-post.html</id><author><name>Ian Price</name></author><updated>2024-04-01T19:00:00Z</updated><link href="https://countingishard.org/obligatory-first-post.html" rel="alternate" /><content type="html">&lt;p&gt;If I'm honest, I'm only writing this page so that my site doesn't seem
completely empty, but that doesn't mean I don't have posts planned.
Famous last words, I suppose. Over the next few weeks, I plan to
upload some of the writing I've already done as part of my PhD
research, including a more leisurely introduction to the ideas in a
paper that my Supervisor and I have just submitted to a conference.
Stay tuned for automata theory, type theory and category theory.&lt;/p&gt;</content></entry></feed>