# The corank of a flow over the category of linearly compact vector spaces.

Ilaria Castellano
<EMAIL_ADDRESS>
University of Southampton
Building 54, Salisbury Road - 50171BJ Southampton (UK)

###### Abstract

For a topological flow $(V,\phi)$ \- i.e., $V$ is a linearly compact vector
space and $\phi$ a continuous endomorphism of $V$ \- we gain a deep
understanding of the relationship between $(V,\phi)$ and the Bernoulli shift:
a topological flow $(V,\phi)$ is essentially a product of one-dimensional left
Bernoulli shifts as many as $\mathrm{ent}^{*}(V,\phi)$ counts. This novel
comprehension brings us to introduce a notion of corank for topological flows
designed for coinciding with the value of the topological entropy of
$(V,\phi)$. As an application, we provide an alternative proof of the so-
called Bridge Theorem for locally linearly compact vector spaces connecting
the topological entropy to the algebraic entropy by means of Lefschetz
duality.

_Key words and phrases: linearly compact vector space, algebraic entropy,
topological entropy, algebraic dynamical system, dual goldie dimension,
corank, Bernoulli shift._

##  1 Introduction

Adler, Konheim and McAndrew [1] introduced the notion of topological entropy
$\mathrm{h}_{\textup{top}}$ for continuous self-maps of compact spaces, and
they sketched a definition of the algebraic entropy
$\mathrm{h}_{\textup{alg}}$ for endomorphisms of abelian groups. Later on
these entropy functions have been pushed forward by many different authors,
e.g., [3, 18, 23, 21] (see also [11] for a complete survey).

Here we investigate the topological entropy $\mathrm{ent}^{*}$ and the
algebraic entropy $\mathrm{ent}$ introduced in [5, 6, 4] for continuous
endomorphisms of locally linearly compact vector spaces (see § 2 for all
definitions and properties). In particular, the ultimate aim of this paper is
to characterise the topological entropy $\mathrm{ent}^{*}$ for linearly
compact vector spaces in terms of a corank function; and this aim is achieved
with Theorem C in Section 5.

Let ${}_{\mathbb{K}}\mathrm{LC}$ denote the category of linearly compact
$\mathbb{K}$-spaces and their continuous endomorphisms. A topological flow is
a pair $(V,\phi)$ consisting of an object $V$ of ${}_{\mathbb{K}}\mathrm{LC}$
and an endomorphism $\phi$ of $V$. Recall that the topological entropy
$\mathrm{ent}^{*}$ for linearly compact $\mathbb{K}$-spaces is actually an
invariant

$\mathrm{ent}^{*}\colon\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})\to\mathbb{N}\cup\\{\infty\\},$

of the category $\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})$ of topological
flows. Therefore, the aim is to design a corank function

$\mathrm{cork}\colon\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})\to\mathbb{N}\cup\\{\infty\\}$

for topological flows able to satisfy the following equality:

$\mathrm{cork}(V,\phi)=\mathrm{ent}^{*}(V,\phi),\quad\forall\
(V,\phi)\in\mathrm{ob}(\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})).$

The initial motivation is the well-know characterisation of the algebraic
entropy of algebraic flows (i.e., pairs of type $(W,\psi)$ consisting of a
discrete $\mathbb{K}$-space $W$ and an endomorphism $\psi$ of $W$) in terms of
the torsion-free rank of modules over PID; a detailed proof of this
characterisation is given in [16]. Since ${}_{\mathbb{K}}\mathrm{LC}$ and
${}_{\mathbb{K}}\mathrm{Vect}$ are known to be dual each other by Lefschetz
duality (see §2.1, 2.2), it is worth looking for the topological counterpart
of the characterisation proved in [16].

After a few pages of preliminaries, we essentially start with Section 3 that
is dedicated to topological flows of non-zero topological entropy. There we
give an accurate description of the role played by left Bernoulli shifts in
order to get $\mathrm{ent}^{*}(V,\phi)>0$. The main idea is to look at those
closed $\phi$-invariant linear subspaces $S$ of $V$ such that $\phi$ induces a
Bernoulli-like action on the factor $V/S$. Then $\mathrm{ent}^{*}(V,\phi)$ is
not zero only when $S$ turns out to be a $\phi$-cotrajectory
$C(\phi,U)=U\cap\phi^{-1}U\cap\ldots\cap\phi^{-n+1}U\cap\ldots$ of a fairly
large linearly compact open subspace $U$ of $V$; see Corollary 3.3. Such a
cotrajectory has to be both cocyclic (i.e., $\dim_{\mathbb{K}}(V/U)=1$) and
non-stationary (i.e., $C(\phi,U)$ is not open in $V$). But one can say even
more:

######  Theorem A.

For a topological flow $(V,\phi)$ the following are equivalent:

  * a)

the topological entropy $\mathrm{ent}^{*}(V,\phi)=k\in\mathbb{N}$,

  * b)

there exist $k\in\mathbb{N}$ coindependent non-stationary cocyclic
$\phi$-cotrajectories $\\{C(\phi,U_{i})\mid i=1,\ldots,k\\}$ such that

$\mathrm{ent}^{*}(C,\phi\restriction_{C})=0,\quad\text{where}\quad
C=\bigcap_{i=1}^{k}C(\phi,U_{i}).$

Moreover, $\mathrm{ent}^{*}(V,\phi)=\infty$ if, and only if, there exists an
infinite (countable) coindependent family of non-stationary cocyclic
$\phi$-cotrajectories.

In other words, a topological flow $(V,\phi)$ is “essentially” a product of
one-dimensional left Bernoulli shifts as many as $\mathrm{ent}^{*}(V,\phi)$
counts. This insight of the relationship between Bernoulli shifts and non-zero
entropy topological flows will lead us towards all the remaining results of
the paper.

Here “essentially” means that $(V,\phi)$ is considered up to topological
subflows of topological entropy $=0$. In Section 4, we detail how the
vanishing of the topological (resp. algebraic) entropy defines a torsion
theory over the category of topological (resp. algebraic) flows. It is
important to highlight that we cannot provide here a module-theoretic property
able to capture the vanishing of the topological entropy even if such module-
theoretic property does exist in the algebraic case (namely, the torsion-free
rank). For this reason the construction of the torsion theory over the
category of topological flows cannot be made (at the moment) independent on
the topological entropy itself.

However, treating the notion of torsion axiomatically has the advantage to let
us prove easily the existence of Pinsker-like constructions in our setup (see
[2, 10] for this kind of constructions in other contexts). Namely, any
topological flow $(V,\phi)$ admits the largest factor
$(P_{top}(V,\phi),\overline{\phi}^{t})$ of zero topological entropy, called
Pinsker factor, and any algebraic flow $(W,\psi)$ admits the Pinsker subflow
$(P_{alg}(W,\psi),\psi\restriction_{a})$ that is the largest subflow of
algebraic entropy $=0$. Since the torsion theories over
${}_{\mathbb{K}}\mathrm{LC}$ and ${}_{\mathbb{K}}\mathrm{Vect}$ turns out to
be dual each other, one deduces the following relation between Pinsker factor
and Pinsker subflow:

######  Theorem B.

Let $(V,\phi)$ be a topological flow. Then

$(P_{top}(V,\phi),\overline{\phi}^{t})\cong(V/P_{alg}(\widehat{V},\widehat{\phi})^{\perp},\overline{\phi}^{a}),$

where $\overline{\phi}^{t}\colon P_{top}(V,\phi)\to P_{top}(V,\phi)$ and
$\overline{\phi}^{a}\colon V/P_{alg}(\widehat{V},\widehat{\phi})^{\perp}\to
V/P_{alg}(\widehat{V},\widehat{\phi})^{\perp}$ are both induced by $\phi$. In
particular,

$D_{+}(V,\phi)\cong_{top}P_{alg}(\widehat{V},\widehat{\phi})^{\perp}\quad\text{and}\quad\widehat{D_{+}(V,\phi)}\cong
F_{+}(\widehat{V},\widehat{\phi}).$

The $\mathbb{K}$-vector spaces $D_{+}(V,\phi)$ and
$F_{+}(\widehat{V},\widehat{\phi})$ denote respectively the domain of
completely positive topological entropy of $(V,\phi)$ and the factor of
completely positive algebraic entropy of $(\widehat{V},\widehat{\phi})$ that
will be defined in Section 4.

Notice that the analogue [9, Thm. A] of Theorem B in the context of Pontryagin
duality is dissimilarly deduced by the Bridge Theorem connecting the
topological entropy and the algebraic entropy of abelian groups by means of
Pontryagin duality. Notice that, since a version of the Bridge Theorem for
locally linearly compact spaces is also available in [6], one can choose to
use it in order to shorten some proofs in this paper. However we prefer to
avoid any possible application of the Bridge Theorem here in order to first
make the proofs less mysterious and then provide an alternative proof of the
Bridge Theorem itself as an application of Theorem C at the end of the last
section; this important result finds some analogues in many other contexts
(see, e.g., [23, 20, 9, 12, 22]).

We conclude the paper with the section devoted to the definition of the corank
function over $\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})$ characterising
$\mathrm{ent}^{*}$. Such a function has the purpose to measure the torsion of
a topological flow $(V,\phi)$, i.e., its domain of completely positive
topological entropy $D_{+}(V,\phi)$. Subsequently, the corank of a topological
flow $(V,\phi)$ is defined to be a dimension of
$(D_{+}(V,\phi),\phi\restriction_{D_{+}(V,\phi)})$ regarded as a lattice: the
corank of $(V,\phi)$ is the dual Goldie dimension of the modular lattice
formed by all closed $\phi$-invariant subspaces of $D_{+}(V,\phi)$.

The idea to use the dual Goldie dimension to measure $D_{+}(V,\phi)$ comes
from the observation that the rank of a torsion-free module over a PID
coincides with its Goldie dimension. Therefore, the authors of [16] actually
prove that the algebraic entropy of an algebraic flow coincides with the
Goldie dimension of its factor of completely positive algebraic entropy. By
the way, it is surprising how the dual Goldie dimension plays a central role
in this context, since it usually does not appear in the setting of
topological modules.

ery locally linearly compact space $V$ together with a continuous endomorphism
$\phi$ corresponds univocally to a topological $\mathbb{K}[t]$-module
${}_{\phi}V$, where $\mathbb{K}[t]$ denotes the (discrete) polynomial ring in
the variable $t$. For an algebraic flow $(V,\phi)$, the $\mathbb{K}[t]$-module
${}_{\phi}V$ is actually discrete and we recover the well-known equivalence of
categories
$\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})\cong{}_{\mathbb{K}[t]}\mathrm{Mod}.$
Finally, as a consequence of Theorem A, one proves

