Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b6c0e69
docs: catalogue mixed placement constraints on maps
ViktorMikhalkin Dec 2, 2026
adec394
docs: certify mixed relation contradictions
ViktorMikhalkin Dec 2, 2026
a271471
test: check feasible placements in mixed relation systems
ViktorMikhalkin Dec 2, 2026
c5fd5f1
test: find more feasible placements in mixed relation systems
ViktorMikhalkin Dec 2, 2026
16cc534
docs: check mixed relation feasibility along two directions
ViktorMikhalkin Dec 2, 2026
fd0b1f5
test: check mixed feasibility across all equality directions
ViktorMikhalkin Dec 2, 2026
c5bb616
docs: certify remaining mixed relation contradictions
ViktorMikhalkin Dec 2, 2026
8c26fca
docs: prove mixed layouts can move between feasible points
ViktorMikhalkin Dec 2, 2026
fec3801
test: check coupled movement in mixed relation systems
ViktorMikhalkin Dec 2, 2026
f557eb6
test: certify fixed coordinates in mixed relation systems
ViktorMikhalkin Dec 2, 2026
2bfb53f
docs: prove which mixed relation coordinates can move
ViktorMikhalkin Dec 2, 2026
cedb735
refactor: combine mixed relation proofs into checked results
ViktorMikhalkin Dec 2, 2026
73d2264
test: check mixed relation feasibility on the placement grid
ViktorMikhalkin Dec 2, 2026
15964f1
docs: prove multiple grid solutions for mixed relation probes
ViktorMikhalkin Dec 2, 2026
2a245c0
refactor: share bounded position contradiction proofs
ViktorMikhalkin Dec 2, 2026
0e91644
refactor: bound exact mixed feasibility projection
ViktorMikhalkin Dec 2, 2026
73c704c
refactor: bound fixed-coordinate proof searches in the typed core
ViktorMikhalkin Dec 2, 2026
60bb0d5
refactor: bound rational motion proofs in the internal solver
ViktorMikhalkin Dec 2, 2026
2b8c4b4
refactor: classify mixed relations with checked bounded searches
ViktorMikhalkin Dec 2, 2026
1881f6a
refactor: accept source systems in the mixed relation solver
ViktorMikhalkin Dec 2, 2026
cdd6e11
refactor: bound searches for nearby integer relation solutions
ViktorMikhalkin Dec 2, 2026
580007b
refactor: bound searches for distinct integer solutions
ViktorMikhalkin Dec 2, 2026
4d62021
refactor: combine checked mixed relation statuses on the grid
ViktorMikhalkin Dec 2, 2026
08183a5
refactor: find distant integer pairs along checked rational directions
ViktorMikhalkin Dec 2, 2026
de34190
refactor: prove grid conflicts from fractional unique solutions
ViktorMikhalkin Dec 2, 2026
9da265d
refactor: prove grid conflicts from indivisible equalities
ViktorMikhalkin Dec 2, 2026
676518e
refactor: check grid conflicts from combined equalities
ViktorMikhalkin Dec 2, 2026
1c2121c
refactor: prove grid conflicts by combining pairs of equalities
ViktorMikhalkin Dec 2, 2026
0d92b63
refactor: prove parity conflicts across multiple equalities
ViktorMikhalkin Dec 2, 2026
7aaa38f
refactor: prove grid conflicts modulo small odd primes
ViktorMikhalkin Dec 2, 2026
cd702f6
refactor: remove grid proofs unused by the map corpus
ViktorMikhalkin Dec 2, 2026
8c800e1
refactor: keep mixed relation reports in an ignored cache
ViktorMikhalkin Dec 2, 2026
33894f1
refactor: remove unused mixed relation motion fallbacks
ViktorMikhalkin Dec 2, 2026
169991f
refactor: remove redundant mixed relation diagnostic searches
ViktorMikhalkin Dec 2, 2026
b58cf71
chore: merge main into loop/issue-94
ViktorMikhalkin Dec 2, 2026
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ output/
# Agent loop state (scripts/agent-loop)
.loop/

