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