  General relativity is a deterministic theory with non-fixed causal structure.
Quantum theory is a probabilistic theory with fixed causal structure. In this
paper we build a framework for probabilistic theories with non-fixed causal
structure. This combines the radical elements of general relativity and quantum
theory. The key idea in the construction is physical compression. A physical
theory relates quantities. Thus, if we specify a sufficiently large set of
quantities (this is the compressed set), we can calculate all the others. We
apply three levels of physical compression. First, we apply it locally to
quantities (actually probabilities) that might be measured in a particular
region of spacetime. Then we consider composite regions. We find that there is
a second level of physical compression for the composite region over and above
the first level physical compression for the component regions. Each
application of first and second level physical compression is quantified by a
matrix. We find that these matrices themselves are related by the physical
theory and can therefore be subject to compression. This is the third level of
physical compression. This third level of physical compression gives rise to a
new mathematical object which we call the causaloid. From the causaloid for a
particular physical theory we can calculate verything the physical theory can
calculate. This approach allows us to set up a framework for calculating
probabilistic correlations in data without imposing a fixed causal structure
(such as a background time). We show how to put quantum theory in this
framework (thus providing a new formulation of this theory). We indicate how
general relativity might be put into this framework and how the framework might
be used to construct a theory of quantum gravity.