# Archived colour research inputs
.cache/colour/
# Reproducible research output (includes archived colour inputs in .cache/colour/)
.cache/
213 changes: 213 additions & 0 deletions docs/evidence/mixed-relations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
# Mixed relation research

This offline research combines difference inequalities with prospective midpoint
and equal-spacing equalities. It adds internal proof searches and independent
checkers, without changing placement callers, public exports, drawings or
acceptance bands. The complete historical reports are preserved on
`archive/mixed-relations-94` at `0d92b63f`; generated reports stay off this branch.
All counts below can be reproduced with the named scripts under
`scripts/mixed-relations/`. Raw historical data for every row is on that archive
branch; current reproductions write to git-ignored `.cache/mixed-relations/`.

## Corpus and counted patterns

`catalogue.mjs` builds 136 base axis systems and 260 prospective systems from
23 book maps (authored and benchmark-hint profiles) and 11 example variants
(each with dagre and ELK). Rank and cross axes use 16-unit gaps. Benchmark hints
add a first-node required pin and same-rank groups inferred from hand geometry;
they are research assumptions, not authored requirements. The established
comparison copy of map 2-1 omits its frame-endpoint arrow. Preferred pins remain
preferences; cross-lane widening is outside this model.

The prospective probes impose a midpoint on the first three source-order boxes
and an equal-spacing chain on the first four, where available. They use leading
edges, not centres, and do not claim to capture the author's intended groups.
The catalogue separately checks 408 output-only derived positions; deriving a
point from one placement does not fix free coordinates of that placement.

| Pattern or result | Count | Reproduction script |
| ------------------------------------------------- | --------------: | ------------------------------ |
| Book benchmark axis systems / relations | 46 / 890 | `../benchmark-relations.mjs` |
| Base systems / prospective probes | 136 / 260 | `catalogue.mjs` |
| Checked output-only derivations | 408 | `catalogue.mjs` |
| Probes retaining a smaller equality remainder | 46 | `catalogue.mjs` |
| Initial contradictions / missed by substitution | 43 / 35 | `catalogue.mjs`, `certify.mjs` |
| Additional contradictions needing multiple bounds | 8 | `certify-projection.mjs` |
| Feasible prospective systems over rationals | 209 | `variations.mjs` |
| Fixed / moving / undecided coordinate occurrences | 281 / 2,359 / 0 | `moving-coordinates.mjs` |

The additional contradictions combine two or three source bounds: cross-axis
spacing in book map 4-5 in both profiles, cross-axis spacing in examples `free`
and `free-plain`, and the rank-axis midpoint in `same-rank`, for both engines
(`certify-projection.mjs`). These are conflicts in prospective constraints,
not defects in the existing drawings.

## Current corpus measure

`bounded-grid-system.mjs` checks every result against source systems and
independently prepared rows. At 10,000 rows and 10,000 grid nodes per search,
it classifies all 396 systems with 686 independently checked integer points.
Contradictions have rational source-row certificates; determined results have
one integer point and signed fixed-coordinate proofs; underdetermined results
have two distinct integer points. Search failure remains undecided.

| Profile | Determined | Underdetermined | Contradictory | Undecided |
| --------------------- | ---------: | --------------: | ------------: | --------: |
| Book, authored | 0 | 137 | 1 | 0 |
| Book, benchmark hints | 0 | 104 | 34 | 0 |
| Examples, dagre | 2 | 50 | 8 | 0 |
| Examples, ELK | 2 | 50 | 8 | 0 |
| Total | 4 | 341 | 51 | 0 |

`bounded-grid.mjs` checks integer witnesses for all 345 rationally feasible
systems: 340 seeds are already integral and five need local search.
`bounded-grid-variation.mjs` checks integer pairs for all 341 underdetermined
systems: 303 existing pairs are integral and 38 need local construction.
These counts describe the corpus, not a general integer-solving guarantee.

## Reproduction

Run from the repository root with locked dependencies installed:

