Jobs

Solver architecture

How a solver is added, what it is allowed to claim, and how it is tied to the laws. One solver writes one receipt. A law counts as tested only when the receipt names it.

How a solver is added, what it is allowed to claim, and how it is tied to the laws. The registry that enforces this is catalog.json, bodies.json, and the report from python -m engineering.solvers.build. This file is the practice. The README is how to regenerate the report.

A solver computes. A prover shows that a stated law holds. They meet only when a receipt names the law.

The short version

  1. One solver, one receipt. A solver is a pinned program that reads a case and writes one receipt. A container that exited is not a passed control.
  2. Name the body of work. A body is the law ids that share one premise, pinned to the current lawset. A lawset version is a snapshot of every law, not a subject such as aerodynamics.
  3. A solver tests a law only when the receipt names it. checked counts only if the receipt text contains the law id or its Lean theorem. assumed and outside are not tests.
  4. Keep the five dimensions apart. Controls, mutant, refinement, certificate, and empirical anchor. Do not average them into a confidence score.
  5. A force may be used only when controls, the mutant, and refinement are all pass. A motion result has the same bar, and only a motion solver may move a body.
  6. Freeze the gates before the run. A fail stays a fail. Do not edit a band after seeing the number.
  7. A protocol is not a theorem. If the lawset does not state the equation, the body has no laws, and the run tests the protocol.
  8. The builder of a receipt does not declare it a pass. The report reads the receipt. An independent check is a separate dimension.
  9. The solver writes each receipt as a nanopub. The draft cites the mathematical subset that solver implements, with one relation for every law in the subset. Aerodynamics and fluid dynamics are different subsets. The draft is unsigned until the ORCID key owner signs it.

1. Register the solver before quoting it

Add a row to catalog.json: an id, a role (constraint, force, kinematic, motion, contact, limit), the code path, the envelope, and a pointer to each receipt field the five dimensions read. A solver with no receipt is missing on every dimension. That is a finding, and it is how the motion solver and ground contact are recorded.

Quote a coefficient from the report, not from a notebook. The report records the receipt hash. When the receipt changes, rebuild.

2. Group laws into bodies, and pin the lawset

Put the group in bodies.json. A body has:

The file names the lawset version. The build fails if an id is absent from that lawset, or if the law file's version disagrees with the pin. Membership is the list. A solver does not join a body by having a related-sounding name.

Use a body when the laws stand or fall together. Steady glide is flight-climb-glide-law and perturb-wind-glide: one glide, no thrust, lift equal to weight, and along-track wind in the second law only. Isometric scaling is its own body. Induced drag and taxiing thrust sit in named-not-formalised while their lawset status is proposed. Continuum flow is a body with an empty law list: lawset 1.6.0 does not state Navier–Stokes or lattice Boltzmann.

Aerodynamics, as a use, is the steady-glide body plus the altitude body. It is not a superset the fluid solvers inherit.

3. Say how the solver stands to each law

On the solver row, each law has one relation:

RelationUse it when
checkedThis receipt is a test of that law. The build counts it only when the receipt contains the law id or the Lean theorem name.
assumedThe solver uses the law as given and does not re-establish it.
outsideThis is the law a reader would think the solver tested. The run does not test it. Say why in detail.

outside is for the likely confusion, not for every law in the lawset. The wind tunnel carries outside on the glide law and the wind law because a free stream is not those theorems. The vortex lattice carries outside on aspect-ratio-induced-drag because that law is not formalised and the gates compare with other formulae.

A Lean name in a receipt that is not a law id is reported as proof_names_not_in_lawset. The constraint solver's FlyingFish.conflict_of_certificate is in that list. Register the law, or leave the run as a proof of something the body does not contain.

4. Read the dimensions as they are

DimensionPass means
controlsThe frozen analytic or suite check in the receipt passed.
mutantA deliberately wrong variant was rejected.
refinementThe declared grid or time pair stayed inside its bound.
certificateAn independent checker accepted a proof object.
empiricalA measurement, or a reference band frozen beforehand, was met.

