====================================================================================================
Part 1. The certificate d' = (9/100, 9/100, 9/100, 6/25) for n = 4 (Proposition 3.1)
====================================================================================================
   Q1(d') = 107811/100000000   Q2(d') = 2368521/1280000000000   Q1/Q2 = 582.63
PASS  d' lies in the open cube (0,1/4)^4
PASS  Q1(d') = 107811/10^8 = (33/100)^3 (3/100)
PASS  Q2(d') (from the definition) = (1/2)(57/100)^2(15/100)^6 = 2368521/1280000000000
PASS  Q1(d') > 500 Q2(d')
PASS  Seigal's linear inequalities hold at d' (d' is in her convex hull)
PASS  f(d') = (1/10, 1/10, 1/10, 2/5) exactly (1 - 4 d_j are rational squares)
PASS  polygon inequality fails at index 4: r1+r2+r3-r4 = 11/5 > 2, i.e. f(d4) - f(d1)-f(d2)-f(d3) = 1/10 > 0
PASS  scale argument: 3*mu_1 <= 0.307799 < 2/5 <= mu_4 for every tensor with Gram tuple d' (no ball-to-sphere step)
PASS  boundary tensor: norm 1, all-orthogonal, Gram tuple (9/100, 9/100, 9/100, 21/100), f = (1/10,1/10,1/10,3/10)
PASS  segment x in [21/100, 1/4]: Q1 >= (3/10)^3 (2/100) = 5.40e-04 > 3.02e-06 >= Q2
PASS  segment: Q1 > Q2 also at 101 exact points (Q2 from the definition)

====================================================================================================
Part 2. Zero padding (Lemma 3.2, Corollary 1.2(b)) and the second example d* (Remark 3.4)
====================================================================================================
PASS  s = sum d' = 51/100 and q = 2 Q2(d') = (57/100)^2 (15/100)^6 < 51/100 < 1
PASS  n=5: Q1 = Q1(d') (51/100)^(n-4) and Q2 = (1/2) q^(2^(n-4)) (Q2 from the definition)
PASS  n=6: Q1 = Q1(d') (51/100)^(n-4) and Q2 = (1/2) q^(2^(n-4)) (Q2 from the definition)
PASS  n=7: Q1 = Q1(d') (51/100)^(n-4) and Q2 = (1/2) q^(2^(n-4)) (Q2 from the definition)
PASS  n=8: Q1 = Q1(d') (51/100)^(n-4) and Q2 = (1/2) q^(2^(n-4)) (Q2 from the definition)
PASS  n = 4..40: Q1^(n) = Q1(d')(51/100)^(n-4) > (1/2) q^(n-3) >= (1/2) q^(2^(n-4)) = Q2^(n)
PASS  the comparison rests on Q1(d') > q/2 and 51/100 > q
PASS  d* = (3/50,3/50,3/50,171/1000): Q1 = 110937519/10^12, Q2 = (1/2)(369/1000)^2(111/1000)^6 (definition)
PASS  d*: sum = 351/1000 > q* = 2 Q2(d*) and Q1(d*) > q*/2 (so Q1^(4)(d*) 0.351^(n-4) > (1/2) q*^(n-3))
PASS  d* padded, n=5: Q1 > Q2 (both exact from the definitions)
PASS  d* padded, n=6: Q1 > Q2 (both exact from the definitions)
PASS  d* padded, n=7: Q1 > Q2 (both exact from the definitions)
PASS  d*: polygon fails, 3 sqrt(19/25) - sqrt(79/250) > 2 via (9*19/25 - 4 - 79/250)/4 = 631/1000 > 0 and (631/1000)^2 > 79/250

====================================================================================================
Part 3. The family d(x) = (x, x, x, 3x - x^2), 0 < x <= 1/12 (Proposition 3.3)
====================================================================================================
PASS  Q1(d(x)) = x^5 (4 - x)^3 identically
PASS  prod_eps (eps . sqrt d) at d = (a,a,a,b) equals (9a-b)^2 (a-b)^6 as a polynomial (from the definition)
PASS  Q2(d(x)) = x^8 (6 + x)^2 (2 - x)^6 / 2 identically
PASS  on (0,1/12]: (4-x)^3 >= (47/12)^3 = 60.083 > 0.6853 >= x^3(6+x)^2(2-x)^6/2, hence Q1 > Q2
PASS  (3 - 6x - x^2)^2 - 9(1 - 4x) = 30x^2 + 12x^3 + x^4 identically
PASS  (3r1 - 2)^2 - r4^2 = 4(3 - 6x - x^2 - 3 r1) given r1^2 = 1-4x, r4^2 = 1-12x+4x^2
PASS  for 0 < x < 5/36: 3 r1 - 2 > 0 (r1 > 2/3 iff x < 5/36) and 3 - 6x - x^2 > 0 (value at 5/36 is 2783/1296)
PASS  family at x = 1/12, 1/13, 1/20, 1/37, 1/100, 1/1000, 1/10^6: in the cube, Q1 > Q2 (Q2 from the definition), polygon fails
PASS  with c = 10^6: Q1 > c Q2 on the family for x = 10^-3, ..., 10^-8

====================================================================================================
Part 4. Remark 3.6 (connected component): a path from d' to (1/4,1/4,1/4,1/4) inside {Q1 > Q2}
====================================================================================================
PASS  path vertices satisfy a+b >= 3/10, 3a-b >= 3/100, 0 < 9a-b <= 2, |a-b| <= 15/100; hence along the path Q1 >= (3/10)^3 (3/100) = 8.10e-04 > 8e-4 and Q2 <= (1/2) 2^2 (15/100)^6 = 2.28e-05 < 2.3e-5
PASS  path: Q1 > Q2 (with the bounds above) also at 123 exact points, Q2 from the definition

====================================================================================================
Part 5. Theorem 1.1 ingredients: Lemma 2.1 (float test), Lemma 2.3 monotonicity (float test),
        Lemma 2.2 attaining tensors (exact), Remark 2.4(b) (exact), n = 2
====================================================================================================
PASS  Lemma 2.1 (float test, 2000 random tensors, n = 3..7): max_i (mu_i - sum_{j!=i} mu_j) = 8.3e-17 <= 1e-12
PASS  Lemma 2.3 (float test, same tensors, norm <= 1): max polygon defect of f(d) = 5.6e-17 <= 1e-12
PASS  Lemma 2.3 monotonicity (float test): mu(c,t)/mu(c_m,t) nondecreasing in t for c <= c_m (20000 samples)
PASS  Lemma 2.2 (exact): 230 random rational lambda in P_n (n = 2..8, many on facets or with entries 0, 1/2): p is a distribution on even strings, G_j = diag(1-lambda_j, lambda_j), d_j = lambda_j(1-lambda_j)
PASS  Lemma 2.2 reproduces the boundary tensor of Part 1 for lambda = (1/10,1/10,1/10,3/10)
PASS  Remark 2.4(b): for lambda in [0,1/2]^n (n = 2..6, 1500 rational points) Q1(lambda) >= 0 iff lambda in P_n
PASS  n = 2: det(M M^T) = det(M^T M) for 200 random rational 2x2 matrices M (G(B) is the diagonal)

====================================================================================================
Part 6. Theorem 1.3 (the n-ary analogue of Seigal's Theorem 1.4) and Proposition 4.1 (n = 3 identities)
====================================================================================================
PASS  Theorem 1.3, n=3: 2000 exact points (incl. facets, L_+ = 0, 0/1 coordinates; 1463 in G(B)): membership agrees with the polygon description
PASS  Theorem 1.3, n=4: 2000 exact points (incl. facets, L_+ = 0, 0/1 coordinates; 1680 in G(B)): membership agrees with the polygon description
PASS  Theorem 1.3, n=5: 600 exact points (incl. facets, L_+ = 0, 0/1 coordinates; 557 in G(B)): membership agrees with the polygon description
PASS  Theorem 1.3, n=6: 150 exact points (incl. facets, L_+ = 0, 0/1 coordinates; 146 in G(B)): membership agrees with the polygon description
PASS  N_3 = -512 (Q1 - Q2) as polynomials in d (both sides expanded from the definitions)
PASS  n = 3: Q2 = E^2/2 with E = sum d_i^2 - 2 sum_{i<j} d_i d_j
PASS  M_k = 16((d_i - d_j)^2 + (d_i + d_j)/2 - 3/16) for k = 1, 2, 3
PASS  N_4 has 424 monomials of total degree <= 8, integer coefficients; M_4 has 35 monomials of degree 4 (written to N4_poly_lead.txt)
PASS  the expansions agree with the product definitions at 60 rational points
PASS  n = 4: Q1 - Q2 is not proportional to N_4 (ratios at three points: ['1/1048576', '5/1048576', '485/286654464']); at (1/4,...): Q1-Q2 = 1/16, N_4 = 65536
PASS  Seigal's formula for Q2(1/4,...,1/4), n = 3..6 (0 for even n)

====================================================================================================
Part 7. The misprint in Seigal's Theorem 1.4 (Remark 4.2)
====================================================================================================
PASS  GHZ tensor (e_000 + e_111)/sqrt2: Gram tuple (1/4,1/4,1/4), Q1 - Q2 = -1/512, conic = 1/4 > 3/16
PASS  (1/5,1/100,1/100): Q1 < Q2, all conics <= 3/16 (printed region 2), but d_1 > d_2 + d_3 (outside the convex hull)
PASS  grid r in {0,1/12,...,1}^3 (2197 points): printed version disagrees with G(B) at 772 points, corrected at 0

====================================================================================================
Part 8. Theorem 1.4 (no single polynomial): the points used in the proof, and an illustration
====================================================================================================
PASS  n = 3..10: facet point r = (1-delta,...,1-delta,1-(n-1)delta): ell_n = 0, ell_k = (2n-4)delta, strictly inside Seigal's polytope (margin (n-1)(n-2)delta^2/4); r* = ((n-2)/n) 1 lies on L_+ = 0 with ell_i = 2 r_i > 0
PASS  N_4 changes sign inside G(B): N_4 = 5.0368e+03 at r = (9/20)1 and -3.2574e+03 at r = (11/20)1 (both interior points)
PASS  at (1/4,1/4,1/4,0) in G(B): Q2/Q1 = 27/512 exactly

ALL CHECKS PASSED
