  A set of algebraic equations for the topological properties of space-time is
derived, and used to extend general relativity into the Planck domain. A unique
basis set of three-dimensional prime manifolds is constructed which consists of
$S^3$, $S^1\times S^2$, and $T^3$. The action of a loop algebra on these prime
manifolds yields topological invariants which constrain the dynamics of the
four-dimensional space-time manifold. An extended formulation of Mach's
principle and Einstein's equivalence of inertial and gravitational mass is
proposed which leads to the correct classical limit of the theory.
  It is found that the vacuum possesses four topological degrees of freedom
corresponding to a lattice of three-tori. This structure for the quantum foam
naturally leads to gauge groups O(n) and SU(n) for the fields, a boundary
condition for the universe, and an initial state characterized by local thermal
equilibrium. The current observational estimate of the cosmological constant is
reproduced without fine-tuning and found to be proportional to the number of
macroscopic black holes. The black hole entropy follows immediately from the
theory and the quantum corrections to its Schwarzschild horizon are computed.
