Tree automata as algebras and coalgebras [mde-U0WX]

(Deterministic) top-down tree automata are coalgebras for the polynomial functor on an algebraic signature, \[ \begin {align*} \Sigma : \mathbf {Set} &\to \mathbf {Set} \\ X &\mapsto \coprod _{\sigma \in \Sigma } X^{\text {ar}(\sigma )}. \end {align*} \] (along with data specifying boundary conditions). Bottom-up tree automata are algebras for the same polynomial functor.