A category is a set of objects and maps between them along with a composition operator. Suppose A,B,C are objects of a category and f : A -> B, g : B -> C maps then their composite gf : A -> C. composition is associative and there is an identity map for each object.
Let C and D be categories, then a functor F : C -> D is a pair of functions, one mapping objects X,Y,.. of C to objects FX, FY, ... of D, another mapping maps f : X -> Y of C to maps Ff : FX -> FY of D. Functors preserve composition (and therefore identities).
A natural transform eta : K -> H between functors K,H : C -> D has components eta_X : KX -> HX for every object X of C. It satisfies the identity Hf eta_X = eta_Y Kf for every map f : X -> Y.
An adjunction F -| G between functors F : C -> D and G : D -> C is a bijection between maps FA -> B and maps A -> GB which is natural in A and B.
An alternative way to view adjunctions is by applying the bijection to the identity function to get what we call unit and counit natual transforms eta : 1 -> GF, epsilon : FG -> 1. "1" here is the identity functor. Ex. for the reader: Prove the equivalence of the two definitions.
The idea of a monad is to remove any mention of the second category D of an adjunction. Let F -| G be an adjunction and define the endofunctor T = GF : C -> C we have the unit eta : 1 -> T and mu = G epsilon F : TT -> T. Check that these satisfy the monad laws mu Teta = 1, mu etaT and mu muT = mu Tmu.
Name:
Anonymous2012-12-27 4:10
so haskell is just abstract bullshite?
Name:
Anonymous2012-12-27 4:57
>>1
Imagine a linear piece of your typical imperative program: you call procedures, assign shit to variables and so on, these statements are separated by semicolons. Now if you have code like:
x = readline();
y = readline();
writeline(x + y);
as MySuperMonad.run(unused => MySuperMonad.readline(x => MySuperMonad.readline(y => MySuperMonad.writeline(x + y))))
where the implementation of MySuperMonad methods can just pass returned values to corresponding lambdas so that they are bound to arguments kinda like assigning shit to variables, or they can do whatever weirder stuff. And that stuff sort of happens between statements, where semicolons originally were, and you can program it. So there you are.
Name:
Anonymous2012-12-27 5:58
>>2 Let C and D be categories, then a functor F : C -> D is a pair of functions, one mapping objects X,Y,.. of C to objects FX, FY, ... of D, another mapping maps f : X -> Y of C to maps Ff : FX -> FY of D. Functors preserve composition (and therefore identities).
mathematician in training here, what the fuck
Name:
Anonymous2012-12-27 6:27
>>5
This is the true nature of computer science, it is study in applied mathematics.
Name:
Anonymous2012-12-27 6:31
>>5
how come X and Y are also sets? waah what the fuck. explain or links.
Name:
Anonymous2012-12-27 8:10
>>5
are you implying that F(id_X) = id_{FX} doesn't follow from F(f . g) = F(f) . F(g)?
Name:
Anonymous2012-12-27 8:42
>>7
They are not sets, they are capital letter variables, yo.
By the way, only plebs use objects in their definition of category theory, real olegs use only morphisms (such that for every morphism f exist endomorphisms g and h such that f.g = h.f = f).
>>10 you can begin here https://www.youtube.com/user/TheCatsters and read some category theory books along with it too, my favorite is Sets for Mathematics by Lawvere. Expect to have to re-study the basic parts many times over a long period.
Name:
Anonymous2012-12-27 16:53
>>15
no, thank you! you can shove your set theory and category theory useless abstract bullshite up your ass, motherfucking scumbag.
>>19 bullshite up your ass, motherfucking scumbag. very happy
ISHYGDDT
Name:
Anonymous2012-12-28 6:31
>>11 and how do you define morphisms?
The same way you define objects... I have a set of morphisms plus a binary operation "composition" defined on some of them, that is all.
Point is, with objects you have particular applications interfering with and limiting your understanding, such as morphisms representing functions, or types of functions, or whatever. What, exactly, the object and morphisms are in a monoid, for example?
Name:
Anonymous2012-12-28 6:44
element is a special case of mapping.
AAAH, that's why they kept considering elements as functions. Element e gets considered as λ.e.
>>24
Your ``ISHYGDDT meme'' is not funny, fuck off back to /g/.
Name:
Anonymous2012-12-28 12:54
>>25
a monoid (M, ·) is a category with only one object, every morphism corresponds to an element of M, and composition is ·
Name:
Anonymous2012-12-28 12:57
>>28
so practically it's just a set and we're looking at all the functions defined on it, right?
Name:
Anonymous2012-12-28 14:01
>>29
yes, the categorical structure arises from the monoid's operation
Name:
Anonymous2012-12-28 14:04
>>30
how could composition mean anything other than the usual function composition? is there an actual point to this abstraction?
Name:
Anonymous2012-12-28 18:00
>>31 just pick any monoid whose objects aren't functions, e.g. numbers with addition
Name:
Anonymous2012-12-28 18:19
monadic dubs
Name:
Anonymous2012-12-28 18:57
>>29,31
The functions defined on it must satisfy certain requirements. Without that all you have is a collection of functions on some domain. Satisfying the requirements gives you room to abstract in certain ways.
Name:
Anonymous2012-12-28 19:32
"Mathematics should be banned as a harmful and obfuscated teaching."
66I am a huge faggot99
-- Ahmed, after failing Algebra 101
Name:
Anonymous2012-12-29 8:48
>>32 just pick any monoid whose objects aren't functions, e.g. numbers with addition
bro, that's what I'm talking about: you don't have objects in a monoid, you have the object, one and only. But you wrote a wrong statement because you are confused by your belief that morphisms are functions on objects.
>>31 how could composition mean anything other than the usual function composition? is there an actual point to this abstraction?
It can mean anything that obeys the rules. The point of this abstraction is that you can prove a lot of useful properties once and for all, then apply them to a variety of things. Kind of like dot-product can mean per-component multiplication for vectors or integration of product for functions; all the stuff about constructing basises and representing values in them is independent of what these values actually are.
"For now I want to emphasize that, unlike in the previous section, the objects do not have to be sets and the arrows need not be functions. In this sense, a category is an abstract algebra of functions, or “arrows” (sometimes also called “morphisms”), with the composition operation “◦” as primitive."
--Awodey, "Category theory", page 5
Name:
Anonymous2012-12-29 13:48
>>40
So why don't they just call "◦" the "category operation" the way we call the group operation in group theory? It would be less confusing.
Name:
Anonymous2012-12-29 14:40
>>41
for same reason why Hom-sets are called Hom-sets
Name:
Anonymous2012-12-29 18:16
>>41
it's just a name, don't assume you know what something is from the name. read the definition.