""" # Verification code for "Pivotal deformations of Deligne's S_t" ## figs.py / checks.py (the pictures) `python3 figs.py diagrams.tex` regenerates every picture in the paper. Most are drawn from layered words (diag.py), so they are honest planar string diagrams whose only crossings are the crossing generator. The partition diagrams are drawn by direct placement (part.py), and three pictures are hand-drawn TikZ (the two upside-down coupons and the second term of P); for these, planarity was checked by eye. The zigzag pictures used in Proposition 3.3 (monoidal deformations are pivotal) are also drawn from layered words. `python3 checks.py` verifies every pictured identity: partition expansions, rotations/isotopies (canonical forms of planar maps, with coupons treated as non-rotation-invariant vertices), and each overlap identity, evaluated with the error terms of the genuine first-order deformations c -> c + eps w (a consistency check, not a proof). It checks the word diagrams only; it does not inspect the drawings of partition diagrams. Requirements: Python 3.10+, `pip install python-flint sympy`. ## verify_proof.py (checks the hand proof) Checks, with t a formal variable (exact rational functions over Q), every finite computation used in the note: * the model of S_t inside Deligne's category (Harman-Snowden basis) satisfies all defining relations in the normalization loop = t-1, bigon = (t-2)/t, I - H = (id - e)/t; * rotation eigenvalues on the 4-box space; the functional psi and the gauge directions (Lemma 4.2); * the level-5 combinatorics (phi, k5) and the cap computation (Lemmas 5.2, 5.4); * the level-6 combinatorics (V_-, m6) and the merge computation (Lemma 6.2); * every planar isotopy used, by comparing canonical forms of planar maps with rotation-invariant 3- and 4-valent vertices (pmap.py). Runtime: a few seconds. Ends with "ALL CHECKS PASSED". ## consistency_check.py (independent cross-check) Generates all first-order consistency equations among the planar maps reachable from "cap / vertex / crossing attached to two adjacent legs of R2, R2.5, R3" (53 maps, 984 equations; each map M gets an unknown deviation nu(M) in S_t^k), eliminates the nu's over Q(t) with fraction-free elimination, and records every polynomial divided by. Several elimination orders certify that the solution space in the 58 error coordinates (a, b, E2, E25, E3) is exactly the 3-dimensional gauge space for all t outside {0,1,2}; exact rational computations settle t = 1, 2. Also checks that a deliberately mis-rotated error placement is detected. ## brauer_control.py (control experiment) Runs the same machinery on the Brauer category (crossing only). The solution space is 3-dimensional with a 2-dimensional gauge space: one genuine non-gauge direction survives, consistent with the BMW deformation (Remark 7.2). So the machine does not over-constrain. ## Files deligne.py Deligne's partition category, Harman-Snowden basis st.py S_t as the image of P = id - t^{-1} unit*counit pmap.py planar maps with boundary, canonical forms, words -> maps evalmap.py evaluation of planar maps in S_t (frontier algorithm) rewrite.py pattern matching / gluing / context evaluation relations.py the relations (with error unknowns) system.py, solve.py, analyze.py, gauge.py, ext.py, hosts.py, symelim.py, exact_at.py, run_common.py consistency system machinery ratfunc.py rational functions in t via python-flint ## build_html.py / html_post.py (HTML version) `python3 build_html.py ` builds the HTML version of the paper with make4ht (tex4ht) and dvisvgm. Display equations become SVG images; html_post.py rescales the small inline diagrams and adds a little CSS. Requires make4ht, dvisvgm and a TeX installation with TikZ. ## Layout of the submission The TeX source (pivotal_St.tex, diagrams.tex) is at the top level and this code is in anc/. From anc/, for example, `python3 figs.py ../diagrams.tex` regenerates the pictures, `python3 verify_proof.py` rechecks the hand proof, and `python3 build_html.py .. html` builds an HTML version of the paper in anc/html. """