LawSynthGitHub

Core concepts

A handful of ideas recur across the CLI, SDK, Studio, and services. They all operate on the same validated representation.

World IR

The World IR is a single typed, executable representation of a dynamical system. Instead of a private object graph per algorithm, every stage — discovery, explanation, simulation, reporting — exchanges the same document: variables, laws, parameters, dependencies, regimes, and uncertainty in one place.

Laws

A law is one equation with a kind. A continuous law defines a state variable's time derivative (dx/dt = …); other kinds cover discrete updates, algebraic constraints, observations, and events. Each law carries a target and an expression tree built from constants, symbols, and a fixed operator set — the same tree the Rust core evaluates.

.lsworld bundles

A discovery is a portable .lsworld bundle: a validated World IR plus its provenance. It is the unit of exchange — explain, forecast, compare, and report all take a bundle in. Same bundle, same result, on any machine, offline.

Composable: CLI, SDK, Studio, and services all read and write the same .lsworld bundle.

Regimes

Real systems switch behavior. A regime is a distinct mode with its own effective dynamics — a spring that yields, a market that flips, a population that crashes. Discovery can detect regime boundaries (--regimes) and surface them as a timeline so a single world can honestly describe a piecewise process.

Uncertainty

LawSynth is honest about what it does not know. Uncertainty is first-class: parameter confidence, bootstrap bounds, and the assumptions a result depends on are recorded on the world and rendered as bands in forecasts and reports — never hidden.

Determinism

The same inputs produce a bit-identical world, every time. This reproducibility guarantee is what makes a discovered world citable, and it is the property the rest of the system is built on. See Why determinism.