"""Reproduce the actual cup-tail proof diagram T.2–T.10."""
from pathlib import Path
SVG='<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="850" viewBox="0 0 1280 850" role="img" aria-labelledby="trc-title trc-desc">\n  <title id="trc-title">The actual cup-tail commutant and its remaining central comparison</title>\n  <desc id="trc-desc">A proof schematic: finite tail restrictions have at most two multiplicity-free edges. Conditional covariance rank at most one forces the infinite relative commutant to have at most two atoms. At index four tail spin permutations and SU2 invariance force scalars. Above four the actual weighted-spin inclusion and the local index lower bound force atom traces p and q and reversed canonical weights. The remaining joint density comparison is one actual operator equality involving the tail atom f.</desc>\n  <rect width="1280" height="850" fill="#f4f7fb" />\n  <text x="35" y="40" font-family="Helvetica" font-size="27" font-weight="bold" fill="#14263c">The cup tail has an exact boundary algebra</text>\n  <text x="35" y="73" font-family="Helvetica" font-size="20" fill="#14263c">K = {g_0,g_1,...}\'\'; K_1 = {g_1,g_2,...}\'\'; F = K_1\' intersect K. Actual inherited traces.</text>\n  <rect x="24" y="96" width="1232" height="172" rx="12" fill="#ffffff" stroke="#8093a9" stroke-width="2" />\n  <text x="44" y="132" font-family="Helvetica" font-size="23" font-weight="bold" fill="#14263c">Finite path edges constrain the infinite relative commutant</text>\n  <text x="44" y="168" font-family="Helvetica" font-size="21" fill="#14263c">Q_n\' intersect P_n is abelian: at most two edges over each old vertex. (T.2)</text>\n  <text x="44" y="204" font-family="Helvetica" font-size="21" fill="#14263c">Centered fiber dimension &lt;= 1; det G_n = 0. The trace limit gives t_1 t_2 (1-t_1-t_2) = 0.</text>\n  <text x="44" y="241" font-family="Helvetica" font-size="21" fill="#14263c">Thus F is abelian with at most two atoms. This uses the inclusion, not factoriality alone. (T.3)</text>\n  <line x1="390" y1="270" x2="390" y2="300" stroke="#334155" stroke-width="3" />\n  <polygon points="382,289 398,289 390,301" fill="#334155" />\n  <line x1="890" y1="270" x2="890" y2="300" stroke="#334155" stroke-width="3" />\n  <polygon points="882,289 898,289 890,301" fill="#334155" />\n  <rect x="24" y="310" width="585" height="255" rx="12" fill="#e5f0fa" stroke="#2563a0" stroke-width="2" />\n  <text x="45" y="349" font-family="Helvetica" font-size="25" font-weight="bold" fill="#14263c">d = 4</text>\n  <text x="45" y="391" font-family="Helvetica" font-size="21" fill="#14263c">1 - 2e_i is the spin swap.</text>\n  <text x="45" y="427" font-family="Helvetica" font-size="21" fill="#14263c">Tail swaps force a commuting x onto site 1.</text>\n  <text x="45" y="463" font-family="Helvetica" font-size="21" fill="#14263c">SU2 invariance forces that site matrix scalar.</text>\n  <text x="45" y="507" font-family="Helvetica" font-size="23" font-weight="bold" fill="#14263c">F = C; k_F = 1; E_F(g) = 4. (T.4)</text>\n  <text x="45" y="544" font-family="Helvetica" font-size="20" fill="#14263c">Actual joint density equality (81.15) follows.</text>\n  <rect x="635" y="310" width="621" height="255" rx="12" fill="#fff0d6" stroke="#b7791f" stroke-width="2" />\n  <text x="656" y="349" font-family="Helvetica" font-size="25" font-weight="bold" fill="#14263c">d &gt; 4</text>\n  <text x="656" y="391" font-family="Helvetica" font-size="21" fill="#14263c">p = (1 - sqrt(1-4/d))/2; q = 1-p.</text>\n  <text x="656" y="427" font-family="Helvetica" font-size="21" fill="#14263c">Norm comparison gives u &lt;= p.</text>\n  <text x="656" y="463" font-family="Helvetica" font-size="21" fill="#14263c">Local index &gt;= 1 gives u &gt;= p. (T.6)</text>\n  <text x="656" y="507" font-family="Helvetica" font-size="23" font-weight="bold" fill="#14263c">F = C f + C(1-f); tau(f) = p.</text>\n  <text x="656" y="544" font-family="Helvetica" font-size="20" fill="#14263c">k_F = (q/p) f + (p/q)(1-f). (T.7)</text>\n  <line x1="890" y1="568" x2="890" y2="598" stroke="#334155" stroke-width="3" />\n  <polygon points="882,587 898,587 890,599" fill="#334155" />\n  <rect x="24" y="608" width="1232" height="194" rx="12" fill="#ffffff" stroke="#8093a9" stroke-width="2" />\n  <text x="44" y="645" font-family="Helvetica" font-size="23" font-weight="bold" fill="#14263c">Exact remaining operator test above four</text>\n  <text x="44" y="684" font-family="Helvetica" font-size="21" fill="#14263c">D_0 = Z(S) join Z(R), C = N\' intersect M; (81.15) iff E_(D_0)(f) = E_(D_0)(E_C(f)).</text>\n  <text x="44" y="724" font-family="Helvetica" font-size="21" fill="#14263c">v = d^2 sqrt(1-4/d) E_(D_0)(f-E_C(f)); b = E_(Z(S))(|v|). (T.9)-(T.10)</text>\n  <text x="44" y="765" font-family="Helvetica" font-size="20" fill="#14263c">f is an actual projection in K. Its expectation comparison is still unproved for general amenable cores.</text>\n  <text x="35" y="833" font-family="Helvetica" font-size="18" fill="#14263c">Schematic proof mechanism. No area or numerical example is a purported core realization; all parameter formulas are exact.</text>\n</svg>\n'
Path(__file__).with_suffix(".svg").write_text(SVG,encoding="utf-8")
