Seol mar théacs é seo: The mathematics of syntactic structure