Comedy is a range of literary or performative genre which generally either end in a positive resolution or use humor to generate mirth. (For the sake of simplicity in discussion, I will refer to comedies as texts, even though a performance is not, IMHO, a text.) Now, it may seem odd to include in a single category texts that have positive resolutions but might generate little mirth (sentimental comedies, for example) with texts that generate mirth but do not have positive resolutions (dark comedies, for example). But our culture uses that loose category for both groups. I have a theory (below) about why one might want to lump them together.
In the theory of poetics, comedy has traditionally been contrasted with tragedy. Aristotle saw the comic character as inferior to the spectator but harmless. By contrast, the tragic character was superior to the spectator, and in tragedy, we witness the downfall of the great. Aristotle began a long line of thinkers who valued tragedy above comedy. (Even in the modern day, the Oscar for best actor rarely goes to a role in a comic movie.) Later theorists have pointed out that, although the comic hero is disparaged and embarrassed, that person often perseveres through the humiliations to be part of a happy ending.
This concept of inferior and superior works well with the theory of humor I articulated in part 4 of this series. There, I argued that humor functions as a non-violent way to adjust an individual's place within a group status hierarchy. We laugh at the pompous individual whose opinion of his status is higher than the consensus opinion of the rest of the group. Or the group feels greater cohesion after members share a laugh at something external to the group.
The comic hero isn't necessarily inferior to the spectator in all regards, but some of the hero's qualities are such that the spectator sees the hero as another member of the group, and probably not the unquestioned peak of the hierarchy. Even a totally ridiculous character who is strictly inferior is usually allowed to continue to be part of the group.
The comedy whose object is to generate mirth often deals with humor's function as a device to adjust group status and build group cohesion. Humor also can be used to lower stress by ridiculing the forces that threaten the group, and comedy can be a vehicle for delivering that psychological relief. So even a dark comedy with grim humor can comfort the spectator that the horrific threats portrayed can be ridiculed.
A comic text that does not feature much mirth but that does have a positive resolution ends with a social group without open conflicts. In traditional western societies, a major contest within a social group is the pairing off of couples into formal marriage. Some marriages allow the couple to enjoy many years of contentment and low emotional conflict and stress, while others can be fraught with stress, conflict, and violence. Many comedies deal with the delicate process of choosing a marriage partner, which can have lifelong consequences. The text often ends with the marriage, settling a source of potential group division.
Then there is the comic text itself, aside from its content. Part of the nature of a public performance or a published text is that it is an assertion by the author or performer of social status. If I make a speech before a group, and it fails, my social status drops. Many leaders within human social groups earn their high status based on their command of written or spoken persuasion. (One theory for why men tell disproportionately more jokes than women and why women laugh approvingly at them is that the men in question are trying to assert their status, perhaps as a courtship display.)
A physical work of art is also an assertion of social status. If it is accepted, it is an object which is respected and which confers on its creator respect as a genius, able to perceive what others cannot. A viewer signals membership within a group by demonstrating an appreciation and respect for a certain type of art. Conversely the viewer may signal rejection of the value of that group by belittling a style of art or performance. (For example, Nashville's radio show "Grand Ole Opry" was named in mocking rebuttal of a competing radio show that broadcast classical music from the Grand Opera.)
A comic performance or text is also an assertion of status. The comic performer who gets no laughs dies on stage and is humiliated. If no publisher is willing to accept a manuscript, if no reader is willing to buy a book, if no review praises it, then its author has low status. It has to be embraced by the social group to be a success. So the comic text uses humor to adjust social status within its narrative (laughing at the ridiculous), but the text itself is a bid for social status. If the wider group, lead often by high status arbiters of taste, does not accept the text's version of adjusting group status, it will itself lose status.