Oh, right. This thread was originally supposed to be about
authorship, wasn't it.
Here's how I look at it:
First, in terms of the word "wrote": Moses, IMO, certainly seems to have been who "wrote" the Torah, including Genesis. Assuming for just a moment that he did, does that mean he
physically wrote it in terms of putting pen to paper? I have no idea. He could have dictated it. He could have physically written it himself. Perhaps a mix of both. Either way, I'm not sure and there is nothing in any of the text (or any extra-textual evidence) to suggest that either scenario is more likely. Having been educated in the royal household in Egypt, he likely would have had the ability to physically write it. But still, we just don't know.
Second, regardless of who
physically penned it, do we know
for certain whether Moses "wrote" it? For certain? No. Likely? Highly. (1) The people in the best position to know, i.e., the ancient Jews, attributed it to him (as well as a few Psalms). (2) Other OT references imply it. (3) Although Jesus never outright says that Moses
wrote the Torah (usually, in referring to specific laws or the law in general, Jesus says things like "Moses commanded" or "it is written," so there isn't an explicit tie made by him to Moses being the "author" of the written record), there are a couple of instances recorded in the gospels (I would have to go back and look to make sure of how many--it might be separate accounts of the same instance) where someone asks Jesus a question and says "Moses wrote." There is no record of Jesus correcting the person. Now, perhaps the person was mistaken and either Jesus did correct him and that part of the story was not written down, or Jesus didn't see a point in correcting the person about the authorship because that is really a secondary issue. But still, Jesus did not correct someone who attributed the writing to Moses. Phillip also makes a similar statement in Acts (along the lines of "Moses wrote..."). So, what evidence there is points to his authorship, and there really isn't anything compelling to suggest otherwise (other than modern junk science positing that there appear to be different styles and, therefore, different authors).
H, to your question, as with what I have said above, there is nothing in the text that would definitively answer that. Whether Moses physically wrote the text or dictated it, it could have been that the details of his death were written beforehand in prophesy. Or it could be that those details were added later by Joshua or someone else (if Moses was indeed the author of the rest of it and Joshua or another of Moses' contemporaries was the scribe, it would make sense). Or maybe Moses just isn't the author after all and the entire thing was written by someone else. For the reasons above, I find this the least likely. But I wouldn't rule it out because, again, we don't have definitive evidence of authorship--only indirect evidence.