######  Theorem C.

For every topological flow $(V,\phi)$, one has

$\mathrm{ent}^{*}(V,\phi)=\mathrm{cork}(V,\phi).$

##  2 Preliminaries

###  2.1 Linearly compact vector spaces

Let $\mathbb{K}$ be a discrete field. A Hausdorff topological
$\mathbb{K}$-space $V$ is said to be _linearly topologized_ if it admits a
neighborhood basis at $0$ consisting of $\mathbb{K}$-subspaces of $V$. A
linearly topologized $\mathbb{K}$-space $V$ is _linearly compact_ if any
collection of closed linear varieties of $V$ with the finite intersection
property has non-empty intersection. E.g., discrete vector spaces are linearly
compact as well as compact linearly topologized spaces.

Here we collect a few properties that we frequently use further on with no
previous acknowledgement. Let $V,V^{\prime}$ and $W$ be linearly topoligized
$\mathbb{K}$-spaces such that $W\leq V$, then

  1. (LC1.)

if $W$ is linearly compact, then $W$ is closed in $V$;

  2. (LC2.)

if $V$ is linearly compact and $W$ is closed, then $W$ is linearly compact;

  3. (LC3.)

linear compactness is preserved by continuous homomorphisms;

  4. (LC4.)

if $V$ is discrete, then $V$ is linearly compact if and only if $V$ has finite
dimension;

  5. (LC5.)

if $W$ is closed, then $V$ is linearly compact if and only if $W$ and $V/W$
are linearly compact;

  6. (LC6.)

an inverse limit of linearly compact vector spaces is linearly compact;

  7. (LC7.)

every linearly compact vector space is complete;

  8. (LC8.)

for $V$ linearly compact, any continuous homomorphism $f\colon V\to
V^{\prime}$ is open onto its image;

  9. (LC9.)

the isomorphism theorems hold in ${}_{\mathbb{K}}\mathrm{LC}$;

  10. (LC10.)

every linearly compact $\mathbb{K}$-space is a Tychonoff product of one-
dimensional $\mathbb{K}$-spaces.

A topological $\mathbb{K}$-vector space $V$ is _locally linearly compact_
(briefly, l.l.c. ) if it admits a neighbourhood basis at $0$ consisting of
linearly compact open $\mathbb{K}$-subspaces. Let
${}_{\mathbb{K}}\mathrm{LLC}$ denote the category of l.l.c.
$\mathbb{K}$-spaces and their continuous homomorphisms. Clearly,
${}_{\mathbb{K}}\mathrm{LC}$ and ${}_{\mathbb{K}}\mathrm{Vect}$ (i.e., the
category of discrete $\mathbb{K}$-vector spaces) are full subcategories of
${}_{\mathbb{K}}\mathrm{LLC}$.

###  2.2 Lefschetz Duality

For an l.l.c. space $V$, the Lefschetz dual $\widehat{V}$ is defined to be
$\mathrm{CHom}(V,\mathbb{K})$ endowed with the (linearly compact)-open
topology. Namely, the topology on $\widehat{V}$ has the family

$\\{A^{\perp}\mid A\leq V,\ A\ \text{linearly compact}\\}$ (2.1)

as neighbourhood basis at $0$, where
$A^{\perp}=\\{\chi\in\mathrm{CHom(V,\mathbb{K})}:\chi(A)=0\\}$. Given a closed
$\mathbb{K}$\- subspace $U$ of $V$, one has

$\widehat{V/U}\cong_{top}U^{\perp}\quad\text{and}\quad\widehat{U}\cong_{top}\widehat{V}/U^{\perp}.$
(2.2)

Lefschetz dual of discrete $\mathbb{K}$-spaces is linearly compact, and vice-
versa. More generally, the dual functor

$\widehat{-}:\ _{\mathbb{K}}\mathrm{LLC}\to_{\mathbb{K}}\mathrm{LLC}$

is such that
$\widehat{\vphantom{\rule{0.0pt}{5.71527pt}}\smash{\widehat{-}}}\colon_{\mathbb{K}}\mathrm{LLC}\,\to\,_{\mathbb{K}}\mathrm{LLC}$
is naturally ismorphic to
$\mathrm{id}\colon_{\mathbb{K}}\mathrm{LLC}\,\to\,_{\mathbb{K}}\mathrm{LLC}$.

###  2.3 Topological entropy and algebraic entropy over
${}_{\mathbb{K}}\mathrm{LLC}$

Let $V$ be an l.l.c. $\mathbb{K}$-space and $\mathcal{B}(V)$ denote the set of
all linearly compact open $\mathbb{K}$-subspaces of $V$. Inspired by the
notion of topological entropy for totally disconnected locally compact groups
and their endomorphisms (see [13, 15]), the topological entropy for l.l.c.
$\mathbb{K}$-spaces is defined to be

$\mathrm{ent}^{*}(V,\phi)=\sup_{U\in\mathcal{B}(V)}H^{*}(\phi,U),\quad(V,\phi)\in\textup{ob}(\mathrm{Flow}(_{\mathbb{K}}\mathrm{LLC})),$
(2.3)

where
$H^{*}(\phi,U)=\lim_{n\to\infty}\frac{1}{n}\cdot\dim(U/(U\cap\phi^{-1}U\cap\ldots\cap\phi^{-n+1}U))$.

Dually, the algebraic entropy of
$(V,\phi)\in\textup{ob}(\mathrm{Flow}(_{\mathbb{K}}\mathrm{LLC}))$ is given by

$\mathrm{ent}(V,\phi)=\sup_{U\in\mathcal{B}(V)}H(\phi,U),$ (2.4)

where $H(\phi,U)=\lim_{n\to\infty}\frac{1}{n}\cdot\dim((U+\phi
U+\cdots+\phi^{n-1}U)/U)$.

Both $\mathrm{ent}^{*}$ and $\mathrm{ent}$ are invariants of the category
$\mathrm{Flow}(_{\mathbb{K}}\mathrm{LLC})$ satisfying:

  1. P1.

Invariance under conjugation: for every topological isomorphism $\alpha\colon
V\to V^{\prime}$ one has

$\mathrm{ent}^{*}(V^{\prime},\alpha\phi\alpha^{-1})=\mathrm{ent}^{*}(V,\phi)\quad\text{and}\quad\mathrm{ent}(V^{\prime},\alpha\phi\alpha^{-1})=\mathrm{ent}(V,\phi);$

  2. P2.

Monotonicity: for any closed linear subspace $W$ of $V$ such that $\phi(W)\leq
W$ one has

$\mathrm{ent}^{*}(V,\phi)\geq\max\\{\mathrm{ent}^{*}(W,\phi\restriction_{W}),\mathrm{ent}^{*}(V/W,\overline{\phi})\\}\
\text{and}$
$\mathrm{ent}(V,\phi)\geq\max\\{\mathrm{ent}(W,\phi\restriction_{W}),\mathrm{ent}(V/W,\overline{\phi})\\},$

where $\overline{\phi}\colon V/W\to V/W$ is induced by $\phi$;

  3. P3.

Logarithmic law: if $k\in\mathbb{N}$, then

$\mathrm{ent}^{*}(V,\phi^{k})=k\cdot\mathrm{ent}^{*}(V,\phi)\quad\text{and}\quad\mathrm{ent}(V,\phi^{k})=k\cdot\mathrm{ent}(V,\phi);$

  4. P4.

Continuity on inverse limits: let $\\{W_{i}\mid i\in I\\}$ be a directed
system (under inverse inclusion) of closed $\phi$-invariant linear subspaces
of $V$. If $V=\varprojlim V/W_{i}$, then $\mathrm{ent}^{*}(\phi)=\sup_{i\in
I}\mathrm{ent}^{*}(\overline{\phi}_{W_{i}})$, where any
$\overline{\phi}_{W_{i}}\colon V/W_{i}\to V/W_{i}$ is the continuous
endomorphism induced by $\phi$;

  5. P5.

Continuity on direct limits: let $V$ be an l.l.c. vector space and
$\phi\colon V\to V$ a continuous endomorphism. Assume that $V$ is the direct
limit of a family $\\{V_{i}\mid i\in I\\}$ of closed $\phi$-invariant linear
subspaces of $V$, and let $\phi_{i}=\phi\restriction_{V_{i}}$ for all $i\in
I$. Then $\mathrm{ent}(\phi)=\sup_{i\in I}\mathrm{ent}(\phi_{i});$

  6. P6.

Vanishing property:
$\mathrm{ent}^{*}\restriction_{\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})}=0\quad\text{and}\quad\mathrm{ent}\restriction_{\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})}=0;$

  7. P7.

Addition Theorem: for every closed linear subspace $W$ of $V$ such that
$\phi(W)\leq W$ one has

$\mathrm{ent}^{*}(V,\phi)=\mathrm{ent}^{*}(W,\phi\restriction_{W})+\mathrm{ent}^{*}(V/W,\overline{\phi}),$
$\mathrm{ent}(V,\phi)=\mathrm{ent}(W,\phi\restriction_{W})+\mathrm{ent}(V/W,\overline{\phi}),$

where $\overline{\phi}\colon V/W\to V/W$ is induced by $\phi$.

Moreover, since it has been pointed out in [5] that
$\mathrm{ent}\restriction_{\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})}$
coincides with the dimension entropy $\mathrm{ent}_{dim}$ studied in [16],
throughout this paper all the well-known results concerning
$\mathrm{ent}_{dim}$ will be automatically considered to be properties of the
algebraic entropy
$\mathrm{ent}\restriction_{\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})}$.

######  Remark 2.1.

The main ingredient in both definitions is the fact that $U\cap\phi(U)$ has
finite codimension in $\phi(U)$ (or, equivalently, $U\cap\phi^{-1}(U)$ has
finite codimension in $U$). This is a phenomenon - giving the name
$\phi$-inert to $U$ \- inspired by a series of papers of U. Dardano and
coauthors (see the survey [7]).

######  Example 2.2 (Bernoulli shifts).

For the purposes of this paper, we consider here only one type of Bernoulli
shift, which will be referred to as 1-dimensional Bernoulli shift.

Let $V_{c}$ be the linearly compact product $\prod_{n=0}^{\infty}\mathbb{K}$.
The _left 1-dimensional Bernoulli shift_ is

