Moses supposedly lived in Egypt for about 40 years and then fled for about 40 years before being in the Desert for about 40 years.
Leviticus 12:
1 The LORD said to Moses, 2 “Say to the Israelites: ‘A woman who becomes pregnant and gives birth to a son will be ceremonially unclean for seven days, just as she is unclean during her monthly period. 3 On the eighth day the boy is to be circumcised. 4 Then the woman must wait thirty-three days to be purified from her bleeding. She must not touch anything sacred or go to the sanctuary until the days of her purification are over. 5 If she gives birth to a daughter, for two weeks the woman will be unclean, as during her period. Then she must wait sixty-six days to be purified from her bleeding. 6 “‘When the days of her purification for a son or daughter are over, she is to bring to the priest at the entrance to the tent of meeting a year-old lamb for a burnt offering and a young pigeon or a dove for a sin offering.[a] 7 He shall offer them before the LORD to make atonement for her, and then she will be ceremonially clean from her flow of blood.
“‘These are the regulations for the woman who gives birth to a boy or a girl. 8 But if she cannot afford a lamb, she is to bring two doves or two young pigeons, one for a burnt offering and the other for a sin offering. In this way the priest will make atonement for her, and she will be clean.’”
7+33=40 days, 14+66=80 days.
See also the spies (40 days), Noah waiting to open the Ark (40 days), and more here.
The "embalming" is an interesting inclusion because it tells of an Egyptian practice, which might stem from the same cultural idea of 40 days/years being a complete unit or is a projection onto them, or be a transcription of an idea directly into metaphor, (nearly) ignoring the literal truth of how long it took, or be erroneous projection. Genesis 50:
1 Joseph threw himself on his father and wept over him and kissed him. 2 Then Joseph directed the physicians in his service to embalm his father Israel. So the physicians embalmed him, 3 taking a full forty days, for that was the time required for embalming. And the Egyptians mourned for him seventy days.
4 When the days of mourning had passed, Joseph said to Pharaoh’s court, “If I have found favor in your eyes, speak to Pharaoh for me. Tell him, 5 ‘My father made me swear an oath and said, “I am about to die; bury me in the tomb I dug for myself in the land of Canaan.” Now let me go up and bury my father; then I will return.’”
6 Pharaoh said, “Go up and bury your father, as he made you swear to do.”
7 So Joseph went up to bury his father. All Pharaoh’s officials accompanied him—the dignitaries of his court and all the dignitaries of Egypt— 8 besides all the members of Joseph’s household and his brothers and those belonging to his father’s household. Only their children and their flocks and herds were left in Goshen. 9 Chariots and horsemen[a] also went up with him. It was a very large company.
10 When they reached the threshing floor of Atad, near the Jordan, they lamented loudly and bitterly; and there Joseph observed a seven-day period of mourning for his father.
I included the full length of that so no one says "Aha! Apparently the writers were willing to say '70 days' when something took that long, so the 40 is not a metaphor." Consider that the other mourning period is a multiple of 7.
So I did actually write it.
Its first title was Rationalist Hamlet, back when it was a short fan contribution to the Alternate Parallels section of Harry Potter and the Methods of Rationality. When I found myself actually trying to write the full thing, its working title became A Will Most Incorrect to Heaven. When I realized I was going to try to make it something approaching marketable, I saw that the only logical title was Hamlet and the Philosopher's Stone. But the actual, official title is, simply, The Tragedy of Prince Hamlet and the Philosopher's Stone, or, A Will Most Incorrect to Heaven by William Shakespeare.
It's a full-length play. I wrote it to be performable, but mostly I wrote it to be read. As of today, I'm self-publishing it and selling it as an e-book for $3.00 (that's the standard e-book price of $2.99, plus a cent to help people make a more rational purchasing decision). If you don't have a bank account and you have 50+ karma on this site, send me a private message with your email address. But I would prefer people paid for it (here's the link again, and here's an excerpt). Charging may seem gauche, but I suspect there's the illusion of a social norm against charging for fanfiction just because it's normally illegal. This work is an exception: the Harry Potter content is purely allusive, and Shakespeare won't be complaining.
The mission statement of the play is roughly the same as that of Methods of Rationality or Alicorn's Twilight re-imagining Luminosity. The philosophy in it is of course my own, but I don't disagree on any major points with Eliezer. As with Methods, I've written it to be enjoyable to people who have no direct exposure to Shakespeare's Hamlet and also to Shakespeare aficionados who have never heard of Less Wrong or even of Buffy the Vampire Slayer. The play is a rewrite of Hamlet that preserves much of the original style, language, and plot, while injecting references to modern culture, epistemology, and ethics. It's perhaps what Shakespeare would have written, had he been simultaneously trying to appeal to audiences of both his time and our own. The Philosopher's Stone, for example, would be familiar to subjects of either Queen Elizabeth. The play's formatting is modeled after the way most of us encounter written Shakespeare: the spelling is updated and standardized, the stage directions are minimal and mostly of the sort that can be inferred from the dialogue, and the language is Elizabethan English from circa 1599; any anachronism is unintentional, aside from a certain wry punctuation mark and other allusions to future art. The only major change to the structure is the play's length: while unabridged productions of Hamlet can run up to five hours, the more concise Tragedy of Prince Hamlet and the Philosopher's Stone, or, A Will Most Incorrect to Heaven by William Shakespeare clocks in at well under two. Oh, and I changed all the words. There are only a few lines from the original in there.
I'm eager, of course, for feedback. Hope you enjoy!