Compactification for a three-brane universe