@lapxo/obligations 0.3.5 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -126
- package/TARGET.bound +622 -507
- package/dist/measures/capacity.d.ts +302 -0
- package/dist/measures/capacity.js +168 -0
- package/dist/measures/coincidence.d.ts +111 -0
- package/dist/measures/coincidence.js +81 -0
- package/dist/measures/error-events.d.ts +27 -0
- package/dist/measures/error-events.js +62 -0
- package/dist/measures/experiments.d.ts +15 -0
- package/dist/measures/experiments.js +53 -0
- package/dist/measures/fitting.d.ts +243 -0
- package/dist/measures/fitting.js +115 -0
- package/dist/measures/identification.d.ts +156 -0
- package/dist/measures/identification.js +107 -0
- package/dist/measures/index.d.ts +24 -0
- package/dist/measures/index.js +12 -0
- package/dist/measures/m3-experiment.d.ts +69 -0
- package/dist/measures/m3-experiment.js +70 -0
- package/dist/measures/m3.d.ts +139 -0
- package/dist/measures/m3.js +181 -0
- package/dist/measures/model.d.ts +14 -0
- package/dist/measures/model.js +67 -0
- package/dist/measures/rational.d.ts +19 -0
- package/dist/measures/rational.js +53 -0
- package/dist/measures/spectrum.d.ts +22 -0
- package/dist/measures/spectrum.js +84 -0
- package/dist/measures/unanimity-fit.d.ts +156 -0
- package/dist/measures/unanimity-fit.js +133 -0
- package/docs/img/cell.svg +28 -0
- package/docs/img/logo-fork.svg +6 -0
- package/docs/img/logo.svg +6 -0
- package/docs/img/price.svg +28 -0
- package/docs/img/thermometer.svg +28 -0
- package/docs/img/withdrawal.svg +28 -0
- package/docs/learn/in-phase.md +46 -0
- package/docs/learn/price.md +52 -0
- package/docs/learn/signature.md +50 -0
- package/docs/learn/thermometer.md +58 -0
- package/docs/learn/withdrawal.md +51 -0
- package/docs/measures.md +197 -0
- package/docs/paper.md +233 -0
- package/docs/reference.md +495 -0
- package/package.json +1 -93
- package/receipts.bound +118 -0
- package/samples/measures/capacity.json +71 -0
- package/samples/measures/coincidence.json +624 -0
- package/samples/measures/decisions.json +66 -0
- package/samples/measures/descent.json +92 -0
- package/samples/measures/m3.json +3126 -0
- package/samples/measures/observations.json +212 -0
- package/samples/measures/spectrum.json +6530 -0
- package/samples/measures/unanimity-fit.json +166 -0
- package/samples/measures/unanimity.json +76 -0
- package/samples/no/installed-artifact.json +314 -0
- package/samples/yes/algebra-is-closed.json +17 -0
- package/samples/yes/field-uses-price-and-debit.json +9 -0
- package/samples/yes/installed-artifact.json +424 -0
- package/samples/yes/three-theories-one-algebra.json +5 -0
- package/src/field/motion.ts +59 -0
- package/src/lattice/index.ts +79 -0
- package/vectors/measures/capacity.cli.json +97 -0
- package/vectors/measures/coincidence.cli.json +97 -0
- package/vectors/measures/decisions.cli.json +97 -0
- package/vectors/measures/descent.cli.json +97 -0
- package/vectors/measures/implementation.json +82 -0
- package/vectors/measures/installed-artifact.cli.json +63 -0
- package/vectors/measures/m3.cli.json +97 -0
- package/vectors/measures/observations.cli.json +97 -0
- package/vectors/measures/spectrum.cli.json +97 -0
- package/vectors/measures/unanimity-fit.cli.json +97 -0
- package/vectors/measures/unanimity.cli.json +97 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 178" width="640" height="178" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">A cell</title>
|
|
3
|
+
<desc id="desc">Two origins on one scale: a claims 2 to 9 and b claims 5 to 12; what they hold together runs from a floor of 5 to a ceiling of 9.</desc>
|
|
4
|
+
<style>
|
|
5
|
+
text{font:14px ui-sans-serif,-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;fill:#59636e}
|
|
6
|
+
.claim{fill:#8c959f}.held{fill:#2da44e}.pole{fill:#2da44e;font-weight:600}.axis,.tick{stroke:#8c959f;stroke-width:1}.touch{stroke:#2da44e;stroke-width:1;stroke-dasharray:3 3}
|
|
7
|
+
@media (prefers-color-scheme:dark){text{fill:#9198a1}}
|
|
8
|
+
</style>
|
|
9
|
+
<line class="touch" x1="269.3" y1="12" x2="269.3" y2="126"/>
|
|
10
|
+
<line class="touch" x1="442.7" y1="12" x2="442.7" y2="126"/>
|
|
11
|
+
<text x="82" y="32" text-anchor="end">a</text>
|
|
12
|
+
<rect class="claim" x="139.3" y="18" width="303.4" height="18" rx="4"/>
|
|
13
|
+
<text x="82" y="66" text-anchor="end">b</text>
|
|
14
|
+
<rect class="claim" x="269.3" y="52" width="303.4" height="18" rx="4"/>
|
|
15
|
+
<text x="82" y="100" text-anchor="end">held</text>
|
|
16
|
+
<rect class="held" x="269.3" y="86" width="173.4" height="18" rx="4"/>
|
|
17
|
+
<line class="axis" x1="96" y1="126" x2="616" y2="126"/>
|
|
18
|
+
<line class="tick" x1="139.3" y1="126" x2="139.3" y2="131"/>
|
|
19
|
+
<text x="139.3" y="148" text-anchor="middle">2</text>
|
|
20
|
+
<line class="tick" x1="269.3" y1="126" x2="269.3" y2="131"/>
|
|
21
|
+
<text x="269.3" y="148" text-anchor="middle">5</text>
|
|
22
|
+
<line class="tick" x1="442.7" y1="126" x2="442.7" y2="131"/>
|
|
23
|
+
<text x="442.7" y="148" text-anchor="middle">9</text>
|
|
24
|
+
<line class="tick" x1="572.7" y1="126" x2="572.7" y2="131"/>
|
|
25
|
+
<text x="572.7" y="148" text-anchor="middle">12</text>
|
|
26
|
+
<text class="pole" x="269.3" y="168" text-anchor="middle">floor</text>
|
|
27
|
+
<text class="pole" x="442.7" y="168" text-anchor="middle">ceiling</text>
|
|
28
|
+
</svg>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# In phase
|
|
2
|
+
|
|
3
|
+
A claim carries a size and a direction, how much it narrows and the turn it landed on, and a withdrawal is the same size the other way: two hundred claims in phase make the square of their number and the same two hundred strewn make its order, while a write and its withdrawal at one epoch leave nothing and at different epochs do not cancel.
|
|
4
|
+
|
|
5
|
+
## Run it
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { coherence, interfere } from '@lapxo/obligations/views/field';
|
|
9
|
+
|
|
10
|
+
const span = { lo: 0, hi: 0 };
|
|
11
|
+
let held = 11;
|
|
12
|
+
const next = (): number => { held = (held * 1103515245 + 12345) % 2147483648; return held / 2147483648; };
|
|
13
|
+
const together = Array.from({ length: 32 }, (_, i) => ({ origin: `o${i}`, epoch: 8, span }));
|
|
14
|
+
const strewn = Array.from({ length: 32 }, (_, i) => ({ origin: `o${i}`, epoch: Math.floor(next() * 8), span }));
|
|
15
|
+
|
|
16
|
+
console.log('in phase ', interfere(together, 8), 'coherence', coherence(together, 8).toFixed(2));
|
|
17
|
+
console.log('strewn ', interfere(strewn, 8).toFixed(0), 'coherence', coherence(strewn, 8).toFixed(2));
|
|
18
|
+
console.log('their number is 32, and its square is', 32 ** 2);
|
|
19
|
+
console.log('why claims that land at one turn of the period add as the square of their number, and the same claims strewn across it add as its order');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
in phase 1024 coherence 1.00
|
|
24
|
+
strewn 50 coherence 0.22
|
|
25
|
+
their number is 32, and its square is 1024
|
|
26
|
+
why claims that land at one turn of the period add as the square of their number, and the same claims strewn across it add as its order
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Its origins meet.
|
|
30
|
+
|
|
31
|
+
## What it rests on
|
|
32
|
+
|
|
33
|
+
```mermaid
|
|
34
|
+
flowchart LR
|
|
35
|
+
c0["coherence"]
|
|
36
|
+
c1["interfere"]
|
|
37
|
+
l0(["amplitude has sign and phase"])
|
|
38
|
+
c0 --> l0
|
|
39
|
+
c1 --> l0
|
|
40
|
+
classDef shown fill:#2da44e,color:#ffffff,stroke:#2da44e
|
|
41
|
+
class l0 shown
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Source
|
|
45
|
+
|
|
46
|
+
[Its source](../../examples/release/in-phase.ts) is one of the examples of obligations, and it runs as it is written, against the built package, with nothing compiled for it.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Price
|
|
2
|
+
|
|
3
|
+
<p align="center"><img src="../img/price.svg" alt="Two origins on one scale: seller claims 2 to 9 and buyer claims 5 to 12; what they hold together runs from a floor of 5 to a ceiling of 9." width="640"></p>
|
|
4
|
+
|
|
5
|
+
A claim from one origin is potential; a cell is information only where two independent origins touch it and their intervals meet.
|
|
6
|
+
|
|
7
|
+
## Run it
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { chain, disagree, freedom, meetAt, origins, point, unit } from '@lapxo/obligations';
|
|
11
|
+
|
|
12
|
+
const said = (cell: Parameters<typeof meetAt>[0]): string =>
|
|
13
|
+
(origins(cell) < 2 ? 'grey' : disagree(cell) ? 'split' : 'agreed');
|
|
14
|
+
|
|
15
|
+
const price = point('price', 0, [
|
|
16
|
+
{ origin: 'seller', span: { lo: 2, hi: 9 } },
|
|
17
|
+
{ origin: 'buyer', span: { lo: 5, hi: 12 } },
|
|
18
|
+
]);
|
|
19
|
+
const scale = chain(Array.from({ length: 16 }, (_, i) => `l${i}`));
|
|
20
|
+
|
|
21
|
+
console.log('verdict ', said(price));
|
|
22
|
+
console.log('they hold ', JSON.stringify(meetAt(price)));
|
|
23
|
+
console.log('still free', freedom(scale, unit('price', { floor: 'l5', ceiling: 'l9' })).toFixed(2), 'bits');
|
|
24
|
+
console.log('why a seller and a buyer are two origins; where their marks meet is a price, and what is left between the marks is what nobody has decided yet');
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
verdict agreed
|
|
29
|
+
they hold {"lo":5,"hi":9}
|
|
30
|
+
still free 2.32 bits
|
|
31
|
+
why a seller and a buyer are two origins; where their marks meet is a price, and what is left between the marks is what nobody has decided yet
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Its origins meet.
|
|
35
|
+
|
|
36
|
+
## What it rests on
|
|
37
|
+
|
|
38
|
+
```mermaid
|
|
39
|
+
flowchart LR
|
|
40
|
+
c0["point"]
|
|
41
|
+
c1["unit"]
|
|
42
|
+
l0(["encounter"])
|
|
43
|
+
l1(["debit in bits"])
|
|
44
|
+
c0 --> l0
|
|
45
|
+
c1 --> l1
|
|
46
|
+
classDef shown fill:#2da44e,color:#ffffff,stroke:#2da44e
|
|
47
|
+
class l0 shown
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Source
|
|
51
|
+
|
|
52
|
+
[Its source](../../examples/release/price.ts) is one of the examples of obligations, and it runs as it is written, against the built package, with nothing compiled for it.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Signature
|
|
2
|
+
|
|
3
|
+
```mermaid
|
|
4
|
+
flowchart LR
|
|
5
|
+
c0["cell"]
|
|
6
|
+
c1["meet"]
|
|
7
|
+
c2["sign"]
|
|
8
|
+
l0(["the obligatory"])
|
|
9
|
+
c0 --> l0
|
|
10
|
+
c1 --> l0
|
|
11
|
+
classDef shown fill:#2da44e,color:#ffffff,stroke:#2da44e
|
|
12
|
+
class l0 shown
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The object is c = ⟨⊥, ⊤, O, ⊑⟩ over L at r: four parts in two pairs, the value (⊥, ⊤) and the relations (O, ⊑), with the lattice L it is given and the resolution r it is read at belonging to the reading and the sign to the act; an origin is (o, φ), and the poles are read, never stored: ⊥ is what is required joined with what its live claims hold, ⊤ what is signed met with what they allow; eight acts in four pairs and seven names answer for it: meet and join on the ceiling, local, a join only with a witness; observe and withdraw on the floor, local, a withdrawal being an observation at −1 that restores exactly; sign and require on both poles, travelling by rest, commuting and both closing freedom; encounter and refine with no pole; and no widening travels.
|
|
16
|
+
|
|
17
|
+
## Run it
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { intervals } from '@lapxo/obligations/forms';
|
|
21
|
+
import { cell, meet, sign } from '@lapxo/obligations/views/field';
|
|
22
|
+
|
|
23
|
+
const scale = intervals(0, 100);
|
|
24
|
+
const world = [0, 1, 2, 3].map((i) => cell(`c${i}`, 0, [{ origin: `own${i}`, span: { lo: 20 * i, hi: 100 } }], ['ceiling']));
|
|
25
|
+
const before = new Map([['ceiling', cell<{ lo: number; hi: number }>('ceiling')]]);
|
|
26
|
+
const after = sign(scale, before, 'ceiling', { lo: 0, hi: 45 });
|
|
27
|
+
|
|
28
|
+
console.log('cells resting on the ceiling', world.filter((one) => one.restsOn.includes('ceiling')).length);
|
|
29
|
+
for (const [i, one] of world.entries()) {
|
|
30
|
+
console.log(`c${i} before`, JSON.stringify(meet(scale, one, before)), '· after', JSON.stringify(meet(scale, one, after)));
|
|
31
|
+
}
|
|
32
|
+
console.log('claims edited by the signature', world.flatMap((one) => one.seen).filter((claim) => claim.span.hi !== 100).length);
|
|
33
|
+
console.log('why one signature narrows a bound and every cell resting on it reads the narrower one, without touching a single claim any origin made');
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
cells resting on the ceiling 4
|
|
38
|
+
c0 before {"lo":0,"hi":100} · after {"lo":0,"hi":45}
|
|
39
|
+
c1 before {"lo":20,"hi":100} · after {"lo":20,"hi":45}
|
|
40
|
+
c2 before {"lo":40,"hi":100} · after {"lo":40,"hi":45}
|
|
41
|
+
c3 before {"lo":60,"hi":100} · after {"lo":60,"hi":45}
|
|
42
|
+
claims edited by the signature 0
|
|
43
|
+
why one signature narrows a bound and every cell resting on it reads the narrower one, without touching a single claim any origin made
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Its origins meet.
|
|
47
|
+
|
|
48
|
+
## Source
|
|
49
|
+
|
|
50
|
+
[Its source](../../examples/release/signature.ts) is one of the examples of obligations, and it runs as it is written, against the built package, with nothing compiled for it.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Thermometer
|
|
2
|
+
|
|
3
|
+
<p align="center"><img src="../img/thermometer.svg" alt="Four origins on one scale: a claims 19.8 to 20.2, b claims 19.9 to 20.3, c claims 19.7 to 20.1 and d claims 24 to 24.4; their claims do not meet." width="640"></p>
|
|
4
|
+
|
|
5
|
+
A claim from one origin is potential; a cell is information only where two independent origins touch it and their intervals meet.
|
|
6
|
+
|
|
7
|
+
## Run it
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { disagree, origins, point } from '@lapxo/obligations';
|
|
11
|
+
import { steady } from '@lapxo/obligations/views/product';
|
|
12
|
+
|
|
13
|
+
const said = (cell: ReturnType<typeof point>): string =>
|
|
14
|
+
(origins(cell) < 2 ? 'grey' : disagree(cell) ? 'split' : 'agreed');
|
|
15
|
+
|
|
16
|
+
const bath = point('bath', 0, [
|
|
17
|
+
{ origin: 'a', span: { lo: 19.8, hi: 20.2 } },
|
|
18
|
+
{ origin: 'b', span: { lo: 19.9, hi: 20.3 } },
|
|
19
|
+
{ origin: 'c', span: { lo: 19.7, hi: 20.1 } },
|
|
20
|
+
{ origin: 'd', span: { lo: 24.0, hi: 24.4 } },
|
|
21
|
+
]);
|
|
22
|
+
const without = (name: string) => point('bath', 0, bath.seen.filter((one) => one.origin !== name));
|
|
23
|
+
|
|
24
|
+
console.log('four thermometers', said(bath));
|
|
25
|
+
for (const one of ['a', 'b', 'c', 'd']) console.log(`without ${one} `, said(without(one)));
|
|
26
|
+
console.log('holds without any one of them:', steady(bath));
|
|
27
|
+
console.log('why leaving one out names the instrument that disagrees, and a verdict that needs every origin is not a verdict');
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
four thermometers split
|
|
32
|
+
without a split
|
|
33
|
+
without b split
|
|
34
|
+
without c split
|
|
35
|
+
without d agreed
|
|
36
|
+
holds without any one of them: false
|
|
37
|
+
why leaving one out names the instrument that disagrees, and a verdict that needs every origin is not a verdict
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Its origins meet.
|
|
41
|
+
|
|
42
|
+
## What it rests on
|
|
43
|
+
|
|
44
|
+
```mermaid
|
|
45
|
+
flowchart LR
|
|
46
|
+
c0["point"]
|
|
47
|
+
c1["steady"]
|
|
48
|
+
l0(["encounter"])
|
|
49
|
+
l1(["origins are a polygon"])
|
|
50
|
+
c0 --> l0
|
|
51
|
+
c1 --> l1
|
|
52
|
+
classDef shown fill:#2da44e,color:#ffffff,stroke:#2da44e
|
|
53
|
+
class l0 shown
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Source
|
|
57
|
+
|
|
58
|
+
[Its source](../../examples/release/thermometer.ts) is one of the examples of obligations, and it runs as it is written, against the built package, with nothing compiled for it.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Withdrawal
|
|
2
|
+
|
|
3
|
+
<p align="center"><img src="../img/withdrawal.svg" alt="Two origins on one scale: a claims 2 to 9 and b claims 5 to 12; what they hold together runs from a floor of 5 to a ceiling of 9." width="640"></p>
|
|
4
|
+
|
|
5
|
+
The object is c = ⟨⊥, ⊤, O, ⊑⟩ over L at r: four parts in two pairs, the value (⊥, ⊤) and the relations (O, ⊑), with the lattice L it is given and the resolution r it is read at belonging to the reading and the sign to the act; an origin is (o, φ), and the poles are read, never stored: ⊥ is what is required joined with what its live claims hold, ⊤ what is signed met with what they allow; eight acts in four pairs and seven names answer for it: meet and join on the ceiling, local, a join only with a witness; observe and withdraw on the floor, local, a withdrawal being an observation at −1 that restores exactly; sign and require on both poles, travelling by rest, commuting and both closing freedom; encounter and refine with no pole; and no widening travels.
|
|
6
|
+
|
|
7
|
+
## Run it
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { intervals } from '@lapxo/obligations/forms';
|
|
11
|
+
import { cell, encounter, meet, observe } from '@lapxo/obligations/views/field';
|
|
12
|
+
|
|
13
|
+
const scale = intervals(0, 20);
|
|
14
|
+
const held = cell('x', 0, [{ id: 'k1', origin: 'a', span: { lo: 2, hi: 9 } }, { id: 'k2', origin: 'b', span: { lo: 5, hi: 12 } }]);
|
|
15
|
+
const back = observe(held, { origin: 'b', span: { lo: 5, hi: 12 }, takes: 'k2' });
|
|
16
|
+
|
|
17
|
+
console.log('two origins ', encounter(scale, held).origins, JSON.stringify(meet(scale, held)));
|
|
18
|
+
console.log('b takes k2 ', encounter(scale, back).origins, JSON.stringify(meet(scale, back)));
|
|
19
|
+
console.log('claims kept ', back.seen.length);
|
|
20
|
+
console.log('why a withdrawal names the claim it takes back, so the cell returns to one origin while all three claims stay on it and nothing is matched by looking like something');
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
two origins 2 {"lo":5,"hi":9}
|
|
25
|
+
b takes k2 1 {"lo":2,"hi":9}
|
|
26
|
+
claims kept 3
|
|
27
|
+
why a withdrawal names the claim it takes back, so the cell returns to one origin while all three claims stay on it and nothing is matched by looking like something
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Its origins meet.
|
|
31
|
+
|
|
32
|
+
## What it rests on
|
|
33
|
+
|
|
34
|
+
```mermaid
|
|
35
|
+
flowchart LR
|
|
36
|
+
c0["cell"]
|
|
37
|
+
c1["encounter"]
|
|
38
|
+
c2["meet"]
|
|
39
|
+
c3["observe"]
|
|
40
|
+
l0(["the obligatory"])
|
|
41
|
+
c0 --> l0
|
|
42
|
+
c1 --> l0
|
|
43
|
+
c2 --> l0
|
|
44
|
+
c3 --> l0
|
|
45
|
+
classDef shown fill:#2da44e,color:#ffffff,stroke:#2da44e
|
|
46
|
+
class l0 shown
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Source
|
|
50
|
+
|
|
51
|
+
[Its source](../../examples/release/withdrawal.ts) is one of the examples of obligations, and it runs as it is written, against the built package, with nothing compiled for it.
|
package/docs/measures.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Measures beside the states
|
|
2
|
+
|
|
3
|
+
The pure API @lapxo/obligations/measures does not change FREE, REQUIRED, FORBIDDEN or CONFLICT. Observed association never establishes independence.
|
|
4
|
+
|
|
5
|
+
## Descriptive contract
|
|
6
|
+
errorMatrix takes explicit binary event/origin/error rows and minCells >= 2. Identical redelivery is idempotent; conflicting observations refuse; incomplete shared events are unmeasured. covariance is population covariance of the handed rows, divided by their event count. participationRatio describes effective rank; zero variation is unmeasured.
|
|
7
|
+
|
|
8
|
+
spectrum requires absolute, relative and maxRotations. Asymmetric or materially non-PSD matrices refuse. commonMass is the largest observed variance fraction, not a probability of false agreement. loadings require an isolated top eigenvalue; repeated eigenspaces have no unique top loading. commonMassOf requires an explicit cutoff and whole eigenspaces. The unanimity no-sample prints observed commonMass >= 0.5 beside FREE, without claiming strength.
|
|
9
|
+
|
|
10
|
+
descentCount counts distinct proper descendants in a declared restsOn graph. Identical edges add nothing. Missing declarations remain unmeasured; duplicate node declarations and cycles refuse. Declared descent is not observed activity or independence.
|
|
11
|
+
|
|
12
|
+
## Controlled procedures
|
|
13
|
+
unanimityFloor and unanimityThreshold implement the declared T1 special case. With P_k=(1-c)p^k(n-1)^(1-k), F_k=(c+P_k)/(c+P_k+(1-c)(1-p)^k). For nondegenerate parameters, F_(k+1) >= F_k iff p*c >= (1-p-p/(n-1))*P_k. The c=.01,p=.1,n=2 no-sample decreases before k=3; its threshold is 3. dissentExperiment and interestExperiment report conditional counts under explicitly handed generators: xorshift32, nonzero seed and trial count. Their denominators are events and falseEvents, and zero events are unmeasured. Interest is an explicitly handed bias toward one wrong value, not inferred from a missing observation. E3: a school answers truth with probability q, otherwise its own wrong value. These are controlled procedures, never laws or state changes.
|
|
14
|
+
|
|
15
|
+
## Native publication evidence
|
|
16
|
+
observations, spectrum, unanimity and descent each have yes/no cases in samples/measures/<group>.json and installed-instrument captures in vectors/measures/<group>.cli.json. M/3 has samples/measures/m3.json and vectors/measures/m3.cli.json. Each vector ran on two independent places, repeated the positive reading byte-for-byte and refused its negative by name. State-preservation tests compare all four actual algebraic states before and after measurements.
|
|
17
|
+
|
|
18
|
+
## Model boundary
|
|
19
|
+
M/3 below is the only reference model. The older descriptive D/commonMass and independence claims are superseded. modelRequired returns unmeasured for an absent model; no measurement silently supplies a causal model. Factor attribution, dissent and probe results are conditional on M/3's handed parameters, not empirical independence certificates.
|
|
20
|
+
|
|
21
|
+
# obligations 0.4.0 — model M/3 (authoritative contract)
|
|
22
|
+
|
|
23
|
+
M/3 is the reference conditional model shipped beside the descriptive measures. Every M/3
|
|
24
|
+
result carries `model=M/3`, its handed parameters and its conditions. The descriptive
|
|
25
|
+
measures are independent of M/3. Nothing changes a state. This document supersedes all
|
|
26
|
+
earlier M/1, M/2 and amendment texts.
|
|
27
|
+
|
|
28
|
+
## 1. Definition
|
|
29
|
+
Witnesses W (unique identifiers); cells with truth t and integer cardinality n ≥ 2;
|
|
30
|
+
factors F, each with unique identifier, sharing set a_f ⊆ W, firing probability c_f and a
|
|
31
|
+
unique declared index (total order); private error probability p_w for every witness
|
|
32
|
+
involved. Per cell, independently:
|
|
33
|
+
1. each factor fires independently with probability c_f;
|
|
34
|
+
2. a witness is governed by the fired factor containing it with the lowest index, if
|
|
35
|
+
any; otherwise its private error fires with probability p_w;
|
|
36
|
+
3. labels: each fired governing factor is a factor label; each privately erring witness
|
|
37
|
+
is a private label (namespaces are distinct: a factor label and a private label can
|
|
38
|
+
never merge even with identical identifier strings); every label draws one wrong
|
|
39
|
+
value uniformly from the n−1 wrong values; draws of distinct labels are mutually
|
|
40
|
+
independent and independent of all firing and private indicators; everyone else says t.
|
|
41
|
+
Singleton factors (|a_f| = 1) are retained in declared order; the generator is never
|
|
42
|
+
normalized.
|
|
43
|
+
|
|
44
|
+
## 2. Validation (refuse by name)
|
|
45
|
+
S ⊆ W and S nonempty; every a_f ⊆ W; unique witness and factor identifiers; unique factor
|
|
46
|
+
indices; c_f, p_w ∈ [0,1]; n integer ≥ 2; an explicitly handed p_w for every witness in
|
|
47
|
+
S and in every sharing set touching S; a sharing set with duplicate members is refused.
|
|
48
|
+
|
|
49
|
+
## 3. Exact evaluator
|
|
50
|
+
Enumerate fired subsets of the factors touching S (2^|touching|) and private patterns of
|
|
51
|
+
ungoverned members of S (2^|free|). In each configuration, erring witnesses are grouped by
|
|
52
|
+
label; L = number of labels; weights = witnesses per label. Collisions of wrong values
|
|
53
|
+
follow set partitions π of the labels with
|
|
54
|
+
P(π) = (n−1)^{↓|π|} / (n−1)^L (falling factorial), and P(π) = 0 when |π| > n−1.
|
|
55
|
+
Each partition yields block totals; unanimity ⇔ no correct witness and one block;
|
|
56
|
+
majority = strictly more than |S|/2 witnesses on one value; ties and pluralities ≤ half
|
|
57
|
+
are "no majority".
|
|
58
|
+
Exactness: all c_f, p_w are handed as rationals (or decimal strings converted exactly);
|
|
59
|
+
accumulation is in rational arithmetic; displayed decimals are rounded half-even to a
|
|
60
|
+
declared number of digits. Budget: before any work, compute
|
|
61
|
+
work = Σ_configurations Bell(L) ≤ `evaluator/budget` (declared); if exceeded, return
|
|
62
|
+
`unmeasured` with cause `evaluator/budget` and no partial accumulation.
|
|
63
|
+
Outputs per (S, x): P_true, P_false (false unanimity), P_fired (false unanimity with some
|
|
64
|
+
touching factor fired), P_dissent = 1 − P_true − P_false (identity, asserted),
|
|
65
|
+
maj_true∧dissent, maj_false∧dissent, maj_none∧dissent (exclusive, sum = P_dissent).
|
|
66
|
+
Closed form admitted only for P_true = Π_{f touches S}(1−c_f) · Π_{w∈S}(1−p_w).
|
|
67
|
+
|
|
68
|
+
## 4. Quantities and denominators
|
|
69
|
+
```
|
|
70
|
+
Φ = P_false / (P_true + P_false) false-unanimity share
|
|
71
|
+
D = P_fired / (P_true + P_false) factor-attribution share
|
|
72
|
+
reliability = 1 − Φ, labelled "P(correct | unanimous) under M/3 with handed parameters"
|
|
73
|
+
P(false maj | dissent) = maj_false∧dissent / P_dissent
|
|
74
|
+
P(false maj | any maj ∧ dissent) = maj_false∧dissent / (maj_true∧dissent + maj_false∧dissent)
|
|
75
|
+
```
|
|
76
|
+
A ratio with zero denominator is `unmeasured` with cause; a zero numerator over a positive
|
|
77
|
+
denominator is a measured 0. Φ − D is private coincidence; 1 − D is never reliability.
|
|
78
|
+
|
|
79
|
+
## 5. Dissent
|
|
80
|
+
Theorem: if a factor covering S fires and no fired factor of lower index touches S
|
|
81
|
+
partially, S is unanimous; disagreement inside S certifies this configuration did not
|
|
82
|
+
occur — nothing more. False majorities under dissent remain possible through partial
|
|
83
|
+
factors and are reported through the two conditionals above. T1 and T5 stay controlled
|
|
84
|
+
experiments with declared PRNG, seed, trials and denominators (T5 uses the second
|
|
85
|
+
conditional).
|
|
86
|
+
|
|
87
|
+
## 6. Probe update
|
|
88
|
+
For a witness u private-only and independent of every factor touching S (or, with its
|
|
89
|
+
total marginal error probability, labelled so):
|
|
90
|
+
```
|
|
91
|
+
a = Φ · p_u/(n−1); b = (1−Φ)·(1−p_u); Φ′ = a/(a+b); unmeasured iff a+b = 0
|
|
92
|
+
```
|
|
93
|
+
Strict improvement Φ′ < Φ holds for 0 < Φ < 1 iff p_u < (n−1)/n; boundary cases are
|
|
94
|
+
valid (Φ=0, p_u=0.2 → 0; Φ=1, p_u=0.2 → 1; p_u=1 → 1).
|
|
95
|
+
|
|
96
|
+
## 7. Identification and fitting
|
|
97
|
+
Let, for each witness w,
|
|
98
|
+
```
|
|
99
|
+
r_w = (1−p_w) · Π_{singleton f ∋ w} (1−c_f) unresolved singleton/private survival
|
|
100
|
+
s_w = r_w · Π_{shared f ∋ w} (1−c_f) total correctness probability
|
|
101
|
+
s_uv = P(e_u = 0 ∧ e_v = 0)
|
|
102
|
+
```
|
|
103
|
+
Population identification (declared sharing sets, s_u > 0 for every involved witness):
|
|
104
|
+
log(s_uv/(s_u·s_v)) = Σ_{shared f ∋ u,v} −log(1−c_f) is linear in −log(1−c_f); if the
|
|
105
|
+
pair × shared-factor system has full column rank, every shared c_f is identified, and then
|
|
106
|
+
r_w from s_w; r_w's decomposition into p_w and singleton c_f is unresolved by error data.
|
|
107
|
+
Structure is never discovered by a measure. Finite-data fitting is a separate declared
|
|
108
|
+
procedure: constrained least squares on the log system, declared budget, residual
|
|
109
|
+
diagnostics against a declared tolerance, bootstrap uncertainty with declared B/seed/PRNG,
|
|
110
|
+
pooling only under declared parameter compatibility; no pseudocounts, no clamping, no
|
|
111
|
+
promotion of fitted structure; zero joint-correct counts or incompatible moments →
|
|
112
|
+
`model/M misfit`, no c_f reported. Φ and D are reported only with handed parameters and
|
|
113
|
+
labelled `handed`, never `fitted`.
|
|
114
|
+
|
|
115
|
+
## 8. Time, stake, commonMass
|
|
116
|
+
Freshness and interest enter only as hypothetical factors with declared firing
|
|
117
|
+
probabilities; otherwise annotations and `unmeasured`. Descriptive commonMass is read as
|
|
118
|
+
excess over 1/|S| only as deviation from the equal-variance independent reference; it
|
|
119
|
+
never identifies dependence.
|
|
120
|
+
|
|
121
|
+
## 9. Captured vectors (exact; rational reference; decimals rounded half-even, 8 digits)
|
|
122
|
+
- two witnesses, covering c=1/20, p=1/5, n=64: P_true 0.608, P_false 0.05060317,
|
|
123
|
+
P_fired 0.05, P_dissent 0.34139683, Φ 0.07683409, D 0.07591825.
|
|
124
|
+
- impossible conditioning (no factors, p_A=0, p_B=1): P_true = P_false = 0, P_dissent 1,
|
|
125
|
+
Φ, D unmeasured (cause: no unanimity mass).
|
|
126
|
+
- three witnesses, covering {A,B,C} c=1/5 idx 0, partial {A,B} c=3/10 idx 1, p=0:
|
|
127
|
+
P_true 0.56, P_false 0.2, P_dissent 0.24, maj_false∧dissent 0.24, Φ = D = 0.26315789,
|
|
128
|
+
P(false maj | dissent) = 1, P(false maj | any maj ∧ dissent) = 1.
|
|
129
|
+
- earlier singleton {A} c=3/10 idx 0, covering {A,B} c=1/5 idx 1, p=1/5: Φ 0.28387293,
|
|
130
|
+
D 0.28316249, P_dissent 0.49953016; merged-singleton no-sample Φ 0.35944805.
|
|
131
|
+
- four witnesses, factors {0,1} and {2,3} each c=1/2, p=0: P_dissent 47/63 = 0.74603175,
|
|
132
|
+
maj_none∧dissent 47/63, P(false maj | dissent) = 0 (measured), P(false maj | any maj ∧
|
|
133
|
+
dissent) unmeasured (no majority mass), Φ = D = 1/64.
|
|
134
|
+
- probe (Φ 0.07683409, n=64): p_u=0.2 → 0.00033; 0.98 → 0.06080; 0.99 → 0.11566; 1 → 1;
|
|
135
|
+
Φ=0,p_u=0.2 → 0; Φ=1,p_u=0.2 → 1.
|
|
136
|
+
- identification: c=1/5, p_A=1/2, p_B=3/8 → c recovered exactly 1/5; (c=1/5,p_A=1,
|
|
137
|
+
p_B=3/8) vs (c=2/5,p_A=1,p_B=1/6) have identical moments → s_A = 0 → unidentified.
|
|
138
|
+
- identity 1 − P_true − P_false = P_dissent holds in every case.
|
|
139
|
+
|
|
140
|
+
## 10. Open, by name
|
|
141
|
+
Partial value sharing (a factor firing without forcing one value) — a future model;
|
|
142
|
+
probe usefulness beyond the private-only case; discovery of sharing structure (never by a
|
|
143
|
+
measure); adequacy policies (min cells, interval widths, budgets) as declared lines.
|
|
144
|
+
|
|
145
|
+
## 11. Acceptance
|
|
146
|
+
TypeScript implementation reproduces every captured vector exactly in rational
|
|
147
|
+
arithmetic; validation refuses by name; budget is computed before work; every result
|
|
148
|
+
carries model, handed parameters and conditions; states identical before and after;
|
|
149
|
+
the descriptive 0.4.0 measures and all algebra hashes unchanged.
|
|
150
|
+
|
|
151
|
+
## 12. Capacity under a single dominant factor
|
|
152
|
+
|
|
153
|
+
`capacityBound`, `capacityP0`, `mutualInformation`, and `unanimityNoFactor` use the declared single-dominant-factor model. T is uniform on n >= 2 values. F is independent of T with probability c. On F=1 all witnesses report one W, uniform among values different from T. On F=0 they use independent homogeneous private channels: correct with probability 1-p, otherwise uniform among n-1 wrong values. These hypotheses are handed, never inferred.
|
|
154
|
+
|
|
155
|
+
For every positive k, I(T;V) <= log2(n)-c*log2(n-1). The entropy chain rule gives
|
|
156
|
+
H(T|V) = c*log2(n-1) + (1-c)*H(T|V,F=0) + I(T;F|V).
|
|
157
|
+
The first term is exclusion uncertainty, the second private uncertainty, the third factor ambiguity. A decoder cannot increase information about T.
|
|
158
|
+
|
|
159
|
+
For 0<p<1 and p!=(n-1)/n, the bound is attained as k tends to infinity: the empirical private vote distribution distinguishes T, and private unanimity has probability (1-p)^k+p^k/(n-1)^(k-1), tending to zero. For p=1,n>2 the missing value identifies T asymptotically. For p=1,n=2 every vote is the complement of T, giving one bit for every k. At p=0, I=log2(n)-h(c)-c*log2(n-1) for every k. At c=1, I=log2(n/(n-1)) for every k. At c=0 the uninformative private channel p=(n-1)/n gives zero for every k; c=0 does not by itself imply log2(n). At that uninformative p with a factor, the limit is c*log2(n/(n-1)), not the general upper bound.
|
|
160
|
+
|
|
161
|
+
Probabilities and the conditional-entropy expression are exact rationals. Numerical entropy uses the explicitly handed `binary64-log2` policy, in bits, and is an approximation; it is not an exact rational logarithm. `mutualInformation` declares its joint-cell enumeration budget before work. `unanimityNoFactor` declares a rational-bit upper-bound budget before exponentiation. Budget exhaustion is unmeasured, never zero.
|
|
162
|
+
|
|
163
|
+
Captured finite information, n=4,c=1/5,p=3/10: k=1,2,4,7 gives approximately 0.313028978, 0.469712906, 0.914458010, 1.332321771 bits. The bound is approximately 1.683007500 bits. At p=0 the information is approximately 0.961079405 bits for every k. These decimals are illustrative approximations under the named policy.
|
|
164
|
+
|
|
165
|
+
## 13. Decision results are separate
|
|
166
|
+
|
|
167
|
+
`decisionInformation` accepts `plurality-uniform-ties@1` or `posterior-map-uniform-ties@1`. The second compares exact declared joint probabilities for finite k; it does not apply an intuition-based unanimity threshold. Ties are uniformly distributed among maximizers. It returns posterior information I(T;V), decision information I(T;answer), and exact rational decision accuracy as distinct quantities. The exact T/answer joint table accompanies them. A randomized answer cannot gain information over V.
|
|
168
|
+
|
|
169
|
+
Under p<(n-1)/n, asymptotically plurality emits the forced wrong value on the factor event. Posterior MAP identifies that event and samples uniformly among its n-1 alternatives. For n=4,c=1/5, plurality decision information is approximately 0.961079405 bits; MAP decision information is approximately 1.222162 bits; posterior information is approximately 1.683007500 bits. The two information gains differ. None is a finite-k or model-free guarantee.
|
|
170
|
+
|
|
171
|
+
## 14. No-truth fitting
|
|
172
|
+
|
|
173
|
+
`fitUnanimityModel` uses `exact-c-slices-on-declared-p-grid@1`. It takes one named lineage, cardinality, k/count/denominator rows, a declared p grid, exact absolute rate tolerance, and a work budget. For each handed p it intersects the exact inequalities for c, returning the entire compatible c interval and midpoint residual diagnostics. No claim is made about p values between slices or continuous identification. A measured fit means the declared procedure was evaluated; it does not mean parameters or causes were identified.
|
|
174
|
+
|
|
175
|
+
The observed rate is compared with c+(1-c)*[(1-p)^k+p^k/(n-1)^(k-1)]. Binary p versus 1-p ambiguity remains visible. Perfect unanimity leaves p=0 and c=1 indistinguishable. Too few informative sizes or no compatible slice are explicitly unmeasured. Mixed populations require a separately declared mixture model and are not pooled here.
|
|
176
|
+
|
|
177
|
+
Optional bootstrap samples complete paired groups across sizes with a handed xorshift32 seed, B and random-word budget. It retains the full compatible regions in each replicate, not independent uncertainty intervals for each size. Groups are the declared resampling units; the procedure assumes exchangeable independent groups and does not establish that assumption. Counts alone leave uncertainty unmeasured. Replicate regions are empirical bootstrap output, not guaranteed confidence sets. Exhausted random words never produce successful uncertainty.
|
|
178
|
+
|
|
179
|
+
## 15. False coincidence relative to a declared reference
|
|
180
|
+
|
|
181
|
+
`coincidenceExcess` takes event/origin/value rows, truth rows (`kind=truth`), an explicit selection S and the `independent-uniform-wrong@1` reference. Order h is |S|; identity and redelivery never add origins or events. Values belong to the declared alphabet. Conflicting values or truth refuse. Incomplete shared events and insufficient declared event counts remain unmeasured. Imperfect probes need a separate contract and are not silently accepted as truth.
|
|
182
|
+
|
|
183
|
+
The reference uses handed error marginals, or explicitly estimated marginals stratified by observed truth. For handed homogeneous errors p_i, reference false coincidence is product(p_i)/(n-1)^(h-1). Estimated strata use their event weights, never a pooled error probability that confounds truth populations. Output contains the false-coincidence count, denominator, exact observed and reference rates, signed delta=observed-reference, and ratio=observed/reference. Delta is never floored at zero. At reference zero the ratio is unmeasured, while counts and delta remain available. No sampling design is inferred; uncertainty is separately unmeasured.
|
|
184
|
+
|
|
185
|
+
A ratio greater than one means more coincidence than this reference, not a discovered common cause. Nonuniform wrong labels can exceed the uniform reference with independent witnesses. Independent errors with one shared wrong label give ratio (n-1)^(h-1): at n=64 this is 63 for pairs and 3969 for triples. The fair-bit XOR vector explicitly assigns one common wrong label: pairs have ratio 63, triples ratio zero and a negative delta. Indicators alone do not define the reported-value vector.
|
|
186
|
+
|
|
187
|
+
Under the separately handed dominant-factor model c=1/10,p=1/5,n=64, observed error marginals are 7/25. Relative to those marginals, delta at orders 2 and 3 is approximately 0.099326984 and 0.099996283. Its convergence to c is a conclusion under this model, never model-free identification.
|
|
188
|
+
|
|
189
|
+
## 16. Research demands and boundaries
|
|
190
|
+
|
|
191
|
+
The spectrum summarizes covariance of binary error indicators. It is not a sufficient statistic of reported values, closure events or independence. False-unanimity excess summarizes one event and does not replace the full joint distribution. Higher-order closure statistics need a declared closure rule and the appropriate joint law of reported values given truth; neither is inferred from a form name.
|
|
192
|
+
|
|
193
|
+
Helly is a property of a declared geometric family, not a probabilistic independence order or a truth guarantee. Geometry, factor precedence, partial label sharing, reproduction, percolation, time-varying fitting, imperfect-probe identification and model-free capacity remain explicitly open until their models, procedures and falsifiers close. Controlled experiments live in a world. No new origin, permission, algebraic amount or state is created by a measure.
|
|
194
|
+
|
|
195
|
+
## 17. Publication and stability
|
|
196
|
+
|
|
197
|
+
Every new operation is linked to its contract, yes/no data and native Bound 0.1.7 captures in two places. Validation readers are maintained TypeScript worlds with ordinary modular compilation; no .mjs bundle or private executor ships in this library. Their implementation inventory is retained once by digest. The installed archive must expose the same public exports, preserve the four states, match all published bytes and close native receipts without a private store. Declaring these requirements does not pay them.
|