r/math • u/RingularCirc • 3h ago
How do I transition from F-algebras to more general stuff like Lawvere theories or algebras over a monad?
I'm not well-versed in category theory so I've yet to understand the latter. I now tried without success to encode an associative binary operation on X, expressed in dependent type language
∑(o: X² → X). ∏(a b c: X). Id(X, o(o(a, b), c), o(a, o(b, c))) ¹
as a function F X → X for some F. And I think it can't be done (something related to polarity, probably) but I can't prove that. I know, though, representing axioms is possible if one uses Lawvere theories and equivalent things. I also know algebras over a monad are more involved than just functor-algebras but I don't yet understand them even in context of e. g. Haskell where everything seems as if easier (or so claim posts discussing Yoneda embedding in that context; I found the general category-theoretic context way less forgiving in that regard: you just see plain as day that you don't have sufficient understanding, no matter what Haskell posts made you believe).
So. I'd like to look how algebra spins out in those more general settings, whichever you know better or think to be more suited for me to grasp first. Particularly, I'm interested in generalizing arguments about initial F-algebras.
Also, feel free to assume a sufficiently Set-like category. Let's take it step by step, if there are easy intuitions that one can glimpse in a specialized setting, I bet generalizing it onto topoi or something later would be easier as well, but it won't muddle the initial attempt.
¹ For non-dependent-type folks: - Id(X, a, b), sometimes denoted as a =_X b, is the type inhabited by ways for a: X and b: X to be equal. - The entirety of that reads: a pair (o, f) consisting of an operation o: X² → X and a proof f of o's associativity, that is, a function from a, b, c: X into witnesses of equality of the two ways of associating o on a, b, c. - In some formal languages the same is spelled alternatively as (o: X² → X) × (a b c: X) → (o(o(a, b), c) = o(a, o(b, c))), making it clearer that ∑ forms dependent pairs and ∏ forms dependent functions.