WG1 — SCE Working Group on Language, Calculus & Formal Semantics
Part of the Research Program for AI as Babel Fish for Structural Economics.
Chair: Akshay Shanker (designated June 2026).
Scope¶
This working group addresses the semantic specification of dynamic structural models: the economist-facing declarative language; the typed Bellman-core and its denotational semantics; and, where feasible, a formal encoding of that semantics in Lean. The three layers are mutually dependent — a usable language requires an explicit semantics; an explicit semantics is scientifically meaningful only if it can be stated in a shareable language; and a formal encoding makes model meaning machine-readable and checkable against a shared knowledge base.
Aims¶
Develop a software-independent declarative language in which a discrete-time Bellman model is written once — mathematically explicit, modular, and free of numerical content — and elaborate it to a single typed core object (a “Bellman-core” / term-graph) with denotational semantics. Encode that semantics, in parallel, in a machine-readable form (Lean), as part of a formal knowledge base of standard dynamic-programming theory, so that specifications can be type-checked against encoded background results rather than judged by informal argument alone.
Scientific rationale¶
Structural papers typically ship bespoke codebases in which the model on paper is not formally bound to the implementation. A shared declarative language is a prerequisite for reproducibility, interoperability, AI-assisted authoring, and systematic robustness analysis: each requires a portable representation of the model itself, independent of any particular solver or codebase. A formal semantic core makes statements such as “this method preserves the solution” or “these two formulations are equivalent” mathematically precise; a formal knowledge base connects the program to the broader AI-for-Science / formalization literature (the economics analogue of formalizing physics in Lean; see prior art §5).
Current state¶
Surface language (from bellman-ddsl)¶
A YAML surface syntax (dolo-plus / Dolang+) extending EconForge’s dolo, with Arrival–Decision–Continuation (ADC) information structure (“perch” tags
[<], bare,[>]marking σ-algebras, not merely time indices); decorators (@in,@dist,@def) and split files; stage / period / trellis composition; and an expression language of Bellman operators (max_{},E_{},solve_{},argmax_{}, marginal-valued_{}).Implemented through spec 0.1; per-application registries of reusable components.
Formal core¶
dolang+ parses once into a typed term-DAG (“ordo”); every interpretation or translation is a fold over that single object. Builders are derived from declarations, not hand-authored.
Draft theory chapters (Bellman-calculus chs. 01–04 revised; 05–10 stubs); category-theoretic foundations (symmetric monoidal categories, initial algebras); a planned Bellman-calculus working paper (denotational semantics, existence/convergence, state-space typing).
Machine formalization¶
Experimental Lean 4 formalizations of HARK models (
ConsIndShock,ConsKinkedR,ConsLaborIntMarg, …) encode ADC state spaces, transitions, and Bellman structure as typed objects, demonstrating that the language’s structure is machine-formalizable.
Registries: stage, period, and trellis libraries¶
Because models are assembled from reusable, composable components, the language should support three curated, versioned catalogs: a stage registry (single arrival→decision→continuation problems), a period registry (named compositions of stages), and a trellis registry (multi-period composites). Components should be discoverable, versioned, citable, and safely recombinable. At present these exist per application; the research agenda calls for program-wide shared registries.
Cross-subfield integration (representation)¶
Letting models and components from different economics traditions — heterogeneous-agent macro, structural microeconometrics, computable general equilibrium (CGE), agent-based modeling (ABM), and applied IO — be expressed, shared, and coupled in one representation is a cross-cutting aim of the program. WG1 owns its representational half:
Companion structures beyond the Bellman-core. In many subfields a Bellman problem is only one component of a model; the same papers rely on structures that are not dynamic-programming problems but recur across literatures — market clearing / equilibrium fixed points, search / matching / interaction topologies, adaptive and learning (non-optimizing) rules, accounting identities and stock–flow consistency, evolutionary / selection dynamics, and the estimation layer wrapped around structural models. A central question is which of these admit a shared, canonical representation — a companion to the Bellman-core — rather than bespoke, one-off treatment. (Concretely in ABM: individual agents may each solve a Bellman problem, but the model as a whole is organized by an interaction structure, adaptive rules, and an aggregation/market-clearing step — none of them a Bellman problem.)
Coupling interfaces — typed, declared imports/exports that let a component built in one tradition (an IO demand system, an HA household block) be embedded in another, together with the consistency conditions (market clearing, budget balance) a joined model must satisfy.
Cross-tradition component portability in the stage/period/trellis registries: what makes a component reusable across traditions, not just within one.
The numerical side of this agenda (Rosetta Stones to CGE/ABM/IO toolkits, verification of coupled models) sits in WG2; AI-assisted translation of subfield papers and cross-subfield reproducibility sit in WG3. See prior art §6 for cross-field precedents (OpenKIM, ESMF, OPTIMADE, …).
Precedent: PhysLean / mathlib¶
Physics and mathematics provide the closest precedent for the formal encoding layer.
mathlib is the community formal-mathematics
library in Lean; PhysLean/Physlib
formalizes physics in Lean 4; Lean4PHYS / LeanPhysBench
add a foundation library and a benchmark for formal physics reasoning by language models. Two
findings are directly relevant: (i) a field requires its own formal corpus and notation
(math-specialized formal libraries did not transfer to physics); and (ii) providing the formal
library as context measurably improves model accuracy — an empirical argument for grounding the
AI work in WG3 in this formal layer.
Five-year milestones¶
Phase 1: Freeze surface-language spec 1.0 and stabilize the Bellman-core wire format (typed IR, JSON-default); establish shared stage/period/trellis registries; publish the Bellman-calculus working paper; seed a Lean DP foundation library and release an initial EconDP formalization benchmark; publish a tutorial corpus of 12–24 canonical models; first models authored by researchers outside the core team.
Phase 2: Advanced language features — branching stages (discrete-continuous choice), infinite-horizon fixed points, forward/distributional builders; a validation/linting toolchain; encoding of standard DP results from the literature (existence, convergence, contraction, composition laws for stage/period/trellis) in the foundation library; formal treatment of information structure (perches as filtrations) and post-decision states.
Phase 3: A stable, governed, citable semantic standard and a community-maintained formal knowledge base; any model in the language exportable to a formal encoding in Lean; incorporation into graduate and summer-school curricula (DSE, Oxford Tools for Macroeconomists).
Open research questions¶
Branching and discrete-continuous choice — surface syntax and elaboration (front half parsed; back half open).
Infinite-horizon models within the modular/stage framework.
Surface-syntax design — the most legible representation of fields, builders, and perches for applied economists.
Forward and distributional builders for simulation and aggregation.
Registry design — naming, versioning, dependency tracking, safe recombination.
Stochastic rewards and aggregator rank; semi-conjugacy / operator equivalence (conditions under which methods may be exchanged); compositionality (conditions under which stage/period/trellis compose correctly); state-space typing.
A Lean DP foundation library — primitive types and definitions for recursive economic models (the analogue of PhysLib’s units system), including encoded standard results from Sargent–Stachurski and related sources; autoformalization (model-spec → Lean), evaluated on the EconDP benchmark (joint with WG3).
Companion structures — which recurrent non-Bellman structures (matching/interaction, market clearing, learning rules, accounting identities) admit a shared canonical representation alongside the Bellman-core, and which are irreducibly bespoke (cross-cutting with WG2/WG3).
Substrate decision — whether the Bellman-core should be built on Lean (inheriting Lean’s type system and tooling, à la QIR-on-LLVM / PhysLean) or remain a bespoke term-graph with Lean as an export/target for formal encoding.
Illustrative project proposals¶
Extend the language to discrete-continuous (branching) choice: specify the surface syntax and elaboration for discrete regime choice (participation, default, retirement timing), validate against three published life-cycle models, and contribute the grammar extension and test suite.
Build a Lean foundation library for modular dynamic programming: define the core types, encode standard existence and convergence results from the DP literature, and release an open EconDP benchmark for evaluating AI-assisted formalization.
Indicators of progress¶
Specification version cadence; adoption of the Bellman-core IR as the input to downstream tooling; breadth of models expressible in the language; registry size and reuse; coverage of the formal knowledge base (encoded standard results and model encodings); adoption of the EconDP benchmark; models authored by researchers outside the core team; consumption of the spec by backends (joint with WG2).
Potential funding sources¶
NSF (cyberinfrastructure / economics; CISE / Foundations of computing; AI for science), JHU
DS/AI Institute, FRO/Convergent, philanthropy (cf. the Lean/mathlib gifts).
Foundations¶
Bellman (DP origins); Sargent–Stachurski (recursive methods, contraction/monotone theory);
Backus FFP (composition, meaning vs. representation); category-theoretic semantics; dolo lineage
(Winant); Lean 4 + mathlib and the PhysLean/Lean4PHYS precedent.