Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 140 additions & 0 deletions research/cactus-partial-query/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Exact partial acquisition on a cactus

This proof was produced by Nick Petalas. Apache-2.0.

## Model and theorem

Let G=(V,E) be a finite simple undirected cactus graph. Distinct simple
cycles may meet at vertices, but each edge is in at most one simple cycle.
Disconnected graphs and isolated vertices are allowed. An edge e={u,v}
offers the binary query q_e=x_u+x_v, with nonnegative acquisition price c_e.
Each source x_v is arbitrary and unknown to the decoder. It sees only
purchased replies. A purchased set S pays sum_(e in S) c_e once;
linear reconstruction of the requested targets is free in this relaxation.

Write B for the vertex-by-edge binary incidence matrix. Let the columns of
T be any finite list of requested coefficient vectors, including zero or
dependent columns. Thus the target responses are T^t x. They are feasible
exactly when each column has even parity on every connected component.
The statement holds coordinatewise for source fields of every positive
binary row width. This is not a price for their physical realization.

Choose any spanning forest F and any coefficient matrix R with BR=T.
For an edge e let r_e denote row e of R. Let C range over the simple
cycles and let E_br be the bridges. Then the exact minimum acquisition bill is

```text
OPT(T) = sum_(e in E_br, r_e != 0) c_e
+ sum_C [sum_(e in C) c_e - max_z sum_(e in C, r_e = z) c_e]. (1)
```

Here z ranges over binary rows of length equal to the number of targets.
It suffices to consider labels r_e actually appearing on C. In particular,
there is no enumeration of target superspaces or a bounded-codimension
hypothesis. The expression is independent of the chosen solution R.

For each cycle choose a maximizing label z_C. Keep bridge e exactly when
r_e is nonzero. On C keep e exactly when r_e+z_C is nonzero. These edges
and the modified coefficient rows give an attaining reconstruction. The
constructor can choose an attaining set that is a forest.

## Incidence solutions and the lower bound

For any graph, the columns of a spanning forest are independent. A nonempty
edge subset of a forest has a leaf of degree one in its nontrivial support,
so its incidence sum cannot be zero. Repeated leaf elimination also represents
every vertex vector having even parity on each component. This proves the
feasibility criterion and rank B=|V|-number of components.

Deleting one edge from each simple cycle of a cactus leaves a spanning forest.
Connectivity survives each deletion along the remainder of that cycle. No
cycle survives, because every surviving simple cycle would have been one of
the cycles just cut. Consequently the number of simple cycles is
|E|-|V|+number of components.

The incidence vector gamma_C of a cycle is in ker B. These vectors have
disjoint nonempty edge supports, hence are independent. The dimension
calculation shows that they form a basis of ker B. Thus every solution D of
BD=T has, independently for each target column, a unique cycle-basis expansion
relative to R. In row form this says

```text
D_e = r_e on bridges,
D_e = r_e + z_C on the edges of cycle C. (2)
```

There is no interaction between the choices z_C, including when two cycles
share a vertex. This is where the cactus hypothesis is used.

If S purchases enough queries, choose one reconstruction of every target
using S. Its coefficient matrix D has zero rows outside S. Since prices are
nonnegative,

```text
cost(S) >= sum_(e: D_e != 0) c_e.
```

Conversely, the support of any solution D is a feasible purchased set with
that support bill. The optimum is therefore exactly the minimum support bill
among all solutions of BD=T. By (2), a bridge's contribution is fixed, while
a cycle with shift z pays its total price minus the price of the rows equal
to z. Independent cycle minimization gives (1). An absent label saves zero;
a present label has nonnegative saved price, so one present label maximizes.
This proves the lower bound, including zero prices and an empty target list.

## Construction, certificate and independence of choices

Start with a spanning forest and give all nontree edges coefficient zero.
At each vertex pack its entries in the target columns into a binary row.
Process forest vertices from leaves to roots. Put the current vertex row on
its parent edge and add it to its parent's row. The residual at a root is
exactly the target parity on its connected component. All residuals vanish
if and only if T is feasible, and the resulting R satisfies BR=T.

Construct each fundamental cycle from a nontree edge and its forest path.
In a cactus these are precisely the edge-disjoint simple cycles. Group the
rows on each cycle by equality, total the prices in every group, choose a
maximum-price group, and apply (2). The displayed reconstruction proves
attainment. At least one edge disappears on each cycle because the chosen
label appears there, so the selected support is a forest. No cycles outside
this list exist.

The certificate records R, the cycle edge lists, each shift and saved price,
the modified rows, selected edges and bill. The checker reconstructs the
forest solution and cycles, checks every row relation, compares the chosen
saving against every present bucket, and verifies BD=T directly. Its
optimality implication is the proof above. It does not invoke the optimizer
or solve another acquisition problem. The decomposition routines are shared;
the finite subset oracle instead uses literal XOR spans and an independent
simple-cycle enumeration.

