  We consider pairs of automorphisms $(\phi,\sigma)$ acting on fields of
Laurent or Puiseux series: pairs of shift operators $(\phi\colon x\mapsto
x+h_1, \sigma\colon x\mapsto x+h_2)$, of $q$-difference operators $(\phi\colon
x\mapsto q_1x,\ \sigma\colon x\mapsto q_2x)$, and of Mahler operators
$(\phi\colon x\mapsto x^{p_1},\ \sigma\colon x\mapsto x^{p_2})$. Given a
solution $f$ to a linear $\phi$-equation and a solution $g$ to a linear
$\sigma$-equation, both transcendental, we show that $f$ and $g$ are
algebraically independent over the field of rational functions, assuming that
the corresponding parameters are sufficiently independent. As a consequence, we
settle a conjecture about Mahler functions put forward by Loxton and van der
Poorten in 1987. We also give an application to the algebraic independence of
$q$-hypergeometric functions. Our approach provides a general strategy to study
this kind of question and is based on a suitable Galois theory: the
$\sigma$-Galois theory of linear $\phi$-equations.
