Assuming the space dimension is not constant, but varies with the expansion of the universe, a Lagrangian formulation of a toy universe model is given. After a critical review of previous works, the field equations are derived and discussed. It is shown that this generalization of the FRW cosmology is not unique. There is a free parameter in the theory, C, with which we can fix the dimension of space say at the Planck time. Different possibilities for this dimension are discussed. The standard FRW model corresponds to the limiting case C → +∞. Depending on the free parameter of the theory, C, the expansion of the model can behave differently to the standard cosmological models with constant dimension. This is explicitly studied in the framework of quantum cosmology. The Wheeler-De Witt equation is written down. It turns out that in our model universe, the potential of the Wheeler-DeWitt equation has different characteristics relative to the potential of the de Sitter minisuperspace. Using the appropriate boundary conditions and the semiclassical approximation, we calculate the wave function of our model universe. In the limit of C → +∞, corresponding to the case of constant space dimension, our wave function has not a unique behavior. It can either leads to the Hartle-Hawking wave function or to a modified Linde wave function, or to a more general one, but not to that of Vilenkin. We also calculate the probability density in our model universe. It is always more than the probability density of the de Sitter minisuperspace in 3-space as suggested by Vilenkin, Linde, and others. In the limit of constant space dimension, the probability density of our model universe approaches to Vilenkin and Linde probability density being exp(−2|S E |), where S E is the Euclidean action. Our model universe indicates therefore that the Vilenkin wave function is not stable with respect to the variation of space dimension.