Live data from Hacker News

Category Theory Illustrated – Orders

abuseofnotation.github.io

61–70 of 72 posts

Re: Category Theory Illustrated – Orders

#61

Earlier quoted context omitted.

My comment is not long enough either to get lost in. The prose "It also means that no ties are permitted - either I am better than my grandmother at soccer or she is better at it than me" is inaccurate for describing antisymmetry. In the same short section, you first state the correct condition: You have x ≤ y and y ≤ x only if x = y from which it doesn't follow that "It also means that no ties are permitted". The "n…

The prose is correct. You (presumably) aren't your grandmother, so we have x=/=y. Therefore by the biimplication, (x ≤ y and y ≤ x) is false i.e. either x ≤ y (I am better than my grandmother) or y ≤ x (my grandmother is better than me). The "neither" case is excluded by the law of totality.

> The "neither" case is excluded by the law of totality.

We literally said the same thing. It doesn't follow from antisymmetry.

My point is precisely that:

(x x = y

does not entail

x The second statement is totality/comparability, not antisymmetry.

Re: Category Theory Illustrated – Orders

#62
post #3

I think it is pretty obvious that at the challenge with all abstract mathematics in general and the category theory in particular isnt the fact that people dont understand what a "linear order" is, but the fact it is so distant from daily routine that it seems completely pointless. It's like pouring water over pefectly smooth glass

>so distant from daily routine that it seems completely pointless

imo, this is a problem with how it's taught! Order theory is super useful in programming. The main challenge, beyond breaking past that barrier of perceived "pointlessness," is getting away from the totally ordered / "Comparator" view of the world. Preorders are powerful.

It gives us a different way to think about what correct means when we test. For example, state machine transitions can sometimes be viewed as a preorder. And if you can squeeze it into that shape, complicated tests can reduce down to asserting that <= holds. It usually takes a lot of thinking, because it IS far from the daily routine, but by the same rationale, forcing it into your daily routing makes it familiar. It let's you look at tests and go "oh, I bet that condition expression can be modeled as a preorder on [blah]"

Re: Category Theory Illustrated – Orders

#63
post #37

Earlier quoted context omitted.

Why assume it is javascript? The article doesn't indicate the language anywhere that I can see.

Ok, let's say that it is not JS, but an untyped, closure-based programming language with a strikingly similar array and sort API to JS. Sadly, this comparator is still wrong for any sorting API that expects a general three-way comparison, because it does not handle equality as a separate case. And to tie it down to the mathematics: if a sorting algorithm asks for a full comparison between a and b, and your function r…

It's obviously not a general 3-way comparison API, _because_ it's returning bool!

Extremely strange to see a sort that returns bool, which is one of two common sort comparator APIs, and assume it's a wrong implementation of the other common sort API.

I do see why you're assuming JS, but you shouldn't assume it's any extant programming language. It's explanatory pseudocode.

Re: Category Theory Illustrated – Orders

#64
post #3

I think it is pretty obvious that at the challenge with all abstract mathematics in general and the category theory in particular isnt the fact that people dont understand what a "linear order" is, but the fact it is so distant from daily routine that it seems completely pointless. It's like pouring water over pefectly smooth glass

You're more right than you'd think. The whole point of mathematics is precise thinking, yet the article is very inaccurate. Nobody seems to care or notice. I'm watching in disbelief how nobody is pointing out the article is full of inaccuracies. See my sibling thread for a (very) incomplete list, which should disqualified this as a serious reading: https://news.ycombinator.com/item?id=47814213 My conclusion cannot be…

> Nobody seems to care or notice. I'm watching in disbelief how nobody is pointing out the article is full of inaccuracies.

I don't know. I finished my graduate studies in math a few years ago, and pretty much every textbook by well-known mathematicians was packed with errors. I just stopped caring so much about inaccuracies. Every math book is going to have them. Human beings are imperfect, and great mathematicians are no exception. I'd just download the errata from the uni website and keep it open while reading.

Re: Category Theory Illustrated – Orders

#65
This does the standard thing of treating preorders as the default generalization of partial orders. But an (arguably) more natural, and more useful, generalization of partial orders is acyclicity.

Unfortunately acyclicity isn't called an "order" so people assume it's something unrelated. But "orders" are just second-order properties that binary relations can fulfill, and acyclicity is also such a property.

Acyclicity is a generalization of strict (irreflexive) partial orders, just like strict partial orders are a generalization of strict total (linear) orders. Every strict partial order relation is acyclic, but not every acyclic relation is a strict partial order.

A strict partial order is a binary relation that is both acyclic and transitive, i.e. a strict partial order is the transitive closure of an acyclic relation.

Binary relations of any kind can be represented as sets of pairs, or as directed graphs. If the binary relation in the directed graph is acyclic, that graph is called a "directed acyclic graph", or DAG. In a DAG the transitive closure (strict partial order) is called the reachability relation.

Examples of common acyclic relations that are not strict partial orders: x∈y (set membership), x causes y, x is a parent of y.

Re: Category Theory Illustrated – Orders

#66

The author's writing style and overuse of parentheses is excruciating. True parenthetic material is rare, good technical writers use them sparely.

I see parenthetical expressions overused all over the internet, especially in HN comments. (Don't worry, I do it sometimes, too.) A browser extension to collapse or strike through parenthetical text nested beyond a configurable level might be handy.

Re: Category Theory Illustrated – Orders

#67
I've barely read about Category Theory, but isn't it a just a slightly more mathy version of what programmers have been doing all along? Going up and down levels of abstraction, graphs, functions that transform one type of "object" into another?

Re: Category Theory Illustrated – Orders

#68

If you want to learn category theory in a way that is more orthodox, a lot of people recommend Tom Leinster’s Basic Category Theory, which is free[1]. I’m going to be working through it soon, but the bit I’ve skimmed through looks really good if more “mathsy” than things like TFA. It also does a better job (imo) of justifying the existence of category theory as a field of study. [1] https://arxiv.org/pdf/1612.09375

Disclaimer for the book, and for category theory in general: most books are optimized for people who already master mathematics at an undergraduate level. If you're not familiar with algebraic structures, linear algebra, or topology, be prepared to learn them along the way from different resources. Category theory is also not that impressive unless you already understand some of the semantics it is trying to unify. I…

_Conceptual Mathematics_ is basically category theory for high school students.

https://www.amazon.com/Conceptual-Mathematics-First-Introduc...

Re: Category Theory Illustrated – Orders

#69

Earlier quoted context omitted.

I don't think they are completely wrong - "=>" is just implication. A hidden assumption in their diagrams is that circles of different colours are assumed to be different elements. A morphism from orange to yellow means "O Totality is just the other way around (all two distinct elements are comparable in one direction).

If this is meant to be an explainer, that can't be simply implicit. The text actually seems full of imprecise claims, such as: "All diagrams that look something different than the said chain diagram represent partial orders" "The different linear orders that make up the partial order are called chains" The Birkhoff theorem statement, which is materially wrong. A finite distributive lattice is not isomorphic to "the i…

I mean, it's a blog post, those statements are correct in spirit. A taste thing, I think. I agree about the birkhoff theorem though.

Re: Category Theory Illustrated – Orders

#70

Earlier quoted context omitted.

Disclaimer for the book, and for category theory in general: most books are optimized for people who already master mathematics at an undergraduate level. If you're not familiar with algebraic structures, linear algebra, or topology, be prepared to learn them along the way from different resources. Category theory is also not that impressive unless you already understand some of the semantics it is trying to unify. I…

_Conceptual Mathematics_ is basically category theory for high school students. https://www.amazon.com/Conceptual-Mathematics-First-Introduc...

That looks fantastic actually. Thanks very much for the recommendation.
Post reply on HN