Categorical semantics of formal languages Categories and algebraic theories mathematics