morphisms-of-computational-structures
morphisms-of-computational-structures copied to clipboard
Find out how the categorical duality between expressions and continuations can be grounded using initial and final algebras and co-algebras
Lectures on Semantics: The initial algebra and final coalgebra perspectives Peter Aczel (1997)
A Tutorial on (Co)Algebras and (Co)Induction: https://fldit-www.cs.tu-dortmund.de/~peter/JR.pdf Bart Jacobs, Jan Rutten (1997)
Function Programming with apomorphisms (Co-Recursion): http://cs.ioc.ee/~tarmo/papers/nwpt97-peas.pdf
Alexandra Silva seems to be doing some great work vis à vis Coalgebra: https://alexandrasilva.org/#/talks.html
An idiosyncratic definition of Coalgebras by Paul Blain Levy: https://www.cs.bham.ac.uk/~pbl/coalglect.pdf
Interleaving data and effects: https://bentnib.org/interleaving.html
This looks like an accessible work to understand structural corecursion and codata which uses examples in Agda and Scheme: https://arxiv.org/pdf/2103.06913v1.pdf
Understanding the difference between data vs. codata
https://github.com/idris-lang/Idris-dev/wiki/Copatterns https://web.archive.org/web/20201209020710/http://www.tac-tics.net/blog/data-vs-codata http://www.jucs.org/jucs_10_7/total_functional_programming/jucs_10_07_0751_0768_turner.pdf http://blog.sigfpe.com/2007/07/data-and-codata.html https://www.cs.uoregon.edu/Reports/MS-201806-Sullivan.pdf
An interesting thing to be noted here is how the algebraic structures (monoid, semigroups) etc. have free/forgetful variants. And how different laws on them such as associativity / commutativity etc. gives them certain guarantees. For example, the free monoid means that in the presence of just unit elements and associativity, there is a canonical representation for them. For example, on lists, the ++ is the operator for free monoid with the unit []. But Last is also a monoid, but since it doesn’t preserve the structure, it is not considered as the free version, so with + and * on natural numbers, there too, the concatenation operation is I think considered as the monoid. TODO: Is there a theorem that there will be one and only one free monoid?
Now an interesting thing to observe is that with associativity, both foldLeft and foldRight on monoids will collapse into a single structure. This is one interesting place where associativity’s nature of providing for multiple decomposition of a problem to one confluent representation shines through.