Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: learning: questions

Topic: Testing vs Generating, Characteristic functions vs ??


view this post on Zulip Peva Blanchard (Apr 11 2024 at 06:53):

Another side quest that originates from @David Egolf 's thread.

Consider a function f:XYf : X \rightarrow Y between sets. We were exercising around the ways ff acts on the subsets of XX (taking direct images) and on the subsets of YY (taking inverse images).

Testing and characteristic function

The usual way to characterise a subset VYV \subset Y is via a characteristic function χV:V2\chi_V : V \rightarrow 2. The inverse image is intensionally defined as:

f1(V)={xXf(x)V} f^{-1}(V) = \{ x \in X | f(x) \in V \}

Equivalently,

χf1(V)=χVf \chi_{f^{-1}(V)} = \chi_V \circ f

So taking inverse images of subsets of YY via ff is the same pre-composing characteristic functions with ff.

"Generating function"

Now, I wanted to look at these things from another point of view. I don't know exactly how to formalize this, but I would say that a subset UU of XX is "generatively defined or presented" when we have a "generating function" γU:IU\gamma_U : I \rightarrow U from some indexing set (e.g. natural numbers if UU is countable).

I am not sure about the exact definition of a "generating function"; intuitively I would require it to be surjective at least, and I would allow it to be non-injective. All in all, I picture this function as a machine that produces elements of UU in an exhaustive manner.

Now, from this point of view, the direct image has an obvious "generating function":

γf(U)=fγU \gamma_{f(U)} = f \circ \gamma_U

This, I think, captures the notation

f(U)={f(x)xU}f(U) = \{ f(x) | x \in U \}

My question

I find the symmetry between "characteristic functions/consumer" and "generating functions/producer" quite amusing. I know that, one side, the characteristic functions, plays a big role in other topics, notably via the concept of sub-object classifier.

I was wondering if the other side has been studied too.

edit: the above is corrected as I used the terms "intensional/extensional" in a non-standard way.

view this post on Zulip Matteo Capucci (he/him) (Apr 11 2024 at 07:22):

First, let me point out your usage of intensional and extensional is quite non-standard: both things you present are quite extensional in nature. At least as far as those words mean anything in this setting (I think of intensional as syntactic and extensional as semantical).
Anyway, I'd say what you describe is exactly the universal property of subobject classifiers: it relates 'generating functions' IUI \to U to characteristic functions UΩU \to \Omega. Two caveats. The 'generating function' has to be injective (mono), or: you must factor it through the inclusion of its image first. Second, the intuition of 'generating elements' is quite brittle in my opinion, since to claim γU\gamma_U is effectively enumerating elements of UU requires to take seriously what 'effective' means, and a general set-theoretic function isn't effective at all. If you really want that you might want to work in the [[effective topos]].

view this post on Zulip Peva Blanchard (Apr 11 2024 at 07:25):

I see, thank you, let me rename the topic so as to avoid confusion for other members then.

view this post on Zulip Peva Blanchard (Apr 11 2024 at 12:17):

Mmh, I'm not sure to follow your answer, but that's because my question was ill-formed. I'll edit it again.

view this post on Zulip Oscar Cunningham (Apr 14 2024 at 09:32):

Suppose a set AA has nn elements. Then AA has 2n2^n subsets. There are also 2n2^n functions A2A\to 2, so it's no surprise that the subsets can be put in bijection with the characteristic functions.

But on the 'generating' side of things, the number of quotients of AA would be the nthn\text{th} Bell number, which doesn't have a nice formula. So it's unlikely that there's a similar correspondence.

By the way, a related concept is exact sequences, which occur when a set can be described both by generating and by testing. The elements y of the form f(x) for some x are also the ones with g(y) = 0.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 10:09):

In a parallel world, instead of functions of finite sets (the subprop of commutative Frobenius algebras generated by the 010 \to 1 and 212 \to 1 operations) mathematicians have formed their intuitions on "fusions" of finite sets (the subprop generated by the 212 \to 1 and 101 \to 0 operations) and everybody knows the Bell numbers as 0n0^n, the number of total fusions of nn elements.

view this post on Zulip John Baez (Apr 14 2024 at 10:11):

Oscar Cunningham said:

Suppose a set AA has nn elements. Then AA has 2n2^n subsets. There are also 2n2^n functions A2A\to 2, so it's no surprise that the subsets can be put in bijection with the characteristic functions.

But on the 'generating' side of things, the number of quotients of AA would be the nthn\text{th} Bell number, which doesn't have a nice formula. So it's unlikely that there's a similar correspondence.

There are various cool formulas for the Bell numbers BnB_n, but I think your point is that we don't have

Bn=nkB_n = n^k

for some kNk \in \mathbb{N}, so the set of quotients of finite sets AA can't possibly be isomorphic to hom(K,A)\mathrm{hom}(K, A) for any fixed finite set KK. So there's no "quotient object coclassifier" in Set\mathsf{Set}.

