4 ms·
That's pretty neat. Can you recommend a resource to read up on this a bit more?
by superlopuh 8y ago
That's pretty neat. Can you recommend a resource to read up on this a bit more?
- edflsafoiewq 8y agoNot really. You can see the basic idea on the nLab: https://ncatlab.org/nlab/show/variety+of+algebras#free_algebras https://ncatlab.org/nlab/show/variety+of+algebras#free_algeb... Continuing the example I gave, the monad law "Identity" says that "trivial subexpressions are already simplified" a+b = (a)+(b) || || (a+b) = a+b and the monad law "Associativity" says that "order of simplification doesn't matter" ((a)+(b))+((c+d)+(e)) = (a)+(b)+(c+d)+(e) || || (a+b)+(c+d+e) = a+b+c+d+e The laws for an algebra for a monad say "Trivial expressions evaluate to themselves" a = (a) = a and "you get the same result no matter the order you do evaluations and simplifications" (6+1)+(3) = 7+3 || || 6+1+3 = 10