Delighted that someone is wants to give a detailed explanation of this area. I tried to read the start of the introduction for programmers and it wasn’t as self-evident that I would have thought.
I would have broken up the parts of speech as subject predicate object, s p o, which produces a pattern like a b c while the post wants to introduce a pattern like a b a. The verb also gets inflected in the examples. A starkly literal application of noun verb noun pattern would spell “cat drink milk” rather than “cat drinks milk”. It is also ambigious whether it should carry over that the As are drawn form the same kind of entities (Alice and Bob are persons)
There is also the difference of a verb as it relates to place ina sentence and verb as descripbing an action. For example I do not think that addition is a verb but more of a relation. Part of the shakiness and insecurity on taking on odd concept areas can be the undefinedness of the basic concepts. To that effect I think the post seems me to think that I have a understanding of “objects” and “morphisms” but it really just says “translate these as nouns and verbs”. Okay it is something I can hangs conceptual stuff on but referring to establihed concepts elsewhere seems like a lot of unwanted baggage might be imported in the same go.
If this is part of future steps refer to there but I got myself confused over what is the same or different between programming functions, mathematical functions and morphisms. How it relates to this post based on reading this if I have p: A → B and q: A → B these seem to define two separate morphisms. I get that if I have p:A->B and p:A->C there is a naming conflict and the second p is neccesarily different. But on language level it would seem that “Alice punches Bob” and “Alice hugs Bob” are two separate entities.
I have previous baggage since the difference between a programming function and a mathematical function gives me a theorethical headache. In particular I can imagine two programming functions that have the same input and output behaviour but work differently and are thus clearly separate. Yet mathematical functions are identified by their input/output behaviour. (then there is the problem that some of the extensions are in fact drawn from intensions which makes one wonder whether the extension definitions are just a front for the real thought processes. If you have a thing like “f(x)=x+x^2” it seems to be a different kind of entity than a infinite listing of value pairs) Then there is the thing that programming functions are geniunely verb in that you can execute functions and it corresponds to physical events happening on a computer. However there is no “time progression” for mathematical functions. The analog for morphisms to verbs seems to me that they also have time progression but it seems to be somewhat in conflict with the other source.
You have thought about the language analogy much harder than I did. I will think about how to avoid this issue better in the future, so thank you. In any case, don’t stress it too much—all that this post seeks to establish is that category theory is a mathematics of “stuff taking action on stuff”—moreover, it does so in a logical, intuitive way that you are already familiar with, even if you don’t know higher maths. Judging by Said’s comment, I also should have clarified that specific branches of mathematics fill in particular things for “stuff” and “taking action.” E.g., you get set theory when you fill in “sets” for stuff and “functions” for taking action.
It might get weird for me as part of the past prgoress for me is how functions are actually objects ie non-verblike. You can example code a function into ordered pairs which can be represented as a set. You are meaning more in the sense that a function by itself is missing something has a “hole” in it? For example “It rains” can seem like a language construction where “rain” appears without holes (and in my native language you express that kind of thought without any formal subject, “rains” is a pertfectly fine sentence that descripbes a common wheather condition/activity.).
The baggage that comes with the words noun and verb is only for guiding the search for intuition and is to be discarded when it leads to confusion.
In all your interpretations of math/programming functions, there can be different arrows between the same objects. The input/output behavior is seen as part of the arrow. The objects are merely there to establish what kinds of arrows can be strung together because one produces, say, real numbers, and the other consumes them.
Well if I have a mapping (function, morphism?) that has some “rows” of
1 to 5
A to 3
B to cat
cow to france
it doesn’t seem that descriptive to say that this is a “B->5” mapping. Now usually programming functions are sensible in the sense that the inputs and outputs are of similar types. But if I am start and form the concept of morphism from the ground up how do I know whether such “mixed” types are allowed or not? Or rather given that I do not know of types how I get mapping over multiple inputs?
If your mapping contains those three pairs, then the arrow’s source object contains 1, A, B and cow, and the target object contains 5, 3, cat and france. Allowing or disallowing mixed types gives two different categories. Whether an arrow mixes types is as far as I can tell you to mean uniquely determined by whether its source or target object mix types. In either case, to compose two arrows they must have a common middle object.
I don’t know whether it is a relevant fear but just I am unsure how much the other details other than type compatibility are preserved.
Say you have a mapping O: A->1, B->3 and a mapping P: 4-> france, 5->england. You could then go that O is letters to numbers and P is numbers to countries so you go that mapping from letters to countries should exist but if you start at A or B you don’t end up at any country. Or is the case that {1,3} is a different category than {4,5} rather than letters being equal to letters?
Every category containing O and P must address this question. In the usual category of math functions, if P has only those two pairs then the source object of P is exactly {4,5}, so O and P can’t be composed. In the category of relations, that is arbitrary sets of pairs between the source and target sets, O and P would compose to the empty relation between letters and countries.
I would suspect there are rules how it works that way but now it is not intuitive for me why that would be the result. Why it would not produce the empty function? And if you have a empty relation isn’t it a relation of any type to any type at the same time? Would it or why it would not be an empty relation between letter-shapes and country-dances? But apparently you can have different kinds of empty morphisms based on what their source and target objects are.
I didn’t also realise that composing is relative to how you view the objects.
Categories are what we call it when each arrow remembers its source and target. When they don’t, and you can compose anything, it’s called a monoid. The difference is the same as between static and dynamic type systems. The more powerful your system is, the less you can prove about it, so whenever we can, we express that particular arrows can’t be composed, using definitions of source and target.
Delighted that someone is wants to give a detailed explanation of this area. I tried to read the start of the introduction for programmers and it wasn’t as self-evident that I would have thought.
I would have broken up the parts of speech as subject predicate object, s p o, which produces a pattern like a b c while the post wants to introduce a pattern like a b a. The verb also gets inflected in the examples. A starkly literal application of noun verb noun pattern would spell “cat drink milk” rather than “cat drinks milk”. It is also ambigious whether it should carry over that the As are drawn form the same kind of entities (Alice and Bob are persons)
There is also the difference of a verb as it relates to place ina sentence and verb as descripbing an action. For example I do not think that addition is a verb but more of a relation. Part of the shakiness and insecurity on taking on odd concept areas can be the undefinedness of the basic concepts. To that effect I think the post seems me to think that I have a understanding of “objects” and “morphisms” but it really just says “translate these as nouns and verbs”. Okay it is something I can hangs conceptual stuff on but referring to establihed concepts elsewhere seems like a lot of unwanted baggage might be imported in the same go.
If this is part of future steps refer to there but I got myself confused over what is the same or different between programming functions, mathematical functions and morphisms. How it relates to this post based on reading this if I have p: A → B and q: A → B these seem to define two separate morphisms. I get that if I have p:A->B and p:A->C there is a naming conflict and the second p is neccesarily different. But on language level it would seem that “Alice punches Bob” and “Alice hugs Bob” are two separate entities.
I have previous baggage since the difference between a programming function and a mathematical function gives me a theorethical headache. In particular I can imagine two programming functions that have the same input and output behaviour but work differently and are thus clearly separate. Yet mathematical functions are identified by their input/output behaviour. (then there is the problem that some of the extensions are in fact drawn from intensions which makes one wonder whether the extension definitions are just a front for the real thought processes. If you have a thing like “f(x)=x+x^2” it seems to be a different kind of entity than a infinite listing of value pairs) Then there is the thing that programming functions are geniunely verb in that you can execute functions and it corresponds to physical events happening on a computer. However there is no “time progression” for mathematical functions. The analog for morphisms to verbs seems to me that they also have time progression but it seems to be somewhat in conflict with the other source.
You have thought about the language analogy much harder than I did. I will think about how to avoid this issue better in the future, so thank you. In any case, don’t stress it too much—all that this post seeks to establish is that category theory is a mathematics of “stuff taking action on stuff”—moreover, it does so in a logical, intuitive way that you are already familiar with, even if you don’t know higher maths. Judging by Said’s comment, I also should have clarified that specific branches of mathematics fill in particular things for “stuff” and “taking action.” E.g., you get set theory when you fill in “sets” for stuff and “functions” for taking action.
It might get weird for me as part of the past prgoress for me is how functions are actually objects ie non-verblike. You can example code a function into ordered pairs which can be represented as a set. You are meaning more in the sense that a function by itself is missing something has a “hole” in it? For example “It rains” can seem like a language construction where “rain” appears without holes (and in my native language you express that kind of thought without any formal subject, “rains” is a pertfectly fine sentence that descripbes a common wheather condition/activity.).
The baggage that comes with the words noun and verb is only for guiding the search for intuition and is to be discarded when it leads to confusion.
In all your interpretations of math/programming functions, there can be different arrows between the same objects. The input/output behavior is seen as part of the arrow. The objects are merely there to establish what kinds of arrows can be strung together because one produces, say, real numbers, and the other consumes them.
Well if I have a mapping (function, morphism?) that has some “rows” of
1 to 5 A to 3 B to cat cow to france
it doesn’t seem that descriptive to say that this is a “B->5” mapping. Now usually programming functions are sensible in the sense that the inputs and outputs are of similar types. But if I am start and form the concept of morphism from the ground up how do I know whether such “mixed” types are allowed or not? Or rather given that I do not know of types how I get mapping over multiple inputs?
If your mapping contains those three pairs, then the arrow’s source object contains 1, A, B and cow, and the target object contains 5, 3, cat and france. Allowing or disallowing mixed types gives two different categories. Whether an arrow mixes types is as far as I can tell you to mean uniquely determined by whether its source or target object mix types. In either case, to compose two arrows they must have a common middle object.
I don’t know whether it is a relevant fear but just I am unsure how much the other details other than type compatibility are preserved.
Say you have a mapping O: A->1, B->3 and a mapping P: 4-> france, 5->england. You could then go that O is letters to numbers and P is numbers to countries so you go that mapping from letters to countries should exist but if you start at A or B you don’t end up at any country. Or is the case that {1,3} is a different category than {4,5} rather than letters being equal to letters?
You mean object.
Every category containing O and P must address this question. In the usual category of math functions, if P has only those two pairs then the source object of P is exactly {4,5}, so O and P can’t be composed. In the category of relations, that is arbitrary sets of pairs between the source and target sets, O and P would compose to the empty relation between letters and countries.
I would suspect there are rules how it works that way but now it is not intuitive for me why that would be the result. Why it would not produce the empty function? And if you have a empty relation isn’t it a relation of any type to any type at the same time? Would it or why it would not be an empty relation between letter-shapes and country-dances? But apparently you can have different kinds of empty morphisms based on what their source and target objects are.
I didn’t also realise that composing is relative to how you view the objects.
Categories are what we call it when each arrow remembers its source and target. When they don’t, and you can compose anything, it’s called a monoid. The difference is the same as between static and dynamic type systems. The more powerful your system is, the less you can prove about it, so whenever we can, we express that particular arrows can’t be composed, using definitions of source and target.