${}_{\mathbb{K}}\beta\colon V_{c}\to
V_{c},\quad(x_{n})_{n\in\mathbb{N}}\mapsto(x_{n+1})_{n\in\mathbb{N}}.$

Therefore, $(V_{c},{}_{\mathbb{K}}\beta)$ is a topological flow and
$\mathrm{ent}^{*}(V_{c},{}_{\mathbb{K}}\beta)=1$.

Dually, let $V_{d}=\bigoplus_{n=0}^{\infty}\mathbb{K}$ be equipped with the
discrete topology. Thus one defines the _right (1-dimensional) Bernoulli
shift_ as

$\beta_{\mathbb{K}}\colon V_{d}\to
V_{d},\quad(x_{0},x_{1},\ldots)\mapsto(0,x_{0},x_{1},\dots).$

In particular,

$\widehat{(V_{c},{}_{\mathbb{K}}\beta)}=(\widehat{V_{c}},\widehat{{}_{\mathbb{K}}\beta})\cong(V_{d},\beta_{\mathbb{K}}),$

and $(V_{d},\beta_{\mathbb{K}})$ has algebraic entropy $=1$.

##  3 Counting left one-dimensional Bernoulli shifts

###  3.1 Coindependent families of linearly compact spaces

Let $M$ be a module over an associative ring with unit. A finite set
$\\{N_{i}\mid i\in I\\}$ of proper submodules of $M$ is said to be
coindependent if

$N_{i}+\bigcap_{j\neq i}N_{j}=M\quad\forall i\in I.$

More generally, an arbitrary set of proper submodules of $M$ is coindependent
if every finite subset is. When $I=\mathbb{N}$, it suffices to check
coindependence of $\\{N_{i}\mid 1\leq i\leq n\\}$ for each $n$.

Given a coindependent finite set $\\{N_{0},\dots,N_{k}\\}$ of proper
submodules of $M$, one has a canonical isomorphism of modules

$\xi_{k}\colon\frac{M}{N_{0}\cap\ldots\cap
N_{k}}\longrightarrow\prod_{i=0}^{k}\frac{M}{N_{i}},$ (3.1)

where $m+N_{0}\cap\ldots\cap N_{k}\mapsto(m+N_{0},\ldots,m+N_{k}),$ for all
$m\in M.$ When $M$ is a linearly compact $\mathbb{K}$-space and each $N_{i}$
is closed in $M$, then (3.1) is a topological isomorphism because of the open
mapping theorem (cf. LC8. in $\S\ref{ss:lc}$).

######  Proposition 3.1.

Let $(V,\phi)$ be a topological flow and $\\{W_{0},\dots,W_{n}\\}$ a
coindependent set of closed $\phi$-invariant linear subspaces of $V$. For
$W=W_{0}\cap\ldots\cap W_{n}$ one has

$n+1\leq\mathrm{ent}^{*}(V/W,\overline{\phi})\leq\mathrm{ent}^{*}(V,\phi)$

whenever $\mathrm{ent}^{*}(\overline{\phi}^{i})>0$ for all $i=1,\ldots,n$,
where each $\overline{\phi}^{i}\colon V/W_{i}\to V/W_{i}$ is induced by
$\phi$.

###### Proof.

By (3.1), the following diagram

$\textstyle{\frac{V}{W}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\overline{\phi}}$$\scriptstyle{\xi_{n}}$$\textstyle{\frac{V}{W}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\xi_{n}}$$\textstyle{\prod_{i=0}^{n}\frac{V}{W_{i}}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\prod\overline{\phi}^{i}}$$\textstyle{\prod_{i=0}^{n}\frac{V}{W_{i}}}$

commute, where $\overline{\phi}\colon V/W\to V/W$ and
$\overline{\phi}^{i}\colon V/W_{i}\to V/W_{i}$ (for all $i$) are induced by
$\phi$. Since $\mathrm{ent}^{*}$ takes values in $\mathbb{N}\cup\\{\infty\\}$,
the Addition Theorem together with the invariance under conjugation yields

$n+1\leq\mathrm{ent}^{*}(V/W,\overline{\phi})\leq\mathrm{ent}^{*}(V,\phi).$

∎

###  3.2 Non-stationary cocyclic $\phi$-cotrajectory

Let $(V,\phi)$ be a topological flow. For $U$ linearly compact open
$\mathbb{K}$-subspace in $V$ and $n\in\mathbb{N}_{>0}$, set

$C_{n}(\phi,U)=U\cap\phi^{-1}U\cap\ldots\cap\phi^{-n+1}U\in\mathcal{B}(V).$
(3.2)

Then one defines the $\phi$-cotrajectory of $U$ to be

$C(\phi,U)=\bigcap_{n\in\mathbb{N}_{>0}}C_{n}(\phi,U).$ (3.3)

A $\phi$-cotrajectory $C(\phi,U)$ is said to be cocyclic if $U$ has
codimension 1 in $V$, and $C(\phi,U)$ is said to be non-stationary if
$C(\phi,U)$ is not open in $V$, i.e., the descending chain of linearly compact
open spaces

$U\geq\cdots\geq C_{n}(\phi,U)\geq C_{n+1}(\phi,U)\geq\cdots,$

is not stationary (see [6, Proposition 3.6]). Notice that a
$\phi$-cotrajectory is stationary whenever there exists some $n$ such that
$C_{n}(\phi,U)=C_{n+1}(\phi,U)$ by [6, Proposition 3.2].

######  Lemma 3.2.

Let $(V,\phi)$ be a topological flow and $C(\phi,U)$ a non-stationary cocyclic
$\phi$-cotrajectory. Then

  1. 1.

the closed subspace $\phi^{-n}U$ has codimension 1 in $V$ for every $n\in N$;

  2. 2.

$\mathfrak{F}=\\{\phi^{-n}U\\}_{n\in\mathbb{N}}$ is a coindependent family in
$V$;

  3. 3.

the topological entropy of $\phi$ with respect to $U$ is equal to 1, i.e.,
$H^{*}(\phi,U)=1$.

###### Proof.

Let $\pi\colon V\to V/U$ be the canonical projection. For all
$n\in\mathbb{N}$, the rank of the linear map $\pi\circ\phi^{n}\colon V\to V/U$
is less or equal to $\dim(V/U)$. Hence $\dim(V/\phi^{-n}U)\leq 1$ since
$C(\phi,U)$ is cocyclic. Moreover, for $C(\phi,U)$ is non-stationary,
$C_{n}(\phi,U)\neq C_{n+1}(\phi,U)$ for all $n\in\mathbb{N}$. Thus
$\phi^{-n}U\neq V$ for all $n\in\mathbb{N}$, and $(1)$ holds.

In order to prove $(2)$, by [17, Lemma 1.1], it suffices to show that
$\phi^{-n}U+C_{n}(\phi,U)=V$ for each $n\in\mathbb{N}_{>0}$. This follows
easily by $(1)$ and the fact that $C(\phi,U)$ is non-stationary.

Let $n\in\mathbb{N}_{>0}$. Thus $(1)$ and $(2)$ implies

$\dim\Big{(}\frac{C_{n}(\phi,U)}{C_{n+1}(\phi,U)}\Big{)}=\dim\Big{(}\frac{C_{n}(\phi,U)+\phi^{-n}U}{\phi^{-n}U}\Big{)}=\dim\Big{(}\frac{V}{\phi^{-n}U}\Big{)}=1,$

and [6, Proposition 3.2] yields (3). ∎

######  Corollary 3.3.

Let $(V,\phi)$ be a topological flow. Thus $\mathrm{ent}^{*}(\phi)>0$ if, and
only if, there exists a non-stationary cocyclic $\phi$-cotrajectory.

###### Proof.

Suppose $\mathrm{ent}^{*}(\phi)>0$. Thus there exists $U\in\mathcal{B}(V)$
such that $C(\phi,U)$ is not open (see [6, Proposition 3.6]). For
$U\in\mathcal{B}(V)$, $\dim(V/U)=n<\infty$. Let $V=U\oplus\langle
v_{1},\ldots,v_{n}\rangle$ and $U_{i}=U\oplus\langle
v_{1},\ldots,\hat{v}_{i},\ldots,v_{n}\rangle\in\mathcal{B}(V)$. Thus
$U=U_{1}\cap\ldots\cap U_{n}$ and $C(\phi,U)=\bigcap_{i=1}^{n}C(\phi,U_{i})$.
Since $C(\phi,U)$ is not open, there exists $i\in\\{1,\ldots,n\\}$ such that
$C(\phi,U_{i})$ is not open, i.e., $C(\phi,U_{i})$ is a non-stationary
cocyclic $\phi$-cotrajectory.

Conversely, if there exists a non-stationary cocyclic cotrajectory
$C(\phi,U)$, then $1=H^{*}(\phi,U)\leq\mathrm{ent}^{*}(V,\phi)$ by Lemma
3.2(3). ∎

######  Proposition 3.4.

Let $(V,\phi)$ be a topological flow. If $C(\phi,U)$ is a non-stationary
cocyclic $\phi$-cotrajectory of $V$, then one has a topological isomorphism

$\theta\colon\frac{V}{C(\phi,U)}\longrightarrow\prod_{n\geq
0}\frac{V}{\phi^{-n}U}.$

Moreover the induced map $\overline{\phi}\colon V/C(\phi,U)\to V/C(\phi,U)$ is
conjugated to a left Bernoulli shift and
$\mathrm{ent}^{*}(\overline{\phi})=1$.

###### Proof.

By the Lemma above, $\mathfrak{F}=\\{\phi^{-n}U\\}_{n\in\mathbb{N}}$ is a
coindependent set of closed proper linear subspaces of $V$. By (3.1), there
are continuous surjective maps

$\xi_{n}\circ\pi_{n}\colon V\to\prod_{i=0}^{n}\frac{V}{\phi^{-n}U},$ (3.4)

where $\pi_{n}\colon V\to V/C_{n+1}(\phi,U)$ is the canonical projection. By
the universal property of inverse limit, one obtains the continuous surjective
map

$\varprojlim(\xi_{n}\circ\pi_{n})\colon
V\longrightarrow\prod_{n\in\mathbb{N}}\frac{V}{\phi^{-n}U},$ (3.5)

(see [19, Lemma 1.1.7]). By the open mapping theorem for linearly compact
spaces, the continuous surjection (3.5) gives rise to the following
topological isomorphism

$\theta\colon\frac{V}{C(\phi,U)}\longrightarrow\prod_{n\geq
0}\frac{V}{\phi^{-n}U},\quad
v+C(\phi,U)\mapsto(v+\phi^{-n}U)_{n\in\mathbb{N}}.$ (3.6)

