Skip to content
plumblangPublic

About

A strict referee for physics — exact empirical verification, explicit assumption lineage, and Lean 4 integration

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Plumb

Plumb checks physics predictions against measurements under explicit assumptions. It tracks shared calibration, keeps worst-case systematics separate from statistical uncertainty, and checks whether the same parameters can satisfy several observations. Each verdict applies to the data, error model and test you declare.

Install

On macOS or Linux:

curl -LsSf https://plumb-lang.sh/install.sh | sh

On Windows, in PowerShell:

irm https://plumb-lang.sh/install.ps1 | iex

Prebuilt binaries and Windows installers are available on GitHub Releases.

Run your first check

In an empty directory, run plumb init to create main.plumb, then check it.

plumb check main.plumb

Check a prediction

Save this as demo.plumb.

assumption stat.gaussian_demo: StatisticalModel "Independent Gaussian error."
role demo.speed: km/s "Carrier speed."

measurement reading: demo.speed = 300 +- 10 km/s assuming stat.gaussian_demo

theory constant_speed {
  predict demo.speed = 305 km/s
}

compare agreement: reading ~ constant_speed
  accept chi2 <= 4
  by gaussian_ldlt
plumb check demo.plumb

Plumb reports compared because $\chi^2 = ((300 - 305)/10)^2 = 0.25$ is within the budget of 4. Change the prediction to 350 km/s and run the check again to see conflict.

Use Plumb in a study

Import measurements and models from the standard library. Use plumb audit to test a theory against a library scope, and plumb parity to compare fixed-point likelihoods with an external fitter.

Add --out runs/attempt-1 to save a receipt and report. Use plumb trace on the receipt to see which assumptions and uncertainties contributed to a result. For archival or CI, plumb lock records exact inputs and plumb validate verifies them and reruns the checks.

Documentation

Read the guide or visit plumb-lang.sh.

plumb doc
plumb doc quickstart
plumb doc --search "covariance"
plumb list scopes

Use plumb lsp for live editor diagnostics, go-to-definition and formatting. See the editor setup and the command index for AI agents.

License

BSD 3-Clause.

About

A strict referee for physics — exact empirical verification, explicit assumption lineage, and Lean 4 integration

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages