  Ostrowski's theorem implies that $\log(x),\log(x+1),\ldots$ are algebraically
independent over $\mathbb{C}(x)$. More generally, for a linear differential or
difference equation, it is an important problem to find all algebraic
dependencies among a non-zero solution $y$ and particular transformations of
$y$, such as derivatives of $y$ with respect to parameters, shifts of the
arguments, rescaling, etc. In the present paper, we develop a theory of
Tannakian categories with semigroup actions, which will be used to attack such
questions in full generality. Deligne studied actions of braid groups on
categories and obtained a finite collection of axioms that characterizes such
actions to apply it to various geometric constructions. In this paper, we find
a finite set of axioms that characterizes actions of semigroups that are finite
free products of semigroups of the form $\mathbb{N}^n\times
\mathbb{Z}/n_1\mathbb{Z}\times\ldots\times\mathbb{Z}/n_r\mathbb{Z}$ on
Tannakian categories. This is the class of semigroups that appear in many
applications.
