Formal semantics (source code)

= Formal semantics

<Formal semantics> describes linguistic meaning with explicit mathematical representations and rules for combining them. A <truth condition> states when a declarative expression is true in a model; <compositional semantics> explains how meanings depend on both the parts and their arrangement. A syntactic category alone need not determine the semantic operation.<Essentials of Linguistics (2nd edition) by Catherine Anderson and others>[§7.2, compositionality and structure; §7.11, denotation and truth conditions]{ref}

In a toy model, let $B=\{1,2\}$ denote the boxes and $R=\{2,3\}$ the red objects. “Every box is red” is true exactly when $B\subseteq R$, which fails here. “Some box is red” is true when $B\cap R\ne\varnothing$, which holds. The difference comes from the quantifier's rule, not a change in the noun's denotation. Such finite examples make competing semantic proposals testable while leaving conversational interpretation to additional assumptions about context and <pragmatics>.