There’s also this paper, which I assume the Elephant in the Brain chapter to draw on (though I didn’t check the references) (emphasis added):
Since the dawn of Western thought, philosophers, scientists, and comedians have tried to explain what makes things funny. Theories of humor, however, tend to suffer from one of two drawbacks. Domain-specific theories, which address narrow sources of humor, such as jokes (Raskin, 1985) or irony (Giora, 1995), are incapable of explaining humor across domains. And general humor theories, which attempt to explain all types of humor by supposing broad antecedents, such as incongruity (Suls, 1972), superiority (Gruner, 1997), or tension release (Freud, 1928), often erroneously predict humor, as in the case of some unexpected tragedies. For example, unintentionally killing a loved one would be incongruous, assert superiority, and release repressed aggressive tension, but is unlikely to be funny. Moreover, most humor theories have difficulty predicting laughter in response to tickling or play fighting in primates (including humans). Consequently, evolutionarily primitive sources of laughter, such as tickling and play fighting (Gervais & Wilson, 2005), are typically treated as distinct from other sources of humor (Provine, 2000; Wyer & Collins, 1992).
Although existing theories do not agree on the specific necessary and sufficient antecedents of humor (Martin, 2007), a broad review of the literature suggests three conditions that facilitate humor. First, theorists since Aristotle have suggested that humor is often evoked by violations, including apparent threats, breaches of norms, or taboo content (Freud, 1928; Gruner, 1997; Provine, 2000; Veatch, 1998). Empirical work confirms that humor is aroused by displays of aggression, hostility, and disparagement (McCauley, Woods, Coolidge, & Kulick, 1983; Zillmann, 1983). For example, primates often laugh when they are play fighting, tickled, or in the presence of other physical threats (Gervais & Wilson, 2005; Provine, 2000).
A second, seemingly contradictory, condition is that humor occurs in contexts perceived to be safe, playful, nonserious, or, in other words, benign (Apter, 1982; Gervais & Wilson, 2005; Ramachandran, 1998; Rothbart, 1973). For example, apparent threats like play fighting and tickling are unlikely to elicit laughter if the aggressor seems serious or is not trusted (Gervais & Wilson, 2005; Rothbart, 1973).
A third condition provides a way to reconcile the first two: Several theories suggest that humor requires an interpretive process labeled simultaneity, bisociation, synergy, or incongruity (Apter, 1982; Koestler, 1964; Raskin, 1985; Veatch, 1998; Wyer & Collins, 1992). That is, humor requires that two contradictory ideas about the same situation be held simultaneously. For example, understanding puns, in which two meanings of a word or phrase are brought together, requires simultaneity (Martin, 2007; Veatch, 1998). Simultaneity, moreover, provides a way to interpret the threats present in play fighting and tickling as benign.
With the exception of Veatch (1998), researchers have not considered these three conditions together. Considered together, however, they suggest an untested hypothesis: Humor is aroused by benign violations. The benign-violation hypothesis suggests that three conditions are jointly necessary and sufficient for eliciting humor: A situation must be appraised as a violation, a situation must be appraised as benign, and these two appraisals must occur simultaneously.
Violations can take a variety of forms (Veatch, 1998). From an evolutionary perspective, humorous violations likely originated as apparent physical threats, similar to those present in play fighting and tickling (Gervais & Wilson, 2005). As humans evolved, the situations that elicited humor likely expanded from apparent physical threats to a wider range of violations, including violations of personal dignity (e.g., slapstick, physical deformities), linguistic norms (e.g., unusual accents, malapropisms), social norms (e.g., eating from a sterile bedpan, strange behaviors), and even moral norms (e.g., bestiality, disrespectful behaviors). The benign-violation hypothesis suggests that anything that is threatening to one’s sense of how the world “ought to be” will be humorous, as long as the threatening situation also seems benign.
Just as there is more than one way in which a situation can be a violation, there is more than one way in which a violation can seem benign. We propose and test three. A violation can seem benign if (a) a salient norm suggests that something is wrong but another salient norm suggests that it is acceptable, (b) one is only weakly committed to the violated norm, or (c) the violation is psychologically distant. [...]
We found that benign moral violations tend to elicit laughter (Study 1), behavioral displays of amusement (Study 2), and mixed emotions of amusement and disgust (Studies 3–5). Moral violations are amusing when another norm suggests that the behavior is acceptable (Studies 2 and 3), when one is weakly committed to the violated norm (Study 4), or when one feels psychologically distant from the violation (Study 5). These findings contribute to current understanding of humor by providing empirical support for the benign-violation hypothesis and by showing that negative emotions can accompany laughter and amusement. The findings also contribute to understanding of moral psychology by showing that benign moral violations elicit laughter and amusement in addition to disgust.
We investigated the benign-violation hypothesis in the domain of moral violations. The hypothesis, however, appears to explain humor across a range of domains, including tickling, teasing, slapstick, and puns. As previously discussed, tickling, which often elicits laughter, is a benign violation because it is a mock attack (Gervais & Wilson, 2005; Koestler, 1964). Similarly, teasing, which is a playful, indirect method of provocation that threatens the dignity of a target (Keltner et al., 2001), appears to be consistent with the benign-violation hypothesis. Targets are more likely to be amused by teasing that is less direct (multiple possible interpretations), less relevant to the targets’ self-concept (low commitment), and more exaggerated (greater hypotheticality or psychological distance; Keltner et al., 2001). Slapstick humor also involves benign violations because the harmful or demeaning acts are hypothetical and thus psychologically distant. Slapstick is less funny if it seems too real or if the viewer feels empathy for the victim. Humorous puns also appear to be benign violations. A pun is funny, at least to people who care about language, because it violates a language convention but is technically correct according to an alternative interpretation of a word or phrase (Veatch, 1998). [...]
Synthesizing seemingly disparate ideas into three jointly necessary and sufficient conditions (appraisal as a violation, appraisal as a benign situation, and simultaneity), we suggest that humor is a positive and adaptive response to benign violations. Humor provides a healthy and socially beneficial way to react to hypothetical threats, remote concerns, minor setbacks, social faux pas, cultural misunderstandings, and other benign violations people encounter on a regular basis. Humor also serves a valuable communicative function (Martin, 2007; Provine, 2000; Ramachandran, 1998): Laughter and amusement signal to the world that a violation is indeed okay.
There’s also this paper, which I assume the Elephant in the Brain chapter to draw on (though I didn’t check the references) (emphasis added):