@cite{spinoso-di-piano-etal-2025} — (RSA)² on mathlib PMF #
@cite{spinoso-di-piano-etal-2025} @cite{kao-goodman-2015}
(RSA)²: A Rhetorical-Strategy-Aware Rational Speech Act Framework for Figurative Language Understanding (ACL 2025).
What this file is #
A headline-focused PMF formalisation of the (RSA)² model's central architectural claim. The paper's deepest result (worth a Lean theorem):
For non-midpoint utterances, the entire (RSA)² model's behavior reduces to a single prior comparison.
We formalise this as irony_iff_prior_favors_antonym:
L1(u)(opposite u) > L1(u)(literal u) ↔ wp(opposite u) > wp(literal u)
This explains WHY (RSA)² agrees with @cite{kao-goodman-2015} (affect-aware RSA) on cross-context predictions: both reduce to the world-prior asymmetry, but (RSA)² achieves this WITHOUT modeling affect dimensions or QUD projection. Affect is unnecessary for irony.
(RSA)² in three lines #
The paper's key generalisation: replace RSA's literal indicator
𝟙_{m ∈ ⟦u⟧} with a rhetorical strategy function f_r(c, m, u)
parameterised by strategy r ∈ R:
L0(m | c, u, r) ∝ f_r(c, m, u) · P(m | c)(Eq. 4)S1(u | c, m, r) ∝ L0(m | c, u, r)^α · P(u | c)(Eq. 5)L1(m | c, u) = Σ_r L1(m | c, u, r) · P(r | c, u)(Eq. 7 — strategy marginalisation)
In our binary irony fragment, R = {literal, ironic}; f_literal
is the standard indicator and f_ironic(u, w) = 𝟙_{w = opposite(meaning(u))}.
Why the binary-strategy fragment reduces to a prior comparison #
For non-midpoint u (where u.toWeather ≠ opposite u.toWeather):
mixedS1 u.toWeather u = 1/2— only the literal strategy contributes.mixedS1 (opposite u.toWeather) u = 1/2— only the ironic strategy contributes.mixedS1 w u = 0everywhere else.
So posterior mixedS1 worldPrior u puts all its mass on those two
worlds, with relative ratio determined by worldPrior — exactly the
content of the headline theorem.
Connection to QUD-RSA (Appendix A.3) #
The paper proves QUD-RSA (RSA.QUD.proj in our substrate, used by Kao
metaphor / hyperbole / irony) is a strict special case of (RSA)²
(Lemma 1: every QUD-RSA instance arises from a specific f_r; Lemma 2:
not all (RSA)² instances arise from any QUD-RSA instance). This file
formalises the (RSA)² side; RSA/QUD.lean formalises the QUD-RSA side.
Scope #
The 10 numerical predictions from the paper (ironic_reading,
literal_reading, infer_ironic, ...) are corollaries of the headline
theorem at specific worldPrior values. They are paper-finding content
(empirical-fit) — out of scope for this architectural migration.
§0. Domain types #
Equations
- SpinosoDiPiano2025.PMF.instDecidableEqWeather x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Utterance type: weather descriptions used as speech acts. Structurally
isomorphic to Weather but distinct for type discipline (utterance space
vs meaning space).
Instances For
Equations
- SpinosoDiPiano2025.PMF.instDecidableEqUtterance x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The two rhetorical strategies in the paper's binary fragment.
Instances For
Equations
- SpinosoDiPiano2025.PMF.instDecidableEqStrategy x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The Utterance ↔ Weather bijection: each utterance has a unique literal weather meaning.
Equations
- SpinosoDiPiano2025.PMF.Utterance.terrible.toWeather = SpinosoDiPiano2025.PMF.Weather.terrible
- SpinosoDiPiano2025.PMF.Utterance.bad.toWeather = SpinosoDiPiano2025.PMF.Weather.bad
- SpinosoDiPiano2025.PMF.Utterance.ok.toWeather = SpinosoDiPiano2025.PMF.Weather.ok
- SpinosoDiPiano2025.PMF.Utterance.good.toWeather = SpinosoDiPiano2025.PMF.Weather.good
- SpinosoDiPiano2025.PMF.Utterance.amazing.toWeather = SpinosoDiPiano2025.PMF.Weather.amazing
Instances For
Inverse of Utterance.toWeather.
Equations
- SpinosoDiPiano2025.PMF.Utterance.fromWeather SpinosoDiPiano2025.PMF.Weather.terrible = SpinosoDiPiano2025.PMF.Utterance.terrible
- SpinosoDiPiano2025.PMF.Utterance.fromWeather SpinosoDiPiano2025.PMF.Weather.bad = SpinosoDiPiano2025.PMF.Utterance.bad
- SpinosoDiPiano2025.PMF.Utterance.fromWeather SpinosoDiPiano2025.PMF.Weather.ok = SpinosoDiPiano2025.PMF.Utterance.ok
- SpinosoDiPiano2025.PMF.Utterance.fromWeather SpinosoDiPiano2025.PMF.Weather.good = SpinosoDiPiano2025.PMF.Utterance.good
- SpinosoDiPiano2025.PMF.Utterance.fromWeather SpinosoDiPiano2025.PMF.Weather.amazing = SpinosoDiPiano2025.PMF.Utterance.amazing
Instances For
§1. Evaluative antonym (involutive) #
The evaluative antonym on the weather scale: flip endpoints, fix the midpoint. This IS the ironic interpretation function: "amazing" ironically conveys "terrible" because they are evaluative antonyms.
Equations
- SpinosoDiPiano2025.PMF.opposite SpinosoDiPiano2025.PMF.Weather.terrible = SpinosoDiPiano2025.PMF.Weather.amazing
- SpinosoDiPiano2025.PMF.opposite SpinosoDiPiano2025.PMF.Weather.bad = SpinosoDiPiano2025.PMF.Weather.good
- SpinosoDiPiano2025.PMF.opposite SpinosoDiPiano2025.PMF.Weather.ok = SpinosoDiPiano2025.PMF.Weather.ok
- SpinosoDiPiano2025.PMF.opposite SpinosoDiPiano2025.PMF.Weather.good = SpinosoDiPiano2025.PMF.Weather.bad
- SpinosoDiPiano2025.PMF.opposite SpinosoDiPiano2025.PMF.Weather.amazing = SpinosoDiPiano2025.PMF.Weather.terrible
Instances For
§2. Per-strategy speakers (deterministic kernels) #
In the binary-strategy fragment with indicator meanings, each strategy maps a world to a unique utterance:
- literal: pick the utterance whose literal meaning is
w - ironic: pick the utterance whose literal meaning is
opposite w
Because Utterance ≅ Weather (via toWeather), these are well-defined
total functions, and the per-strategy speaker collapses to PMF.pure.
The literal speaker: at world w, deterministically emit the
utterance whose literal meaning is w.
Equations
Instances For
The ironic speaker: at world w, deterministically emit the
utterance whose ironic meaning is w (i.e., whose literal meaning is
opposite w).
Equations
Instances For
The per-strategy speaker dispatch.
Equations
Instances For
§3. Strategy-marginalised speaker (Eq. 7) #
Uniform strategy prior — paper's default for the binary fragment.
Equations
- SpinosoDiPiano2025.PMF.strategyPrior = PMF.uniformOfFintype SpinosoDiPiano2025.PMF.Strategy
Instances For
The strategy-marginalised speaker (Eq. 7's mixture): at world w,
sample a strategy then emit an utterance. This is the L1 likelihood.
Equations
Instances For
§4. Computing mixedS1 at the matching worlds #
The two architectural lemmas the headline theorem hinges on.
mixedS1 at u.toWeather (the literal-matching world) for u:
only the literal strategy contributes (the ironic strategy emits a
DIFFERENT utterance there, namely Utterance.fromWeather (opposite u.toWeather),
which differs from u because the world is non-midpoint).
mixedS1 at opposite u.toWeather (the ironic-matching world) for u:
only the ironic strategy contributes. Symmetric to
mixedS1_at_literal_world, hinging on opposite_involutive.
§5. The L1 posterior #
Pragmatic listener L1: posterior over worlds given an utterance.
Equations
- SpinosoDiPiano2025.PMF.L1 worldPrior u h_marg = PMF.posterior SpinosoDiPiano2025.PMF.mixedS1 worldPrior u h_marg
Instances For
§6. Architectural payoff — irony reduces to prior comparison #
Headline theorem (Spinoso–Di Piano et al. 2025): For any non-midpoint
utterance u, the L1 posterior orders the two candidate weather states
strictly by the world prior at those states.
This is the paper's core architectural insight, formalised: the entire (RSA)² model behavior — for non-midpoint utterances — reduces to a single prior comparison. Affect dimensions and QUD projection are unnecessary for irony; context (the world prior) alone determines whether an utterance is interpreted ironically.
The shared 1/2 factor (the strategy-prior weight on each strategy)
cancels via posterior_lt_iff_score_lt + mul_lt_mul_iff_right.