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: on the concept of ologs


view this post on Zulip Jacob Zelko (Jun 25 2022 at 00:41):

[Beginner Question]: I am working through Spivak's textbook, Category Theory for the Sciences, and am learning about Ontology Logs (ologs). There was a practice problem in the text book that went like this:

Create an olog for human nuclear biological families that includes the concepts of person, man, woman, parent, father, mother, and child. Make sure to label all the arrows and that each arrow indicates a valid aspect in the sense of Section 2.3.2.1. Indicate with check marks the diagrams that are intended to commute. If the 2-dimensionality of the page prevents a check mark from being unambiguous, indicate the intended commutativity with an equation.

For an initial first pass, I left out the check marks but came up with this diagram. family_olog.png.

view this post on Zulip Jacob Zelko (Jun 25 2022 at 00:42):

When I compared my answer to his, he had something quite different: image.png

view this post on Zulip Jacob Zelko (Jun 25 2022 at 00:44):

His answer made sense after I reviewed it.
It seems that with ologs, one should really only box together objects only when absolutely necessary.
In mine, I tried using compound boxes to denote morphisms between objects all at once.
I am just somewhat surprised that I didn't think to keep things as independent as possible.
Does anyone have any tips or thoughts about constructing ologs in general or additional practice problems to think more categorically?
Trying to build my category theory intuition but it seems like I certainly need more practice here!
Thank you!

view this post on Zulip Spencer Breiner (Jun 25 2022 at 12:57):

Hi @Jacob Zelko:

Looking at your first attempt, the thing that jumps out to me is your arrow Child -> Parent. Even though "has a" often functions as a marker of a function in natural language, you always need to be sure the usage is unique. Since many children have two (or more) parents, this relation isn't a function.

I think that might be the reason it felt natural to put both the mother and the father in the same box further down the line.

view this post on Zulip Spencer Breiner (Jun 25 2022 at 13:02):

In terms of checking your work, the best thing to do is imagine an intuitive scenario (e.g., two parents three kids) and use it to fill in the sets (tables) associated with each of the objects. In this example, you would have a Child table with one column "parent", and you would have to decide whether to put Alice or Bob as the parent in Timmy's row.

That mismatch is a signal that something should be modeled in a different way.

view this post on Zulip Jacob Zelko (Jun 25 2022 at 21:49):

Ohhhh that makes so much sense.
Your approach is really cool, I like that it exposes the flaws in thinking while you go through your approach.
Also, as one final thought, when do you think that I one should put concepts in a box?
To me, it feels like it should be more of a last resort.

view this post on Zulip Spencer Breiner (Jun 27 2022 at 13:44):

Hi @Jacob Zelko: For ologs, multiple entities inside the same box corresponds to (a subset of) a product. E.g., in your diagram the box "A man mm and a woman ww" corresponds to a Cartesian product Man×WomanMan\times Woman.

A map into a product p:ZX×Yp:Z\to X\times Y can always be decomposed into a pair of arrows f=proj1p:ZXf=proj_1\circ p: Z\to X and g=proj2p:ZYg=proj_2\circ p: Z\to Y. So a product with only arrows in can always be "boiled out" of an olog.

However, there usually isn't a good way to replace an arrow out of (a subset of) a product like a:X×YZa:X\times Y \to Z, since you need both inputs in order to evaluate a result z=a(x,y)z=a(x,y). The upshot is, if you have arrows out of a product in an olog, the product might really be necessary to describe the situation of interest.

It's always good to think about these things in terms of concrete examples, so think about the function RR×R\R\to\R\times \R defined by p:x(x2,x3)p:x\mapsto (x^2,x^3); it's (hopefully) obvious that we could split this up into a pair of functions f:xx2f:x\mapsto x^2 and g:xx3g:x\mapsto x^3 without losing any information (we could rebuild pp). On the other hand, addition is a map R×RR\R\times\R\to \R, and there is no way to decompose this into a pair of single-input functions.

view this post on Zulip Jacob Zelko (Jun 30 2022 at 03:03):

Hey @Spencer Breiner, with the last few messages you had sent and your feedback, I went back to my notes and learning materials and ruminated on what you were saying for a couple hours this week. I challenged myself with another exercise that came from the text:

Create an olog about a scientific subject, preferably one you think about often. The olog should have at least five boxes, five arrows, and one commutative diagram.

This time, I felt much better as I created an olog around my area of research: mental illness!
I sketched out a couple different ologs and took the table approach that you described earlier to check my thinking.
What was really neat was that as I did this checking, sure enough, more clear structures in my thinking started to emerge as I realized things such as "Oh this box makes sense. This set does not really hold to a one-to-one relationship. Etc" and it helped me to find logical mismatches.
In the end, I have two diagrams that I created representing the same olog. Screenshot_20220629-220343.png Screenshot_20220629-223144.png

view this post on Zulip Jacob Zelko (Jun 30 2022 at 03:08):

The first olog codifies my "categorical" understanding of mental illness where I could read it as "A mental illness has a clinical diagnosis which describes a pattern of behavior which leads to a wellness problem which affects a person" and the second olog utilizes the fact that each box represents the total possible elements belonging to that set described in the box and follows a trace example that could be read as "Bipolar disorder has a clinical diagnosis which describes {Euphoria, Depression} and leads to risky behavior which affects Emil".
There are two paths that also commute in these diagrams that I didn't write out but do you think this makes sense and am on the right track now?

view this post on Zulip Jacob Zelko (Jun 30 2022 at 03:10):

I know in this case, the idea is very toned downed down and there is a lot more nuance in this space that I am aware of, but I know that in ologs and category theory in general, we try our best to abstract away from those complications and focus on relationships between the objects - which I think I accomplished here to some extent.

view this post on Zulip Henry Story (Jul 20 2022 at 09:49):

Thinking relation of @David Spivak's Ologs to the semantic web (via their generalisation to the bicategory of relations by @Evan Patterson ) I was wondering if the core of the rdf schema subject,relation,object:ArrowNode subject, relation, object: Arrow \to Node was not an initial object in the category of schemas or databases.
The practical reason I think this is that essentially all data (that does not contain modal notions) can be transformed into RDF without loss. It seems to be the simplest schema available. (or at least very close to it).

view this post on Zulip Henry Story (Jul 20 2022 at 10:02):

So i guess that would make it some initial or final object in the category of data transformations (on the schema side). Transformations that keep the meaning of the data the same but change the schema.