Examples
One framework, many fields
Pick the field that looks closest to the problem you have in front of you. Each page carries a runnable snippet, a walkthrough, and pointers into the docs and the monograph.
-
Background causal inference on a Tokio runtime
An event handler runs a causal model on a Tokio task while the main loop stays free.
-
Pearl's Ladder of Causation: association, intervention, counterfactual
Walk all three rungs of Pearl's ladder against the same Smoking → Tar → Cancer chain. The difference between the rungs is one method call.
-
A Causal State Machine wired to three real-time sensors
Smoke, fire, and explosion sensors each get a Causaloid and an Action. The CSM routes per-tick readings and fires the matching alert when a predicate holds.
-
Flight-envelope monitor for a safety-critical aircraft
A five-stage PropagatingProcess that fuses sensor health, folds risk, runs a Kalman update, and walks an envelope hypergraph.
-
TTFields electrode optimization for a glioblastoma volume
A Metropolis-style optimizer that proposes a new electrode angle, evaluates the disruption via a causal effect chain, and accepts or rejects.
-
Maxwell field derivation as a four-step monadic chain
A plane-wave configuration becomes a vector potential, then an EM field, then a gauge check, then a Poynting flux. Four bind calls.
-
Protein folding under the Generalized Master Equation
Simulate non-Markovian folding dynamics with memory kernels. The Markov operator handles instantaneous transitions; the kernels carry the part of the past that still matters.
-
A probe approaches a black hole; the physics regime switches mid-chain
Newtonian mechanics at distance, relativistic geometry near the event horizon. The Causal Monad carries the probe state and the chain picks the right kernel each step.
-
General-relativistic magnetohydrodynamics as a five-stage monadic pipeline
Couple a GR solver, a coupling layer, and an MHD solver through monadic bind. Curvature picks the metric; the metric drives the plasma physics; stability falls out at the end.
-
Recovering Earth's mass from satellite clocks
One week of Galileo broadcast clock and orbit data, a five-stage CausalMonad pipeline, and Earth's mass falls out within 0.2% of the IERS reference.