As far as I'm concerned, the first sin occured in heaven, when Satan rebelled against God, not in the garden of Eden.
God knowing this, shouldn't he have warned Adam and Eve that Satan would tempt them.
Since in Revelation 12:12 it's written:
Woe for the earth and for the sea, because the Devil has come down to YOU
Shouldn't God have given the same warning to Adam and Eve?