"""Original CC0 coordinate diagram; Python standard library only."""
from pathlib import Path
from html import escape
root=Path(__file__).resolve().parent
parts=['<svg xmlns="http://www.w3.org/2000/svg" width="1460" height="1640" viewBox="0 0 1460 1640" role="img" aria-labelledby="title desc">',
       '<title id="title">Physical endpoint rigidity and a singular abelian witness</title>',
       '<desc id="desc">The physical conditional expectation of a projection is another projection, forcing equality in the faithful trace. A separate abelian model satisfies twisted state identities with original discrepancy one third.</desc>',
       '<defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="8" refY="4" orient="auto"><path d="M0 0L8 4L0 8" fill="none" stroke="#34566f" stroke-width="1.6"/></marker></defs>',
       '<rect width="1460" height="1640" fill="#fafcfe"/>',
       '<style>text{font-family:Arial,DejaVu Sans,sans-serif;fill:#183548} .title{font-size:30px;font-weight:bold} .head{font-size:26px;font-weight:bold} .sub{font-size:21px} .body{font-size:23px} .small{font-size:20px} .eq{font-size:25px} .box{fill:#fff;stroke:#83a7bd;stroke-width:2}</style>']
def tx(x,y,s,cl='body'):parts.append(f'<text x="{x}" y="{y}" class="{cl}">{escape(s)}</text>')
def box(x,y,w,h):parts.append(f'<rect x="{x}" y="{y}" width="{w}" height="{h}" rx="15" class="box"/>')
def line(x1,y1,x2,y2):parts.append(f'<path d="M{x1} {y1}L{x2} {y2}" fill="none" stroke="#34566f" stroke-width="2.4" marker-end="url(#arrow)"/>')
tx(38,48,'Two different tests of the original joint defect','title')
tx(38,80,'V9.1–V9.20 • Exact formulas; boxes are coordinate diagrams, not trace-scaled areas.','sub')
box(30,106,680,850);box(738,106,692,850)
tx(52,147,'Actual finite-factor inclusion','head')
tx(52,181,'C = N′ ∩ M,   E_C preserves the faithful physical τ','sub')
tx(52,231,'k_F = (s/t) f + (t/s)(1−f)','eq')
tx(52,269,'k_C = (s/t) c + (t/s)(1−c)','eq')
tx(52,304,'f and c are projections;   0 < t < 1/2,   s = 1−t','small')
line(356,322,356,369)
tx(90,402,'E_C(k_F) = k_C  ⇒  E_C(f) = c','eq')
tx(64,452,'τ(f) = τ(c),   τ(fc) = τ(c)','body')
tx(64,494,'‖f−c‖₂² = τ(f)+τ(c)−2 Re τ(fc) = 0','eq')
line(356,516,356,554)
tx(200,592,'Faithfulness ⇒ f = c','eq')
tx(64,642,'Every ordinary core:   k_F = k_C = k₀','body')
tx(64,681,'Original labels:   w = ℓ;   original cost = 0','body')
tx(64,720,'Every compatible hypertrace:   α = αP₀','body')
tx(52,777,'Unequal-trace diagonal model (HC9)','head')
tx(64,819,'Projection','small');tx(290,819,'τ','small');tx(470,819,'dual trace','small')
tx(64,856,'c','body');tx(290,856,'t','body');tx(470,856,'s','body')
tx(64,893,'1−c','body');tx(290,893,'s','body');tx(470,893,'t','body')
tx(762,147,'Abelian identities without a physical inclusion','head')
tx(762,181,'D₀ = ℓ∞(ℕ₀ × {0,1}); inherited atomic probability trace','sub')
tx(764,233,'U labels','small');tx(997,233,'Atoms and inherited masses','small');tx(1325,233,'V labels','small')
tx(765,289,'sⱼ','eq');tx(997,281,'(j,0):  2⁻ʲ/3','body');tx(1325,310,'rⱼ','eq')
tx(765,347,'sⱼ₊₁','eq');tx(997,348,'(j,1):  2⁻ʲ⁻¹/3','body')
line(970,280,829,280);line(970,341,829,341);line(1210,280,1300,304);line(1210,341,1300,311)
tx(764,398,'P₀ on each rⱼ: weights 2/3 and 1/3','body')
tx(764,438,'Q on each sₖ (k ≥ 1): weights 1/2 and 1/2','body')
tx(764,479,'w = 1;  ℓ(j,0) = 4/3;  ℓ(j,1) = 2/3','body')
tx(764,512,'Boundary exception: ℓ(0,0) = 1','small')
tx(764,556,'f_L(sₖ) = 2ᵏ for k < L, else 0;   L ≥ 2','body')
tx(764,592,'α_L(x) = τ(f_L x)/c_L;   c_L = (2L−1)/3','body')
tx(764,637,'‖α_LP₀ − ℓα_L‖ = 4 / [3(2L−1)]','eq')
tx(764,680,'α_L(|1−ℓ|) = 2(L−1) / [3(2L−1)]','eq')
line(1080,700,1080,737)
tx(764,778,'A singular weak-star cluster state','head')
tx(764,819,'α = αQ,   αP₀ = ℓα,   Qℓ = 1','eq')
tx(764,860,'Original discrepancy: ‖α−αP₀‖ = 1/3','eq')
tx(764,897,'The GNS completion leaves this bounded-test norm intact.','small')
box(30,982,680,224);box(738,982,692,224)
tx(52,1021,'Scalar ambient density forces zero original cost','head')
tx(52,1060,'k_C = 1 ⇒ ℓ = 1,   α(w) = α(1/w) = 1','body')
tx(52,1101,'α((w−1)²/w) = 0 ⇒ α(|w−1|) = 0','eq')
tx(52,1141,'For Δ_C = τ(|k_C−1|),  r = t/s > 0:','body')
tx(52,1181,'φ(original cost) ≤ d (√(Δ_C/r) + Δ_C)','eq')
tx(762,1021,'Matching physical spectrum is impossible','head')
tx(762,1060,'If k_C has values 4/3 and 2/3, z ≤ c₋ gives:','body')
tx(762,1101,'(1−r) / [3(R*−r)] ≤ (2/3−r) / [2(R*−r)]','eq')
tx(762,1141,'⇒ r/6 ≤ 0, contradicting the actual r > 0','body')
tx(762,1181,'This excludes the specified extension, not other spectra.','small')
box(30,1232,1400,259)
tx(52,1270,'Full all-smooth amenability for the hyperfinite diagonal family','head')
box(52,1296,410,160);box(526,1296,410,160);box(1000,1296,406,160)
tx(70,1327,'Any smooth U ⊂ V gives cVc = Uc','small')
tx(70,1363,'Stabilize the represented corners','body')
tx(70,1399,'β₀ : P̃ → P fixes physical P','body')
tx(70,1435,'P is II∞; no tracial state is used','small')
line(468,1370,516,1370)
tx(545,1327,'Average the actual cyclic action','small')
tx(545,1363,'β_L = L⁻¹ Σ a⁻ⁿ β₀ ãⁿ','eq')
tx(545,1399,'Error ≤ 2 ‖X‖ / L','body')
tx(545,1435,'A cluster β satisfies βã = aβ','small')
line(942,1370,990,1370)
tx(1018,1327,'F∞ = M₂(β); finite-corner return','small')
tx(1018,1363,'F : V → M,   F(U) ⊂ N','body')
tx(1018,1399,'E_N F = F E;   φ = τF','eq')
tx(1018,1435,'φ is M-central and compatible','small')
box(30,1517,1400,87)
tx(53,1550,'Exact boundary: the diagonal family is fully amenable and jointly balanced; the abelian-only deduction still fails.','small')
tx(53,1582,'For other inclusions, the unrestricted joint state, actual marked corners, full residual and generating conclusions remain open.','small')
parts.append('</svg>')
(root/'joint-endpoint-and-singular-witness-v9.svg').write_text('\n'.join(parts)+'\n',encoding='utf-8')
print('Rendered original SVG: '+str(root/'joint-endpoint-and-singular-witness-v9.svg'))
