A.I. (Spoiler)

At the end, when the child Mecha is in the submarine/helicopter in the submerged Coney Island, he is trapped by the falling Ferris Wheel, and prays to the statue of the Blue Fairy.

This apparently goes on for several days after the power cells onboard the sub/copter expire.

Cut ahead approx. 2000 years.

X-generation Mechas cut through the ice field that has enveloped New York, to free the child Mecha.

Are we to believe that the Ice Age instantly froze the earth immediately after robo-kid got stuck underwater?

I wouldn’t say it happened instantly, as in a matter of seconds, but rather, several hundreds of years (that lapse in time just wasn’t shown to us). So the kid just keeps pleading to the Blue Fairy, he eventually “dies,” and presumably, the machines take over the humans. This, of course, also happens over hundreds of years.