# Arxo population impact bank 0.1 / 0.2 A pinned population for the population-impact comparison: two sides — case packages with their own pins — rows mapping a row id to a case and a weight, and a single measure. It carries no legal meaning: weights and sums only orchestrate the comparison and are not a legal answer. The runner checks row id uniqueness, non-negative weights, the content hash self-pin, and equal case sets on both sides (rejection POPULATION_BANK_INVALID); the schema only holds the shape. Form 0.2 adds a distribution section — auxiliary rank and size queries, a pinned equivalence scale, and a group count — and provenance, an optional link to the materialization manifest. Auxiliary queries run as separate asks on the basis side. ## Versions Accepted `schemaVersion`: `law.population.bank/0.1`, `law.population.bank/0.2`. ## Top-level fields | name | type-or-$ref | required | description | |---|---|---|---| | `schemaVersion` | enum (2) | yes | — | | `bankId` | [`#/$defs/Name`](#name) | yes | — | | `worlds` | `object` | yes | — | | `rows` | `array` | yes | — | | `measure` | [`#/$defs/Measure`](#measure) | yes | — | | `contentHash` | [`#/$defs/Digest`](#digest) | yes | Self-pin: sha256 of the bank's canonical bytes without the contentHash field, with rows ordered by the bytes of rowId: permuting the rows in the input does not change the hash. | | `distribution` | [`#/$defs/Distribution`](#distribution) | no | — | | `provenance` | [`#/$defs/Provenance`](#provenance) | no | — | ## Enumerations | location | values | |---|---| | `properties/schemaVersion` | `"law.population.bank/0.1"`, `"law.population.bank/0.2"` | | `$defs/Distribution/properties/basis` | `"before"` | | `$defs/Provenance/properties/dataClass` | `"synthetic"`, `"real"` | | `allOf/0/if/properties/schemaVersion` | `"law.population.bank/0.2"` | ## Raw schema [`https://law.arxo.io/schema/population-bank.schema.json`](https://law.arxo.io/schema/population-bank.schema.json) ## `Digest` Type: `string`. ## `Name` Type: `string`. ## `CaseName` Name of the case declaration, as recorded in the [[cases]] list of the case package. Type: `string`. ## `Weight` Decimal string not less than zero. Type: `string`. ## `WorldPin` A side of the bank: a case package and its pins. theoryHash and artifactHash are the hashes of the bound world W = root + closure C, the same hashes each row's evaluation manifest records. Type: `object`. Required: `package`, `manifestHash`, `lockHash`, `theoryHash`, `artifactHash`, `resources`. | name | type-or-$ref | description | |---|---|---| | `package` | `string` | Path to the case package's law.toml relative to the bank file's directory. | | `manifestHash` | [`#/$defs/Digest`](#digest) | sha256 of the exact bytes of law.toml. | | `lockHash` | [`#/$defs/Digest`](#digest) | sha256 of the exact bytes of law.lock. | | `theoryHash` | [`#/$defs/Digest`](#digest) | — | | `artifactHash` | [`#/$defs/Digest`](#digest) | — | | `resources` | `array` | Explicit resources of the side (calendars, documents, snapshots) — exactly the resources entries of the pinned law.lock, ordered by id and path. | ## `Row` Type: `object`. Required: `rowId`, `case`, `weight`. | name | type-or-$ref | description | |---|---|---| | `rowId` | [`#/$defs/Name`](#name) | — | | `case` | [`#/$defs/CaseName`](#casename) | — | | `weight` | [`#/$defs/Weight`](#weight) | — | ## `ShortQueryId` Short query name: the ask operation completes the full URN in the namespace of the case package and the row's case. Type: `object`. | name | type-or-$ref | description | |---|---|---| | `queryId` | `string` | — | ## `Measure` A single measure per bank: a collect-all query (distinct: false) over Money literals, or a term query without an aggregate and with the empty-options flag; the stage is printed into the report verbatim. The schema deliberately does not constrain the distinct flag, the empty-options flag in a term query, side resolution, or an explicit non-Money variable type: those are the runner's POPULATION_MEASURE_INVALID rejection, and the bank's shape must not intercept them with a POPULATION_BANK_INVALID rejection. Type: `object`. Required: `name`, `stage`, `currency`, `query`. | name | type-or-$ref | description | |---|---|---| | `name` | `string` | — | | `stage` | `string` | — | | `currency` | `string` | — | | `query` | oneOf (2) | — | ## `PositiveDecimal` Decimal string greater than zero (equivalence-scale weight). Type: `string`. ## `ScalePin` Equivalence scale, pinned as name + version + source + contentHash; weights — first adult, each subsequent adult, child. contentHash is a self-pin: sha256 of the object's canonical bytes without the contentHash field (checked by the runner, POPULATION_BANK_INVALID). The runner applies it as a statistical operation. Type: `object`. Required: `name`, `version`, `source`, `contentHash`, `weights`. | name | type-or-$ref | description | |---|---|---| | `name` | `string` | — | | `version` | `string` | — | | `source` | `string` | — | | `contentHash` | [`#/$defs/Digest`](#digest) | — | | `weights` | `object` | — | ## `SizeQuery` A term query with an Integer result of zero or more (number of adults or children); the empty-options flag in the term is a POPULATION_MEASURE_INVALID rejection. ## `Distribution` Deciles for form 0.2 of the impact comparison: groups — number of groups; basis — the ranking side; scale — the pinned scale; rank — the ranking measure (Measure shape, executed as a separate ask on the basis side); size — queries for the number of adults (at least one) and children. Type: `object`. Required: `groups`, `basis`, `scale`, `rank`, `size`. | name | type-or-$ref | description | |---|---|---| | `groups` | `integer` | — | | `basis` | `"before"` | — | | `scale` | [`#/$defs/ScalePin`](#scalepin) | — | | `rank` | [`#/$defs/Measure`](#measure) | — | | `size` | `object` | — | ## `Provenance` Link to the materialization manifest: the manifest's contentHash and the data class; real data triggers the runner's rejection. Type: `object`. Required: `materializationHash`, `dataClass`. | name | type-or-$ref | description | |---|---|---| | `materializationHash` | [`#/$defs/Digest`](#digest) | — | | `dataClass` | enum (2) | — |