# Phase-Margin Residual Jacobians MVP `phase_margin_experiment.py` is a deterministic 2D residual-Jacobian toy. Each block Jacobian is `a R(phi)`, which is also a complex scalar and therefore gives an exact, non-stochastic test of the phase certificate and product composition. Run: ```bash /home/maxwelhelp/main/bin/python3 phase_margin_experiment.py ``` The script writes `results.json` and prints the same measurements. ## Quantitative checks 1. For phase errors in `[-0.9, 0.9]`, the exact optimization certificate satisfies `Gamma_theta(a R(phi)) = |wrapped(phi-theta)|`; maximum absolute error was `3.33e-16`. 2. For eight blocks, the product phase equals the sum of block phases modulo `2*pi`; error was `4.44e-16`. 3. With total phase fixed at `pi`, `sigma_min(I+P) = |1-a^N|`; the gain sweep identified the crossing at `a=1.000`, versus predicted `1.000`, with maximum error `2.66e-15`. 4. Power growth has the predicted boundary at gain one: measured log slopes were `log(0.97)=-0.030459` and `log(1.03)=0.029559`. ## Tiny baseline comparison The synthetic fitting objective pulls ten block phases to a dangerous total phase of `pi`. Vanilla optimization reaches zero invertibility margin and `sigma_min(I+P)=7.22e-16`. Adding the phase-margin hinge leaves margin `0.212911` and `sigma_min(I+P)=0.212911` under the same steps and learning rate. This is a mechanism verification, not a CIFAR or 50-layer MLP benchmark. It uses exact planar rotations rather than sampled Jacobian-vector products, so it does not test estimator noise, computational overhead, nonlinear activations, classification accuracy, or whether the certificate is conservative/useful on general matrices.