<ahref="javascript:toggleDiv('T23')">Quotienting a Monad via Projective Algebras (short talk)</a>
<divstyle="display:none",id="T23"><br/><br/>Quotient types are quite common in mathematics but they are rather difficult to implement in a programming language. For instance, one can easily define the type of pairs of integers $\mathsf{Int}\times \mathsf{Int}$, but in order to define the type of rational numbers, one needs to quotient $\mathsf{Int}\times \mathsf{Int}$ by the relation $(p,q) \sim (r,s) \Leftrightarrow ps = rq$, which is easier said than done. In the framework of monadic programming, datatypes are free algebras for a monad. Not all algebras for a monad are free, but they are all quotients of free algebras. An algebra for a monad is said to be <i>projective</i> if it is both a quotient and a subalgebra of a free algebra. We show that a natural family of projective algebras can be seen as algebras for a quotient monad. In other words, when a quotienting operation is nice enough that 1) the resulting algebra is a subalgebra of the free algebra and 2) it satisfies some naturality condition, then we obtain a monad that models the quotient type.</div>