Let $e_{0}$ be a non-zero vector of $V/U$. Since $C(\phi,U)$ is non-stationary
and cocyclic, $\phi$ induces an isomorphism $\varphi_{n}$ from $V/\phi^{-n}U$
to $V/\phi^{-n+1}U$ for all $n\in\mathbb{N}$. Thus, for $n\in\mathbb{N}$, let
$e_{n}\in V/\phi^{-n}U$ such that $\varphi_{n}(e_{n})=e_{n-1}$. Let $\beta$ be
the left Bernoulli shift of $\prod_{n\in\mathbb{N}}\mathbb{K}e_{n}$. As the
diagram

$\textstyle{\frac{V}{C(\phi,U)}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\theta}$$\scriptstyle{\overline{\phi}}$$\textstyle{\prod_{n\in\mathbb{N}}\frac{V}{\phi^{-n}U}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\cong}$$\textstyle{\prod_{n\in\mathbb{N}}\mathbb{K}e_{n}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\beta}$$\textstyle{\frac{V}{C(\phi,U)}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\theta}$$\textstyle{\prod_{n\in\mathbb{N}}\frac{V}{\phi^{-n}U}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\cong}$$\textstyle{\prod_{n\in\mathbb{N}}\mathbb{K}e_{n}}$
(3.7)

commutes, $\overline{\phi}$ is topologically conjugated to a left Bernoulli
shift. By [6, Prop. 3.11(a), Ex. 3.13(a)],
$\mathrm{ent}^{*}(V/C(\phi,U),\overline{\phi})=1$, and this concludes the
proof. ∎

######  Remark 3.5.

For an arbitrary module $M$ is not true that if $M$ has an infinite
coindependent set of proper submodules, then $M$ has an homomorphic image
given by a direct product of infinitely many non-zero modules. E.g., let
$\mathbb{Z}$ be the abelian group of integers. Then $\\{p\mathbb{Z}\mid p\
\text{prime}\\}$ is an infinite coindependent set of proper
$\mathbb{Z}$-submodules, but there is no homomorphic image of $\mathbb{Z}$
onto a direct product of infinitely many non-zero abelian groups. Therefore,
the linear compactness is an essential ingredient in the proof of Proposition
3.4.

######  Corollary 3.6.

Let $(V,\phi)$ be a topological flow. Thus $\mathrm{ent}^{*}(V,\phi)=0$ if,
and only if, $\mathrm{ent}(\widehat{V},\widehat{\phi})=0$.

###### Proof.

Suppose $\mathrm{ent}^{*}(V,\phi)>0$. By the latter proposition, there exists
a factor of $V$ acted on by $\overline{\phi}$ as left Bernoulli shift. By
Lefschetz duality, $\widehat{V}$ admits a $\widehat{\phi}$-invariant linear
subspace acted on by the restriction of $\widehat{\phi}$ as right Bernoulli
shift (see Example 2.2). By the monotonicity of $\mathrm{ent}$, one concludes
that $1\leq\mathrm{ent}(V,\phi)$.

Vice-versa, suppose $\mathrm{ent}(\widehat{V},\widehat{\phi})>0$. By [16,
Theorem 4.3], $\widehat{V}$ admits a $\widehat{\phi}$-invariant linear
subspace acted on by $\widehat{\phi}$ as right Bernoulli shift (namely an
infinite-dimensional $\phi$-trajectory). A similar reasoning as above
concludes the proof.∎

######  Corollary 3.7.

Let $(V,\phi)$ be a topological flow. Thus $\mathrm{ent}^{*}(\phi)=1$ if, and
only if, there exists a non-stationary cocyclic $\phi$-cotrajectory
$C(\phi,U)$ such that $\mathrm{ent}^{*}(\phi\restriction_{C(\phi,U)})=0$.

###  3.3 Proof of Theorem A

Now we are in position to prove Theorem A that can be considered to be dual of
[16, Theorem 4.7], where the algebraic entropy of an algebraic flow is
expressed in terms of right Bernoulli shifts. We just need one more technical
lemma.

######  Lemma 3.8.

Let $(V,\phi)$ be a topological flow and $W$ a closed $\phi$-invariant linear
subspace of $V$. If $\mathrm{ent}^{*}(W,\phi\restriction_{W})>0$, then there
exists a non-stationary cocyclic $\phi$-cotrajectory $C(\phi,U)$ such that
$C(\phi,U)+W=V$.

###### Proof.

Firstly, notice that $\mathcal{B}(W)=\\{U\cap W\mid U\in\mathcal{B}(V)\\}$.
Since $0<\mathrm{ent}^{*}(W,\phi\restriction_{W})$, by Corollary 3.3, there
exists $U\in\mathcal{B}(V)$ such that $C(\phi\restriction_{W},U\cap
W)=C(\phi,U)\cap W$ is non-stationary and cocyclic. Therefore, $C(\phi,U)$ is
also cocyclic and non-stationary. In particular, both the topological flows
$(V/C(\phi,U),\overline{\phi})$ and $(W/C(\phi\restriction_{W},U\cap
W),\overline{\phi\restriction_{W}})$ can be regarded as left 1-dimensional
Bernoulli shift. Now, the topological flow
$(Z=(C(\phi,U)+W)/C(\phi,U),(\overline{\phi})\restriction_{Z})$ is isomorphic
to $(W/C(\phi\restriction_{W},U\cap W),),\overline{\phi\restriction_{W}})$ by
LC8; namely, the following diagram

$\textstyle{Z=\frac{C(\phi,U)+W}{C(\phi,U)}\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{(\overline{\phi})\restriction_{Z}}$$\scriptstyle{\cong}$$\textstyle{\frac{W}{C(\phi\restriction_{W},U\cap
W)}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\overline{\phi\restriction_{W}}}$$\textstyle{Z=\frac{C(\phi,U)+W}{C(\phi,U)}\ignorespaces\ignorespaces\ignorespaces\ignorespaces}$$\scriptstyle{\cong}$$\textstyle{\frac{W}{C(\phi\restriction_{W},U\cap
W)}}$ (3.8)

commutes. Thus $\mathrm{ent}^{*}(Z,(\overline{\phi})\restriction_{Z})=1$,
since $\mathrm{ent}^{*}(W/C(\phi\restriction_{W},U\cap
W),),\overline{\phi\restriction_{W}})=1$. Finally, by Example 4.9,
$V/C(\phi,U)=Z,$ i.e., $C(\phi,U)+W=V$. ∎

######  Remark 3.9.

The reference to Example 4.9 could create the appearance of a circular
argument but requiring the reader read forward only once simplifies the
organization of the paper.

######  Theorem A.

Let $(V,\phi)$ be a topological flow. Then the following are equivalent:

  * a)

the topological entropy $\mathrm{ent}^{*}(\phi)=k\in\mathbb{N}$,

  * b)

there exist $k\in\mathbb{N}$ coindependent non-stationary cocyclic
$\phi$-cotrajectories $\\{C(\phi,U_{i})\mid i=1,\ldots,k\\}$ such that
$\mathrm{ent}^{*}(\phi\restriction_{C})=0$ where
$C=C(\phi,U_{1})\cap\ldots\cap C(\phi,U_{k})$

Moreover, $\mathrm{ent}^{*}(V,\phi)=\infty$ if, and only if, there exists an
infinite (countable) coindependent family of non-stationary cocyclic
$\phi$-cotrajectories.

###### Proof of Theorem A.

By Corollary 3.3, we can assume $k>0$. By the Addition Theorem, Proposition
3.1 and Proposition 3.4, b) implies a).

Now, since $k>0$, there is at least one non-stationary cocyclic
$\phi$-cotrajectory. By Proposition 3.1 and Proposition 3.4, every finite set
of coindependent non-stationary cocyclic $\phi$-cotrajectories has cardinality
less or equal to $k$. Let $m$ be the maximal number of coindependent non-
stationary cocyclic $\phi$-cotrajectories, thus $1\leq m\leq k$.

Now suppose $m<k$ and let $\\{C_{i}\mid 1\leq i\leq m\\}$ be a maximal family
of coindependent non-stationary cocyclic $\phi$-cotrajectories. By the
Addition Theorem, $\mathrm{ent}^{*}(\phi\restriction_{C})>0$, where
$C=C_{1}\cap\ldots\cap C_{m}$. Applying Lemma 3.8 yields a non-stationary
cocyclic $\phi$-trajectory $C_{m+1}$ such that $C_{m+1}+C=V$, and this
contradicts the maximality of $m$, i.e., a) implies b).

Finally, let $\mathrm{ent}^{*}(V,\phi)=\infty$. Let $C_{1}$ be a non-
stationary cocyclic $\phi$-cotrajectory (see Corollary 3.3). Since
$\mathrm{ent}^{*}(V/C_{1},\overline{\phi})=1$, the Addition Theorem yields
$\mathrm{ent}^{*}(C_{1},\phi\restriction_{C_{1}})=\infty$. By Lemma 3.8, there
exists a non-stationary cocyclic $\phi$-cotrajectory $C_{2}$ such that
$\\{C_{1},C_{2}\\}$ is coindependent. Repeating the procedure at each step
yields the claim. Conversely, since every finite subfamily of a countable
coindependent family is coindependent as well, Proposition 3.1 concludes the
proof. ∎

##  4 Torsion theories and Pinsker-like constructions

###  4.1 Torsion theory for abelian categories

Following [8], a torsion theory for a subcomplete abelian category
$\mathcal{C}$ consists of a couple $\tau=(\mathcal{T},\mathcal{F})$ of classes
of objects of $\mathcal{C}$ satisfying

  * (I)

$\mathcal{T}\cap\mathcal{F}=\\{0\\}$.

  * (II)

If $T\to A\to 0$ is exact with $T\in\mathcal{T}$, then $A\in\mathcal{T}$.

  * (III)

If $0\to A\to F$ is exact with $F\in\mathcal{F}$, then $A\in\mathcal{F}$.

  * (IV)

For each object $X$ of $\mathcal{C}$ there is an exact sequence $0\to T\to
X\to F\to 0,$ with $T\in\mathcal{T}$ and $F\in\mathcal{F}$.

Thus $\mathcal{T}$ is a torsion class and $\mathcal{F}$ is a torsion-free
class of $\mathcal{C}$. If both classes $\mathcal{T}$ and $\mathcal{F}$
satisfy (IV) and contain with any object all its isomorphic images, then
axioms (I) through (III) can be replaced by the ortogonality axiom

  * (V)

