Dolo-SYM to T core Mapping in ADC Framework¶
Version: 0.1.0
Date: December 22, 2025
Status: Design Note
1. Overview¶
This document maps Dolo's current syntax (which we treat as DDSL-SYM) to the operator-theoretic T core representation (formerly “DDSL-CORE”) within the ADC (Arrival-Decision-Continuation) framework.
A key insight is that expectations can be computed at different perches, and this is the fundamental distinction between: - ADC factorization: Expectation at arrival perch (shock before decision) - Primal Bellman factorization: Expectation at continuation perch (shock after decision)
2. Symbol Group Mapping¶
2.1 Current Dolo Symbol Groups¶
| Dolo Group | Semantic Role | Time Structure |
|---|---|---|
states |
Endogenous state variables | s[t], s[t-1] |
controls |
Decision/choice variables | c[t], c[t+1] |
exogenous |
Shock realizations | m[t], m[t+1] |
expectations |
Intermediate conditional expectations | z[t] computed from [t+1] |
values |
Value functions (recursive/fixed-point) | V[t], V[t+1] |
poststates |
Post-decision state (for EGM) | a[t] |
parameters |
Fixed calibration values | No time index |
2.2 T core Representation¶
| Dolo Group | T core Declaration | ADC Perch |
|---|---|---|
states |
xa @in Xa, xv @in Xv, xe @in Xe |
Arrival, Decision, Continuation |
controls |
a @in A |
Decision |
exogenous |
y @in Y, y ~ D_y |
Shock space |
expectations |
Operator E_y[\cdot] inside mover |
Depends on shock timing |
values |
Va: Xa → R, Vv: Xv → R, Ve: Xe → R |
Each perch |
poststates |
xe @in Xe (continuation state) |
Continuation |
parameters |
β @in (0,1) |
Stage-global |
3. The Key Insight: When is Expectation Computed?¶
3.1 Shock Timing in Dynamic Models¶
In a recursive problem, shocks can arrive at different points:
Period t Period t+1
─────────────────────────────────────────────────
Arrival → [shock?] → Decision → [shock?] → Continuation → Arrival_next
xa xv xe xa'
Two canonical timings:
- Shock BEFORE decision (observed before choosing)
- Agent sees shock, then optimizes
- \(x_{\sim} = \mathrm{g}_{\prec\sim}(x_{\prec}, y)\) — shock \(y\) is part of the decision state
-
No expectation needed at decision perch
-
Shock AFTER decision (unobserved at choice time)
- Agent optimizes under uncertainty
- \(V_{\succ}(x_{\succ}) = \mathbb{E}_{y'}\!\left[V_{\prec}'\!\left(g_{ea}(x_{\succ}, y')\right)\right]\)
- Expectation computed at continuation perch (or inside the decision operator in primal form)
3.2 ADC vs Primal Bellman Factorization¶
| Factorization | Shock Timing | Where E[·] Lives | Dolo Analog |
|---|---|---|---|
| ADC | Before decision | Arrival perch | transition: then arbitrage: |
| Primal Bellman | After decision | Continuation perch | expectation: block |
ADC Structure: $$ V_{\prec}(x_{\prec}) = \mathbb{E}{y}!\left[V}!\left(\mathrm{g{\prec\sim}(x, y)\right)\right] \qquad \text{(expectation at arrival)} $$
Primal Bellman Structure: $$ V(x) = \max_{a}\left{ r(x, a) + \beta\, \mathbb{E}_{y'}!\left[V'!\left(g(x, a, y')\right)\right] \right} \qquad \text{(expectation inside the decision operator)} $$
3.3 What Dolo's expectations: Actually Is¶
Dolo's expectations: group represents variables computed for shocks unobserved at decision time.
Example from consumption_savings_iid.yaml:
This computes E[u'(c')] — the expected marginal utility of next-period consumption.
In T core terms:
- mr is an intermediate variable inside a backward mover
- The expectation \(E_y[\cdot]\) is computed at the continuation perch
- This is Primal Bellman style, not ADC style
4. T core Representation of Expectations¶
4.1 Explicit Operator Instances¶
In T core, expectation operators are explicit, and their instance identity is keyed by the random variable name:
E_{y}(...)in SYM → operator instanceE_yin CORE.
Expectation location (arrival vs decision vs continuation) is not encoded in the operator id; it is determined by where the operator is applied (which mover/perch uses it).
4.2 Movers with Different Expectation Locations¶
ADC-style mover (expectation at arrival):
perches:
arrival:
backward:
B_arvl: Vv -> Va @via |
xv = g_av(xa, y)
Va(xa) = E_y[Vv(xv)] # ← E at arrival perch
decision:
backward:
B_dcsn: Ve -> Vv @via |
a_star(xv) = argmax_{a} Q(xv, a)
Vv(xv) = Q(xv, a_star(xv)) # ← No E at decision
Primal-style mover (expectation at continuation/inside decision):
perches:
decision:
backward:
B_dcsn: Ve -> Vv @via |
Q(xv, a) = r(xv, a) + β * E_y[Ve(g_ve(xv, a, y'))] # ← E inside Q
a_star(xv) = argmax_{a} Q(xv, a)
Vv(xv) = Q(xv, a_star(xv))
5. Mapping Dolo Equation Blocks to T core¶
5.1 Dolo transition: → T core Transition Functions¶
# Dolo-SYM
equations:
transition: |
w[t] = exp(y[t]) + (w[t-1] - c[t-1]) * r
# T core
functionals:
"arvl_to_dcsn_transition": g_av: [xa, y] @mapsto xv @via |
xv = exp(y) + xa * r
5.1.1 Kernel vs. push-forward (where “methods” live)¶
- In this mapping,
g_avis a kernel: a pure Υ-level function object (it says how states move, given an input and a shock). - The corresponding forward evolution is a push-forward operator (often implicit in SYM): it takes a distribution on
xa(and the shock distribution fory) and produces the induced distribution onxv. - Methodization attaches to the push-forward / draw operators (simulation / quadrature / discretization), not to
g_avitself. - A kernel only becomes method-relevant when you intend to evaluate it numerically and its evaluation invokes methodized operators (e.g.,
E_y[...],argmax, interpolation of an approximated object, draws, etc.).
5.2 Dolo arbitrage: → T core Euler/FOC¶
# Dolo-SYM
equations:
arbitrage: |
β * (c[t+1]/c[t])^(-γ) * r - 1 | 0 <= c[t] <= w[t]
# T core (inside decision mover)
perches:
decision:
backward:
B_dcsn: Ve -> [Vv, c_star] @via |
# Euler equation defines optimal c implicitly
c_star(xv) satisfies: β * E_y[(c'/c_star)^(-γ)] * r = 1
@constraint: c_star @in Gamma(xv)
For readability (math form):
5.2.1 (EGM) Endogenous grid → interpolated policy function (implicit in Dolo, explicit in CORE)¶
In EGM, the policy update is not “compute \(c\) on the decision grid \(w\) directly”. Instead, EGM computes policy points on the continuation/poststate grid and then constructs an approximate policy function by interpolation.
This is exactly why dolo-plus allows perch-shifted controls like c[>]: it denotes an endogenous-grid representation of the policy.
For the consumption–savings example (single state \(w\), poststate \(a\)):
1) Inverse Euler on the continuation grid (SYM: cntn_to_dcsn_mover.InvEuler):
Let \(\{a_i\}_{i=1}^{N_a}\) be a grid for the continuation state \(a \in X_{\succ}\). Given the continuation shadow value \(dV_{\succ}(a)\),
2) Endogenous wealth grid (SYM: cntn_to_dcsn_transition / reverse_state):
3) Approximate policy function:
Construct an interpolant \(\hat c(\cdot)\) from the point cloud \(\{(w_i, c_i)\}\), and evaluate it on the decision grid \(\{w_j\}\) (e.g. a !Cartesian grid).
Key point for SYM → CORE mapping: Dolo’s model YAML only names method: egm and options.grid, but the solver implicitly performs the step
\((w_i,c_i) \mapsto \hat c(w)\). CORE makes this approximation step explicit by treating it as an approximation/interpolation operator attached to the backward mover’s policy output.
Implementation reality (Dolo): in dolo/algos/egm.py, the arrays (sa, xa) are exactly the endogenous point cloud (w_i, c_i), and the call eval_linear((sa0[i,:,0],), xa0[i,:,0], ss) evaluates \(\hat c(ss)\) by interpolation.
5.3 Dolo expectation: → T core E Operator¶
# Dolo-SYM
symbols:
expectations: [mr]
equations:
expectation: |
mr[t] = β * (c[t+1])^(-γ) * r
# T core (intermediate inside mover)
perches:
continuation:
backward:
B_cntn: Va_next -> Ve @via |
# mr is a local intermediate, not a separate symbol
mr(xe) = β * E_y[(c'(xa'))^(-γ)] * r
Ve(xe) = ...
5.4 Dolo value: → T core Value Function Mover¶
# Dolo-SYM
symbols:
values: [V]
equations:
value: |
V[t] = u(c[t]) + β * V[t+1]
# T core
symbols:
functions:
inputs:
"continuation_value": Ve: Xe -> R @input
outputs:
"decision_value": Vv: Xv -> R
perches:
decision:
backward:
B_dcsn: Ve -> Vv @via |
Vv(xv) = u(c_star(xv)) + β * Ve(g_ve(xv, c_star(xv)))
6. Two-Shock Models and Stage-Internal Expectations¶
6.1 The General Case¶
A model can have shocks at multiple points:
This requires two expectation operators:
- E_y1 computed at arrival (before decision)
- E_y2 computed at continuation (after decision)
6.2 Stage-Internal Expectations¶
A key insight: expectations can be computed within a stage, not just at stage boundaries.
Example: Shock observed mid-decision
perches:
decision:
# Two-part decision: observe shock, then choose
backward:
B_dcsn: Ve -> [Vv, a_star] @via |
# First: expect over shock y that arrives during decision
Q_expected(xv, a) = E_y_mid[r(xv, a, y) + β * Ve(g_ve(xv, a, y))]
# Then: optimize
a_star(xv) = argmax_{a} Q_expected(xv, a)
Vv(xv) = Q_expected(xv, a_star(xv))
This is different from both pure ADC and pure Primal: - ADC: expectation fully resolved before decision - Primal: expectation over next-period shock (not current-period) - This: expectation over current-period shock that affects both reward and transition
7. Summary: The Expectation Location Principle¶
The fundamental design choice in a recursive model is: at which perch is each expectation computed?
| Expectation Location | What It Means | Dolo Representation | T core Representation |
|---|---|---|---|
| At arrival | Shock observed before decision | Implicit in transition: |
E_y inside B_arvl mover |
| At decision | Shock during decision (rare) | Not standard | E_y inside B_dcsn mover |
| At continuation | Shock after decision | expectations: group |
E_y inside B_cntn mover |
| Across stages | Next-period shock | V[t+1] in value: |
Stage input Ve |
T core makes this explicit by: 1. Declaring operator instances with their shock variable 2. Placing operators inside specific movers 3. Tracking which perch each expectation belongs to
8. Open Questions¶
-
Multiple shocks same timing: How to handle
E_{y1,y2}[\cdot]when two shocks arrive together? -
Correlated shocks across perches: If
y1at arrival is correlated withy2at continuation, how does T core represent this? -
Methodization per location: Should expectation operators at different perches have different default methods?
-
Forward movers: How does shock timing affect distribution evolution (push-forward)?
- Partial resolution: treat forward movers as push-forwards induced by kernels + shock distributions; shock timing determines which kernel/distribution pair is used at which perch, while methodization supplies the concrete push-forward method (simulate / quadrature / etc.).