interplane.Get Omega
Read in your language

yang

This project has not described itself yet.

Brought by drakestapleton

branch main Branches Tags History

yang / evidence / wilson_nested_face_cut.md

193 lines · 9951 bytes Raw Blame History Rendered
1# Joint nested minimum split-face cut
2
3Contract row 1 (general algorithm only); base `0cc5f925842f9b0a639bea4f7a5ca771f9a0ea71`.
4Contract SHA-256: `091b3430014619b53d55c8d2389cc6a86004b8b76838e9f9792c1ad4de1a26f2`.
5Implementation: `scripts/nested_face_cut.py`, using the unchanged integral residual
6network and certificate in `scripts/face_min_cut.py`. Dependencies are NumPy and
7the Python standard library. No sampler, neighborhood construction, or field-data
8selection is part of this implementation.
9
10## Interface and minimization class
11
12```python
13from scripts.nested_face_cut import minimum_nested
14small, big, total = minimum_nested(faces, pinned, left, right)
15```
16
17`faces` is an integer array of shape `(nfaces, 4)`. Every other input is a flat
18boolean array indexed by link, with identical shape. `left` and `right` are
19**already-forced protected free-link sets**. They are not endpoint masks to be
20expanded: no closure, growth, or boundary protection is added by this function.
21Pinned anchor bits, invalid shapes/types/indices, and infeasible constraints
22raise `ValueError`. Inputs are not modified. Returned masks are flat NumPy bool
23arrays with pins false; `total` is an exact Python integer.
24
25For each face row let E be its distinct free links. A row belongs to boundary(X)
26when E meets both X and its complement. Empty or singleton E is never split;
27repeated incidences have no extra cost, while repeated rows are distinct unit
28costs. The optimization class is precisely
29
30- `left <= small <= big`, and `big` disjoint from `right`;
31- both masks are free-link sets;
32- boundary(small) and boundary(big) are disjoint.
33
34Minimize `len(boundary(small)) + len(boundary(big))`. There are no volume,
35connectedness, regularity, time-slice, topology, or strict-inclusion constraints.
36Free links absent from all faces remain valid inputs. In particular, an isolated
37left anchor belongs to both returned masks. Unforced isolated links are false.
38The routine selects one residual-reachable optimum; it does not claim uniqueness.
39
40## Exact two-layer incidence network
41
42Use height 2 on `small`, height 1 on `big \\ small`, and height 0 outside `big`.
43Each free link has high and low nodes indicating height at least 2 and at least
441, respectively; source-side membership means true. A hard arc high(v) -> low(v)
45for **every free link, including isolates**, enforces nesting. Force every left
46high node to the source and every right low node to the sink using hard arcs.
47Pins have no terminal or incidence arcs.
48
49At each face, in each layer, create auxiliary nodes a and b. Add a -> b with
50unit capacity, and for each distinct free incident link v add v -> a and b -> v
51with hard capacity. A mixed layer forces a source-side and b sink-side, charging
52one unit. A constant layer can put both auxiliaries with its links at zero cost.
53Faces with fewer than two distinct free links need no auxiliaries or arcs.
54
55In addition add the hard arc a_high -> b_low. Together with the incidence arcs,
56this is a linear-size encoding of **high(v) -> low(w) for all free v,w in that
57face**. Thus no face contains both a height-2 link and a height-0 link. For nested
58masks, splitting both thresholds is equivalent to exactly that forbidden span.
59This is stronger than per-link nesting; that constraint alone would not prevent
60a face being charged twice. A permissible face has height range at most one.
61
62All capacities are Python integers. With m input rows choose `H = 2*m + 1`.
63Any admissible geometric labeling extends to a network cut whose cost is its
64total number of threshold splits, at most `2*m`, strictly less than H.
65Conversely any cut of cost below H respects every hard implication and has
66capacity at least its decoded geometric objective. An optimum geometric labeling
67therefore extends to an optimum network cut; a network optimum below H decodes to a geometric
68optimum. There is no floating infinity or fixed-width capacity arithmetic.
69
70### Infeasibility is decided before augmentation
71
72Intersecting left/right sets are impossible. A face meeting both left and right
73is also impossible: it is forced to contain heights 2 and 0. These are the only
74obstructions. If neither occurs, assign height 2 on left, 0 on right, and 1 on
75every other free link. No face then has span two, so this is a finite feasible
76witness. This proves both rejection and feasibility using actual free incidences;
77it does not rely on thresholding a possibly overflowed max-flow value.
78
79### Checked finite certificate
80
81The reused solver performs integral shortest-residual-path augmentation and
82extracts source reachability when the sink is unreachable. Before returning,
83the implementation recomputes both free boundaries and checks anchors, pins,
84nesting, and disjointness. The shared certificate then inspects every original
85arc: integral nonnegative flow within capacity, exact forward/reverse residual
86agreement, conservation at every internal node, and equal source outflow, sink
87inflow, cut capacity, and recomputed geometric total. These checks certify a
88feasible flow and cut of the same integer value, not an augmentation counter.
89No external flow package or approximate solver is used.
90
91## Independent tiny oracle and semantic controls
92
93`python3 scripts/nested_face_cut.py` runs the entire owned control module. Its
94oracle enumerates two boolean masks independently, rejects pairs using direct
95subset and boundary-set tests, and minimizes their direct row counts. It does
96not enumerate graph cuts or reuse the reduction's height/auxiliary constraints.
97
98The exhaustive family covers all multisets of up to two nonempty face supports
99on three links, every pin set, and every disjoint left/right labeling of the
100free links. Repeated incidences pad supports to four entries. Additional controls
101include empty graphs, all pins, isolated anchors, unforced isolates, duplicate
102four-link hyperedges with a required two-versus-two split, and a two-step chain
103whose two cuts are both necessary. That chain becomes infeasible if its supplied
104anchors are incorrectly expanded: it directly tests the no-expansion contract.
105Every oracle comparison also checks that all inputs remain unchanged.
106
107Semantic negatives distinguish classes rather than relaxing the oracle:
108
109- A direct left/right face admits two equal endpoint-separating masks if one
110 drops boundary disjointness, but both split that same face. The exported
111 optimization must reject it. Per-link nesting alone would incorrectly admit it.
112- Crossed masks on two faces can have disjoint boundaries while neither contains
113 the other. They are not themselves members of the nested class. This control
114 is not a proof of the separately supplied uncrossing theorem.
115
116Malformed input, contradictory anchors, false primal values, and fractional
117certificate flow are rejected by explicit negative controls.
118
119## Portable reproduction and receipts
120
121Run from the repository root, with Python 3 and NumPy:
122
123```bash
124export PYTHONDONTWRITEBYTECODE=1 VECLIB_MAXIMUM_THREADS=1
125export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1
126python3 scripts/nested_face_cut.py
127python3 scripts/face_min_cut.py
128```
129
130The second command is the complete existing network control module, not a
131selected subset of its cases. These controls concern finite combinatorial
132geometry only. Actual side-eight neighborhood construction, performance,
133four-mask separation, orbit measurements, and comparisons with endpoint collars
134are integration responsibilities and are not claimed by this worker.
135
136### math-check
137
138Wolfram Language query (session `PGZhjyai`, saved result in
139`/tmp/yang-local.5bzC63/nested_math.log`):
140
141```wolfram
142With[{rows=Tuples[Range[0,2],4]}, {
143 And@@Map[Function[h, With[{a=Min[h],b=Max[h]},
144 (Length[Union[Boole[Thread[h>=1]]]]==2 &&
145 Length[Union[Boole[Thread[h>=2]]]]==2)==(b-a==2)]],rows],
146 And@@Map[Function[h,
147 Count[{1,2},k_/;Min[h]<k<=Max[h]]==Max[h]-Min[h]],rows],
148 FullSimplify[2 m < 2 m+1, Element[m,Integers] && m>=0]}]
149```
150
151Recorded reply: `Out[2]= {True, True, True}`. This checks the threshold/span
152identity for four incidences and the exact hard-capacity inequality, not lattice
153physics or measured attenuation. The independent pair oracle above checks the
154implemented reduction separately.
155
156### Final focused control receipt
157
158Observed environment: Python `3.14.6`, NumPy `2.5.3`.
159Start `2026-11-23T14:32:32Z`; finish `2026-11-23T14:32:33Z`.
160Both complete module commands above exited `0`.
161Log: `/tmp/yang-local.5bzC63/nested_controls.log`.
162SHA-256: `eee02600ef3d09ded4f872a0d0b25c73a0b7d571912acba43b9d1e9080a6e686`.
163
164Portable output from the nested module:
165
166```text
167independent pair oracle: 2311 cases; 307 infeasible
168anchors not expanded; pins, isolated links, repeated rows/incidences: PASS
169semantic negatives: double-split and crossed masks are inadmissible: PASS
170invalid-input controls: 9; certificate corruption controls: PASS
171```
172
173The unchanged existing module also passed its complete exhaustive and certificate
174controls (`admissible=16`, minimum/certified flow `3`; tiny families
175`feasible=594 infeasible=378`). These are quoted control outputs, not side-eight
176measurements.
177
178Artifact SHA-256:
179
180- `scripts/nested_face_cut.py`:
181 `b38e814ac6886e863251740952c2b268fca2ec7904f2ba67e4ba5b8c4dca869a`
182- unchanged `scripts/face_min_cut.py`:
183 `28880504fb032c06995c7e7500bdc19dab2237383698d7bb785854098e30b72e`
184- `nested_math.log`:
185 `087f17376a81ebf6b2feb9e24f665949896b199ecc943a5139bd44473be60696`
186
187Consistency check found the integration caller in `scripts/local_neighborhood.py`
188using the exact four-argument interface and supplied free-link protected sets.
189No existing exported signature, duplicate solver, or caller was changed by this
190worker. The scope is only the new solver/control module and this evidence file;
191the existing residual network is unchanged. The interface is ready for the
192parent's side-eight integration. No commits, publication, key use, GPU work, or
193sampler changes were performed by this worker.