# lawref.population_distribution

*module*

Децили `population-impact/0.2` (DECISION-0265, уточнения 16.09.2026):
распределение статического эффекта по группам эквивалентного дохода.

Статистика над готовыми документами, без семантики (инвариант CLAUDE.md №5):
ранжирующая величина `rank`, число взрослых и детей — отдельные `ask`
закреплённых запросов на стороне `basis` (`before`), каждый со своим
документом в хранилище; шкала эквивалентности — закреплённый параметр банка,
который инструмент применяет как арифметику. Ни класс строки, ни вердикт
от распределения не зависят.

Ранг строки ([§2](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/01-part-i-audit.ru.md#2-что-необходимо-исправить) решения): `R / S`, где `S = firstAdult + otherAdult·(A − 1) +
child·C`; сравнение — точное рациональное (в эталоне `Fraction`, в порте —
перекрёстные произведения). Группы ([§3](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/02-part-ii-goals-and-scope.ru.md#3-цели-law-dsl-core-01)): связки равного ранга не режутся,
`g = 1 + ⌊groups · (2·W₍<₎ + w) / (2·W)⌋`, не больше `groups`. Строка без
ранга — корзина `unranked` с причиной: `RANK_FAILED` (сбой любой стороны
или вспомогательного запроса), `RANK_NO_VALUE` (ранг не `VALUE`), `RANK_SIZE`
(размер не `VALUE`, взрослых меньше одного).

## lawref.population_distribution.BANK_SCHEMA_VERSION_02

*attribute* · *module attribute*

```python
BANK_SCHEMA_VERSION_02 = 'law.population.bank/0.2'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L27-L27)

## lawref.population_distribution.INTEGER_TYPE

*attribute* · *module attribute*

```python
INTEGER_TYPE = 'urn:law:std#Integer'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L35-L35)

## lawref.population_distribution.RANK_FAILED

*attribute* · *module attribute*

```python
RANK_FAILED = 'RANK_FAILED'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L32-L32)

## lawref.population_distribution.RANK_NO_VALUE

*attribute* · *module attribute*

```python
RANK_NO_VALUE = 'RANK_NO_VALUE'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L30-L30)

## lawref.population_distribution.RANK_SIZE

*attribute* · *module attribute*

```python
RANK_SIZE = 'RANK_SIZE'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L31-L31)

## lawref.population_distribution.REASONS

*attribute* · *module attribute*

```python
REASONS = (RANK_NO_VALUE, RANK_SIZE, RANK_FAILED)
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L33-L33)

## lawref.population_distribution.REPORT_SCHEMA_VERSION_02

*attribute* · *module attribute*

```python
REPORT_SCHEMA_VERSION_02 = 'law.population.impact-report/0.2'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L28-L28)

## lawref.population_distribution.SIZE_KIND

*attribute* · *module attribute*

```python
SIZE_KIND = 'SIZE_KIND'
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L36-L36)

## lawref.population_distribution.RowInput

*class* · *dataclass*

```python
class RowInput
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L119-L129)

### lawref.population_distribution.RowInput.adults

*attribute* · *instance attribute*

```python
adults: int | None
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L128-L128)

### lawref.population_distribution.RowInput.children

*attribute* · *instance attribute*

```python
children: int | None
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L129-L129)

### lawref.population_distribution.RowInput.delta

*attribute* · *instance attribute*

```python
delta: Fraction | None
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L124-L124)

### lawref.population_distribution.RowInput.failed

*attribute* · *instance attribute*

```python
failed: bool
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L125-L125)

### lawref.population_distribution.RowInput.klass

*attribute* · *instance attribute*

```python
klass: str
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L123-L123)

### lawref.population_distribution.RowInput.rank_amount

*attribute* · *instance attribute*

```python
rank_amount: Fraction | None
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L127-L127)

### lawref.population_distribution.RowInput.rank_state

*attribute* · *instance attribute*

```python
rank_state: str
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L126-L126)

### lawref.population_distribution.RowInput.row_id

*attribute* · *instance attribute*

```python
row_id: str
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L121-L121)

### lawref.population_distribution.RowInput.weight

*attribute* · *instance attribute*

```python
weight: Fraction
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L122-L122)

## lawref.population_distribution.build

*function*

```python
def build(items: list[RowInput], distribution: dict, complete: bool) -> tuple[dict, dict[str, int], dict[str, str]]
```

Раздел `distribution` отчёта, группа каждой ранжированной строки и
причина каждой неранжированной.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L157-L240)

## lawref.population_distribution.check_distribution

*function*

```python
def check_distribution(distribution: dict, side, first_case: str) -> None
```

Форма 0.2 сверх схемы: самопин шкалы, запрос ранга как мера ([§3](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/02-part-ii-goals-and-scope.ru.md#3-цели-law-dsl-core-01) 0255),
запросы размера — `term` без `options.empty`, разрешимые на стороне basis.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L53-L65)

## lawref.population_distribution.check_scale

*function*

```python
def check_scale(scale: dict) -> None
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L44-L50)

## lawref.population_distribution.equivalised

*function*

```python
def equivalised(item: RowInput, weights: dict) -> Fraction
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L150-L154)

## lawref.population_distribution.rational

*function*

```python
def rational(value: Fraction | None) -> dict | None
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L132-L135)

## lawref.population_distribution.reason_of

*function*

```python
def reason_of(item: RowInput) -> str | None
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L138-L147)

## lawref.population_distribution.render_lines

*function*

```python
def render_lines(section: dict) -> list[str]
```

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L243-L260)

## lawref.population_distribution.scale_content_hash

*function*

```python
def scale_content_hash(scale: dict) -> str
```

Самопин шкалы: канон [§208](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/28-part-xxvii-canonical-legal-ir.ru.md#208-canonical-serialization) без поля `contentHash`.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L39-L41)

## lawref.population_distribution.size_state

*function*

```python
def size_state(outcome, store: Path | None, record_proof: bool = True) -> tuple[dict, int | None, dict | None]
```

Состояние запроса размера семьи: та же проекция [§5](https://github.com/arxohq/law/blob/master/spec/SPEC.ru/02-part-ii-goals-and-scope.ru.md#5-главные-инварианты-дизайна), что у стороны,
но значение — целое ≥ 0.

[View source](https://github.com-arxohq/arxo-io/law/blob/2edc2b92ce22b52e03f4081d2769a58229684379/engines/lawref/lawref/population_distribution.py#L68-L116)