Replacing R changes each cycle's rows by a common translation, which merely
permutes its bucket labels; bridge rows do not change. Formula (1) is therefore
independent of R. Different spanning forests have the same consequence.
No assumption about a particular target basis or its rank is required.

## Small improvement and boundary

Take the triangle 01,12,02, with prices 4,3,2, and request x_0+x_1.
Its cheapest whole-span basis consists of edges 12 and 02 at price five;
both answers are needed to reconstruct this target from that basis.
The exact partial-target optimum is the direct edge 01 at price four.
With both independent triangle targets requested, formula (1) instead pays
five, as it should. These numbers are enumerated by the new verifier.

A general graph still has a cycle-space parametrization, but overlapping
cycle edges couple its shifts. Formula (1) is not asserted there. This
result does not optimize reconstruction XORs, storage, chronology, source
mutation, nonlinear observations, native frames, delivery or restoration.
A favorable acquisition bill alone supplies no complete recursive invoice.

## Credit

Ali Romman's [PR #5791](https://github.com/CrocSwap/integer-mult-bounds/pull/5791)
poses the partial-target boundary of whole-span binary query acquisition.
The new step here is the exact arbitrary-target cactus formula and its
certificate. Classical graphic cycle spaces, parity, linear reconstruction
and weighted grouping retain their usual credit. No literature-wide priority
for these ingredients or their general optimization setting is claimed.
Nick Petalas #5878 and #6654 are related general-pool results, not premises
or algorithms used in this proof.
159 changes: 159 additions & 0 deletions research/cactus-partial-query/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Exact partial-query acquisition on a cactus graph

This contribution was produced by Nick Petalas. Apache-2.0.

Claim type: scoped written proof with exact finite corroboration and a bounded
constructive optimizer. For binary edge queries on every finite simple cactus
graph, arbitrary target subspaces have an exact acquisition optimum. Neither
target rank nor target codimension needs to be small. No new kappa is claimed.

Give edge e={u,v} the query x_u+x_v and nonnegative price c_e. The decoder
reconstructs requested parities only from purchased replies. Choose any matrix
R of edge coefficients reconstructing all requested targets, with row r_e.
Then

```text
OPT = sum_(bridge e with r_e != 0) c_e
+ sum_(cycle C) [sum_(e in C) c_e
- max_z sum_(e in C with r_e = z) c_e].
```

On each cycle remove the maximum-price bucket of equal rows and translate
all its coefficient rows by that bucket's label. Keep the nonzero rows.
This gives an attaining forest and every reconstruction expression.
[PROOF.md](PROOF.md) proves the lower bound, construction, feasibility test
and independence from the initial coefficient solution. Its cycles may share
vertices, but must be edge-disjoint.

For triangle queries 01,12,02 at prices 4,3,2 and target x_0+x_1, the exact
partial-target bill is four. Pruning the cheapest whole-span basis pays five.
The new result supplies a closed optimum throughout this structured pool,
rather than another bound or a search through target superspaces.

## Reproduce and use

From the repository root, CPython 3.12 and its standard library:

```sh
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/cactus-partial-query/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/cactus-partial-query/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/cactus-partial-query
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/cactus-partial-query --check-source-history
```

Substitute another CPython 3.12 path on another machine. Run the publication
preflight after committing. Both registered commands have 120-second limits.
They print `PASS_CACTUS_PARTIAL_QUERY` with a generated receipt binding the
SHA256 of all seven package files, and write nothing into the checkout.
No receipt is handwritten. Direct verification needs neither Git nor network.

The optimizer accepts this JSON problem, where vertex bit i is coefficient i:

```json
{"vertices":3,"edges":[[0,1],[1,2],[0,2]],"costs":[4,3,2],"targets":[3]}
```

Save it outside the checkout, then run:

```sh
python3.12 -I -B research/cactus-partial-query/optimizer.py problem.json > certificate.json
python3.12 -I -B research/cactus-partial-query/optimizer.py problem.json --check certificate.json
```

The checker compares all cycle savings and reconstructs every target; it
does not invoke the optimizer. Its graph and base-coefficient routines are
shared with the producer. The independent exhaustive oracle shares neither
routine.

## Exact finite evidence

The verifier enumerates all 1,099 labelled simple graphs on one through five
vertices. A separate edge-subset simple-cycle test finds 691 cacti and rejects
408 noncacti through the optimizer. For every cactus it enumerates every
subspace of its edge-query span, producing 28,305 target bases across graphs.
Each is checked at three explicitly defined integer-price patterns, including
zero prices. All 84,915 optimum comparisons agree with a direct purchased-
subset/XOR-span oracle. The oracle enumerates 39,267 purchased subsets across
graph/price cases. Counts include repeated mathematical spaces in different
labelled graphs or price cases, as stated.

