Ibn Khaldun's Philosophy of History: a study in the philosophic foundation of the science of culture