  We are concerned with the behaviour of stochastic systems with inputs and
outputs, and how this might relate to the pursuit of a goal. We model this
using what we term transducers, which are a mathematical object that captures
only the external behaviour of such a system and not its internal state. We
present a framework for reasoning about the optimality of such a process, when
it is coupled to a 'teleo-environment' consisting of another transducer that
also embodies a success criterion. We find that (globally) optimal transducers
have a property closely related to Bellman's theorem: a transducer that is
optimal in one time step will again be optimal in the next time step, but with
respect to a different environment (obtained from the original one by a
modified version of Bayesian filtering). We also consider bounded rationality
and its relationship to constrained optimality, which in our framework means
optimal within some subset of all transducers. We describe a condition that is
sufficient for such a subset to have this Bellman property. Additionally, we
show that a policy is deterministic if and only if there exists a
teleo-envionment for which it is uniquely optimal among the set of all
transducers; this is at least conceptually related to classical representation
theorems from decision theory. This need not hold for constrained subsets; we
give an example of this related to the so-called absent-minded driver problem.
All of the formalism is defined using coinduction, following the style proposed
by Czajka [9].