Every optimum certificate and every binary source assignment on its graph
are checked. The 367 cycle occurrences include two cycles sharing a vertex.
Thirty-three larger fixtures include 32 triangles sharing one hub, dependent
and zero targets, and a 128-vertex forest with 128 target columns and prices
10^12. Ten semantic/certificate controls and fourteen invalid-input controls
reject. Normal and optimized Python run the identical explicit checks.
These finite checks corroborate the written theorem; they do not establish
its arbitrary-size quantifiers by extrapolation.

## Scope, provenance and implementation bounds

Ali Romman's [PR #5791](https://github.com/CrocSwap/integer-mult-bounds/pull/5791)
supplies the whole-span acquisition interface and partial-target question.
Its greedy theorem and scientific executable are not replayed. Classical
incidence kernels, cycle spaces, parity and weighted grouping retain credit.
The new step is formula (1) for arbitrary cactus target spaces, its attaining
reconstruction and certificate. Literature-wide priority is unclaimed.
Nick Petalas #5878 and #6654 supply related general-pool approximation and
small-codimension results; their theorems, constructions and code are not used.
Predecessor credit lines and frozen evidence are unchanged.

Canonical base is e54523517d0f03e58352e647c403a5af3e525a57, priority revision 8.
The [advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19601550)
states this scope. SOURCES.json pins historical provenance, including #5791's
guide. It is not a runtime import. The selected-baseline binding orientation
passed, with selected #7000 at 0.00363005817; historical priority headlines do
not supersede that record. TASK.json records the changed joint-query-controller
scope and the structured next questions. The card's physical acceptance gate
is not met by this algebraic side result.

Live overlap checked open PRs, this account's recent PRs, handoffs, active
Discussions, merged-PR searches and all-main README searches. The cached helper
covered 846 open PRs and 7,482 Discussion records with complete pagination;
its local scan covered 207 of 10,178 note paths. Targeted Git searches cover
omitted main README text, rather than all historical diffs or unpublished work.
No matching cactus acquisition result was found in that coverage. This is not
a novelty certificate.

The theorem permits real nonnegative prices. The executable restricts prices
to integers in 0..10^12, vertices to 1..128, edges to at most 192 and target
columns to at most 128. Edges have canonical distinct endpoints; duplicates,
loops, noncacti, out-of-range values and infeasible targets reject explicitly.
The implementation is deterministic and polynomial in these input sizes,
with no enumeration of target superspaces. The certificate checker can use
quadratic work in a cycle length to compare every bucket.

Functions stay below 60 physical lines. Loops inherit the fixed input bounds;
the exhaustive graph domain has at most ten possible edges and 1,024 subsets.
The main oracle processes at most 67 target spaces per graph, at most 64
purchases per cactus and at most 32 source assignments per optimum. Inputs and
certificates are capped at 128 KiB; each of seven receipt files at 256 KiB.
There is no recursion, subprocess, network access or code generation in the
scientific checker. Standard-library dispatch and one fixed sibling import
have explicit targets. A local price-key callback only compares bounded rows.

Power of Ten rule 3 deviation: CPython allocates managed integers and
containers during this bounded one-shot computation. The caps above bound
live graph, coefficient, subspace and oracle state. No fixed-allocation or
persistent-service guarantee is claimed. Explicit contracts survive -O.
Warning-strict normal and optimized execution and in-memory syntax/function-
size inspection supply the available diagnostics. No external static analyzer
or proof assistant is required or claimed.

Acquisition prices exclude reconstruction XORs, physical delivery, source
access, chronology, dirty restoration, frames, ownership, storage, precision,
tape costs and a complete paid/productive supplier invoice. No actual native
caller, selected scientific cold replay, Lean, Docker, new kappa, selected-
frontier change or complete multiplication theorem is supplied. Independent
human and formal proof-kernel review are unclaimed. General graphs with
shared cycle edges are outside the theorem.

## Open next questions

- Can one actual native caller supply a cactus query pool whose complete
partial-target bill improves? First export its queries, targets and prices,
then charge reconstruction, delivery, storage and restoration. The missing
physical caller and tariffs prevent a supplier consequence.
- Can the coupled coefficient shifts be optimized for one theta graph? Start
with its three path coefficient rows. Shared edges couple the cycles, so
the independent-bucket formula supplies no answer there.
24 changes: 24 additions & 0 deletions research/cactus-partial-query/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schema_version": 1,
"base_commit": "e54523517d0f03e58352e647c403a5af3e525a57",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8",
"sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
},
{
"path": "docs/research/binary-query-basis.md",
"usage": "provenance",
"git_blob": "291bce46071c77b76b17ddfc3571df676b95c529",
"sha256": "cd60665849910830381a6a5b0c8f0d10b4bc9e54d50286eeacaf200fffd6f660"
}
]
}
Loading
Loading