On Structures and Transforms

Patterns are powerful, and luckily as humans we are quite good at recognizing them. Patterns help us identify things we already know, but the fascinating part is that they help us make predictions about the unknown. The second one is the fascinating part. We use it all the time. Predicting what someone might mean from their facial expression when you do not understand the language. We have all had this experience when we visit a foreign country. Predicting the product of an organic reaction based on others we have seen before. This is also how we try to debug a looming problem at work. We try to draw parallels to something we have seen before, to predict the behavior of what's in front of us. The more fundamental the pattern, or theory, the more application of it we will find.

Such a fundamental theory in mathematics is Set Theory. It is so fundamental that when the Logicians set out to express the entirety of mathematics in logic, they relied on it. But in here, we will discuss something else that is equally fundamental if not more so - Category Theory. Being one of those fundamental theories, it has found applications in Psychology, Quantum Mechanics, Control Theory, and for our purpose, Computer Science.

Category Theory might be a totally alien concept for you as it used to be for me, a few weeks back. In the upcoming multi-part blog posts, I would like to explore Category Theory with you. But before we go there, in this post, I would like to lay the structure of how the content will be organized.

I feel that there are three stages to learning a new concept and then becoming proficient in it. The stages are

  • survey
  • recognition
  • using

The ** Survey ** stage is about starting to know the domain. Here, you go over introductory material about your topic of choice. The mode of consumption can be blogs, short write-ups, books and published survey papers. My preference is usually books or survey papers. In case I have not come across any, I will search the internet to see if people have recommendations of books on the topic. I love buying books and therefore, if too many people have recommended a book or two, then I will buy them and devour them. Then usually those books will refer to other books or seminal papers on the topic, and I will follow the trail. On the first reading of the book, the goal is not to understand everything, in fact the goal is to only skim the material to know what the experts talk about when they talk about it. I am just looking to remember the keywords if anything. Once I have gone over 4 or 5 books on the topic, I am starting to pick favorites. For the second reading, I will pick the book that appealed to me the most and read it cover to cover. The goal is to get 60 to 70 percent of the material. Remember the keywords we noted during the skimming phase, some of them should start making sense now. The goal is to have a soliloquy explaining some of the terms or the keywords. I will do the same with the other books, go over them. Authors have different writing styles and each treat the subject matter a little differently. No one book is better than all others, just different. Therefore, you must read more than one text on the topic as each will provide a slightly different intuition than all others.

The first blog will be dedicated to survey. We will go over the fundamental concepts in category theory and I will try to provide you analogies for each of them. I will skip the maths but instead I will refer you to books that I think have done an excellent job at that.

Once the things start making sense to you, it is time to train your eyes to see it all around you. This can take some time and I would argue that we should always keep doing this. One can never get too good at it. This is also hard and can be frustrating at times. The posts targeted to aid in this endeavour, will contain examples and applications of category theory in type theory, language design, reasoning about concurrency. We will also touch on some applications in Control Theory and Quantum Mechanics for completeness. We will discuss some seminal papers that introduced this concept in Computer Science and also some papers from the recent research.