$\mathrm{Hom}(T,F)=0,\ \forall T\in\mathcal{T},F\in\mathcal{F}$.

In particular, if $\mathcal{T}$ and $\mathcal{F}$ are complete with respect to
the orthogonality axiom - i.e., if an object $T$ of $\mathcal{C}$ is such that
$\mathrm{Hom}(T,F)=0$ for all $F\in\mathcal{F}$, then $T\in\mathcal{T}$; and
the other way round - then $\tau=(\mathcal{T},\mathcal{F})$ is a torsion
theory (cf. [8, Thm. 2.1]). For further applications we state here the
following result.

######  Proposition 4.1 ([8, Proposition 2.4]).

Let $\tau=(\mathcal{T},\mathcal{F})$ be a torsion theory of $\mathcal{C}$, and
let $M\in ob(\mathcal{C})$. Then there is a unique largest subobject $M_{t}$
of $M$ which is a member of $\mathcal{T}$. Moreover, $M/M_{t}\in\mathcal{F}$.
The object $M_{t}$ can be calculated by either of the equalities

  1. 1.

$M_{t}=\bigcup\\{T\subseteq M\mid T\in\mathcal{T}\\}$, or

  2. 2.

$M_{t}=\bigcap\\{S\subseteq M\mid M/S\in\mathcal{F}\\}.$

Hence any torsion theory over $\mathcal{C}$ is uniquely determined by its
torsion class:

$\mathcal{F}=\\{M\in ob(\mathcal{C})\mid M_{t}=0\\}.$

###  4.2 Pinsker factor of a topological flow

Since the category of topological flows can be regarded as a functor category
over ${}_{\mathbb{K}}\mathrm{LC}$, $\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})$
is a complete abelian category since ${}_{\mathbb{K}}\mathrm{LC}$ is. Let

$\mathcal{F}_{top}=\\{(F,\varphi)\in
ob(\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC}))\mid\mathrm{ent}^{*}(F,\varphi)=0\\}.$
(4.1)

For all the properties stated in $\S$2.3, $\mathcal{F}_{top}$ is closed under
taking kernels, infinite products and extensions. Thus [8, Thm. 3.2] applies
and $\mathcal{F}_{top}$ is a well-defined torsion-free class on
$\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})$. The corresponding torsion class
$\mathcal{T}_{top}$ can be obtained by the orthogonality axiom. Namely,
$(T,\tau)\in\mathcal{T}_{top}$ if, and only if,

$\mathrm{Hom}_{\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})}((T,\tau),(F,\varphi))=0,\
\forall(F,\varphi)\in\mathcal{F}_{top}.$ (4.2)

A topological flow $(V,\phi)$ is said to have completely positive topological
entropy, $\mathrm{ent}^{*}(V,\phi)>>0$, if
$\mathrm{ent}^{*}(V/Z,\overline{\phi})\neq 0$ for every closed
$\phi$-invariant proper linear subspace $Z$ of $V$. Equivalently,
$\mathrm{ent}^{*}(V,\phi)>>0$ whenever $(V,\phi)$ does not admit non-trivial
factors of zero topological entropy.

######  Proposition 4.2.

$\mathcal{T}_{top}=\\{(V,\phi)\in
ob(\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC}))\mid\mathrm{ent}^{*}(V,\phi)>>0\\}\cup\\{0\\}.$

###### Proof.

Let $(T,\tau)\in T_{top}$ and suppose it admits a non-trivial factor
$(T^{\prime},\tau^{\prime})$ of zero topological entropy. Thus
$0\neq(T^{\prime},\tau^{\prime})\in\mathcal{F}_{top}$ and
$\mathrm{Hom}_{\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})}((T,\tau),(T^{\prime},\tau^{\prime}))\neq
0$ contradicting (4.2).

Conversely, let $\mathrm{ent}^{*}(V,\phi)>>0$. Suppose there is
$(F,\varphi)\in\mathcal{F}_{top}$ such that

$\mathrm{Hom}_{\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})}((V,\phi),(F,\varphi))\neq
0.$

Thus $(V,\phi)$ admits a non-trivial factor $(V^{\prime},\phi^{\prime})$
isomorphic to a subflow of $(F,\varphi)$ by LC9. In particular,
$0\leq\mathrm{ent}^{*}(V^{\prime},\phi^{\prime})\leq\mathrm{ent}^{*}(F,\varphi)=0$;
contradiction. ∎

######  Proposition 4.3.

Let $(V,\phi)$ be a topological flow. Thus $V$ admits the largest closed
$\phi$-invariant $\mathbb{K}$-subspace $D_{+}(V,\phi)$ such that
$\mathrm{ent}^{*}(D_{+}(V,\phi),\phi\restriction_{+})>>0$, where
$\phi\restriction_{+}:=\phi\restriction_{D_{+}(V,\phi)}$. Moreover,

$\mathrm{ent}^{*}(D_{+}(V,\phi),\phi\restriction_{+})=\mathrm{ent}^{*}(V,\phi).$

The subspace $D_{+}(V,\phi)$ can be computed by either of the equalities

  1. 1.

$D_{+}(V,\phi)=\bigcup\\{Z\leq V\ \text{closed}\mid\phi Z\leq Z,\
\mathrm{ent}^{*}((Z,\phi\restriction_{Z})>>0\\}$, or

  2. 2.

$D_{+}(V,\phi)=\bigcap\\{Z\leq V\ \text{closed}\mid\phi Z\leq Z,\
\mathrm{ent}^{*}(V/Z,\overline{\phi})=0\\}.$

###### Proof.

It follows by Proposition 4.1 and the Addition Theorem.∎

We shall call $D_{+}(V,\phi)$ the domain of completely positive topological
entropy of $(V,\phi)$. Clearly, $D_{+}(V,\phi)=V$ if, and only if, $(V,\phi)$
has completely positive topological entropy; and $D_{+}(V,\phi)=0$ if, and
only if, $\mathrm{ent}^{*}(V,\phi)$=0. Moreover the Addition Theorem together
with Proposition 4.3(2) yields the following.

######  Corollary 4.4.

Given a topological flow $(V,\phi)$, the domain $D_{+}(V,\phi)$ is the
smallest closed $\phi$-invariant linear subspace of $V$ such that

$\mathrm{ent}^{*}(D_{+}(V,\phi),\phi\restriction_{+})=\mathrm{ent}^{*}(V,\phi).$

Thus $(V,\phi)$ admits the Pinsker factor, i.e., the largest factor
$(P_{top}(V,\phi),\overline{\phi}^{t})$ of $(V,\phi)$ having zero topological
entropy. Namely, $P_{top}(V,\phi)=V/D_{+}(V,\phi)$ and $\overline{\phi}^{t}$
is induced by $\phi$.

######  Fact 4.5.

Let $(V,\phi)$ be a topological flow. If $V=D_{+}(V,\phi)$, then

  * (a)

$V$ has no open $\phi$-invariant proper linear subspaces;

  * (b)

a finite coindependent set of closed $\phi$-invariant $\mathbb{K}$-subspaces
of $V$ has cardinality $\leq\mathrm{ent}^{*}(V,\phi)$.

###### Proof.

(a) follows by [6, Proposition $3.11(b)$] and (b) is a consequence of
Proposition 3.1.∎

###  4.3 Pinsker subspace of an algebraic flow

By analogy with the topological case,
$\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})$ can be equipped with the following
torsion theory:

$\displaystyle\mathcal{T}_{alg}=\\{(W,\psi)\mid\mathrm{ent}(W,\psi)=0\\},\quad\text{and}$
(4.3)
$\displaystyle\mathcal{F}_{alg}=\\{(W,\psi)\mid\mathrm{ent}(W,\psi)>>0\\}\cup\\{0\\},$

where $\mathrm{ent}(W,\psi)>>0$ denote an algebraic flow $(W,\psi)$ of
completely positive algebraic entropy, i.e.,
$\mathrm{ent}(Z,\psi\restriction_{Z})\neq 0$ whenever $Z$ is a non-trivial
$\psi$-invariant $\mathbb{K}$-subspace of $W$.

######  Remark 4.6.

Recall that $\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})$ is equivalent to
${}_{\mathbb{K}[t]}\mathrm{Mod}$, which denotes the category of (abstract)
modules over the polynomial ring in one variable. In [16] it has been pointed
out that the torsion theory defined by (4.3) goes over into the usual torsion
theory of $\mathbb{K}[t]$-modules (see [16, Theorem 4.3]).

######  Proposition 4.7.

Let $(W,\psi)$ be an algebraic flow. Then $W$ admits the largest
$\psi$-invariant $\mathbb{K}$-subspace $P_{alg}(W,\psi)$ of zero algebraic
entropy. Moreover, $P_{alg}(W,\psi)$ is given by either of the equalities

  1. 1.

$P_{alg}(W,\psi)=\bigcup\\{Z\leq W\ \text{closed}\mid\psi Z\leq Z,\
\mathrm{ent}((Z,\psi\restriction_{Z})=0\\}$, or

  2. 2.

$P_{alg}(W,\psi)=\bigcap\\{Z\leq W\ \text{closed}\mid\psi Z\leq Z,\
\mathrm{ent}(W/Z,\overline{\psi})>>0\\}.$

Consequently every algebraic flow $(W,\psi)$ admits the factor of completely
positive algebraic entropy $F_{+}(W,\psi)=W/P_{alg}(W,\psi)$, i.e., the
smallest factor of $W$ such that

$\mathrm{ent}(F_{+}(W,\psi),\overline{\psi}^{+})=\mathrm{ent}(W,\psi),$

where $\overline{\psi}^{+}\colon F_{+}(W,\psi)\to F_{+}(W,\psi)$ is induced by
$\psi$.

The linear subspace $P_{alg}(W,\psi)$ is called Pinsker subspace of $(W,\psi)$
and the corresponding algebraic flow $(P_{alg}(W,\psi),\psi\restriction_{a})$
is named Pinsker subflow. Clearly, an algebraic flow $(W,\psi)$ has completely
positive algebraic entropy if, and only if, $P_{alg}(W,\psi)=0$.

######  Remark 4.8.

An alternative proof of the existence of the Pinsker subspace can be provided
by adapting the proof of [10, Proposition 3.1].

###  4.4 Duality of Pinsker-constructions

Here we relate Pinsker factors and Pinsker subflows by Lefschetz duality.
Firstly observe that $(\mathcal{T}_{top},\mathcal{F}_{top})$ goes over into
the torsion theory $(\mathcal{F}_{top},\mathcal{T}_{top})$ of the opposite
category $\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})^{op}$. Since the opposite
category $\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})^{op}$ is equivalent to
$\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})$ by Lefschetz duality, one obtains
a new torsion theory on $\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})$ determined
by

