The following text is a compilation of tweets by Professor Joel Baden on Genesis 9:18-29. Can you summarize the following text?

"Genesis 9:18-29

Noah’s sons. 

There are three of them - we’ve known their names since 6:10, and P has referred to them, by name or not, throughout the flood story. J, on the other hand, hasn’t mentioned them at all (yet). We only know Noah had a family in J from 7:1. So when we see Shem, Ham, and Japhet in 9:18-19, it is most likely that these verses are from P. This is bolstered by a bunch of stylistic evidence pointing to P, and also from the fact that their “branching out” looks a lot like the fulfillment of “fill the earth” (9:1). (To get it out of the way now: 9:28-29 are also clearly P. This is typical P genealogical style - compare to Gen 5 - and moreover Noah’s age matches the calendar in P’s flood, where Noah was 600.) When we get to the story of Noah inventing viticulture in 9:20, though, it looks a lot like the little notices in J of cultural advances from before the flood (Gen 4:20-22), and is I think the fulfillment of the predictions that Noah will provide relief from work (5:29). The episode that follows - Noah’s exposure and discovery and re-covering - is a little lesson in both the folly of excess drink and the value of respect for one’s parents. Mostly, though, it’s an opportunity for Noah to describe the hierarchy of his children. It’s pretty apparent from even a brief read that there’s something weird going on with Noah’s kids here. By which I mean, why is Canaan mentioned as the one who is cursed, when it was his father who ostensibly committed the wrong? Why isn’t Ham the cursed one? Also: since we know from P that Noah’s kids were Shem, Ham, and Jephet - and always in that order - why is Ham described here as Noah’s youngest son? And why is Canaan described as Shem and Jephet’s brother? The answer is that J and P disagreed on who Noah’s kids were, and in what order they were born. P had Shem-Ham-Jephet, as we’ve seen repeatedly; J must have had Shem-Jephet-Canaan. This contradiction was bridged by a clever bit of redaction: Everything in J points to Canaan being Noah’s son, except the phrase “Ham, the father of” in 9:22. (Which is a weird thing to say there, isn’t it?) And Canaan appears in P (to this point) only in the phrase “and Ham was the father of Canaan” in 9:18 - which is also pretty weird! This is a case of someone seeing that the two concepts of Noah’s sons don’t quite work, and adjusting them each with pretty much the exact same banal phrase. Without them, P reads consistently with itself, and J’s curse on Canaan makes sense: he’s the one who did it! The curse and blessing at the end of the J story is probably a little suspect textually, but the gist of it is apparent: Shem and Jephet are okay, and Canaan is cursed to be a slave to them. Whatever international situation is envisioned here, or in the background, one can guess. Much more important is that 9:25, the curse of Canaan - extended (via redaction) to his father Ham - is a major biblical source for justifying the enslavement of African people in particular, since Ham is the ancestor of (what the biblical authors knew of) Africa. Shem is the ancestor of Israel, and thus of Judaism and Christianity; Jephet is the ancestor of Greece, and thus of “western civilization”; and Ham, or Africa, is to be a slave to them both. (Thus the pro-slavery interpretation goes.) For such a silly little story, the implications in the history of interpretation couldn’t be bigger. Or worse. Fascinating, to me at least, that some of those implications are due to the redaction that aligned J’s Canaan with P’s Ham. Redaction has consequences, it turns out."