Skip to content

Commit 6c269fe

Browse files
committed
feat: tighten domain diagnostics and Gaussian inputs
1 parent bbdfa5c commit 6c269fe

14 files changed

Lines changed: 155 additions & 68 deletions

File tree

benchmarks/tooling/codex_visibility.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,7 @@ def _codex_arguments(
463463
tool_mode: ToolMode,
464464
) -> tuple[str, ...]:
465465
arguments = [
466-
"-a",
467-
"never",
466+
"--approve-for-me",
468467
"exec",
469468
"--ephemeral",
470469
"--skip-git-repo-check",

docs/reference/capabilities/graphs/graph-distance-matrix.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ verification of the distance claim.
4343

4444
## Independent verification
4545

46-
`graph.distance_matrix.verify` consumes one stored producer result and can
47-
promote that exact matrix to `VERIFIED`. The operator-authorized checker uses
46+
`graph.distance_matrix.verify` consumes the exact producer input plus one complete
47+
typed candidate inline and can promote that matrix to `VERIFIED`. The operator-authorized checker uses
4848
only Python standard-library adjacency sets, queues, and integer distances. It
4949
does not import NetworkX or the producer package.
5050

@@ -55,9 +55,9 @@ checks. Acceptance still requires an exhaustive breadth-first traversal from
5555
every source and exact comparison of every finite distance and unreachable
5656
`null`.
5757

58-
The verification record is bound to the exact graph input artifact, matrix
59-
result artifact, schemas, semantics, checker source digest, witness format, and
60-
provider runtime. Rejection, timeout, cancellation, unavailable runtime, or
58+
The verification record is bound to the canonical graph input and matrix
59+
candidate digests, semantics, checker source digest, and provider runtime.
60+
Rejection, timeout, cancellation, unavailable runtime, or
6161
checker error remains `UNKNOWN` and cannot produce `VERIFIED`.
6262

6363
## Public composition evidence

docs/reference/capabilities/graphs/graph-maximum-matching.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
matching together with a Tutte–Berge barrier certificate. The producer remains
77
`COMPUTED`. An operator-authorized
88
`graph.invariant.maximum_matching.verify` capability may promote the exact
9-
stored result to `VERIFIED` only after independent clean-process replay.
9+
submitted `{input, candidate}` claim to `VERIFIED` only after independent
10+
clean-process replay.
1011

1112
## Exact claim and scope
1213

1314
The verifier checks one claim:
1415

15-
> The stored witness edges form a maximum-cardinality matching of the exact
16-
> stored finite simple undirected graph.
16+
> The submitted witness edges form a maximum-cardinality matching of the exact
17+
> submitted finite simple undirected graph.
1718
18-
The claim is bound to the producer input artifact, result artifact, graph
19-
semantics, result schema version, checker identity, and checker provider
20-
runtime. It does not certify a graph supplied directly by the caller, a
21-
different matching, or any theorem that uses the matching as an intermediate
22-
fact.
19+
The claim is bound to canonical producer-input and candidate digests, graph
20+
semantics, checker identity, and checker provider runtime. It does not certify
21+
a different graph or matching, or any theorem that uses the matching as an
22+
intermediate fact.
2323

2424
The producer accepts at most 64 vertices and 2,016 edges through a
2525
matching-specific graph contract. Other graph invariants retain their own

docs/reference/capabilities/graphs/graph-metric-verification.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
`graph.invariant.radius.compute` version `2` retain their existing producer
77
contracts and `COMPUTED` assurance. Operator-authorized
88
`graph.invariant.diameter.verify` and `graph.invariant.radius.verify`
9-
capabilities can promote one exact stored result to `VERIFIED` after
9+
capabilities can promote one exact submitted `{input, candidate}` claim to `VERIFIED` after
1010
independent all-sources breadth-first replay.
1111

1212
## Exact claims and conventions
1313

14-
Each verifier checks one stored producer result against the exact stored finite
14+
Each verifier checks one complete typed candidate against the exact submitted finite
1515
simple undirected graph:
1616

1717
- for a nonempty connected graph, diameter is the maximum vertex eccentricity
@@ -21,8 +21,8 @@ simple undirected graph:
2121
and returns `status = NOT_APPLICABLE`, `connected = false`, and
2222
`exactness = NOT_APPLICABLE`.
2323

24-
The claim is bound to the input artifact, result artifact, graph semantics,
25-
result schema, checker identity, checker source digest, and provider runtime.
24+
The claim is bound to canonical input and candidate digests, graph semantics,
25+
checker identity, checker source digest, and provider runtime.
2626
The verifier does not certify a directly supplied graph, an unbounded graph
2727
family, or a theorem that later uses the metric.
2828

src/jacobian/adapters/mcp/guidance.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,41 @@
33
from __future__ import annotations
44

55
SERVER_DESCRIPTION = (
6-
"Use atomic exact and symbolic mathematics, with separate checker operations "
7-
"when independent verification is needed."
6+
"Search and run installed Jacobian exact-math operations, with separate checker "
7+
"operations for independent verification."
88
)
99

1010
SERVER_INSTRUCTIONS = (
11-
"Use Jacobian whenever a task may benefit from a specialized exact mathematical "
12-
"operation, including matrix or polynomial computation. This applies even when the "
13-
"user does not name Jacobian and shell code could also calculate the result. Unless "
11+
"Search and run the locally installed Jacobian toolbox whenever a task may benefit "
12+
"from exact computation, symbolic transformation, finite search, formal inspection, "
13+
"or independent checking, even when the user does not name Jacobian or shell code "
14+
"could also calculate the result. math.find is the authoritative local inventory; "
15+
"internet search cannot show which operations are available in this runtime. Unless "
1416
"an exact installed capability ID and its typed contract are already available, call "
15-
"math.find with a plain-language desired local mathematical outcome; no capability "
16-
"ID is required. math.run may execute a known contract directly. "
17+
"math.find with a plain-language desired local mathematical outcome. math.run may "
18+
"execute a known contract directly. "
1719
"For declaration queries explicitly targeting Jacobian's pinned CORE or MATHLIB "
1820
"environment, use the pinned mathematical operation; do not substitute repository "
1921
"search, cached Mathlib files, or a local Lean process because they may not match "
20-
"that server environment. Project-local Lean "
21-
"declarations are outside the server catalog and may require project-local tools. "
22-
"Other uses include symbolic transformation, structural analysis, examples or "
23-
"counterexamples, bounded search, Lean/Mathlib declaration search or formal-"
24-
"environment inspection, and requested independent verification. "
25-
"Do not report that no specialized mathematical operation is available without "
26-
"checking math.find. When independent checking is requested, multiple calculations "
27-
"or programs authored by the same model are not independent checker evidence. "
28-
"Search again whenever the objective or available evidence changes. "
22+
"that server environment. Project-local Lean declarations are outside the server "
23+
"catalog and may require project-local tools. Repeating the same lookup against an "
24+
"unchanged catalog returns the same operation facts; math.find is operation lookup, "
25+
"not confirmation. Merely restating an accepted value without new evidence is not a "
26+
"mathematical-tool use case. "
2927
"The model owns representation, decomposition, composition, iteration, verification "
30-
"timing, and stopping. Results keep execution status, mathematical conclusion, "
31-
"and verification record separate. No descriptor match, timeout, "
32-
"bounded or exhausted search, or failure to find a witness is a mathematical "
33-
"conclusion. Only a result with a local verification record URI is "
34-
"verified. A verification record for an input, premise, factorization, or related "
35-
"artifact does not verify a model-derived conclusion; the record must be bound to "
36-
"the exact final claim."
28+
"timing, and stopping. An operation match, timeout, incomplete search, or failure to "
29+
"find a witness is not a mathematical conclusion. Independent checking uses a "
30+
"separate checker operation; model-authored duplicate calculations are not independent "
31+
"evidence. Only a result with a local verification record URI is verified. A record "
32+
"for an input, premise, factorization, or related artifact does not verify a model-"
33+
"derived conclusion; the record must be bound to the exact final claim."
3734
)
3835

3936
MATH_FIND_DESCRIPTION = """\
40-
Search or inspect installed math tools by desired outcome or exact ID. Use when a
41-
task may benefit from exact computation, search, structural analysis, or a separate
42-
checker tool—even if shell code could also calculate the answer.
37+
Search or inspect locally installed Jacobian math tools by desired outcome or exact ID.
38+
This is the authoritative runtime inventory; internet search is not. Use when a task
39+
may benefit from exact computation, search, structural analysis, or a separate checker
40+
tool—even if shell code could also calculate the answer.
4341
4442
Forms:
4543
- `request.op="search"`: plain-language mathematical outcome (compact cards).
@@ -58,15 +56,17 @@
5856
"""
5957

6058
MATH_RUN_DESCRIPTION = """\
61-
Run one installed math tool by ID with its typed `payload`. Read the mathematical
62-
value in `output` first, then execution status. If the payload shape is unknown,
63-
inspect the exact operation with math.find, then copy and adapt one of its
64-
`invocation_examples`. Do not call math.run with an empty `payload` merely to
65-
discover required fields; the inspect result is the authoritative contract.
59+
Run one installed math tool by ID with its typed `payload`. Check execution status
60+
before treating `output` as mathematical evidence. For a completed run, interpret the
61+
operation-owned result fields and any `verification_record_uri` to determine exactly
62+
what the run established. If the payload shape is unknown, inspect the exact operation
63+
with math.find and copy its `invocation_examples`. Do not call math.run with an empty
64+
`payload` merely to discover required fields; the inspect result is the authoritative
65+
contract.
6666
6767
Ordinary tools return calculations. Independent checking uses a separate checker
6868
tool ID (for example `polynomial.identity.verify`), not a switch on the producer.
69-
Failed or incomplete runs are not mathematical conclusions.
69+
Failed, cancelled, timed-out, or incomplete runs are not mathematical conclusions.
7070
7171
Examples:
7272
- `{"capability_id":"integer.compute.gcd","payload":{"left":"84","right":"30"}}`

src/jacobian/domains/certified_snf/checkers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
verification_title="Verify a transformation-certified Smith normal form",
2020
verification_description=(
2121
"Independently verify the full Smith diagonal and both unimodular "
22-
"basis transformations against the exact stored integer matrix."
22+
"basis transformations against the exact submitted integer matrix input."
2323
),
2424
verification_tags=(
2525
"verification",

src/jacobian/domains/graph_optimization/checkers.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
verification_title="Verify a Hamiltonian-path decision",
3030
verification_description=(
3131
"Independently verify a spanning path witness or exhaust the bounded "
32-
"finite path state space for one stored negative decision."
32+
"finite path state space for one submitted negative decision."
3333
),
3434
verification_tags=(
3535
"verification",
@@ -52,8 +52,8 @@
5252
verification_capability_id="graph.induced_tree.maximum.verify",
5353
verification_title="Verify a maximum induced tree result",
5454
verification_description=(
55-
"Independently exhaust bounded vertex subsets to verify one stored "
56-
"exact maximum induced-tree result and its graph binding."
55+
"Independently exhaust bounded vertex subsets to verify one submitted "
56+
"exact maximum induced-tree result against its exact graph input."
5757
),
5858
verification_tags=("verification", "exact", "graph", "induced-tree"),
5959
),
@@ -73,7 +73,7 @@
7373
verification_description=(
7474
"Independently verify source connectivity, spanning-tree feasibility, "
7575
"exact total weight, and every fundamental-cycle non-improvement check "
76-
"for one stored exact rational weighted-graph result."
76+
"for one submitted exact rational weighted-graph result."
7777
),
7878
verification_tags=(
7979
"verification",
@@ -98,7 +98,7 @@
9898
verification_capability_id="graph.invariant.diameter.verify",
9999
verification_title="Verify an exact graph diameter",
100100
verification_description=(
101-
"Independently replay all-source shortest paths to verify one stored "
101+
"Independently replay all-source shortest paths to verify one submitted "
102102
"diameter result, including its disconnected-graph convention."
103103
),
104104
verification_tags=(
@@ -123,7 +123,7 @@
123123
verification_capability_id="graph.invariant.radius.verify",
124124
verification_title="Verify an exact graph radius",
125125
verification_description=(
126-
"Independently replay all-source shortest paths to verify one stored "
126+
"Independently replay all-source shortest paths to verify one submitted "
127127
"radius result, including its disconnected-graph convention."
128128
),
129129
verification_tags=(
@@ -149,7 +149,7 @@
149149
verification_title="Verify an exact graph distance matrix",
150150
verification_description=(
151151
"Independently replay every source shortest-path traversal to verify "
152-
"one stored all-pairs distance matrix, including unreachable pairs."
152+
"one submitted all-pairs distance matrix, including unreachable pairs."
153153
),
154154
verification_tags=(
155155
"verification",
@@ -175,7 +175,7 @@
175175
verification_title="Verify a maximum matching result",
176176
verification_description=(
177177
"Independently verify matching feasibility and a Tutte-Berge upper-bound "
178-
"certificate for one exact stored finite graph."
178+
"certificate submitted with its exact finite graph input."
179179
),
180180
verification_tags=(
181181
"verification",

src/jacobian/domains/number_theory/checkers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
verification_title="Verify an integer prime factorization",
2626
verification_description=(
2727
"Independently verify the complete canonical prime-power "
28-
"factorization of one stored nonzero integer result."
28+
"factorization submitted with its exact nonzero integer input."
2929
),
3030
verification_tags=(
3131
"verification",
@@ -49,8 +49,9 @@
4949
verification_capability_id="integer.powerful.verify",
5050
verification_title="Verify a powerful-number decision",
5151
verification_description=(
52-
"Independently verify one stored powerful-number decision, its "
53-
"complete canonical factor witness, and every violating prime."
52+
"Independently verify one submitted powerful-number decision against "
53+
"its exact integer input, complete canonical factor witness, and every "
54+
"violating prime."
5455
),
5556
verification_tags=(
5657
"verification",

src/jacobian/domains/probability/bundle.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
"""Finite-probability domain bundle."""
22

3+
from dataclasses import replace
4+
from typing import Any
5+
36
from jacobian.contracts.capabilities import CapabilityDiagnostic
47
from jacobian.domain_bundles import DomainBundle
58
from jacobian.domains.probability.checkers import PROBABILITY_EXACT_REPLAY_CHECKERS
9+
from jacobian.domains.probability.gaussian_inputs import (
10+
CanonicalGaussianPolynomialMomentRequest,
11+
)
612
from jacobian.domains.probability.operations import FINITE_PROBABILITY_CAPABILITIES
713
from jacobian.operations import DomainDiagnostics, DomainSemantics
814
from jacobian.provider_runtime import PYTHON_FLINT_VERSION
915
from jacobian.providers.flint_runtime import python_flint_probability_provider_runtime
1016

1117

18+
def _operation_with_canonical_gaussian_input(operation: Any) -> Any:
19+
if operation.spec.operation_id != "probability.gaussian_polynomial.moment.compute":
20+
return operation
21+
return replace(
22+
operation,
23+
spec=replace(
24+
operation.spec,
25+
request_type=CanonicalGaussianPolynomialMomentRequest,
26+
),
27+
)
28+
29+
1230
def build_finite_probability_bundle() -> DomainBundle:
1331
"""Build this domain-owned installation unit explicitly."""
1432
return DomainBundle(
@@ -31,7 +49,10 @@ def build_finite_probability_bundle() -> DomainBundle:
3149
),
3250
provider_runtime=python_flint_probability_provider_runtime(),
3351
backend_version=f"python-flint-{PYTHON_FLINT_VERSION}",
34-
capabilities=FINITE_PROBABILITY_CAPABILITIES,
52+
capabilities=tuple(
53+
_operation_with_canonical_gaussian_input(operation)
54+
for operation in FINITE_PROBABILITY_CAPABILITIES
55+
),
3556
diagnostics=DomainDiagnostics(
3657
invalid_request=CapabilityDiagnostic(
3758
code="INVALID_FINITE_PROBABILITY_REQUEST",

src/jacobian/polynomials/installation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from jacobian.contracts.checkers import EvidenceKind
1010
from jacobian.contracts.evidence import CertificateEnvelope, WitnessEnvelope
1111
from jacobian.contracts.polynomials import (
12+
MAX_POLYNOMIAL_VARIABLES,
1213
PolynomialIdentityClaim,
1314
PolynomialInjectivityClaim,
1415
PolynomialJacobian,
@@ -71,7 +72,7 @@ def install_polynomial_capabilities(
7172
),
7273
"domain": "QQ",
7374
"map_shape": "square",
74-
"maximum_dimension": 4,
75+
"maximum_dimension": MAX_POLYNOMIAL_VARIABLES,
7576
"maximum_terms_per_coordinate": 1024,
7677
"maximum_exponent": 32,
7778
"maximum_derived_exponent": 127,

0 commit comments

Comments
 (0)