```sh
npm run build
node scripts/benchmark-relations.mjs > /tmp/relations-baseline.json
node scripts/mixed-relations/catalogue.mjs
node scripts/mixed-relations/certify.mjs
node scripts/mixed-relations/feasibility.mjs
node scripts/mixed-relations/variations.mjs
node scripts/mixed-relations/certify-projection.mjs
node scripts/mixed-relations/fixed-coordinates.mjs
node scripts/mixed-relations/moving-coordinates.mjs
node scripts/mixed-relations/classification.mjs
node scripts/mixed-relations/grid-feasibility.mjs
node scripts/mixed-relations/grid-variations.mjs
node scripts/mixed-relations/bounded-certificates.mjs
node scripts/mixed-relations/bounded-fixed.mjs
node scripts/mixed-relations/bounded-classification.mjs
node scripts/mixed-relations/bounded-system.mjs
node scripts/mixed-relations/bounded-feasibility.mjs
node scripts/mixed-relations/bounded-variation.mjs
node scripts/mixed-relations/bounded-grid.mjs
node scripts/mixed-relations/bounded-grid-variation.mjs
node scripts/mixed-relations/bounded-grid-system.mjs
node scripts/mixed-relations/ablate-grid.mjs
node scripts/mixed-relations/ablate-earlier.mjs
node scripts/mixed-relations/ablate-diagnostics.mjs
npm run verify
```

The order matters: fixed-coordinate reports read generated variation pairs;
moving-coordinate and bounded-fixed reports also read generated fixed proofs.
Each writer accepts an optional output-directory argument, except the three ablation scripts.
Prerequisite reads always use the default cache directory. For independent
replay, generate prerequisites there first, then pass a separate destination
and compare JSON byte for byte. Reports retain the 500-line limit.

Focused diagnostic checks are `node scripts/mixed-relations/test.mjs` and
all `test-*.mjs` scripts in that directory. They check original-row certificates,
feasible points, distinct pairs, fixed coordinates and tampering separately from
the proof producers. The archive contains the earlier per-pass summaries and
raw reports; no screenshots or generated proof files belong in this branch.

## Ablation of late grid fallbacks

`node scripts/mixed-relations/ablate-grid.mjs` reconstructs the pre-cleanup
modules from commit `7aaa38f1bdd4443b3b1557c1a9c3e987f95d6bd3` in an ignored
copy, disables each fallback separately, and independently checks every
returned source-system result. It also disables all seven together and runs
the current implementation. Output goes to
`.cache/mixed-relations/grid-ablation/summary.json`; no archive branch is changed.
The raw map catalogue remains on `archive/mixed-relations-94` at `0d92b63f`.

| Disabled mechanism | Determined | Underdetermined | Contradictory | Undecided | Checked integer points | Changed classifications |
| ---------------------------------- | ---------: | --------------: | ------------: | --------: | ---------------------: | ----------------------: |
| None (reference) | 4 | 341 | 51 | 0 | 686 | 0 |
| Primitive seed line | 4 | 341 | 51 | 0 | 686 | 0 |
| Fractional singleton | 4 | 341 | 51 | 0 | 686 | 0 |
| Single-row divisibility | 4 | 341 | 51 | 0 | 686 | 0 |
| Reduced-row divisibility | 4 | 341 | 51 | 0 | 686 | 0 |
| Pairwise divisibility | 4 | 341 | 51 | 0 | 686 | 0 |
| Parity elimination | 4 | 341 | 51 | 0 | 686 | 0 |
| Odd-prime elimination | 4 | 341 | 51 | 0 | 686 | 0 |
| All seven / current implementation | 4 | 341 | 51 | 0 | 686 | 0 |

All seven mechanisms and their synthetic controls were removed: none meets
the author's minimum of three changed map-corpus classifications. A failed
nearby grid search now stays undecided. This changes internal diagnostic
coverage outside this corpus, with no public export or placement caller.

## Ablation of rational and nearby-grid searches

`ablate-earlier.mjs` freezes the implementation at commit `8c800e1` in an
ignored copy and disables each search separately. It checks all returned proofs
against source systems. Its count report is
`.cache/mixed-relations/earlier-ablation/summary.json`; separate
`<variant>-changed.json` files list changed case names. Historical raw data is on
`archive/mixed-relations-94` at `0d92b63f`.

