"""Reproduce the exact85.17–85.26 finite partition diagram."""
from pathlib import Path
SVG='<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="1020" viewBox="0 0 1280 1020" role="img" aria-labelledby="fp85-title fp85-desc">\n  <title id="fp85-title">Finite central partition extraction: repair all cells and select one for every target</title>\n  <desc id="fp85-desc">A schematic of Theorem 85.7, not a numerical core realization. An actual finite projection is cut by represented smaller-center projections. The exact pinching identity measures its added commutator cost. A common matrix deletion multiplies traces by n squared. Feasible trimming gives integer dimensions on each positive cell. The total trace-weighted bound chooses one cell for all ambient unitary targets. The simultaneous small pinching estimate remains an input.</desc>\n  <rect width="1280" height="1020" fill="#f4f7fb" />\n  <text x="38" y="42" font-family="Helvetica" fill="#14263c" font-size="28" font-weight="bold">Repair every central cell, then select one cell for all targets</text>\n  <text x="38" y="73" font-family="Helvetica" fill="#14263c" font-size="18">Actual core S in R; A = &lt;N,e&gt; in B = &lt;M,e&gt;. Physical center Z(S) and its represented lift are distinct.</text>\n  <rect x="28" y="94" width="1224" height="144" rx="14" fill="#ffffff" stroke="#aab8c9" stroke-width="2" />\n  <text x="48" y="127" font-family="Helvetica" fill="#14263c" font-size="23" font-weight="bold">1. Finite projection and a scalar step from below</text>\n  <text x="48" y="160" font-family="Helvetica" fill="#14263c" font-size="21">zeta = C_A(p), c = Tr(p) &gt; 0; h = sum_i theta_i z_i &lt;= zeta</text>\n  <text x="48" y="192" font-family="Helvetica" fill="#14263c" font-size="21">t = tau(h) &gt; 0; rho = (c - t)/t</text>\n  <text x="48" y="222" font-family="Helvetica" fill="#14263c" font-size="18">Finite central partition z_0 + z_1 + ... + z_r = 1; p_i = p z-hat_i. (85.18)</text>\n  <rect x="828" y="145" width="94" height="49" rx="7" fill="#fff0d6" stroke="#b7791f" stroke-width="2" />\n  <text x="845" y="176" font-family="Helvetica" fill="#14263c" font-size="21">z_0</text>\n  <rect x="933" y="145" width="94" height="49" rx="7" fill="#e5f0fa" stroke="#2563a0" stroke-width="2" />\n  <text x="950" y="176" font-family="Helvetica" fill="#14263c" font-size="21">z_1</text>\n  <text x="1038" y="177" font-family="Helvetica" fill="#14263c" font-size="23" font-weight="bold">...</text>\n  <rect x="1090" y="145" width="94" height="49" rx="7" fill="#e5f0fa" stroke="#2563a0" stroke-width="2" />\n  <text x="1107" y="176" font-family="Helvetica" fill="#14263c" font-size="21">z_r</text>\n  <text x="831" y="221" font-family="Helvetica" fill="#14263c" font-size="18">Zero cell includes discarded tails.</text>\n  <path d="M640,240 L640,264" stroke="#334155" stroke-width="3" />\n  <polygon points="631,254 649,254 640,264" fill="#334155" />\n  <rect x="28" y="274" width="1224" height="181" rx="14" fill="#ffffff" stroke="#aab8c9" stroke-width="2" />\n  <text x="48" y="308" font-family="Helvetica" fill="#14263c" font-size="23" font-weight="bold">2. Exact pinching identity, before selecting a cell</text>\n  <text x="48" y="344" font-family="Helvetica" fill="#14263c" font-size="21">sum_i ||[p_i,u_j]||_2^2 = ||[p,u_j]||_2^2 + 2 sum_(i != l) ||p_i u_j p_l||_2^2</text>\n  <text x="48" y="376" font-family="Helvetica" fill="#14263c" font-size="18">The off-diagonal blocks are orthogonal in L2. This is (85.17), for each j.</text>\n  <text x="48" y="411" font-family="Helvetica" fill="#14263c" font-size="21">Lambda = sum_j sum_(i != l) ||p_i u_j p_l||_2^2; mu = 2 Lambda/c</text>\n  <text x="48" y="441" font-family="Helvetica" fill="#14263c" font-size="18">Sum all targets first: sum_(i,j) ||[p_i,u_j]||_2^2 = c (delta^2 + mu). (85.19)</text>\n  <path d="M640,457 L640,481" stroke="#334155" stroke-width="3" />\n  <polygon points="631,471 649,471 640,481" fill="#334155" />\n  <rect x="28" y="491" width="1224" height="224" rx="14" fill="#ffffff" stroke="#aab8c9" stroke-width="2" />\n  <text x="48" y="525" font-family="Helvetica" fill="#14263c" font-size="23" font-weight="bold">3. Actual common M_n deletion and feasible integer trimming</text>\n  <text x="48" y="560" font-family="Helvetica" fill="#14263c" font-size="21">Old traces and squared L2 norms multiply by n^2. Centers are preserved. (52.3)</text>\n  <text x="48" y="595" font-family="Helvetica" fill="#14263c" font-size="21">k_i = floor(n^2 theta_i) &gt;= k_0; q_i &lt;= p_i; C_(A-tilde)(q_i) = k_i z_i; q_0 = 0</text>\n  <text x="48" y="631" font-family="Helvetica" fill="#14263c" font-size="21">T_n = sum_(i &gt;= 1) k_i tau(z_i); s = tau(sum_(i &gt;= 1) z_i); b = s/(n^2 t) &lt; 1</text>\n  <text x="48" y="666" font-family="Helvetica" fill="#14263c" font-size="21">Total trim cost = n^2 c - T_n &lt;= n^2 rho t + s</text>\n  <text x="48" y="697" font-family="Helvetica" fill="#14263c" font-size="21">T_n &gt;= (1 - b)n^2 t &gt; 0. Prescription and cost: (85.20), (85.22).</text>\n  <path d="M640,717 L640,741" stroke="#334155" stroke-width="3" />\n  <polygon points="631,731 649,731 640,741" fill="#334155" />\n  <rect x="28" y="751" width="1224" height="204" rx="14" fill="#ffffff" stroke="#aab8c9" stroke-width="2" />\n  <text x="48" y="786" font-family="Helvetica" fill="#14263c" font-size="23" font-weight="bold">4. One nonzero q_i works for every u_1, ..., u_m</text>\n  <text x="48" y="820" font-family="Helvetica" fill="#14263c" font-size="21">max_j ||[q_i,u_j]||_(2,new) / sqrt(Tr_new(q_i)) &lt;= Gamma</text>\n  <text x="48" y="855" font-family="Helvetica" fill="#14263c" font-size="21">Gamma = sqrt((1 + rho)/(1 - b)) sqrt(delta^2 + mu)</text>\n  <text x="177" y="887" font-family="Helvetica" fill="#14263c" font-size="21">+ 2 sqrt(m(rho + b)/(1 - b)). Trace-weighted selection: (85.21), (85.23).</text>\n  <text x="48" y="922" font-family="Helvetica" fill="#14263c" font-size="18">q_i splits into k_i pieces equivalent to the new Jones corner e_new z-hat_i. (52.4)</text>\n  <text x="38" y="985" font-family="Helvetica" fill="#14263c" font-size="18">Automatic: finite scalar approximation, (85.25)-(85.26). Missing: simultaneous small actual Lambda and profile loss.</text>\n</svg>\n'
Path(__file__).with_suffix(".svg").write_text(SVG,encoding="utf-8")
