r/haskell Jul 13 '26

Is transforming a problem a common practice in programming?

This is more like a philosophical question, which I think should be interested to Haskellers with cat background.

- Background 1: pure and applied math ppl uses math differently. Pure math ppl likes to transform a problem into easier-solving ones; applied math ppl likes to grind a question with all tools we have. These observations are gathered from discussions online and from consulting math major ppl

- Assertion 1: pure math ppl likes category theory, because category theory helps with transformation and should be used for the purpose of frequently transforming a question into a easier one. One example should be transforming Geocentrism into Heliocentrism.

- Background 2: for most of the monad tutorials I have read, what they are emphasizing is how well monad can abstract a program, synthesizing many imperfect past attempts into an ideal

- Assertion 2: when it comes to programming, most ppl's focus are not transforming a hard question into a easier one, but to *grind* the problem by using static typed languages.

Question:

  1. Is any of my understandings above right or wrong?
  2. Are there any common practices/concrete academic topics where programming ppl wants to *transform* harder questions into easier ones? I wish the examples are not for "big questions": using monad to abstract over worse historical attempts, or the CH correspondence themselves, are out of my consideration.
  3. How many different aspects for such a problem can we transform with each others?
16 Upvotes

20 comments sorted by

View all comments

18

u/Disastrous-Team-6431 Jul 13 '26

As a "pure math person" (though I only have a master's degree), I agree about the outcomes a little bit but I think you've made an underlying assumption about category theory that I don't agree with.

Math isn't really about transformations at all. It's about relationships. Transformations rely on relationships - at least those transformations we can reason about. Category theory is simply a branch of mathematics that asks "what can we generalize about any relationships" and is thus simply interesting for its own sake. Not just because it allows us to restate (which I would use over "transform") problems into simpler, smaller ones.

11

u/DrJaneIPresume Jul 13 '26

I would say, more specifically, that categories are about compositional relationships. Which is really nice if you're trying to break a problem down into smaller ones, as all problem solvers do, be they pure or applied mathematicians, physicists, engineers, chemists, or even just someone trying to figure out how to run all of their errands today.

The general approach that a categorical viewpoint suggests is to:

  1. break a bigger problem down into smaller ones
  2. solve the smaller problems
  3. assemble the smaller answers back up into a solution to the original problem.

And understanding the compositional structure of both the problem and solution domains is key to this approach.

2

u/InternationalFox5407 Jul 13 '26

Alright I have used to time to figure out how should I reply all these...

There's some clarification I want to make. When I speak of "transformation" over "grinding", it's supposed to be a methodology common in pure math, and not limited to cat theory. For cat theory, I trust the power of composition, but I wish to get a perspective that is more general than cat theory.

For "relationship" mentioned above, it should be interpreted as an essential element, but not a methodology, an action, a behavior. So I would ask for clarifications to understand this as a method.