$\mathcal{T}^{*}_{alg}=\\{(V,\phi)\in
ob(\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect}))\mid\mathrm{ent}^{*}(\widehat{V},\widehat{\phi})=0\\}.$
(4.4)

Since $\mathrm{ent}^{*}(\widehat{V},\widehat{\phi})=0$ if, and only if,
$\mathrm{ent}(V,\phi)=0$ by Corollary 3.6, one has
$\mathcal{T}^{*}_{alg}=\mathcal{T}_{alg}$. In other words, the torsion
theories $(\mathcal{T}_{top},\mathcal{F}_{top})$ and
$(\mathcal{T}_{alg},\mathcal{F}_{alg})$ are dual one each other. Therefore one
deduces by (2.2) the following analogue of [9, Theorem A].

######  Theorem A.

Let $(V,\phi)$ be a topological flow. Then

$(P_{top}(V,\phi),\overline{\phi}^{t})\cong_{top}(V/P_{alg}(\widehat{V},\widehat{\phi})^{\perp},\overline{\phi}^{a}),$

where $\overline{\phi}^{t}\colon P_{top}(V,\phi)\to P_{top}(V,\phi)$ and
$\overline{\phi}^{a}\colon V/P_{alg}(\widehat{V},\widehat{\phi})^{\perp}\to
V/P_{alg}(\widehat{V},\widehat{\phi})^{\perp}$ are both induced by $\phi$. In
particular,

$D_{+}(V,\phi)\cong_{top}P_{alg}(\widehat{V},\widehat{\phi})^{\perp}\quad\text{and}\quad\widehat{D_{+}(V,\phi)}\cong
F_{+}(\widehat{V},\widehat{\phi}).$

Moreover, $\mathrm{ent}^{*}(V,\phi)>>0$ if, and only if,
$\mathrm{ent}(\widehat{V},\widehat{\phi})>>0$.

######  Example 4.9.

In the notations of Example 2.2, the right 1-dimensional Bernoulli shift has
completely positive algebraic entropy: every non-trivial
$\beta_{\mathbb{K}}$-invariant $\mathbb{K}$-subspace of $V_{d}$ is isomorphic
to $V_{d}$ since such a subspace has countable but not finite dimension being
$\beta_{\mathbb{K}}$-invariant.

Consequently, the left 1-dimensional Bernoulli shift has completely positive
topological entropy. In particular, a left 1-dimensional Bernoulli shift
cannot admit any proper subflow of positive topological entropy by Proposition
4.3(2).

##  5 The corank of a topological flow

###  5.1 (Dual) Goldie dimension

Here we recall both the definitions of Goldie dimension and of dual Goldie
dimension placing greater emphasis on dual Goldie dimension. These notions
were firstly introduced in module theory, but modular lattices seem to be the
proper setting for their definition.

Following [14], let $(L,\vee,\wedge)$ denote a modular lattice - i.e.,
$x\vee(a\wedge b)=(x\vee a)\wedge b$ whenever $x\leq b$ \- with a smallest
element 0 and a greatest element 1. We start from a bit of terminology. A
finite subset $\\{a_{i}\mid i\in I\\}$ of $L\setminus\\{0\\}$ is said to be
coindependent if

$a_{i}\vee(\bigwedge_{j\neq i}a_{j})=1\quad\forall i\in I.$ (5.1)

Every element $x$ of $L\setminus\\{0\\}$ (considered as a singleton $\\{x\\}$)
is coindependent. An arbitrary subset $A$ of $L\setminus\\{0\\}$ is
coindependent if all its finite subsets are coindependent. In a lattice $L$
with $1$ an element $a\in L$ is called superfluos if $a\vee b\neq 1$ for all
$b\neq 1$. A lattice $L\neq\\{0\\}$ is said to be couniform if every element
$a\neq 1$ is superfluous. An element $a\neq 1$ of $L$ is called couniform if
the sublattice $[a,1]=\\{x\in L\mid a\leq x\\}$ is couniform. Consequently one
has the following well-known result.

######  Proposition 5.1 (see [14]).

The following conditions are equivalent for a modular lattice $L$ with $0$ and
$1$.

  1. 1.

$L$ does not contain infinite coindependent subsets.

  2. 2.

$L$ contains a finite coindependent set $\\{a_{1},\dots,a_{n}\\}$ with $a_{i}$
couniform for every $i$ and $a_{1}\wedge a_{2}\wedge\ldots\wedge a_{n}$
superfluous in $L$.

  3. 3.

The cardinality of a coindependent subset of $L$ is $\leq m$ for an
$m\in\mathbb{N}$.

Moreover, if these conditions hold and $\\{a_{1},\dots,a_{n}\\}$ is a finite
coindependent subset of $L$ with $a_{i}$ couniform for every $i$ and
$a_{1}\wedge a_{2}\wedge\ldots\wedge a_{n}$ superfluous in $L$, then any other
coindependent subset of $L$ has cardinality $\leq n$.

Thus if the modular lattice $L$ contains infinite coindependent subsets, then
$L$ is said to have infinite dual Goldie dimension; otherwise the (finite)
dual Goldie dimension of $L$ is defined to be the maximal cardinality
$\mathrm{codim}\,{L}$ of a finite coindependent subset of $L\setminus\\{0\\}$.
Since the dual lattice $(L,\wedge,\vee)$ of a modular lattice
$(L,\vee,\wedge)$ is also a modular lattice, one may define the Goldie
dimension of $(L,\vee,\wedge)$ to be the dual Goldie dimension of the dual
lattice $(L,\wedge,\vee)$.

######  Fact 5.2 ([14, Propositions 2.37 and 2.42]).

For a modular lattice $L$,

  1. 1.

$\mathrm{codim}\,{L}=0$ if, and only if, $L$ has exactly one element;

  2. 2.

$\mathrm{codim}\,{L}=1$ if, and only if, $L$ is couniform.

Moreover, the dual version of $(1)$ and $(2)$ holds for the Goldie dimension.

Let $M$ be a module over an associative ring with unit. Now we apply the
(dual) Goldie dimension of modular lattices just introduced to the lattice
$(L(M),+,\cap)$ of all submodules of $M$. Thus the dual Goldie dimension
$\mathrm{codim}\,{M}$ of $M$ is defined to be the dual Goldie dimension of
$L(M)$. In particular, $\mathrm{codim}\,{M}$ turns out to be the maximal
cardinality of a finite coindependent family (see §3.1) of proper submodules
of $M$ ( or $\infty$). Analogously, the Goldie dimension $\dim(M)$ of $M$ is
the Goldie dimension of $({L}(M),+,\cap)$ and it coincides with the maximal
$n$ (or $\infty$) such that there exists a direct sum
$\bigoplus_{i=1}^{n}M_{i}\subseteq M$ of non-zero submodules of $M$.

######  Proposition 5.3 ([14, §2.7]).

Let $E(M)$ be the injective hull of $M$. Then the following hold:

  * (a)

$\dim(M)=\dim(E(M))$;

  * (b)

$\dim(M)=n<\infty$ if, and only if, $E(M)$ is the direct sum of $n$
indecomposable modules.

######  Remark 5.4.

Since the category $\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})$ is equivalent
to ${}_{\mathbb{K}[t]}\mathrm{Mod}$, Proposition 5.3 can be applied directly
to algebraic flows.

The notion of projective cover is dual to that of injective hull. Although
each abstract module has an injective hull, projective covers seldom exist,
therefore the latter result cannot be dualised to the dual Goldie dimension of
abstract modules. Nevertheless such a statement holds over the dual category
when it does exists.

###  5.2 Modular lattice of a topological flow

Let $(V,\phi)$ be a flow over ${}_{\mathbb{K}}\mathrm{LC}$. We can associate
to $(V,\phi)$ the lattice of all closed $\phi$-invariant
$\mathbb{K}$-subspaces of $V$, which will be denoted by
$(\Lambda(V,\phi),+,\cap)$. By properties LC1.–LC3., the lattice
$(\Lambda(V,\phi),+,\cap)$ is modular. Therefore we are allowed to compute the
dual Goldie dimension of $(\Lambda(V,\phi),+,\cap)$, i.e., the maximal
cardinality of a set of coindependent closed $\phi$-invariant linear subspaces
of $V$. We denote it by $\mathrm{codim}\,{(}V,\phi)$.

######  Remark 5.5.

Notice that, by Lefschetz duality, the dual lattice of $\Lambda(V,\phi)$ is
equivalent to the lattice consisting of all $\widehat{\phi}$-invariant
$\mathbb{K}$-subspaces of $\widehat{V}$, say
$\Lambda(\widehat{V},\widehat{\phi})$.

######  Proposition 5.6.

For every discrete field $\mathbb{K}$ the following hold:

  1. 1.

$\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})$ is an abelian category with enough
injectives and projectives;

  2. 2.

$\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})$ admits projective covers.

Moreover, for every topological flow $(V,\phi)$ with projective cover
$(P,\rho)$ one has

  1. 3.

$\mathrm{codim}\,{(}V,\phi)=\mathrm{codim}\,{(}P,\rho)$;

  2. 4.

$\mathrm{codim}\,{(}V,\phi)=n<\infty$ iff $(P,\rho)$ is the product of exactly
$n$ indecomposable topological flows.

###### Proof.

It follows by the fact that $\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})$ is the
Lefschetz dual of $\mathrm{Flow}(_{\mathbb{K}}\mathrm{Vect})$ \- which is
nothing but ${}_{\mathbb{K}[t]}\mathrm{Mod}$ \- and Proposition 5.3. ∎

###  5.3 The corank function

For a topological flow $(V,\phi)$, one may consider the domain of completely
positive topological entropy $(D_{+}(V,\phi),\phi\restriction_{+})$ \- i.e.,
the torsion subflow of $(V,\phi)$ \- and give the following definition.

######  Definition 5.7.

The corank $\mathrm{cork}(V,\phi)$ of a topological flow $(V,\phi)$ is defined
to be the dual Goldie dimension of $(D_{+}(V,\phi),\phi\restriction_{+}).$
Thus one obtains a corank function

$\mathrm{cork}\colon\mathrm{Flow}(_{\mathbb{K}}\mathrm{LC})\to\mathbb{N}\cup\\{\infty\\}.$

