Search code examples
mathfunctional-programminglambda-calculuscategory-theory

Which terms is corresponding for Map, Filter, Foldable, Bind etc from Category Theory?


I became interested and did not find in one place a list of corresponding terms:

Map <-> Morphism

Foldable <-> Catamorphism

...

Who can supplement the list of terms


Solution

  • I think your question is on the right track but there are so many more ways in which Category Theory connects to other concepts. I also find that relating Category Theory to Type Theory brings more to the table than relating Category Theory to transformations. I say relating, because while Math and Computer Science may use the same terminology, they are not the same; one is not interchangeable with the other.

    Physics, Topology, Logic and Computation: A Rosetta Stone

    by John C. Baez and Mike Stay

    Category Theory: object X
    Computation: data type X

    Category Theory: morphism f: X → Y
    Computation: program f: X → Y

    Category Theory: tensor product of objects: X ⊗ Y
    Computation: product of data types: X ⊗ Y

    Category Theory: tensor product of morphisms: f ⊗ g
    Computation: programs executing in parallel: f ⊗ g

    Category Theory: internal hom: X ⊸ Y
    Computation: function type: X ⊸ Y

    relation between type theory and category theory

    from nLab

    Category Theory: counit for hom-tensor adjunction
    Type Theory: beta reduction

    Category Theory: unit for hom-tensor adjunction
    Type Theory: eta conversion

    Yoneda embedding

    The Yoneda embedding is familiar in category theory. The continuation passing transform is familiar in computer programming. They’re the same thing! Why doesn’t anyone ever say so?

    by Mike Stay

    Other references

    There is so much more to this question than can possibly be put into an SO answer.

    When I was looking into this in the past I asked most of my questions at StackExchange: Computer Science and updated the most useful references as part of the Category Theory tag. Most of what you seek is found in those references.

    TL;DR

    If I could have created tables with the SO Markdown I would have added a lot more, but without being in a table seeing them in a list just loses its impact.

    If you find Category Theory of interest, then you should also look at HoTT (Homotopy Type Theory)