Cohomology of language classes
Project: Topoi of automata
Contents
Every Grothendieck topos has cohomology. Hora proposes to use the cohomology of the Syntactic topos $T(C)$ as an invariant of a class $C$ of languages. The aim is to separate classes such as star-free, regular and non-regular languages, with the generalized star-height problem in view.
1. Idea§
Grothendieck defined topoi to introduce geometric methods into number theory, which is traditionally regarded as a finite and discrete subject. Automata theory is also regarded as a finite and discrete subject. So we ask whether we can construct a space, that is, a topos, for each class of languages, and extract its topological invariants.
2. Definition§
The cohomology of a class of languages is the cohomology of its syntactic topos.
Definition 2.1 (Cohomology of a language class)§
Fix a finite alphabet $\Sigma$. For a set $C$ of languages, let $T(C)$ be its Syntactic topos, the smallest hyperconnected quotient of the topos of Σ-sets that recognizes every language in $C$. For an abelian group object $A$ of $T(C)$, the cohomology of $C$ with coefficients in $A$ is the topos cohomology $H^n(T(C),A)$, the $n$-th right derived functor of the global sections functor $A\mapsto\mathrm{Hom}(1,A)$. For a single language $L$, we write $T(L)=T(\{L\})$.
See p. 52 of Topoi of automata (IRIF) and Definition 3.4 of Topoi of automata II.
3. Examples§
We first list the syntactic topoi of some classes of languages. Then we compute the cohomology in the easiest case, one language over one letter.
Example 3.1 (Syntactic topoi of language classes)§
For a general alphabet $\Sigma$, the syntactic topoi of four classes of languages are as follows. Here $\mathbf{Cont}(M)$ is the topos of continuous actions of a topological monoid $M$, and $\widehat{F_\Sigma}$ is the profinite completion of the free group on $\Sigma$. A group language is a language whose syntactic monoid is a finite group, and a commutative language is a language that contains, with a word, all the words with the same number of occurrences of each letter.
See p. 59 of Topoi of automata (IRIF).
Example 3.2 (Syntactic topoi over one letter)§
For a one-letter alphabet $\Sigma=\{a\}$, the syntactic topoi are as follows. A $p$-adic language is a periodic language whose period is a power of the prime $p$. The topos $\mathbf{PSh}(\mathbb N)$ is the topos of discrete dynamical systems, and $\mathbb N\cup\hat{\mathbb Z}$ is the free profinite monoid on one generator.
See p. 59 of Topoi of automata (IRIF) and the full draft of Topoi of automata II, §3.6.
Example 3.3 (One-letter languages)§
Let $\Sigma=\{a\}$ and let $L$ be a language. A coefficient $A$, an abelian group object of $T(L)$, is in particular an abelian group with an endomorphism $f$, the action of $a$. Write $A^f$ for the fixed points and $A/(1-f)$ for the coinvariants of $f$. The cohomology $H^n(T(L),A)$ and the cohomological dimension of $T(L)$ are as follows.
The three dimensions are those of a point, of $\mathbb{RP}^\infty$ and of the circle $S^1$.
See p. 61 of Topoi of automata (IRIF).
Remark 3.4 (Classical inputs)§
The underlying cases are the classical cohomology of the free monoid $\mathbb N$ and of cyclic groups, which is $2$-periodic for $\mathbb Z/n\mathbb Z$ [CE56, XII.7].
Remark 3.5 (Group languages)§
For $\Sigma=\{a\}$, the syntactic topos $\mathbf{Cont}(\hat{\mathbb Z})$ of group languages is the classifying topos of $\mathrm{Gal}(\overline{\mathbb F_q}/\mathbb F_q)\cong\hat{\mathbb Z}$, whose cohomology is classical; see the next fact.
See p. 38 of Topoi of automata (CSCAT 2025).
Fact 3.6 (Cohomology of $\hat{\mathbb Z}$ [Ser64])§
The group $\hat{\mathbb Z}$ has cohomological dimension $1$, that is, $H^n(\hat{\mathbb Z},A)=0$ for $n\ge2$ and torsion coefficients $A$ [Ser64, Ch. I]. This fails for other coefficients: $H^2(\hat{\mathbb Z},\mathbb Z)\cong\mathbb Q/\mathbb Z$. With all coefficients the dimension is $2$: we have $H^n(\hat{\mathbb Z},A)=0$ for $n\ge3$ and every discrete $\hat{\mathbb Z}$-module $A$, since the strict cohomological dimension is at most one more than the cohomological dimension [Ser64, Ch. I, §3.2].
4. Properties§
For a regular language, the cohomology is the cohomology of a finite monoid.
Proposition 4.1 (Regular languages)§☆
For a regular language $L$ with syntactic monoid $M$, the syntactic topos $T(L)$ is the topos $\mathbf{PSh}(M)$ of right $M$-sets.
See p. 58 of Topoi of automata (IRIF).
Proof§
This is the syntactic monoid result for the syntactic topos; see its proof.
Remark 4.2 (Ext description)§
Presheaves on $M$ are right $M$-sets, and abelian group objects of $\mathbf{PSh}(M)$ are right $\mathbb ZM$-modules. Let $M$ act trivially on $\mathbb Z$. Then for a regular language $L$ with syntactic monoid $M$ and a right $\mathbb ZM$-module $A$, we have $H^n(T(L),A)=\mathrm{Ext}^n_{\mathbb ZM}(\mathbb Z,A)$.
Example 4.3 (Two letters)§
Let $\Sigma=\{a,b\}$. For a regular language $L$ with syntactic monoid $M$, let $\mathbb Z_0$ be the abelian group $\mathbb Z$ on which every non-identity element of $M$ acts by $0$, and let $\mathbb Z$ have the trivial action. The cohomological dimension of $T(L)$ is as follows for four languages.
With left actions instead of right actions, read the reversed languages $a\Sigma^*$, $b\Sigma^*a$ and $a\Sigma\Sigma^*$.
Remark 4.4 (Star-freeness over two letters)§
So over two letters, unlike in the one-letter example, the cohomological dimension does not tell whether a language is star-free.
5. Open problems§
Problem 5.1 (Separation by cohomology)§
Can the cohomology of syntactic topoi separate language classes in open problems of automata theory, in particular in the generalized star-height problem?
Remark 5.2 (Evidence)§
Already in the one-letter case, the cohomology of $T(L)$ carries information about star height: it tells whether $L$ is star-free, that is, of generalized star height $0$. See pp. 6–8 of Topoi of automata (Groupe de travail topossique) and p. 7 of Topoi of automata (SLACS 2025).
Over two letters, the cohomological dimension alone does not separate the star-free languages: see example.
6. Related concepts§
- Syntactic topos · Topoi of automata · Sigma-set · Discrete dynamical system
- Primitive word: Hora pairs the primitive word conjecture with topos-theoretic Galois theory, as he pairs star height with cohomology.
7. References§
- [CE56] Henri Cartan and Samuel Eilenberg, Homological Algebra, Princeton University Press (1956), XII.7.
- [Ser64] Jean-Pierre Serre, Cohomologie galoisienne, Lecture Notes in Mathematics 5, Springer (1964), Chapter I.
- [Hora] Ryuya Hora, Topoi of automata II: Hyperconnected geometric morphisms and syntactic topoi, prepreprint (abridged); the full draft is unpublished.
- [Hor25a] Ryuya Hora, Topoi of automata, slides, CSCAT 2025, 11 March 2025.
- [Hor25b] Ryuya Hora, Topoi of automata, slides, Groupe de travail topossique, 30 April 2025.
- [Hor25c] Ryuya Hora, Topoi of automata (IRIF), slides, Categories for Automata and Language Theory, IRIF, 6 May 2025.
- [Hor25d] Ryuya Hora, Topoi of automata, slides, SLACS 2025, 31 October 2025.
- [Hor25e] Ryuya Hora, Hyperconnectedness for automata theory, slides, 2025, unpublished.
- [Horb] Ryuya Hora, Notes on topos cohomology, unpublished note.