  In this chapter a general mathematical framework for probabilistic theories
of operationally understood circuits is laid out. Circuits are comprised of
operations and wires. An operation is one use of an apparatus and a wire is a
diagrammatic device for showing how apertures on the apparatuses are placed
next to each other. Mathematical objects are defined in terms of the circuit
understood graphically. In particular, we do not think of the circuit as
sitting in a background time. Circuits can be foliated by hypersurfaces
comprised of sets of wires. Systems are defined to be associated with wires. A
closable set of operations is defined to be one for which the probability
associated with any circuit built from this set is independent both of choices
on other circuits and of extra circuitry that may be added to outputs from this
circuit. States can be associated with circuit fragments corresponding to
preparations. These states evolve on passing through circuit fragments
corresponding to transformations. The composition of transformations is
treated. A number of theorems are proven including one which rules out
quaternionic quantum theory. The case of locally tomographic theories (where
local measurements on a systems components suffice to determine the global
state) is considered. For such theories the probability can be calculated for a
circuit from matrices pertaining the operations that comprise that circuit.
Classical probability theory and quantum theory are exhibited as examples in
this framework.
