Mathematical modeling of grammatical diversity supports the historical reality of formal syntax