Indeed, the corank is meant to measure the $\mathbb{K}$-subspace where the map
$\phi$ is actually creating disorder. By Fact 5.2, one easily deduces the
following properties:

  * (C1)

$\mathrm{cork}(V,\phi)=0$ if, and only if, $D_{+}(V,\phi)=0$.

  * (C2)

$\mathrm{cork}(V,\phi)=1$ if, and only if,
$\Lambda(D_{+}(V,\phi),\phi\restriction_{+})$ is couniform, i.e., every proper
closed $\phi\restriction_{+}$-invariant linear subspace of $D_{+}(V,\phi)$ is
superfluous in $(\Lambda(D_{+}(V,\phi),\phi\restriction_{+}),+,\cap)$.

######  Remark 5.8.

By analogy with the topological case, one can define the rank of an algebraic
flow, say $\mathrm{rk}(W,\psi)$, by using the notion of Goldie dimension: this
rank does value the size of the factor of completely positive algebraic
entropy, i.e.,
$\mathrm{rk}(W,\psi)=\dim(W,\psi):=\dim(\Lambda(F_{+}(W,\psi),\overline{\psi}^{+}))$,
where $\dim$ denotes the Goldie dimension. Since $F_{+}(W,\psi)$ is the
torsion-free factor of the algebraic flow with respect to the torsion theory
$(\mathcal{T}_{alg},\mathcal{F}_{alg})$, the notion of rank so introduced
simply coincides with the torsion-free rank of the algebraic flow $(W,\psi)$
regarded as a module over $\mathbb{K}[t]$ (see Remark 4.6) and so it does not
yield any new information.

Finally, we are ready to prove that the topological entropy $\mathrm{ent}^{*}$
is essentially a dimension of the topological flow.

######  Theorem C.

For every topological flow $(V,\phi)$, one has

$\mathrm{ent}^{*}(V,\phi)=\mathrm{cork}(V,\phi).$

###### Proof of Theorem C.

By Corollary 4.4, $V$ can be replaced by its domain of completely positive
topological entropy without loss of generality. So let assume
$\mathrm{ent}^{*}(V,\phi)>>0$.

When $\mathrm{ent}^{*}(V,\phi)=0$ there is nothing to prove. Thus firstly
suppose $\mathrm{ent}^{*}(V,\phi)=k\in\mathbb{N}_{>0}$. By Theorem B and
Proposition 3.1, one obtains $k\leq\mathrm{cork}(V,\phi)\leq k$, i.e.,
$k=\mathrm{cork}(V,\phi)$.

Now assume $\mathrm{ent}^{*}(V,\phi)=\infty$. By Theorem B,
$\mathrm{ent}^{*}(V,\phi)\leq\mathrm{cork}(V,\phi)$ i.e.,
$\mathrm{cork}(V,\phi)=\infty$. Vice-versa, let
$\mathrm{cork}(V,\phi)=\infty$. Suppose ad absurdum that
$\mathrm{ent}^{*}(V,\phi)=k$ is finite. Then there exist $k$ coindependent
non-stationary cocyclic $\phi$-cotrajectories $\\{C_{i}\mid i=1,\dots,k\\}$ by
Theorem B. By Proposition 3.4,
$\mathrm{ent}^{*}(V/C_{i},\overline{\phi}^{i})=1$ for all $i=1,\dots,k$, where
$\overline{\phi}^{i}\colon V/C_{i}\to V/C_{i}$ is induced by $\phi$. Since the
topological entropy and the corank coincide in the finite case, one has
$\mathrm{cork}(V/C_{i},\overline{\phi}^{i})=1$ for all $i=1,\dots,k$ by
Proposition 3.4. Therefore the lattice $\Lambda(V/C_{i},\overline{\phi}^{i})$
is couniform for every $i=1,\dots,k$ (see property (C2) above), i.e., $C_{i}$
is a couniform element of the lattice $\Lambda(V,\phi)$. Finally, we claim
that $C=C_{1}\cap\ldots\cap C_{k}$ is superfluos in the lattice
$\Lambda(V,\phi)$, i.e., $C+W\neq V$ for every proper closed $\phi$-invariant
linear subspace of $V$. Thus Proposition 5.1(2) yields the contradiction:
$\mathrm{cork}(V,\phi)=\mathrm{codim}\,{(}V,\phi)<\infty$.

Let us prove the claim. Let $W$ be a closed $\phi$-invariant
$\mathbb{K}$-subspace of $V$ such that $C+W=V$. Then
$\\{C_{1},\dots,C_{k},W\\}$ is a coindependent set of closed $\phi$-invariant
$\mathbb{K}$-subspaces of $V$ of cardinality $>\mathrm{ent}^{*}(V,\phi)$. By
Proposition 3.1 and $\mathrm{ent}^{*}(V,\phi)>>0$, one has $W=C_{j}$ for some
$j\in\\{1,\ldots,k\\}$, and so $W=C+W=V$.∎

We conclude applying Theorem C to produce an alternative proof of the
following significant result.

######  Bridge Theorem.

Let $(W,\psi)$ be an algebraic flow. Then

$\mathrm{ent}(W,\psi)=\mathrm{ent}^{*}(\widehat{W},\widehat{\psi}).$

###### Proof.

By [16, Corollary 4.8],

$\mathrm{ent}(W,\psi)=\dim(\Lambda(F_{+}(W,\psi),\overline{\psi}^{+}))=\mathrm{rk}(W,\psi);$
(5.2)

see Remark 5.8. Therefore, one computes

$\displaystyle\mathrm{ent}(W,\psi)$
$\displaystyle=\dim\Lambda(F_{+}(W,\psi),\overline{\psi}^{+})\quad\text{(by
\eqref{eq:1})}$
$\displaystyle=\mathrm{codim}\,{\savestack{\tmpbox}{\stretchto{\scaleto{\scalerel*[\widthof{\Lambda(F_{+}(W,\psi),\overline{\psi}^{+})}]{\kern-0.6pt\bigwedge\kern-0.6pt}{\rule[-505.89pt]{4.30554pt}{505.89pt}}}{}}{0.5ex}}\stackon[1pt]{\Lambda(F_{+}(W,\psi),\overline{\psi}^{+})}{\tmpbox}}\quad$
$\displaystyle=\mathrm{codim}\,{\Lambda(D_{+}(\widehat{W},\widehat{\psi}),(\widehat{\psi})\restriction_{+})}\quad\text{(by
Theorem\leavevmode\nobreak\ B)}$
$\displaystyle=\mathrm{cork}((\widehat{W},\widehat{\psi}))=\mathrm{ent}^{*}(\widehat{W},\widehat{\psi})\quad\text{(by
definition and Theorem\leavevmode\nobreak\ C).}$

∎

By using the reductions steps described in [5, 6], one then obtains also the
Bridge Theorem [6, Theorem 1.3] for locally linearly compact vector spaces as
a corollary of the one stated here.

## Acknowledgements

This work was supported by EPSRC Grant N007328/1 Soluble Groups and Cohomology
and partially supported by Programma SIR 2014 by MIUR (Project GADYGR, Number
RBSI14V2LI, cup G22I15000160008).

I thank my friends Dikran Dikranjan, Anna Giordano Bruno and Simone Virili for
useful discussions on the topic of this paper. Moreover, I thank Anna Giordano
Bruno and Peter Kropholler for comments on early versions of this work.
Finally, I thank the referee for helpful suggestions.

## References

  * [1] R. L. Adler, A. G. Konheim, and M. H. McAndrew.  _Topological entropy_ ,  Transactions of the American Mathematical Society 114 (1965): 309–319.
  * [2] F. Blanchard and Y. Lacroix.  Zero entropy factors of topological flows,  Proc. Amer. Math. Soc. 119 (1993) no. 3, 985-992.
  * [3] R. Bowen.  Entropy for group endomorphisms and homogeneous spaces,  Trans. Amer. Math. Soc. 153 (1971): 401-414.
  * [4] I.Castellano.  Topological entropy for locally linearly compact vector spaces and field extensions, preprint.
  * [5] I. Castellano and A. Giordano Bruno.  Algebraic entropy in locally linearly compact vector spaces, Rings, Polynomials, and Modules. Springer, Cham, (2017). 103-127.
  * [6] I. Castellano and A. Giordano Bruono.  Topological entropy for locally linearly compact spaces, Topology and its Applications (2016), to appear.
  * [7] U. Dardano, D. Dikranjan, and S. Rinauro.  Inertial Properties in Groups,  International Journal of Group theory (2017), to appear, DOI: 10.22108/IJGT.2017.21611.
  * [8] S. E. Dickson.  A torsion theory for abelian categories, Transactions of the American Mathematical Society 121.1 (1966): 223-235.
  * [9] D. Dikranjan and A. Giordano Bruno.  The connection between topological and algebraic entropy, Topology and its Applications 159.13 (2012): 2980-2989.
  * [10] D. Dikranjan and A. Giordano Bruno.  The Pinsker subgroup of an algebraic flow, Journal of Pure and Applied Algebra 216.2 (2012): 364-376.
  * [11] D. Dikranjan and A. Giordano Bruno.  Topological entropy and algebraic entropy for group endomorphisms, arXiv preprint arXiv:1308.4019 (2013).
  * [12] D. Dikranjan, A. Giordano Bruno.  _The Bridge Theorem for totally disconnected LCA groups_ ,  Topology Appl. 169 (2014): 21–32.
  * [13] D. Dikranjan, M. Sanchis and S. Virili.  _New and old facts about entropy on uniform spaces and topological groups_ ,  Topology Appl. 159 (2012): 1916–1942.
  * [14] A. Facchini.  Module theory: endomorphism rings and direct sum decompositions in some classes of modules, Vol. 167. Birkäuser, 2013.
  * [15] A. Giordano Bruno and S. Virili.  _Topological entropy in totally disconnected locally compact groups_ ,  Ergodic Theory and Dynamical Systems 37.7 (2017): 2163-2186.
  * [16] A. Giordano Bruno and L. Salce.  A soft introduction to algebraic entropy, Arabian Journal of Mathematics 1.1 (2012): 69-87.
  * [17] Hanna, A. and A. Shamsuddin.  Dual Goldie dimension, Rendiconti dell’ Istitutio di Mathematica dell’ Università di Trieste, 24(1-2) (1992): 25-38.
  * [18] B. M. Hood.  Topological entropy and uniform spaces,  J. London Math. Soc. 8 (1974): 633-641.
  * [19] L. Ribes, and P. Zalesskii.  Profinite groups, Springer Berlin Heidelberg, (2000). 19-77.
  * [20] J. Peters.  _Entropy of automorphisms on LCA groups_ ,  Pacific J. Math. 96 (1981): 475–488.
  * [21] L. Salce, and P. Zanardo.  A general notion of algebraic entropy and the rank-entropy, Forum Mathematicum. Vol. 21. No. 4. (2009).
  * [22] S. Virili.  _Algebraic and topological entropy of group actions_ , preprint.
  * [23] M. D. Weiss.  _Algebraic and other entropies of group endomorphisms_ ,  Theory of Computing Systems 8 (1974): 243–248.


