Cards & schema
A card is the unit of meaning in Lemma: a typed, schema-validated
specification of one scientific principle. Cards live in cards/<domain>/<id>.json
and every card validates against schema/card.v0.1.json.
A real card
This is a shipping principle card from the corpus, verbatim:
{ "kind": "principle", "id": "density-of-states", "version": "1.3.0", "name": "Electronic density of states", "domain": "physics-condensed-matter", "principles": [ "Bloch theorem", "k-point Brillouin-zone sampling", "spectral function" ], "formulaTeX": "g(\\varepsilon) = \\sum_{n,\\mathbf{k}} w_{\\mathbf{k}} \\, \\delta(\\varepsilon - \\varepsilon_{n\\mathbf{k}})", "conventions": [ "g(epsilon) >= 0", "spin factor 2 absorbed (non-magnetic)" ], "expectedLimits": [ "metallic systems: g(epsilon_F) > 0", "smooth under k-mesh refinement (Methfessel-Paxton or Gaussian smearing)" ], "references": [ "Ashcroft & Mermin, Solid State Physics, ch.8", "Methfessel & Paxton 1989" ]}The fields
A principle card requires kind, id, version, name, principles,
formulaTeX, conventions, expectedLimits, and references. domain and
validationEnvelopes are optional.
| Field | Meaning |
|---|---|
kind | The structural discriminator: principle, ops, hypothesis, or unidentified. The kind is structural, not subject-area. |
id | Stable, lowercase, hyphen-separated (^[a-z][a-z0-9-]*$). Part of the URL once published; never reused. |
version | Semver. MAJOR for a breaking convention change, MINOR for added limits, PATCH for refs/typos. |
name | Human-readable name. |
domain | Subject area, hyphenated — e.g. physics-condensed-matter, chemistry-thermodynamics, numerical-methods. Must match the folder path. |
principles | The named principles the card rests on. |
formulaTeX | The canonical equation in LaTeX (KaTeX-renderable). |
conventions | Sign / normalisation / unit conventions the output must follow. |
expectedLimits | Asymptotic and boundary cases the output must respect. |
references | Primary-source citations (not blog posts). |
validationEnvelopes (optional) | Numerical bounds the engine asserts at runtime — an object of { key: [min, max] } tuples in conventional units (e.g. { "gEarth_m_per_s2": [9.79, 9.83] }). |
Licensing
The schema is MIT; the cards corpus is CC-BY 4.0. Anyone can read, fork the schema, and contribute a card — attribution is the only requirement.
One schema, many domains
kind is the structural discriminator — PrincipleCard covers physics,
chemistry, biology, climate, mathematics, and engineering because the
verification operations are universal. The subject area lives in domain. A
card in optics, fluid dynamics, climate, or pure mathematics has the same shape.