Through the use of psychohistory, a future science hypothesized by Asimov, a scientist on Trantor named Hari Seldon in about 12,000 Galactic Era predicts the fall of the empire, and institutes the two foundations.