1

# GopCaml: A Structural Editor for OCaml

Kiran Gopinathan  National University of SingaporeSingapore

###### Abstract.

This talk presents GopCaml-mode, the first structural editing plugin for
OCaml. We will give a tour of the main plugin features, discussing the
plugin’s internal design and its integration with existing OCaml and GNU Emacs
toolchains.

††journalyear: 2021††copyright: none

##  1\. Introduction

Language-aware editor support can vastly improve the overall user experience
of a programming language. In this talk, we focus on the task of providing
_syntactic_ editor support for OCaml, presenting GopCaml-mode, a plugin for
GNU Emacs, that extends Emacs with support for _syntax-directed_ editing
operations. As it turns out, the particular style of OCaml syntax produces
unique challenges for capturing the structure of programs within the
interfaces of standard editors.

Consider the task of providing structural editing support for GNU Emacs, one
of the most popular editors within the OCaml community (oca, 2020). The base
interface of Emacs revolves around a user interacting with a file by
expressing operations in terms of character-based transformations of text
(_i.e._ insert character at cursor). Plugins then provide additional
operations to allow a user to express _syntax_ -based transformations of text
in terms of these lexical operations, _i.e._ delete expression at cursor
_delimited by braces_ , swap statements at cursor _separated by semicolons_.
In the case of OCaml, this approach falls short, as OCaml’s syntax means that
the structure of OCaml programs can not consistently be approximated from a
lexical analysis alone — what denotes the start and end of a given expression?

While OCaml has a rich tooling ecosystem, existing plugins do not adequately
provide support for structural editing. Tuareg, Vim-OCaml and VS-code-OCaml-
platform, are the main plugins that provide OCaml-specific language support
for the popular editors, GNU Emacs, Vim and VS-Code respectively. While all
three plugins provide basic structural editing support, these functionalities
are implemented using basic lexical analysis alone, and so, by design, are not
intended to provide a fully accurate encoding of OCaml syntax, which results
in their inability to support common OCaml code transformations, such as
swapping branches of a match-statement. The Merlin (Bour et al., 2018)
language server extends an editor to provide additional _semantic_ integration
with the language, but does not focus on lower-level _syntactic_ editing
support. More recently, the Rotor (Rowe et al., 2019; Rowe and Thompson, 2018,
2017) tool is a framework designed for refactoring OCaml projects, however its
focus is on large-scale whole program transformations rather than local
syntactic transformations as needed for structural editing.

##  2\. A tour of GopCaml

In this section, we highlight a selection of structural editing operations on
OCaml mode that GopCaml-mode supports.

Consider the following snippet of code, where the position of the user’s
cursor is denoted by the hollow caret block:

⬇

let rec map f xs = match xs with

@\tikzmark{c1s}@|@\tikzmark{c1e}@ [] -> []

| x :: xs -> f x :: map f xs

Now, with this code in hand, what can GopCaml-mode do?

### Structural Navigation

One useful operation when editing code is to move the cursor relative to the
structure of the program, _i.e._ move to the start of the match statement
_enclosing_ the cursor. GopCaml-mode explicitly supports such movements — in
this case, through a function structural-up, which uses the concrete syntax
tree (CST) for the current program to reposition the cursor accordingly:

⬇

let rec map f xs = @\tikzmark{c2s}@m@\tikzmark{c2e}@atch xs with

| [] -> []

| x :: xs -> f x :: map f xs

### Structural Transposition

Another useful way in which syntactic information can be of use for editing is
through structural transformations, such as swapping the nearest syntactic
constructs by the cursor. Again, GopCaml-mode supports such operations — in
this case, through a function structural-transpose, which uses the concrete
syntax tree for the current program to modify the program text as follows:

⬇

let rec map f xs = match xs with

| x :: xs -> f x :: map f xs

@\tikzmark{c3s}@|@\tikzmark{c3e}@ [] -> []

### Structural Deletion

As a final example, consider the task of deleting entire nodes from the syntax
tree, _i.e._ delete the branch at the cursor. GopCaml-mode supports this
transformation through a function structural-delete, which again relies on the
concrete syntax tree for the current program to remove the nearest syntax
construct to the cursor, leaving the buffer as follows:

⬇

let rec map f xs = match xs with

@\tikzmark{c4s}@|@\tikzmark{c4e}@ x :: xs -> f x :: map f xs

Other operations supported by GopCaml-mode include:

  * •

Structural selection \- select regions using the CST.

  * •

Structural syntax-move \- move nodes around the CST.

  * •

Extract expression \- extract a common sub-expression to a let binding.

  * •

Jump to binding/parameter \- move the cursor to the nearest let
binding/parameter.

##  3\. Under the hood

We now present the core logic used by GopCaml-mode to provide structural
editing — a variant of Huet’s zipper (Huet, 1997), specialised for navigating
syntax trees. A syntax tree might provide the information needed for
structural editing, but it is fundamentally unsuited for use in an interactive
setting where the tree traversal is iterative, typically being controlled by
the user. The definition of the zipper used in GopCaml-mode is as follows:

⬇

type zipper =

| Top

| Node of {

item: t; below: t list; above: t list;

parent: zipper;

bounds: text_region;

}

An instance of this zipper encodes a path from the root of the program CST
(_i.e._ `Top}) to a currently \emph`focused node (

    item}), retaining the structure of the whole tree
    by tracking the siblings below and above each node.
    The main modification made to Huet’s original definition is to extend
    each intermediate node with an additional field that captures the
    ‘‘bounds’’ of the current node --- the character range in the original
    buffer from the start to the end of the current node.
    %
    This change enables a simple interface between the core logic and the
    user’s editor --- that of simple text ranges, as will be discussed
    later in this section.
    Finally, the type \mintinline

ocaml—t— captures a thin wrapper around OCaml’s underlying AST type:

⬇

type t =

| Sequence of

text_region option * t list * t * t list

| Signature_item of Parsetree.signature_item

(* … *)

The full data type has a constructor for each node in the OCaml AST, along
with an additional

    Sequence} constructor which provides a generic
    encoding of the ‘‘minimal’’ information needed to represent an
    syntactic node --- this happens to be particularly useful for handling
    intermediate operations that produce invalid syntax trees.
    As it turns out, using a zipper to track the user’s position in the
    syntax tree allows for a rather simple and elegant implementation of
    the structural operations we saw earlier:
    \begin

itemize[leftmargin=20pt] Structural movement \- With this framework, syntax-
based movement simply boils down to moving the zipper itself and then updating
the position of the editor’s cursor to reflect the change in the focus of the
zipper. For example, in order to move the cursor to the enclosing match
osition expression as before, the plugin first moves the zipper up the syntax
tree by replacing it with the value of its parent and then simply updates the
editor’s cursor to move to the start of the newly focused element. Structural
transposition \- Syntax-based transformations also neatly fit into this
framework. For example, in order to transpose the match branches from before,
the plugin first retrieves the two nodes to be changed as the focused element
of the zipper and its next sibling (from the `item} and \mintinline`ocamlabove
fields respectively). After swapping them in the zipper, to perform this
transformation on the program text itself, the plugin passes the text ranges
corresponding to the swapped elements to the editor, which then simultaneously
swaps the corresponding characters. Structural deletion \- Structural deletion
requires more care, but still works quite cleanly with zippers. In order to
delete an element in the zipper, the plugin need only remove the currently
focused item and replace it with its next sibling, and similarly ask the
editor to delete the text region corresponding to the removed element.
Finally, to account for the removed characters from the text buffer, the
zipper must update the text bounds for all subsequent and parent nodes
accordingly — by shifting or shrinking them respectively.

##  4\. Editor integration and Future Work

We have implemented the above zipper-based structural editing framework as a
small OCaml library, using the OCaml compiler infrastructure to provide the
AST definitions and parser. The GopCaml-mode Emacs plugin builds on this core
framework to integrate it with GNU Emacs, providing functions to persist and
cache the state of the zipper over an editing session and keybindings to run
structural operations using the zipper. For example, when the user presses a
keybinding for a structural operation, GopCaml-mode then transparently handles
the tasks of building the CST, constructing a zipper at the cursor and
performing the editing operation on the zipper and text buffer. In the future,
we plan to extend support to other editors. The core editing framework is
agnostic to the particular choice of editor, simply implementing edits in
terms of zipper transformations as above, so it would not be too challenging
to integrate this into editors such as Vim and VS-code. Finally, looking
further out, we hope to extend this framework further, moving from the
_syntactic_ to the _semantic_ \- for instance, using typing information to
guide transformations.

## References

  * (1)
  * oca (2020) 2020\.  OCaml User Survey 2020.  https://docs.google.com/forms/d/1OZV7WCprDnouU-rIEuw-1lDTeXrH_naVlJ77ziXQJfg/viewanalytics [Online; accessed 19. May 2021].
  * Bour et al. (2018) Frédéric Bour, Thomas Refis, and Gabriel Scherer. 2018\.  Merlin: a language server for OCaml (experience report).  _Proceedings of the ACM on Programming Languages_ 2, ICFP (2018), 1–15.
  * Huet (1997) Gérard Huet. 1997\.  The zipper.  _Journal of functional programming_ 7, 5 (1997), 549–554.
  * Rowe et al. (2019) Reuben NS Rowe, Hugo Férée, Simon J Thompson, and Scott Owens. 2019.  Rotor: a tool for renaming values in OCaml’s module system. In _2019 IEEE/ACM 3rd International Workshop on Refactoring (IWoR)_. IEEE, 27–30.
  * Rowe and Thompson (2017) Reuben NS Rowe and Simon J Thompson. 2017.  Rotor: First steps towards a refactoring tool for OCaml. In _OCaml Users and Developers Workshop 2017_.
  * Rowe and Thompson (2018) Reuben NS Rowe and Simon J Thompson. 2018.  Towards Large-scale Refactoring for OCaml.  _Proceedings of the ACM on Programming Languages_ 1, 1 (2018).