"If you're happy and you know it, clap your hands!"
How should we translate this into a logical sentence in order to capture everything that’s going on here?
First, we could just translate it as “P” but that seems way too easy. We can at least get the conditional and conjunction structure like this:
P = “You’re happy.” | Q = “You know it.” | R = “Clap your hands.”
(P ∧ Q) → R
So far so good. But there’s at least three things in those atoms that we ought to try and get some logical vocabulary for. First, let’s consider the epistemic modality. If X is true and S knows X, then we can introduce an epistemic modal operator, K, that we use to represent knowledge. We’re not going to worry about multi-agent modeling, so we just need one operator.
p = “You’re happy.” | Kp = “You know (that you’re happy).” | r = “Clap your hands.”
(p ∧ Kp) → r
We could also represent the relationship of the object (‘you’) and its states or properties (‘being happy’) with first-order predication.
y = you | H = “…is happy.” | Kϕ = “S knows that ϕ.” | r = “Clap your hands.”
(Hy ∧ KHy) → r
Okay, that’s two of the three features of the sentence that seem obviously worth capturing the logical structure of. Last, there’s the imperative: “Clap your hands.” We could just leave it as is and include an imperative operator (‘!’) to indicate that it’s a non-propositional subformula. It would be better, I think, to try and incorporate the first-order structure we have so far. In that case, we can think of imperatives as issuing to specific objects that are defined in our first order language. We might as well do the same for our epistemic modal operator:
y = you | H = “…is happy.” | Kˢϕ = “S knows that ϕ.” | !ˢϕ = “S, do ϕ!” | C = “Clap …’s hands.”
(Hy ∧ KʸHy) → !ʸCy
This is, I think, the best translation we can give without getting into worries about second-person indexical pronouns. It’s interesting to me that this sentence, which is ostensibly so simple that we teach children to sing it, requires a non-propositional, first-order epistemic modal logic in order to capture its structure.
♩♫ 𝅘𝅥𝅯 𝄽 ♬ 𝄽♪ 𝄽 ♫ 𝅘𝅥𝅯 ♪♬ 𝅘𝅥𝅯 ♬ ♪ ♫ ♩ ♪ ♫ ♬ ♫ 𝅘𝅥𝅯 ♪ 𝄽 ♬ 𝅘𝅥𝅯 ♬ ♪ ♫ ♫ 𝅘𝅥𝅯 𝄽 ♪♬ 𝅘𝅥𝅯 ♬ ♪ ♫
(Hy∧KʸHy) → !ʸCy, (Hy∧KʸHy) → !ʸCy, (Hy∧KʸHy) → Fy, (Hy∧KʸHy) → !ʸCy
(Hy∧KʸHy) → !ʸSy, (Hy∧KʸHy) → !ʸSy, (Hy∧KʸHy) → Fy, (Hy∧KʸHy) → !ʸSy
(Hy∧KʸHy) → !ʸRy, (Hy∧KʸHy) → !ʸRy, (Hy∧KʸHy) → Fy, (Hy∧KʸHy) → !ʸRy
(Hy∧KʸHy) → !ʸ(Cy∧Sy∧Ry), (Hy∧KʸHy) → !ʸ(Cy∧Sy∧Ry), (Hy∧KʸHy) → Fy,
(Hy∧KʸHy) → !ʸ(Cy∧Sy∧Ry)
♩♫ 𝅘𝅥𝅯 𝄽 ♬ 𝄽♪ 𝄽 ♫ 𝅘𝅥𝅯 ♪♬ 𝅘𝅥𝅯 ♬ ♪ ♫ ♩ ♪ ♫ ♬ ♫ 𝅘𝅥𝅯 ♪ 𝄽 ♬ 𝅘𝅥𝅯 ♬ ♪ ♫ ♫ 𝅘𝅥𝅯 𝄽 ♪♬ 𝅘𝅥𝅯 ♬ ♪ ♫