partial is a real status. On the constraint solver it means Lean accepted one recorded pattern and other unsatisfiable cores are z3 checking z3. On the wind tunnel the time pair passed and the grid pair is null, so refinement is partial while the suite label stays FAIL. The analytic check can be true inside a failed suite. The suite status is the controls status.

missing means the receipt has no such check. no-claim means the receipt itself says there is no calibrated claim. not-applicable means that dimension does not apply to this kind of solver, as a grid does not apply to an exact rational certificate.

5. What the result may be used for

may_supply_force is true only for a force solver whose controls, mutant, and refinement are all pass, and only inside the envelope on the row. The vortex lattice is the current case: steady thin-wing lift, with no fish polar.

may_move_body is true only for a motion solver on the same three passes. A force, including an eligible one, does not move a body. Feeding a failed control into the motion solver is refused. WaterLily's sphere band is a failed control, so its fish force stays out of the integrator.

A limit solver returns a thickness, or a refusal. It does not supply a force and it does not move a body. material-limit is the current case: a quasi-static plug-work bound, with no ballistic rating.

An unevaluable run is kept and dropped from ranking. It is not given a bad coefficient. Two solvers that agree do not become a measurement. The comparer publishes the spread. Agreement beside a failed reference case still authorizes no force claim.

6. Freeze the case, then run

The case file holds the bounds, the end time, the reference area, and the pass rule. Write it before the output exists. A later run uses the same case hash. Refinement partners share the physical end time.

The mutant is part of the freeze. A control that cannot fail is not a control. The wind tunnel's opposite force sign, WaterLily's viscosity mutant, and the vortex lattice's moved collocation point are the pattern.

CPU controls come before a GPU run. One GPU at a time. The receipt carries the job id and the image digest.

7. Geometry is a door, not a solver

A SketchUp file is opened in its own image and leaves as closed solids in metres, with the unit conversion on the receipt. A physics solver never opens a .skp. An open surface comes back as a refusal that names the component. Mass and displaced volume come from the solid plus a declared density.

8. Adding a capability

A new regime is a new case and, when the program differs, a new solver row. A low-Reynolds pass does not extend an envelope to flight Reynolds number. A fixed-body force does not become a trajectory by adding a flag.

When a law is formalised, add its id to the body it shares a premise with and cut a lawset. Then point the solver at it with checked only after a receipt names it. Until that receipt exists, the relation is assumed or outside, and the body stays untested.

9. Publish the receipt as a nanopub, and cite the subset

python -m engineering.solvers.build writes one unsigned TriG draft for every solver that has a receipt, and one draft for each mathematical subset:

engineering/solvers/nanopubs/unsigned/

The receipt draft's solv:mathematicalSubset is the subset that solver implements. Aerodynamics is the flight subset: steady glide, altitude, and induced drag. Fluid dynamics is the continuum-flow subset. A fluid solver's receipt cites fluid dynamics. Every law in the cited subset has one relation on that draft. A solver with no receipt writes no receipt draft.

The drafts are the record you read. They are unsigned, they have no trusty URI, and the build does not send them to a registry. Signing for the test registry, and any later production signature, waits for the ORCID key owner. Hand-editing a draft is overwritten on the next build. Change the catalog, the subset, or the receipt, and rebuild.

10. Keep one deliberately bad solver

red-team-bad is a fixture in redteam/bad-receipt.json. Its label says PASS, it carries a confidence number, and it says it checked the glide law. The registry reads the checks. A PASS label with a false check is a fail. A checked relation counts only when the receipt contains the law id or the Lean theorem. One passing dimension leaves the others where they are. The fixture supplies no force. Quote a coefficient from a receipt whose red-team flag is false.

This page is studio/engineering/solvers/BEST_PRACTICES.md. Open roles that use it: Applied Category Theorist, Bioelectric Robotics Engineer, Lab Lead.