Revelation 13:8
And all that dwell upon the earth shall worship him,
whose names are not written in the book of life of the Lamb slain from the foundation of the world.
Revelation 17:8
The beast that thou sawest was, and is not; and shall ascend out of the bottomless pit, and go into perdition: and they that dwell on the earth shall wonder,
whose names were not written in the book of life from the foundation of the world, when they behold the beast that was, and is not, and yet is.
These are the passages I'm referring to.
In Revelation 13:8, the clause "from the foundation of the world" can fit grammatically with either "whose names were not written in the book of life", or with, "of the Lamb slain", so this passage is ambiguous, and we need to bring other passages to bring clarity. We have a parallel passage in Revelation 17:8, which brings two of these clauses together, "not written in the book of life . . . from the foundation of the world".
So if we are going to choose whether to read 13:8 according to what we can support elsewhere, it would have to agree with 17:8, that being the names written from the foundation of the world.
To be sure, you can read one passage the one way, and the other passage the other way, and be grammatically correct. I don't happen think that's the best hermeneutic, but that's me.
Much love!