view this post on Zulip Peva Blanchard (Apr 14 2024 at 14:22):

Wow thanks, I didn't know about Bell numbers. I very recently learned about "de/categorication" (thanks @John Baez ), and if I understood correctly, the Bell numbers are somehow a decategorification of the co-presheaf BB that associates with every finite set XX the (finite) set of its quotient objects.

I did delve about the reason why there is no "quotient object coclassifier" in the other thread. In fact, there cannot be such an object in a category with a strict initial object.

@Amar Hadzihasanovic I am intrigued by what you are saying about "fusions". Could you expand a bit more?

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:15):

I will try to be more detailed than not, sorry if you already know some of these things.
The "prop of commutative [[Frobenius algebra]] s" is a monoidal category which shows up in a lot of contexts, and is a fundamental example of a “non-cartesian” algebraic theory.

Being a prop means, roughly, that its

so you can take two morphisms f:nmf: n \to m and g:nmg: n' \to m' and compose them horizontally to get a morphism fg:n+nm+mf \otimes g: n + n' \to m + m'

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:21):

One cool fact about it is that it is equivalent to the monoidal category of 2-cobordisms: if you identify the object nn with nn copies of a circle, then morphisms nmn \to m are “ways of connecting nn 'circular holes' to mm 'circular holes' via a 2-dimensional surface”.
There is a nice book by Joachim Kock telling this story, it's called Frobenius Algebras and 2D Topological Quantum Field Theories

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:24):

But the nLab article also summarises this correspondence with pictures. This one I took from a post by John
commutative_frobenius_algebra.jpg

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:27):

The 4 cobordisms in the top row of the picture -- of type 010 \to 1, 212 \to 1, 101 \to 0, and 121 \to 2, respectively -- actually suffice to generate all the others, that is, you can assemble any cobordism (up to the appropriate notion of equality) by just assembling together copies of those 4.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:28):

So you can ask the question: what sub-prop (sub-monoidal category) can I obtain by just using a subset of those 4?

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:30):

If you take only the first two, that is, 010 \to 1 and 212 \to 1, you get a sub-prop which is equivalent to the “prop of commutative monoids”.
Which is well-known-ish to be the equivalent to the monoidal category of finite sets and functions, with disjoint union as monoidal product.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:30):

So: the morphisms nmn \to m that you can generate using just the 010 \to 1 and 212 \to 1 pieces correspond, bijectively, to functions from an nn-element set to an mm-element set.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:31):

So you may as well call these morphisms “functions”.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:33):

I do not know if there is a name for the morphisms generated using just the 212 \to 1 and 101 \to 0 pieces, but I was suggesting calling them “fusions” since they only allow you to “fuse” together some of the circular holes you started with into the same surface.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:34):

Then what you have is (try it out): fusions n0n \to 0 correspond exactly to partitions of the set of nn elements.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:36):

My not-very-serious suggestion was:
Imagine that our familiarity with the exponential notation nmn^m comes from the fact that

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:37):

Then in the parallel world where fusions are much better-known than functions, they defined nmn^m to be the cardinality of the hom-set Hom(m,n)\mathrm{Hom}(m, n) in the category of finite sets and fusions.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 16:38):

And then 0n0^n is the nn th Bell number.

view this post on Zulip Peva Blanchard (Apr 14 2024 at 17:28):

This is really cool! Thank you for the detailed description. Indeed, I don't know much about props; I stumbled upon them a while back while reading graphical linear algebra.

I think I get the gist. Let me try variations to make sure I understood correctly. When we take 010 \rightarrow 1 and 21 2 \rightarrow 1 as generators, we obtain something close to FinSetFinSet. I would say the skeleton of FinSetFinSet (?). A morphism 010 \rightarrow 1 is like singling out an element. So 0n0 \rightarrow n is really like choosing an explicit set of nn elements.

Another choice than yours would be to take 121 \rightarrow 2 and 010 \rightarrow 1 as generators. And 0n0 \rightarrow n would also correspond exactly to partitions of the set of nn elements. But this is just the dual of your construction, so it makes sense.

Now, if we take 121 \rightarrow 2 and 101 \rightarrow 0, what do I get? I get infinitely many morphisms n0n \rightarrow 0, because the cobordisms can branch out arbitrarily often.

I'll stop here, but this is really fun :)

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 17:32):

The choice 121 \to 2 and 101 \to 0 is dual to the one that gives FinSet\mathrm{FinSet}, so it will actually give you something equivalent (indeed, a skeleton) to FinSetop\mathrm{FinSet}^\mathrm{op}.

view this post on Zulip Amar Hadzihasanovic (Apr 14 2024 at 17:35):

In the subprop equivalent to FinSet\mathrm{FinSet}, the generator 010 \to 1 corresponds to the unique function from the empty set to the singleton set, so it is not "singling out" any element, though.