Since the cognitive revolution, language and action have been compared as cognitive systems, with cross-domain convergent views recently gaining renewed interest in biology, neuroscience, and cognitive science. Language and action are both combinatorial systems whose mode of combination has been argued to be hierarchical, combining elements into constituents of increasingly larger size. This structural similarity has led to the suggestion that they rely on shared cognitive and neural resources. In this paper, we compare the conceptual and formal properties of hierarchy in language and action using tools from category theory. We show that the strong compositionality of language requires a formalism that describes the mapping between sentences and their syntactic structures as an order-embedded Galois connection, while the weak compositionality of actions only requires a monotonic mapping between action sequences and their goals, which we model as a monotone Galois connection. We aim to capture the different system properties of language and action in terms of the distinction between hierarchical sets and hierarchical sequences, and discuss the implications for the way both systems are represented in the brain.