Seol mar théacs é seo: The logic of categorial grammars