Live data from Hacker News

Category Theory Illustrated – Natural Transformations

abuseofnotation.github.io

51–60 of 86 posts

Re: Category Theory Illustrated – Natural Transformations

#51
post #39

Earlier quoted context omitted.

Category theory is what you get when you take mappings instead of sets as the primitive objects of your universe. At first this might seem a perverse thing to do as mappings seem more complex than sets, but that is just because traditionally mappings have usually been defined in terms of sets. In set theory you can specify that two sets be equal and you can also specify that one set be an element of another. In categ…

> Category theory can be used to express some requirements in a very concise way. Could you give an example in programming, what can be easier expressed in CT than with sets and functions?

It's more that category theory foregrounds the functions themselves, and their relationships, rather than on the elements of sets which the functions operate on. This higher-level perspective is arguably the more appropriate level when thinking about the structure of programs.

For more detail, see Bartosz Milewski, Category Theory for Programmers:

"Composition is at the very root of category theory — it’s part of the definition of the category itself. And I will argue strongly that composition is the essence of programming. We’ve been composing things forever, long before some great engineer came up with the idea of a subroutine. Some time ago the principles of structured programming revolutionized programming because they made blocks of code composable. Then came object oriented programming, which is all about composing objects. Functional programming is not only about composing functions and algebraic data structures — it makes concurrency composable — something that’s virtually impossible with other programming paradigms."

https://bartoszmilewski.com/2014/10/28/category-theory-for-p...

Re: Category Theory Illustrated – Natural Transformations

#52

I hate this particular mix of prose and formalism. Too complicated to be pop-sci, too informal to be, well, formal. I got to this part: > We know that two orders are isomorphic if there are two functors, such that going from one to the other and back again leads you to the same object. And I have no clue what is a functor, nor order. "Functor" wasn't defined, and "order" is defined as "thin category", which in turn r…

It's the newest chapter of a book, the previous one defines functors.

Re: Category Theory Illustrated – Natural Transformations

#53
post #20

Earlier quoted context omitted.

I think your reply overstates the importance of category theory in mathematics and doesn't give any hint on what it is about. IMO a better reply would be: category theory appeared to unify the concepts around using discrete objects to prove the properties of continous objects in topology, like fundamental groups, homology groups and homothopy groups. It is only practically useful for very advanced proofs like 2nd Wei…

Wasn't that corrected already? I mean categorical definition of Hask?

If it was, I would like to see the link

Re: Category Theory Illustrated – Natural Transformations

#54
post #28
post #22

Earlier quoted context omitted.

You don't need category theory to connect dots with arrows, graph theory is enough for this.

Category theory is actually a ‘simplified’ graph theory, i.e. you can see categories as a restricted class of graphs. E.G. ‘Category Theory for Computing Science’ introduces categories this way (a category is a directed graph with associative composition and identity; the free category on a graph is the graph with all identities and compositions filled in). But the restrictions (associative composition and identity)…

But what's the utility of this definition? Does it help solve or prove something?

Re: Category Theory Illustrated – Natural Transformations

#55
post #54
post #28

Earlier quoted context omitted.

Category theory is actually a ‘simplified’ graph theory, i.e. you can see categories as a restricted class of graphs. E.G. ‘Category Theory for Computing Science’ introduces categories this way (a category is a directed graph with associative composition and identity; the free category on a graph is the graph with all identities and compositions filled in). But the restrictions (associative composition and identity)…

But what's the utility of this definition? Does it help solve or prove something?

[deleted]

Re: Category Theory Illustrated – Natural Transformations

#56
I like it when teachers (e.g., Grant Sanderson) are careful to explain when they are trying to convey an intuition to motivate and guide some complex math, because it orients you without tangling you in all the misunderstanding that would come from extending analogies or cross-cultural/discipline comparisons too far.

But when authors start slinging around Plato and Aristotle and especially Parmenides willy-nilly alongside modern principles, they're waving a red flag... Don't get me started!

Re: Category Theory Illustrated – Natural Transformations

#57
post #47

What's the thing with category theory? I see this topic discussed quite frequently here but I don't get it why people are so into it

At the 2018(?) ICFP, I sat between John Wiegley and Conal Elliot. They talked about expressing and solving a programming problem in category theory, and then mapping the solution into whatever programming language their employer was using. From what they said, they were having great success producing efficient and effective solutions following this process. I decided to look for other cases where this process worked.…

> you can find much better solutions this way

... because mappings map nicely to functions

Re: Category Theory Illustrated – Natural Transformations

#58
post #41
post #30

Earlier quoted context omitted.

Insofar as ‘computation’ is about mapping one state or value to another state or value, it has a lot to do with CT! The question of whether CT is _useful_ for studying computation is different, and there are certainly other lenses you can see computation through that some people would argue are better. But it's hard to deny that they're _related_.

I mean, technically almost all of math can be related to other math one way or another. To say the CT has a lot to do with computation is definitely a stretch. CT is not a recognized Computer Science subject. It's mostly used in the functional programming community to name certain concepts and theorems, but then applied to a specific type system (so it's not actually doing CT, since your restricting yourself to a sin…

Good point, algebraic topology is mostly concerned with Top -> Grp functors to prove the properties of continuous transformation, while Haskel community focuses on Hask -> Hask endofunctors to use fancy names for mundane things.

Re: Category Theory Illustrated – Natural Transformations

#59
Isomorphism invariance applies to neural assemblies or syntax, not to mere symbols. The problem in math is it models. Brains do not model. Heraclitus was right if math never enters the picture to add its arbitrariness. "A man in the night kindles a light for himself when his sight is extinguished; living he is in contact with the dead when asleep, when awake he is in touch with the sleeper."

Re: Category Theory Illustrated – Natural Transformations

#60

I hate this particular mix of prose and formalism. Too complicated to be pop-sci, too informal to be, well, formal. I got to this part: > We know that two orders are isomorphic if there are two functors, such that going from one to the other and back again leads you to the same object. And I have no clue what is a functor, nor order. "Functor" wasn't defined, and "order" is defined as "thin category", which in turn r…

I agree. There was (and still is) a trend in technical writing that began in the 2010s to be overly pedestrian and informal (and in many cases explicitly vulgar). The same impulse or geist resulted in many people naming their library or product a cute or contrived or irrelevant word.

Get off my lawn! And start giving things long descriptive names that are aliased to acronyms again! db2, netcat, socat, emacs (editing macros), wget...etc.

Post reply on HN