@lapxo/obligations 0.4.3 → 0.4.4
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 +4 -0
- package/TARGET.bound +52 -9
- package/dist/measures/cofailure-pairs.d.ts +113 -0
- package/dist/measures/cofailure-pairs.js +129 -0
- package/dist/measures/index.d.ts +4 -0
- package/dist/measures/index.js +2 -0
- package/dist/measures/marginal-information.d.ts +78 -0
- package/dist/measures/marginal-information.js +71 -0
- package/docs/measures.md +16 -0
- package/docs/paper.md +2 -2
- package/docs/reference.md +6 -1
- package/package.json +1 -1
- package/proofs/cofailure-pairs.json +26 -0
- package/proofs/coordination.json +27 -0
- package/proofs/helly-comb.json +17 -0
- package/proofs/lean/Obligations/Cell.lean +159 -0
- package/proofs/lean/Obligations/HellyComb.lean +19 -0
- package/proofs/lineage-ceiling.json +41 -0
- package/proofs/marginal-information.json +30 -0
- package/proofs/resolution-encounters.json +23 -0
- package/receipts.bound +505 -288
- package/samples/laws/cofailure-pairs/no/sample.json +1 -0
- package/samples/laws/cofailure-pairs/yes/sample.json +20 -0
- package/samples/laws/linage-rest/no/sample.json +19 -0
- package/samples/laws/linage-rest/yes/sample.json +100 -0
- package/samples/laws/lineage-ceiling/no/sample.json +8 -0
- package/samples/laws/lineage-ceiling/yes/sample.json +30 -0
- package/samples/laws/marginal-information/no/sample.json +17 -0
- package/samples/laws/marginal-information/yes/sample.json +459 -0
- package/samples/laws/semilattice/no/sample.json +18 -0
- package/samples/laws/semilattice/yes/sample.json +29 -0
- package/samples/no/H1-uncertainty.json +24 -0
- package/samples/no/installed-artifact.json +24 -26
- package/samples/yes/H1-uncertainty.json +25 -0
- package/samples/yes/installed-artifact.json +23 -25
- package/vectors/laws/cofailure-pairs.json +2580 -0
- package/vectors/laws/cofailure-pairs.native.json +267 -0
- package/vectors/laws/coordination.json +386 -0
- package/vectors/laws/f1/finite-arithmetic.json +66 -0
- package/vectors/laws/f1/path-witness.json +242 -0
- package/vectors/laws/helly-comb.json +95 -0
- package/vectors/laws/helly-comb.lean.json +94 -0
- package/vectors/laws/linage-rest.native.json +335 -0
- package/vectors/laws/lineage-ceiling.json +790 -0
- package/vectors/laws/lineage-ceiling.native.json +291 -0
- package/vectors/laws/marginal-information.json +868 -0
- package/vectors/laws/marginal-information.native.json +259 -0
- package/vectors/laws/meet-semilattice.json +244 -0
- package/vectors/laws/meet-semilattice.native.json +265 -0
- package/vectors/laws/resolution-encounters.json +171 -0
- package/vectors/measures/installed-artifact.cli.json +8 -12
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { type ValueReading, type TruthReading, type CoincidenceReference } from './coincidence.ts';
|
|
2
|
+
import { type RationalInput } from './rational.ts';
|
|
3
|
+
export type PairReference = Readonly<{
|
|
4
|
+
model: 'independent-categorical@1';
|
|
5
|
+
marginals: readonly Readonly<{
|
|
6
|
+
origin: string;
|
|
7
|
+
probabilities: readonly Readonly<{
|
|
8
|
+
value: string;
|
|
9
|
+
p: RationalInput;
|
|
10
|
+
}>[];
|
|
11
|
+
}>[];
|
|
12
|
+
}>;
|
|
13
|
+
export type PairSampling = Readonly<{
|
|
14
|
+
model: 'iid-cells@1';
|
|
15
|
+
epsilon: RationalInput;
|
|
16
|
+
}>;
|
|
17
|
+
type Common = Readonly<{
|
|
18
|
+
origins: readonly string[];
|
|
19
|
+
values: readonly string[];
|
|
20
|
+
T?: number;
|
|
21
|
+
theta?: RationalInput;
|
|
22
|
+
budget: string;
|
|
23
|
+
sampling?: PairSampling;
|
|
24
|
+
}>;
|
|
25
|
+
export type CofailureModel = Common & (Readonly<{
|
|
26
|
+
variant: 'oracle-false-rate';
|
|
27
|
+
truth: readonly TruthReading[];
|
|
28
|
+
reference: CoincidenceReference;
|
|
29
|
+
}> | Readonly<{
|
|
30
|
+
variant: 'categorical-match-excess';
|
|
31
|
+
reference?: PairReference;
|
|
32
|
+
truth?: never;
|
|
33
|
+
}>);
|
|
34
|
+
export declare function cofailurePairs(rows: readonly ValueReading[], model: CofailureModel): {
|
|
35
|
+
status: "unmeasured";
|
|
36
|
+
cause: string;
|
|
37
|
+
required?: undefined;
|
|
38
|
+
events?: undefined;
|
|
39
|
+
T?: undefined;
|
|
40
|
+
variant?: undefined;
|
|
41
|
+
theta?: undefined;
|
|
42
|
+
origins?: undefined;
|
|
43
|
+
pairs?: undefined;
|
|
44
|
+
components?: undefined;
|
|
45
|
+
uncertainty?: undefined;
|
|
46
|
+
scoreMeaning?: undefined;
|
|
47
|
+
interpretation?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
status: "unmeasured";
|
|
50
|
+
cause: string;
|
|
51
|
+
required: string;
|
|
52
|
+
events?: undefined;
|
|
53
|
+
T?: undefined;
|
|
54
|
+
variant?: undefined;
|
|
55
|
+
theta?: undefined;
|
|
56
|
+
origins?: undefined;
|
|
57
|
+
pairs?: undefined;
|
|
58
|
+
components?: undefined;
|
|
59
|
+
uncertainty?: undefined;
|
|
60
|
+
scoreMeaning?: undefined;
|
|
61
|
+
interpretation?: undefined;
|
|
62
|
+
} | {
|
|
63
|
+
status: "unmeasured";
|
|
64
|
+
cause: string;
|
|
65
|
+
events: number;
|
|
66
|
+
T: number;
|
|
67
|
+
required?: undefined;
|
|
68
|
+
variant?: undefined;
|
|
69
|
+
theta?: undefined;
|
|
70
|
+
origins?: undefined;
|
|
71
|
+
pairs?: undefined;
|
|
72
|
+
components?: undefined;
|
|
73
|
+
uncertainty?: undefined;
|
|
74
|
+
scoreMeaning?: undefined;
|
|
75
|
+
interpretation?: undefined;
|
|
76
|
+
} | {
|
|
77
|
+
status: "measured";
|
|
78
|
+
variant: "oracle-false-rate" | "categorical-match-excess";
|
|
79
|
+
T: number;
|
|
80
|
+
theta: Readonly<{
|
|
81
|
+
numerator: string;
|
|
82
|
+
denominator: string;
|
|
83
|
+
}>;
|
|
84
|
+
origins: string[];
|
|
85
|
+
pairs: {
|
|
86
|
+
origins: readonly [string, string];
|
|
87
|
+
observed: Readonly<{
|
|
88
|
+
numerator: string;
|
|
89
|
+
denominator: string;
|
|
90
|
+
}>;
|
|
91
|
+
expected: Readonly<{
|
|
92
|
+
numerator: string;
|
|
93
|
+
denominator: string;
|
|
94
|
+
}>;
|
|
95
|
+
excess: Readonly<{
|
|
96
|
+
numerator: string;
|
|
97
|
+
denominator: string;
|
|
98
|
+
}>;
|
|
99
|
+
score: Readonly<{
|
|
100
|
+
numerator: string;
|
|
101
|
+
denominator: string;
|
|
102
|
+
}>;
|
|
103
|
+
edge: boolean;
|
|
104
|
+
}[];
|
|
105
|
+
components: string[][];
|
|
106
|
+
uncertainty: unknown;
|
|
107
|
+
scoreMeaning: string;
|
|
108
|
+
interpretation: "descriptive threshold components, not identified causes or probability of truth";
|
|
109
|
+
cause?: undefined;
|
|
110
|
+
required?: undefined;
|
|
111
|
+
events?: undefined;
|
|
112
|
+
};
|
|
113
|
+
export {};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { coincidenceExcess } from "./coincidence.js";
|
|
2
|
+
import { unionBoundConfidence } from "./confidence.js";
|
|
3
|
+
import { add, sub, mul, div, q, zero, one, pack, rational, probability } from "./rational.js";
|
|
4
|
+
const refuse = (cause) => { throw Error('REFUSE·cofailure ' + cause); };
|
|
5
|
+
const named = (v) => typeof v === 'string' && v.trim().length > 0;
|
|
6
|
+
const compare = (a, b) => a[0] * b[1] < b[0] * a[1] ? -1 : a[0] * b[1] > b[0] * a[1] ? 1 : 0;
|
|
7
|
+
const max = (a, b) => compare(a, b) >= 0 ? a : b;
|
|
8
|
+
const min = (a, b) => compare(a, b) <= 0 ? a : b;
|
|
9
|
+
export function cofailurePairs(rows, model) {
|
|
10
|
+
if (!model || model.T === undefined || model.theta === undefined)
|
|
11
|
+
return { status: 'unmeasured', cause: 'cofailure/T-and-theta-required' };
|
|
12
|
+
if (!Number.isSafeInteger(model.T) || model.T < 1)
|
|
13
|
+
refuse('invalid-T');
|
|
14
|
+
if (!Array.isArray(rows) || !Array.isArray(model.origins) || model.origins.length < 2 || model.origins.some(id => !named(id)) || new Set(model.origins).size !== model.origins.length)
|
|
15
|
+
refuse('invalid-origins-or-rows');
|
|
16
|
+
if (!Array.isArray(model.values) || model.values.length < 2 || model.values.some(v => !named(v)) || new Set(model.values).size !== model.values.length)
|
|
17
|
+
refuse('invalid-alphabet');
|
|
18
|
+
if (model.variant !== 'oracle-false-rate' && model.variant !== 'categorical-match-excess')
|
|
19
|
+
refuse('declared-variant-required');
|
|
20
|
+
if (typeof model.budget !== 'string' || !/^\d+$/.test(model.budget))
|
|
21
|
+
refuse('budget-required');
|
|
22
|
+
const theta = rational(model.theta);
|
|
23
|
+
if (compare(theta, one) > 0 || compare(theta, model.variant === 'oracle-false-rate' ? zero : q(-1n)) < 0)
|
|
24
|
+
refuse('invalid-threshold');
|
|
25
|
+
const origins = [...model.origins].sort(), M = origins.length * (origins.length - 1) / 2;
|
|
26
|
+
const truth = model.variant === 'oracle-false-rate' ? model.truth : [];
|
|
27
|
+
if (!Array.isArray(truth))
|
|
28
|
+
refuse('truth-array-required');
|
|
29
|
+
if (model.variant === 'categorical-match-excess' && Object.hasOwn(model, 'truth'))
|
|
30
|
+
refuse('non-oracle-truth-input');
|
|
31
|
+
const required = BigInt(M) * (3n * BigInt(rows.length) + BigInt(truth.length) + BigInt(model.values.length) + 2n) + BigInt(rows.length) + BigInt(model.T) * BigInt(origins.length);
|
|
32
|
+
if (required > BigInt(model.budget))
|
|
33
|
+
return { status: 'unmeasured', cause: 'cofailure/budget', required: String(required) };
|
|
34
|
+
const alphabet = new Set(model.values), selected = new Set(origins), events = new Map();
|
|
35
|
+
for (const row of rows) {
|
|
36
|
+
if (!row || !named(row.event) || !named(row.origin) || !alphabet.has(row.value))
|
|
37
|
+
refuse('invalid-value-reading');
|
|
38
|
+
if (!selected.has(row.origin))
|
|
39
|
+
continue;
|
|
40
|
+
const at = events.get(row.event) ?? new Map();
|
|
41
|
+
if (at.has(row.origin) && at.get(row.origin) !== row.value)
|
|
42
|
+
refuse('conflicting-value ' + row.event + '/' + row.origin);
|
|
43
|
+
at.set(row.origin, row.value);
|
|
44
|
+
events.set(row.event, at);
|
|
45
|
+
}
|
|
46
|
+
if (events.size !== model.T || [...events.values()].some(at => at.size !== origins.length))
|
|
47
|
+
return { status: 'unmeasured', cause: 'cofailure/incomplete-declared-frame', events: events.size, T: model.T };
|
|
48
|
+
const marginals = new Map();
|
|
49
|
+
if (model.variant === 'oracle-false-rate' && model.reference?.marginals === 'handed') {
|
|
50
|
+
const errors = model.reference.errors;
|
|
51
|
+
if (!Array.isArray(errors) || errors.length !== origins.length || errors.some(e => !e) || new Set(errors.map(e => e.origin)).size !== origins.length || errors.some(e => !selected.has(e.origin)))
|
|
52
|
+
refuse('oracle-reference-origins');
|
|
53
|
+
}
|
|
54
|
+
if (model.variant === 'categorical-match-excess') {
|
|
55
|
+
if (!model.reference)
|
|
56
|
+
return { status: 'unmeasured', cause: 'cofailure/reference-required' };
|
|
57
|
+
if (model.reference.model !== 'independent-categorical@1' || !Array.isArray(model.reference.marginals) || model.reference.marginals.length !== origins.length)
|
|
58
|
+
refuse('categorical-reference-required');
|
|
59
|
+
for (const row of model.reference.marginals) {
|
|
60
|
+
if (!row || !selected.has(row.origin) || marginals.has(row.origin) || !Array.isArray(row.probabilities) || row.probabilities.length !== alphabet.size)
|
|
61
|
+
refuse('reference-origins-or-values');
|
|
62
|
+
const values = new Map();
|
|
63
|
+
for (const p of row.probabilities) {
|
|
64
|
+
if (!p || !alphabet.has(p.value) || values.has(p.value))
|
|
65
|
+
refuse('reference-origins-or-values');
|
|
66
|
+
values.set(p.value, probability(p.p));
|
|
67
|
+
}
|
|
68
|
+
const total = [...values.values()].reduce(add, zero);
|
|
69
|
+
if (compare(total, one) !== 0)
|
|
70
|
+
refuse('reference-not-normalized');
|
|
71
|
+
marginals.set(row.origin, values);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const pairs = [];
|
|
75
|
+
for (let i = 0; i < origins.length; i++)
|
|
76
|
+
for (let j = i + 1; j < origins.length; j++) {
|
|
77
|
+
const a = origins[i], b = origins[j];
|
|
78
|
+
let observed, expected;
|
|
79
|
+
if (model.variant === 'oracle-false-rate') {
|
|
80
|
+
if (!model.reference || !Array.isArray(model.reference.values) || model.reference.values.length !== alphabet.size || model.reference.values.some(v => !alphabet.has(v)))
|
|
81
|
+
refuse('oracle-reference-alphabet');
|
|
82
|
+
const reference = model.reference.marginals === 'handed' ? { ...model.reference, errors: model.reference.errors.filter(e => e.origin === a || e.origin === b) } : model.reference;
|
|
83
|
+
const reading = coincidenceExcess(rows, truth, [a, b], reference, { minEvents: model.T, minEventsPerTruth: 1, budget: model.budget });
|
|
84
|
+
if (reading.status !== 'measured')
|
|
85
|
+
return { status: 'unmeasured', cause: 'cofailure/oracle ' + reading.cause };
|
|
86
|
+
observed = rational(reading.observed);
|
|
87
|
+
expected = rational(reading.expected);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
let count = 0;
|
|
91
|
+
for (const row of events.values())
|
|
92
|
+
if (row.get(a) === row.get(b))
|
|
93
|
+
count++;
|
|
94
|
+
observed = q(BigInt(count), BigInt(model.T));
|
|
95
|
+
expected = model.values.map(v => mul(marginals.get(a).get(v), marginals.get(b).get(v))).reduce(add, zero);
|
|
96
|
+
}
|
|
97
|
+
const excess = sub(observed, expected), score = model.variant === 'oracle-false-rate' ? observed : excess;
|
|
98
|
+
pairs.push({ origins: [a, b], observed: pack(observed), expected: pack(expected), excess: pack(excess), score: pack(score), edge: compare(score, theta) > 0 });
|
|
99
|
+
}
|
|
100
|
+
const parent = origins.map((_, i) => i), find = (i) => parent[i] === i ? i : find(parent[i]);
|
|
101
|
+
for (const p of pairs)
|
|
102
|
+
if (p.edge)
|
|
103
|
+
parent[find(origins.indexOf(p.origins[0]))] = find(origins.indexOf(p.origins[1]));
|
|
104
|
+
const groups = new Map();
|
|
105
|
+
origins.forEach((id, i) => { const key = find(i); groups.set(key, [...(groups.get(key) ?? []), id]); });
|
|
106
|
+
const components = [...groups.values()].sort((a, b) => a[0].localeCompare(b[0]));
|
|
107
|
+
let uncertainty = { status: 'unmeasured', cause: 'cofailure/sampling-design-required' };
|
|
108
|
+
if (model.sampling) {
|
|
109
|
+
if (model.sampling.model !== 'iid-cells@1')
|
|
110
|
+
refuse('sampling-model-required');
|
|
111
|
+
const epsilon = probability(model.sampling.epsilon);
|
|
112
|
+
if (compare(epsilon, zero) <= 0)
|
|
113
|
+
refuse('positive-epsilon-required');
|
|
114
|
+
const failure = min(one, div(one, mul(q(4n * BigInt(model.T)), mul(epsilon, epsilon))));
|
|
115
|
+
const confidence = unionBoundConfidence(pairs.map((p, i) => ({ id: 'pair-' + i, p: pack(failure), justification: 'Chebyshev: declared iid Bernoulli indicators, variance <= 1/4; fixed handed reference' })));
|
|
116
|
+
const intervals = pairs.map(p => {
|
|
117
|
+
const score = rational(p.score), expected = rational(p.expected), low = model.variant === 'oracle-false-rate' ? zero : sub(zero, expected), high = model.variant === 'oracle-false-rate' ? one : sub(one, expected);
|
|
118
|
+
const lo = max(low, sub(score, epsilon)), hi = min(high, add(score, epsilon));
|
|
119
|
+
return { origins: p.origins, lo: pack(lo), hi: pack(hi), decision: compare(lo, theta) > 0 ? 'above' : compare(hi, theta) < 0 ? 'below' : 'unresolved' };
|
|
120
|
+
});
|
|
121
|
+
uncertainty = { status: 'conditional', model: model.sampling.model, epsilon: pack(epsilon), perPairFailureUpper: pack(failure), confidence,
|
|
122
|
+
intervals, thresholdGraphResolved: intervals.every(i => i.decision !== 'unresolved'),
|
|
123
|
+
conditionalGraphCertificate: !confidence.trivial && intervals.every(i => i.decision !== 'unresolved'),
|
|
124
|
+
meaning: 'fixed-frame threshold graph only, conditional on the handed iid design; neither causal grouping nor iid was inferred' };
|
|
125
|
+
}
|
|
126
|
+
return { status: 'measured', variant: model.variant, T: model.T, theta: pack(theta), origins, pairs, components, uncertainty,
|
|
127
|
+
scoreMeaning: model.variant === 'oracle-false-rate' ? 'same wrong answer / T' : 'same answer / T minus handed independent-categorical reference',
|
|
128
|
+
interpretation: 'descriptive threshold components, not identified causes or probability of truth' };
|
|
129
|
+
}
|
package/dist/measures/index.d.ts
CHANGED
|
@@ -30,3 +30,7 @@ export { phaseDefect, phaseDefectExtrema } from './phase-defect.ts';
|
|
|
30
30
|
export type { PhaseDefectInterpretation } from './phase-defect.ts';
|
|
31
31
|
export { mixProjectionLoss } from './mix-loss.ts';
|
|
32
32
|
export type { NamedConfiguration, ConfigurationPrior, MixLossModel, MixLossPolicy } from './mix-loss.ts';
|
|
33
|
+
export { cofailurePairs } from './cofailure-pairs.ts';
|
|
34
|
+
export type { PairReference, PairSampling, CofailureModel } from './cofailure-pairs.ts';
|
|
35
|
+
export { marginalInformation } from './marginal-information.ts';
|
|
36
|
+
export type { MarginalSource, JointAtom, MarginalModel } from './marginal-information.ts';
|
package/dist/measures/index.js
CHANGED
|
@@ -14,3 +14,5 @@ export { unionBoundConfidence, tolerantCountConfidence } from "./confidence.js";
|
|
|
14
14
|
export { tolerantSubsetConfidence, independentCountConfidence } from "./tolerant-subsets.js";
|
|
15
15
|
export { phaseDefect, phaseDefectExtrema } from "./phase-defect.js";
|
|
16
16
|
export { mixProjectionLoss } from "./mix-loss.js";
|
|
17
|
+
export { cofailurePairs } from "./cofailure-pairs.js";
|
|
18
|
+
export { marginalInformation } from "./marginal-information.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type MixLossPolicy } from './mix-loss.ts';
|
|
2
|
+
import { type RationalInput } from './rational.ts';
|
|
3
|
+
export type MarginalSource = Readonly<{
|
|
4
|
+
id: string;
|
|
5
|
+
lineage: string;
|
|
6
|
+
values: readonly string[];
|
|
7
|
+
}>;
|
|
8
|
+
export type JointAtom = Readonly<{
|
|
9
|
+
id: string;
|
|
10
|
+
truth: string;
|
|
11
|
+
values: Readonly<Record<string, string>>;
|
|
12
|
+
p?: RationalInput;
|
|
13
|
+
}>;
|
|
14
|
+
export type MarginalModel = Readonly<{
|
|
15
|
+
model: 'finite-declared-joint@1';
|
|
16
|
+
truthValues: readonly string[];
|
|
17
|
+
sources: readonly MarginalSource[];
|
|
18
|
+
atoms: readonly JointAtom[];
|
|
19
|
+
}>;
|
|
20
|
+
export declare function marginalInformation(model: MarginalModel, orders: readonly (readonly string[])[], policy: MixLossPolicy): {
|
|
21
|
+
status: "unmeasured";
|
|
22
|
+
cause: string;
|
|
23
|
+
required?: undefined;
|
|
24
|
+
workUnit?: undefined;
|
|
25
|
+
model?: undefined;
|
|
26
|
+
unit?: undefined;
|
|
27
|
+
approximation?: undefined;
|
|
28
|
+
truthEntropy?: undefined;
|
|
29
|
+
declaredAtoms?: undefined;
|
|
30
|
+
computedSubsets?: undefined;
|
|
31
|
+
policy?: undefined;
|
|
32
|
+
readings?: undefined;
|
|
33
|
+
meaning?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
status: "unmeasured";
|
|
36
|
+
cause: string;
|
|
37
|
+
required: string;
|
|
38
|
+
workUnit: "declared-support-scans";
|
|
39
|
+
model?: undefined;
|
|
40
|
+
unit?: undefined;
|
|
41
|
+
approximation?: undefined;
|
|
42
|
+
truthEntropy?: undefined;
|
|
43
|
+
declaredAtoms?: undefined;
|
|
44
|
+
computedSubsets?: undefined;
|
|
45
|
+
policy?: undefined;
|
|
46
|
+
readings?: undefined;
|
|
47
|
+
meaning?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
status: "measured";
|
|
50
|
+
model: "finite-declared-joint@1";
|
|
51
|
+
unit: "bits";
|
|
52
|
+
approximation: "binary64-log2";
|
|
53
|
+
truthEntropy: number;
|
|
54
|
+
declaredAtoms: number;
|
|
55
|
+
computedSubsets: number;
|
|
56
|
+
policy: Readonly<{
|
|
57
|
+
logarithm: "binary64-log2";
|
|
58
|
+
budget: string;
|
|
59
|
+
}>;
|
|
60
|
+
workUnit: "declared-support-scans";
|
|
61
|
+
required: string;
|
|
62
|
+
readings: {
|
|
63
|
+
additionOrder: string[];
|
|
64
|
+
steps: {
|
|
65
|
+
source: string;
|
|
66
|
+
lineage: string;
|
|
67
|
+
priorSources: string[];
|
|
68
|
+
deltaInformation: number;
|
|
69
|
+
cumulativeInformation: number;
|
|
70
|
+
remainingConditionalEntropy: number;
|
|
71
|
+
}[];
|
|
72
|
+
totalInformation: number;
|
|
73
|
+
sumMarginals: number;
|
|
74
|
+
telescopingResidual: number;
|
|
75
|
+
}[];
|
|
76
|
+
meaning: "I(truth; new source | previous sources) under one unchanged declared joint prior; lineage labels supply no ordering or independence";
|
|
77
|
+
cause?: undefined;
|
|
78
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { mixProjectionLoss } from "./mix-loss.js";
|
|
2
|
+
import { add, probability, pack, zero } from "./rational.js";
|
|
3
|
+
const refuse = (why) => { throw Error('REFUSE·marginal ' + why); };
|
|
4
|
+
const names = (xs) => Array.isArray(xs) && xs.length > 0 && xs.every(x => typeof x === 'string' && x.trim().length > 0) && new Set(xs).size === xs.length;
|
|
5
|
+
export function marginalInformation(model, orders, policy) {
|
|
6
|
+
if (!model || model.model !== 'finite-declared-joint@1' || !Array.isArray(model.atoms))
|
|
7
|
+
return { status: 'unmeasured', cause: 'marginal/joint-model-required' };
|
|
8
|
+
if (!names(model.truthValues) || !Array.isArray(model.sources) || !model.sources.length || !names(model.sources.map(s => s?.id)))
|
|
9
|
+
refuse('declared-domain-required');
|
|
10
|
+
if (model.sources.some(s => !s || typeof s.lineage !== 'string' || !s.lineage.trim() || !names(s.values)))
|
|
11
|
+
refuse('declared-source-domain-required');
|
|
12
|
+
if (!policy || policy.logarithm !== 'binary64-log2' || typeof policy.budget !== 'string' || !/^\d+$/.test(policy.budget))
|
|
13
|
+
refuse('numeric-policy-required');
|
|
14
|
+
const ids = model.sources.map(s => s.id);
|
|
15
|
+
if (!Array.isArray(orders) || !orders.length || orders.some(o => !Array.isArray(o) || o.length !== ids.length || new Set(o).size !== ids.length || o.some(id => !ids.includes(id))))
|
|
16
|
+
refuse('order-must-be-permutation');
|
|
17
|
+
if (!model.atoms.length || !names(model.atoms.map(a => a?.id)))
|
|
18
|
+
refuse('unique-atom-ids-required');
|
|
19
|
+
if (model.atoms.some(a => !a || a.p === undefined || a.p === null))
|
|
20
|
+
return { status: 'unmeasured', cause: 'marginal/prior-required' };
|
|
21
|
+
const required = BigInt(model.atoms.length) * BigInt(ids.length + 1) * BigInt(1 + orders.length * (ids.length + 1));
|
|
22
|
+
if (required > BigInt(policy.budget))
|
|
23
|
+
return { status: 'unmeasured', cause: 'marginal/budget', required: String(required), workUnit: 'declared-support-scans' };
|
|
24
|
+
const probabilities = model.atoms.map(a => probability(a.p));
|
|
25
|
+
const total = probabilities.reduce(add, zero);
|
|
26
|
+
if (total[0] !== total[1])
|
|
27
|
+
refuse('prior-must-sum-to-one');
|
|
28
|
+
for (const a of model.atoms) {
|
|
29
|
+
if (!model.truthValues.includes(a.truth) || !a.values || Object.keys(a.values).length !== ids.length || model.sources.some(s => !Object.hasOwn(a.values, s.id) || !s.values.includes(a.values[s.id])))
|
|
30
|
+
refuse('atom-outside-domain');
|
|
31
|
+
}
|
|
32
|
+
const cached = new Map();
|
|
33
|
+
function conditional(selected) {
|
|
34
|
+
const coordinates = [...selected].sort(), key = JSON.stringify(coordinates), held = cached.get(key);
|
|
35
|
+
if (held !== undefined)
|
|
36
|
+
return held;
|
|
37
|
+
const states = new Map();
|
|
38
|
+
model.atoms.forEach((a, i) => {
|
|
39
|
+
const truth = JSON.stringify(['truth', a.truth]), tuple = JSON.stringify(['selected', coordinates.map(id => a.values[id])]), name = JSON.stringify([truth, tuple]);
|
|
40
|
+
const previous = states.get(name);
|
|
41
|
+
states.set(name, { truth, tuple, mass: add(previous?.mass ?? zero, probabilities[i]) });
|
|
42
|
+
});
|
|
43
|
+
const values = [...states.values()], alphabet = [...new Set(values.flatMap(v => [v.truth, v.tuple]))];
|
|
44
|
+
const result = mixProjectionLoss({ factors: [{ id: 'truth-coordinate', weight: '0' }, { id: 'selected-coordinate', weight: '1' }], alphabet,
|
|
45
|
+
configurations: values.map((v, i) => ({ id: String(i), values: [v.truth, v.tuple] })),
|
|
46
|
+
prior: { kind: 'explicit', probabilities: values.map((v, i) => ({ configuration: String(i), p: pack(v.mass) })) } }, policy);
|
|
47
|
+
if (result.status !== 'measured')
|
|
48
|
+
return refuse('projection-budget');
|
|
49
|
+
cached.set(key, result.lossBits);
|
|
50
|
+
return result.lossBits;
|
|
51
|
+
}
|
|
52
|
+
const truthEntropy = conditional([]);
|
|
53
|
+
const readings = orders.map(additionOrder => {
|
|
54
|
+
const selected = [];
|
|
55
|
+
let before = truthEntropy, sumMarginals = 0;
|
|
56
|
+
const steps = additionOrder.map(source => {
|
|
57
|
+
const priorSources = [...selected];
|
|
58
|
+
selected.push(source);
|
|
59
|
+
const after = conditional(selected), delta = before - after;
|
|
60
|
+
sumMarginals += delta;
|
|
61
|
+
before = after;
|
|
62
|
+
return { source, lineage: model.sources.find(s => s.id === source).lineage, priorSources,
|
|
63
|
+
deltaInformation: delta, cumulativeInformation: truthEntropy - after, remainingConditionalEntropy: after };
|
|
64
|
+
});
|
|
65
|
+
const totalInformation = truthEntropy - before;
|
|
66
|
+
return { additionOrder: [...additionOrder], steps, totalInformation, sumMarginals, telescopingResidual: sumMarginals - totalInformation };
|
|
67
|
+
});
|
|
68
|
+
return { status: 'measured', model: model.model, unit: 'bits', approximation: 'binary64-log2',
|
|
69
|
+
truthEntropy, declaredAtoms: model.atoms.length, computedSubsets: cached.size, policy, workUnit: 'declared-support-scans',
|
|
70
|
+
required: String(required), readings, meaning: 'I(truth; new source | previous sources) under one unchanged declared joint prior; lineage labels supply no ordering or independence' };
|
|
71
|
+
}
|
package/docs/measures.md
CHANGED
|
@@ -219,3 +219,19 @@ L7: conditional bound on one declared common probability space: P(N>k)<=min(1,su
|
|
|
219
219
|
L8: law by enumeration only for 3<=n<=64, positive integer divisors p|n and integer 0<=s<p. D=log2(n/p)-h(s/p), explicit binary64-log2 approximation. Odd-period minimum uses h(floor(p/2)/p), even-period minimum uses one. Complete maximum at zero; nonzero domain has endpoints 1,p-1, empty when p=1. No information or worst-case interpretation follows from nonnegativity. T87 retains its separate wrapped-phase amplitude identity.
|
|
220
220
|
|
|
221
221
|
L9: law by counterexample of existence of noninjective weighted mix, and measure with a declared prior on a finite explicitly supplied set of named-factor configurations. Equal-weight ab and ba give the same bottom tie and different named forks. Loss is H(configuration | mix)=H(configuration)-H(mix); a uniform prior must be explicitly selected, absent prior is unmeasured. The four-state uniform example has mean loss 0.5 bits and one bit conditioned on tie; the injective named fork has zero loss. Defines no new algebraic act, governance selection, M/3 or M/4 law, or destroyed field.
|
|
222
|
+
|
|
223
|
+
## Lineage and delivery: distinct scopes
|
|
224
|
+
|
|
225
|
+
For n>=2, uniform truth X, the declared n-ary symmetric channel X->Z with crossover probability c in [0,1], and X->Z->reports->aggregate A,
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
H(X|Z) = h2(c) + c*log2(n-1) >= h2(c)
|
|
229
|
+
H(X|A) >= H(X|Z)
|
|
230
|
+
I(X;A) <= log2(n) - h2(c) - c*log2(n-1)
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Here h2 is binary entropy, with 0*log2(0)=0. The uncertainty floor and information ceiling follow from this symmetric-channel equality and the declared Markov bottleneck. The reports and aggregation have no additional access to truth or a revealed error/cause indicator. This reuses capacityP0; it neither replaces capacityBound nor changes M/3 or M/4. An error rate alone, an asymmetric channel or the existing private-error model does not establish this ceiling. The distinguishing counterexamples and relation to F1 are in [the conditional lineage contract](../proofs/lineage-ceiling.json).
|
|
234
|
+
|
|
235
|
+
The parameter c denotes the mixture activation or channel crossover specified by the selected model. It is not identified from unanimity without that model, and no equality with the genetic inbreeding coefficient F is asserted. No genetic law follows here.
|
|
236
|
+
|
|
237
|
+
Cell vacuity is a property of a region under the algebra. Delivery asks whether the bytes named by a digest are available and match it. A vacuous cell neither certifies delivery nor proves that a delivered package is admissible. The relation between these predicates remains the named vacuity-versus-delivery tension.
|
package/docs/paper.md
CHANGED
|
@@ -63,7 +63,7 @@ claims that meet outside the bounds FORBIDDEN ✕
|
|
|
63
63
|
| D7-fork | definition | lattice | A2-meet | two incomparable bounds on one cell from two signers; rendered with both, closed only by a signature | | none | derived by the reader | not a derivation |
|
|
64
64
|
| D8-present | definition | field | A4-epoch, A3-resolution | the present is the meet of overlapping observation bands; there is no instant to certify | | [yes](../samples/yes/D8-present.json) | derived by the reader | not a derivation |
|
|
65
65
|
| D9-yield | definition | valuation | A5-origin-is-extension, D4-debit-in-bits | an origin's yield is bits it closed minus bits reopened against it, per act, over an epoch | | [yes](../samples/yes/D9-yield.json) | derived by the reader | not a derivation |
|
|
66
|
-
| H1-uncertainty | conjecture | chain | A3-resolution, A1-encounter | resolution times independent encounters per cell stays above a floor c; the sufficient resolution is where the product saturates | | [yes](../samples/yes/H1-uncertainty.json) | The falsifier: a
|
|
66
|
+
| H1-uncertainty | conjecture | chain | A3-resolution, A1-encounter | resolution times independent encounters per cell stays above a floor c; the sufficient resolution is where the product saturates | | [yes](../samples/yes/H1-uncertainty.json) | The falsifier: after declaring a counting model, population, units and a fixed positive floor c before observing the sample, an admissible cell whose resolution times encounters per cell falls below c. A rising product does not refute a lower bound. A decrease refutes monotonicity and an exceedance refutes an upper bound only under their separately declared contracts. H1 remains open without the counting/refinement model and fixed parameters; the increasing sample is an experiment, not a universal bound. | not a derivation |
|
|
67
67
|
| H10-the-period-is-a-line-of-the-region | conjecture | field | T48-epoch-is-phase, T87-the-quarter-turn | the period a phase is read against, the one T48 and T87 turn on, is a line of the region and never a fact of the instrument: a concert, a match and a sensor-s cadence each define theirs, and two heads that read one region with its period agree on its coherence with no clock between them; structural resemblance, one origin, not a claim about the world | | [yes](../samples/yes/H10-the-period-is-a-line-of-the-region.json) | The falsifier: two heads that read one region, each with the period of its own clock, and agree on its coherence. A period each instrument brought would be the instrument's, and the heads would need a clock between them to agree. | not a derivation |
|
|
68
68
|
| H2-density-attracts | conjecture | field | A1-encounter, A6-vacuity | where reading already is, the next reading lands: over eight epochs of placement in proportion to the origins a cell already carries, the ratio between the densest tenth and the sparsest rises at every epoch and the deserts stay empty, while the same budget placed blind to density holds that ratio near two and touches three times as many cells | | [yes](../samples/yes/H2-density-attracts.json) | The falsifier: encounters that land independently of the density already there. Then the ratio does not rise with the epochs and the cells touched grow with the budget, which is what the blind placement in the yes sample shows. | not a derivation |
|
|
69
69
|
| H3-a-distant-signature-moves-a-cell-that-did-not-move | conjecture | lattice | T46-a-bound-moves-cells-no-walk-reaches, T47-a-two-pole-object | stated as a hint and never as a claim about the world: if what is is a field of floors and ceilings, a distant signature changes a cell whose own record never moved, and in two hundred trials of one cell holding one value the verdict came out both ways, so nothing stored at the cell explains the difference and what explains it is the bound the cell rests on; the resemblance is structural and never arithmetic, with no continuous amplitudes and no inequality violated by number; structural resemblance, one origin, not a claim about the world | | [yes](../samples/yes/H3-a-distant-signature-moves-a-cell-that-did-not-move.json) | The falsifier: one act that is both local and non-local — a change that travels a distance and also reaches a cell that does not rest on its bound. The two poles would then be one, and this would be a claim about the world rather than a hint. | not a derivation |
|
|
@@ -191,7 +191,7 @@ Five readings:
|
|
|
191
191
|
|
|
192
192
|
<details><summary>Every conjecture in full</summary>
|
|
193
193
|
|
|
194
|
-
Resolution times independent encounters per cell stays above a floor c; the sufficient resolution is where the product saturates. The falsifier: a
|
|
194
|
+
Resolution times independent encounters per cell stays above a floor c; the sufficient resolution is where the product saturates. The falsifier: after declaring a counting model, population, units and a fixed positive floor c before observing the sample, an admissible cell whose resolution times encounters per cell falls below c. A rising product does not refute a lower bound. A decrease refutes monotonicity and an exceedance refutes an upper bound only under their separately declared contracts. H1 remains open without the counting/refinement model and fixed parameters; the increasing sample is an experiment, not a universal bound.
|
|
195
195
|
|
|
196
196
|
Where reading already is, the next reading lands: over eight epochs of placement in proportion to the origins a cell already carries, the ratio between the densest tenth and the sparsest rises at every epoch and the deserts stay empty, while the same budget placed blind to density holds that ratio near two and touches three times as many cells. The falsifier: encounters that land independently of the density already there. Then the ratio does not rise with the epochs and the cells touched grow with the budget, which is what the blind placement in the yes sample shows.
|
|
197
197
|
|
package/docs/reference.md
CHANGED
|
@@ -361,7 +361,7 @@ flowchart BT
|
|
|
361
361
|
| D7-fork | definition | lattice | A2-meet | two incomparable bounds on one cell from two signers; rendered with both, closed only by a signature | | none | derived by the reader | not a derivation |
|
|
362
362
|
| D8-present | definition | field | A4-epoch, A3-resolution | the present is the meet of overlapping observation bands; there is no instant to certify | | [yes](../samples/yes/D8-present.json) | derived by the reader | not a derivation |
|
|
363
363
|
| D9-yield | definition | valuation | A5-origin-is-extension, D4-debit-in-bits | an origin's yield is bits it closed minus bits reopened against it, per act, over an epoch | | [yes](../samples/yes/D9-yield.json) | derived by the reader | not a derivation |
|
|
364
|
-
| H1-uncertainty | conjecture | chain | A3-resolution, A1-encounter | resolution times independent encounters per cell stays above a floor c; the sufficient resolution is where the product saturates | | [yes](../samples/yes/H1-uncertainty.json) | The falsifier: a
|
|
364
|
+
| H1-uncertainty | conjecture | chain | A3-resolution, A1-encounter | resolution times independent encounters per cell stays above a floor c; the sufficient resolution is where the product saturates | | [yes](../samples/yes/H1-uncertainty.json) | The falsifier: after declaring a counting model, population, units and a fixed positive floor c before observing the sample, an admissible cell whose resolution times encounters per cell falls below c. A rising product does not refute a lower bound. A decrease refutes monotonicity and an exceedance refutes an upper bound only under their separately declared contracts. H1 remains open without the counting/refinement model and fixed parameters; the increasing sample is an experiment, not a universal bound. | not a derivation |
|
|
365
365
|
| H10-the-period-is-a-line-of-the-region | conjecture | field | T48-epoch-is-phase, T87-the-quarter-turn | the period a phase is read against, the one T48 and T87 turn on, is a line of the region and never a fact of the instrument: a concert, a match and a sensor-s cadence each define theirs, and two heads that read one region with its period agree on its coherence with no clock between them; structural resemblance, one origin, not a claim about the world | | [yes](../samples/yes/H10-the-period-is-a-line-of-the-region.json) | The falsifier: two heads that read one region, each with the period of its own clock, and agree on its coherence. A period each instrument brought would be the instrument's, and the heads would need a clock between them to agree. | not a derivation |
|
|
366
366
|
| H2-density-attracts | conjecture | field | A1-encounter, A6-vacuity | where reading already is, the next reading lands: over eight epochs of placement in proportion to the origins a cell already carries, the ratio between the densest tenth and the sparsest rises at every epoch and the deserts stay empty, while the same budget placed blind to density holds that ratio near two and touches three times as many cells | | [yes](../samples/yes/H2-density-attracts.json) | The falsifier: encounters that land independently of the density already there. Then the ratio does not rise with the epochs and the cells touched grow with the budget, which is what the blind placement in the yes sample shows. | not a derivation |
|
|
367
367
|
| H3-a-distant-signature-moves-a-cell-that-did-not-move | conjecture | lattice | T46-a-bound-moves-cells-no-walk-reaches, T47-a-two-pole-object | stated as a hint and never as a claim about the world: if what is is a field of floors and ceilings, a distant signature changes a cell whose own record never moved, and in two hundred trials of one cell holding one value the verdict came out both ways, so nothing stored at the cell explains the difference and what explains it is the bound the cell rests on; the resemblance is structural and never arithmetic, with no continuous amplitudes and no inequality violated by number; structural resemblance, one origin, not a claim about the world | | [yes](../samples/yes/H3-a-distant-signature-moves-a-cell-that-did-not-move.json) | The falsifier: one act that is both local and non-local — a change that travels a distance and also reaches a cell that does not rest on its bound. The two poles would then be one, and this would be a claim about the world rather than a hint. | not a derivation |
|
|
@@ -493,3 +493,8 @@ flowchart BT
|
|
|
493
493
|
| (o, φ) | Origin |
|
|
494
494
|
| s | Act |
|
|
495
495
|
| state | State |
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
## Executable Lean evidence
|
|
499
|
+
|
|
500
|
+
The Lean proof reading executes the declared compiler against handed source bytes after image preparation. Its input identity includes all Lean sources, lean-toolchain, lakefile.toml, lake-manifest.json, both policy vectors and the selected reader implementation. It checks the compiler version/commit and every dependency revision and tracked worktree. A successful receipt means the declared 16 theorem audits and both negative causes passed. No dependencies are installed inside the reading. Native read/open counters distinguish execution from verified reuse. This proof place is separate from npm consumption: consumers verify portable historical readings without installing Lean. Compiler and cache preparation is reported separately, never charged to an existing proof-reader ceiling. Native reading uses the existing 25-second global limit, with the existing 65536-byte capture boundary. Changes to declared inputs reopen the reading; no prose claim closes it.
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@lapxo/obligations","version":"0.4.
|
|
1
|
+
{"name":"@lapxo/obligations","version":"0.4.4","description":"The algebra of a cell: two poles, origins with phase, eight acts.","type":"module","license":"MIT","author":"Lapxo","repository":{"type":"git","url":"git+https://github.com/Lapxo/obligations.git"},"keywords":["obligations","lattice","provenance"],"sideEffects":false,"engines":{"node":">=22.12"},"exports":{".":{"types":"./dist/lattice/index.d.ts","default":"./dist/lattice/index.js"},"./debit":{"types":"./dist/debit/debit.d.ts","default":"./dist/debit/debit.js"},"./encounter":{"types":"./dist/field/encounter.d.ts","default":"./dist/field/encounter.js"},"./field":{"types":"./dist/field/field.d.ts","default":"./dist/field/field.js"},"./forms":{"types":"./dist/lattice/forms.d.ts","default":"./dist/lattice/forms.js"},"./lattice":{"types":"./dist/lattice/lattice.d.ts","default":"./dist/lattice/lattice.js"},"./measures":{"types":"./dist/measures/index.d.ts","default":"./dist/measures/index.js"},"./packed":{"types":"./dist/debit/packed.d.ts","default":"./dist/debit/packed.js"},"./present":{"types":"./dist/field/present.d.ts","default":"./dist/field/present.js"},"./price":{"types":"./dist/lattice/price/index.d.ts","default":"./dist/lattice/price/index.js"},"./replay":{"types":"./dist/replay.d.ts","default":"./dist/replay.js"},"./shuffle":{"types":"./dist/debit/shuffle.d.ts","default":"./dist/debit/shuffle.js"},"./signatures":{"types":"./dist/field/signatures.d.ts","default":"./dist/field/signatures.js"},"./views/field":{"types":"./dist/views/field.d.ts","default":"./dist/views/field.js"},"./views/product":{"types":"./dist/views/product.d.ts","default":"./dist/views/product.js"},"./package.json":"./package.json"},"files":["dist","README.md","LICENSE","TARGET.bound","receipts.bound","docs/measures.md","samples/measures","vectors/measures","samples/yes/algebra-is-closed.json","samples/yes/field-uses-price-and-debit.json","samples/yes/three-theories-one-algebra.json","src/lattice/index.ts","src/field/motion.ts","samples/yes/installed-artifact.json","samples/no/installed-artifact.json","vectors/measures/installed-artifact.cli.json","docs/img","docs/paper.md","docs/reference.md","docs/learn/in-phase.md","docs/learn/price.md","docs/learn/signature.md","docs/learn/thermometer.md","docs/learn/withdrawal.md","vectors/laws/policy.json","vectors/laws/l7-tolerant-k.json","vectors/laws/l8-phase-defect.json","vectors/laws/l9-mix-loss.json","vectors/laws/implementation-043.json","samples/laws/cofailure-pairs/no/sample.json","samples/laws/cofailure-pairs/yes/sample.json","samples/laws/linage-rest/no/sample.json","samples/laws/linage-rest/yes/sample.json","samples/laws/lineage-ceiling/no/sample.json","samples/laws/lineage-ceiling/yes/sample.json","samples/laws/marginal-information/no/sample.json","samples/laws/marginal-information/yes/sample.json","samples/laws/semilattice/no/sample.json","samples/laws/semilattice/yes/sample.json","vectors/laws/cofailure-pairs.json","vectors/laws/cofailure-pairs.native.json","vectors/laws/coordination.json","vectors/laws/f1/finite-arithmetic.json","vectors/laws/f1/path-witness.json","vectors/laws/helly-comb.json","vectors/laws/helly-comb.lean.json","vectors/laws/linage-rest.native.json","vectors/laws/lineage-ceiling.json","vectors/laws/lineage-ceiling.native.json","vectors/laws/marginal-information.json","vectors/laws/marginal-information.native.json","vectors/laws/meet-semilattice.json","vectors/laws/meet-semilattice.native.json","vectors/laws/resolution-encounters.json","proofs/lineage-ceiling.json","proofs/cofailure-pairs.json","proofs/marginal-information.json","proofs/helly-comb.json","proofs/resolution-encounters.json","proofs/coordination.json","proofs/lean/Obligations/Cell.lean","proofs/lean/Obligations/HellyComb.lean","samples/yes/H1-uncertainty.json","samples/no/H1-uncertainty.json","vectors/laws/f1/path-witness.json","vectors/laws/f1/finite-arithmetic.json"],"scripts":{"build":"tsc --build","test":"node --import ./test/setup.ts --test --test-concurrency=2 test/*.test.ts test/measures/*.test.ts"},"devDependencies":{"@types/node":"^22","typescript":"^5.9.3"}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id":"cofailure-pairs/two-declared-observables",
|
|
3
|
+
"classification":"two descriptive measures with declared models; finite counterexamples, not a law identifying causes",
|
|
4
|
+
"oracle":{"score":"number of complete cells with Y_i=Y_j!=truth divided by declared T","reference":"Published coincidenceExcess supplies this pair rate and its independent-uniform-wrong baseline, with handed or truth-estimated error marginals. The graph uses the raw false rate, not the excess.","thetaUnit":"false-coincidence probability"},
|
|
5
|
+
"withoutTruth":{"score":"number of complete cells with Y_i=Y_j divided by T, minus sum_v q_i(v)*q_j(v)","reference":"independent-categorical@1 with fixed, normalized, handed per-origin categorical marginals over the named alphabet. No truth or estimated error marginal is read.","thetaUnit":"excess probability, in [-1,1]","absentReference":"unmeasured; never silently estimate a null from this batch","Head":"This is the candidate observable available without truth; no Head or Bound change is made, and no causal interpretation is supplied."},
|
|
6
|
+
"existingBoundary":"The published coincidenceExcess itself requires truth. Its no-truth reading stays unmeasured. This candidate is a different observable, not a relabel of that API.",
|
|
7
|
+
"frame":"T and theta are explicit and mandatory: absence is unmeasured. T counts distinct complete selected events. Missing cells are unmeasured; identical redelivery is idempotent; conflicting event/origin values refuse by name. Budget is checked before indexing rows.",
|
|
8
|
+
"graph":"An edge is score>theta. Connected components are a descriptive projection; a path of above-threshold edges does not establish a common cause or a clique.",
|
|
9
|
+
"populationRecovery":"For a handed target partition, require max score_outside < theta < min score_inside over every pair. A threshold between the two means is insufficient. The partition itself and population scores are not inferred by this rule.",
|
|
10
|
+
"finiteUncertainty":{
|
|
11
|
+
"sampling":"Optional iid-cells@1, with epsilon in (0,1], fixed frame, selected origins, epsilon and (for the non-oracle observable) null marginals fixed before observing the batch. The caller supplies these premises; the instrument does not verify them.",
|
|
12
|
+
"chain":["For each pair's Bernoulli event, Var(mean)<=1/(4T) under the declared independent cells.","Chebyshev gives P(|observed-population|>=epsilon)<=min(1,1/(4*T*epsilon^2)). Subtracting a fixed handed baseline preserves the deviation.","The existing unionBoundConfidence combines these failures for all M=m(m-1)/2 pairs; no independence between pairs is required.","Exact rational intervals score+-epsilon are clipped to their probability support. Resolve an edge only if the whole interval is strictly above or below theta. Unresolved intervals and trivial bounds stay visible.","This bounds simultaneous threshold decisions under the handed model. Causal recovery requires the separate population partition and strict gap premises."],
|
|
13
|
+
"arithmetic":"rational, no logarithmic or directed-rounding approximation; conservative Chebyshev bound, not an optimal interval",
|
|
14
|
+
"reference":"https://theory.stanford.edu/~blynn/pr/markov.html"
|
|
15
|
+
},
|
|
16
|
+
"counterexamples":[
|
|
17
|
+
{"id":"truth-relabel","claimRefuted":"the no-truth statistic identifies which coincidences are wrong","witness":"Identical response rows, truth all zero versus truth copied from a: observational output is unchanged but oracle edges differ."},
|
|
18
|
+
{"id":"shared-question","claimRefuted":"positive categorical excess proves shared error lineage","witness":"All sources answer a balanced binary question correctly. Oracle false rate is zero; a handed marginal 1/2 reference gives observed agreement 1 and excess 1/2. Conditional errors are degenerate zero, while the shared question drives unconditional agreement."},
|
|
19
|
+
{"id":"between-means","claimRefuted":"threshold between mean within and outside rates suffices","witness":"Within rates 0.8 and 0.2; outside 0.21,0.21,0,0. Theta=0.15 lies between means 0.5 and 0.105 but merges the handed groups; max outside exceeds min inside."},
|
|
20
|
+
{"id":"c-e-finite-confusion","claimRefuted":"finite exact subgroup recovery whenever shared c is comparable to private e","witness":"With c=e=1/4, the all-correct T=4 batch has probability [(3/4)^5]^4>0; it has no above-threshold oracle edges. Its confidence bound is trivial, not a certificate of no common factor."}
|
|
21
|
+
],
|
|
22
|
+
"alreadyKnown":"Cooccurrence relative to a declared null, Chebyshev concentration and union bounds are standard. The published package already has truth-conditioned coincidenceExcess and exact unionBoundConfidence.",
|
|
23
|
+
"addsHere":"The oracle-free observable and its explicit null, pair graph with threshold units, and model-separating fixtures. No c is identified, no M/3-M/4 hypothesis changes, and no algebraic act or wire field is introduced.",
|
|
24
|
+
"publication":"new candidate module only; existing signed public exports, TARGET, receipts and derived docs remain unchanged",
|
|
25
|
+
"open":["Choice of an adequate observable-context reference for Head; this marginal null can be confounded by shared questions.","No causal subgroup identification from these statistics alone.","No iid certificate, population-margin estimate, or guarantee without the declared sampling premises."]
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "coordination@1",
|
|
3
|
+
"policy": "vectors/laws/policy.json",
|
|
4
|
+
"classification": "measure with declared conditional model and exact finite enumeration",
|
|
5
|
+
"statement": "For all L selected sources under a shared activation of probability f, active outputs equal one named wrong value. Otherwise source errors are jointly independent conditional on truth with rate e, uniform among n-1 wrong labels. Then U_L=f+(1-f)*((1-e)^L+e^L/(n-1)^(L-1)), and wrong unanimity W_L=f+(1-f)*e^L/(n-1)^(L-1).",
|
|
6
|
+
"hypotheses": [
|
|
7
|
+
"n>=2, L>=1, declared f and e, fixed truth for wrong-label enumeration; symmetry permits uniform truth extension.",
|
|
8
|
+
"Activation affects every selected source, no other unmodeled activation or observation channel.",
|
|
9
|
+
"Joint conditional independence is a model declaration for inactive draws, not inferred from pairwise statistics.",
|
|
10
|
+
"If n>2 and 0<e<=1, or n=2 and 0<e<1, both private unanimity terms tend to zero, giving limit f; finite values generally exceed f."
|
|
11
|
+
],
|
|
12
|
+
"existing": "U_L is exactly the published fitUnanimityModel single-dominant-factor curve, not a new algebraic law or identification method.",
|
|
13
|
+
"adds": "Explicit equivalence of scheduled coordinated outputs and a shared-cause output distribution under this specified mixture, exact small-L enumeration, wrong-unanimity distinction and named invalid readings.",
|
|
14
|
+
"nonIdentification": "The activation schedule is itself a common variable in the joint distribution. No inference about a shared physical process, intent or causal origin follows from the same curve; c_total is a compatible model parameter, not model-free truth.",
|
|
15
|
+
"negative": [
|
|
16
|
+
"At e=0 all outputs are unanimously correct when inactive: U_L=1 for every L, so U does not identify f. W_L still equals f.",
|
|
17
|
+
"Two disjoint groups independently activated at rate f/2 do not obey the all-source single-activation curve with mass f.",
|
|
18
|
+
"Marginal error rate e without joint conditional independence does not determine private unanimity; n=2, e=1/2, identical private errors give U=1 while iid predicts 2^(1-L)."
|
|
19
|
+
],
|
|
20
|
+
"status": "declared-model measure; finite vectors, no causal identification",
|
|
21
|
+
"unmeasured": "Missing joint-independence declaration refuses curve interpretation by name; unknown mechanism remains unmeasured.",
|
|
22
|
+
"references": [
|
|
23
|
+
"https://www.stat.berkeley.edu/~aldous/206-Exch/"
|
|
24
|
+
],
|
|
25
|
+
"signatures": 0,
|
|
26
|
+
"admission": false
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "helly-comb@1",
|
|
3
|
+
"policy": "vectors/laws/policy.json",
|
|
4
|
+
"classification": "law by finite counterexample, Lean kernel checked",
|
|
5
|
+
"statement": "Pairwise intersection does not imply joint intersection for arbitrary finite nonconvex subsets (combs).",
|
|
6
|
+
"domain": "Finite carrier {0,1,2}; A={0,1}, B={1,2}, C={0,2}. Witnesses AB=1, AC=0, BC=2; ABC empty.",
|
|
7
|
+
"hypotheses": "No convexity/interval assumption. C has a hole. Does not refute the interval-only T38.",
|
|
8
|
+
"negative": "Reject promoting pairwise compatibility of these combs to a global witness.",
|
|
9
|
+
"existing": "Classical Helly theory needs convexity; finite intervals on a line are 2-Helly. The elementary nonconvex counterexample is not a new discovery.",
|
|
10
|
+
"adds": "Exact finite subset witness and compiled Lean certificate tied to Obligations candidate bytes; no new form or wire encoding.",
|
|
11
|
+
"references": [
|
|
12
|
+
"https://www.math.ucdavis.edu/~deloera/TEACHING/MATH114/convexitythy.pdf"
|
|
13
|
+
],
|
|
14
|
+
"status": "finite witness checked; no generalized theorem",
|
|
15
|
+
"signatures": 0,
|
|
16
|
+
"admission": false
|
|
17
|
+
}
|