| Disabled mechanism | Determined | Underdetermined | Contradictory | Undecided | Checked integer points | Changed classifications |
| -------------------------------------- | ---------: | --------------: | ------------: | --------: | ---------------------: | ----------------------: |
| None (reference) | 4 | 341 | 51 | 0 | 686 | 0 |
| Rational feasibility | 0 | 0 | 51 | 345 | 0 | 345 |
| Contradiction projection | 0 | 341 | 0 | 55 | 682 | 55 |
| Fixed-coordinate proofs | 0 | 341 | 51 | 4 | 682 | 4 |
| Signed basis lines | 4 | 341 | 51 | 0 | 686 | 0 |
| Coupled motion cones | 4 | 331 | 51 | 10 | 666 | 10 |
| Nearby integer search | 4 | 303 | 51 | 38 | 610 | 38 |
| Search around first integer point | 4 | 341 | 51 | 0 | 686 | 0 |
| Both zero-contribution paths / current | 4 | 341 | 51 | 0 | 686 | 0 |

Signed basis lines and the extra integer-point seed were removed together with
their synthetic assertions. Their joint removal preserves every corpus status.
It changes the chosen rational motion points, so this is classification equality,
not byte-identical witness output. Outside this corpus, a search can now remain
undecided when those fallbacks previously found a result.

The same script repeats each retained-search ablation after both removals:

| Disabled retained mechanism | Determined | Underdetermined | Contradictory | Undecided | Checked integer points | Changed classifications |
| --------------------------- | ---------: | --------------: | ------------: | --------: | ---------------------: | ----------------------: |
| Rational feasibility | 0 | 0 | 51 | 345 | 0 | 345 |
| Contradiction projection | 0 | 341 | 0 | 55 | 682 | 55 |
| Fixed-coordinate proofs | 0 | 341 | 51 | 4 | 682 | 4 |
| Coupled motion cones | 4 | 0 | 51 | 341 | 4 | 341 |
| Nearby integer search | 4 | 275 | 51 | 66 | 554 | 66 |

Every retained search meets the three-system minimum. Contradiction projection
also supports the four determined systems' fixedness proofs; its contribution
is 51 contradictions plus four determined statuses, with overlapping dependencies.

## Ablation of diagnostic shortcuts

`ablate-diagnostics.mjs` restores the diagnostic classifier and shortcuts from
commit `0d92b63fd096df4cd4632115e1f770af609cc2eb` in ignored copies. It classifies
all base systems and real-map probes, checks rational proofs, then constructs
and independently checks integer witnesses using `gridWitness`. It disables
shortcuts individually and together, and repeats with current code. Counts and
changed-case lists go to `.cache/mixed-relations/diagnostic-ablation/`.
Historical raw reports remain on `archive/mixed-relations-94` at `0d92b63f`.

| Disabled diagnostic mechanism | Determined | Underdetermined | Contradictory | Undecided | Checked integer points | Changed classifications |
| ----------------------------- | ---------: | --------------: | ------------: | --------: | ---------------------: | ----------------------: |
| None (reference) | 4 | 341 | 51 | 0 | 686 | 0 |
| Greedy coordinate retention | 4 | 341 | 51 | 0 | 686 | 0 |
| Nullspace line search | 4 | 341 | 51 | 0 | 686 | 0 |
| Nullspace plane search | 4 | 341 | 51 | 0 | 686 | 0 |
| Equality-conflict shortcut | 4 | 341 | 51 | 0 | 686 | 0 |
| Single-bound conflict search | 4 | 341 | 51 | 0 | 686 | 0 |
| All five / current | 4 | 341 | 51 | 0 | 686 | 0 |

All five shortcuts and their dedicated controls were removed. Diagnostic
feasibility and contradiction reports now use the retained bounded projection
implementation. Independent certificate checkers remain. The historical split
between initial and additional contradictions is reproduced by the catalogue's
input analysis in `certify-projection.mjs`, rather than a second proof search.
Witness choices can differ from the archive; classifications remain equal.
There is no public export, placement integration or runtime performance claim.

## Known gaps

General integer solving, grid-only uniqueness and placement integration are
known gaps. Placement integration belongs to the stated-relations work after
the proposed source format is approved.
Loading
Loading