# r2_quad_exact.py (independent verification run 2, AI-assisted, own code); exact integer/rational arithmetic
N_4(b^2) = prod over eight eta of (b1 +- b2 +- b3 +- b4), symbolic: True
identities (5), (6), (7), (8) symbolic: (True, True, True, True)
[unit_square] V=[(0, 0), (1, 0), (1, 1), (0, 1)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=116, content=16; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[1, -1, 1, -1], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 4, so the tangent-cone sextic contains s=0 with multiplicity 2); F_P(w_def)=0 exactly on all 16 branches at x=[(-37, -23), (36, -23)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[rectangle] V=[(0, 0), (5, 0), (5, 2), (0, 2)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=116, content=6400; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[10, -10, 10, -10], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 4, so the tangent-cone sextic contains s=0 with multiplicity 2); F_P(w_def)=0 exactly on all 16 branches at x=[(2, 19), (-23, -21)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[parallelogram] V=[(0, 0), (5, 1), (7, 4), (2, 3)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=132, content=456976; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[13, -13, 13, -13], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 4, so the tangent-cone sextic contains s=0 with multiplicity 2); F_P(w_def)=0 exactly on all 16 branches at x=[(33, -22), (-40, 9)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
   Remark 5.4: vertex order (0, 2, 1, 3) gives the same F_P after relabelling: True
   Remark 5.4: vertex order (0, 1, 3, 2) gives the same F_P after relabelling: True
[rhombus(tangential)] V=[(0, 0), (5, 0), (8, 4), (3, 4)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=139, content=640000; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[20, -20, 20, -20], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 4, so the tangent-cone sextic contains s=0 with multiplicity 2); F_P(w_def)=0 exactly on all 16 branches at x=[(26, 38), (15, 15)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[kite(tangential)] V=[(0, 0), (3, -2), (8, 0), (3, 2)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=1024; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[20, -16, 12, -16], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 2, so the tangent-cone sextic contains s=0 with multiplicity 0); F_P(w_def)=0 exactly on all 16 branches at x=[(-31, -1), (-39, -11)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[isosceles_trapezoid] V=[(0, 0), (6, 0), (4, 3), (2, 3)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=2304; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[6, -6, 18, -18], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 3, so the tangent-cone sextic contains s=0 with multiplicity 1); F_P(w_def)=0 exactly on all 16 branches at x=[(-19, -30), (25, -16)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[trapezoid] V=[(0, 0), (7, 0), (5, 3), (1, 3)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=144; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[12, -12, 21, -21], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 3, so the tangent-cone sextic contains s=0 with multiplicity 1); F_P(w_def)=0 exactly on all 16 branches at x=[(-39, -26), (18, 29)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[cyclic(r=5)] V=[(5, 0), (3, 4), (-4, 3), (0, -5)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=138, content=1440000; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[60, -60, 30, -30], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 3, so the tangent-cone sextic contains s=0 with multiplicity 1); F_P(w_def)=0 exactly on all 16 branches at x=[(16, 2), (20, -8)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[dart(non-convex)] V=[(0, 0), (8, 1), (3, 3), (1, 9)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=16; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[-26, -24, 71, -21], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 2, so the tangent-cone sextic contains s=0 with multiplicity 0); F_P(w_def)=0 exactly on all 16 branches at x=[(29, 19), (-5, -10)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[bowtie(self-intersecting)] V=[(0, 0), (6, 5), (6, 0), (0, 7)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=132, content=2304; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[-30, -42, 42, 30], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 3, so the tangent-cone sextic contains s=0 with multiplicity 1); F_P(w_def)=0 exactly on all 16 branches at x=[(38, 2), (27, -14)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[random1] V=[(5, 5), (-6, -16), (25, -2), (-12, -18)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=16; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[22, 579, -104, -497], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 2, so the tangent-cone sextic contains s=0 with multiplicity 0); F_P(w_def)=0 exactly on all 16 branches at x=[(15, 40), (40, -19)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[random2] V=[(-24, 4), (24, -1), (-21, 3), (14, -21)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=16; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[940, 37, -1010, 33], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 2, so the tangent-cone sextic contains s=0 with multiplicity 0); F_P(w_def)=0 exactly on all 16 branches at x=[(3, 28), (23, -30)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[random3] V=[(16, 25), (5, -2), (11, 30), (6, 0)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=10000; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[-20, -175, 5, 190], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 2, so the tangent-cone sextic contains s=0 with multiplicity 0); F_P(w_def)=0 exactly on all 16 branches at x=[(-22, -19), (14, -18)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[random4] V=[(-18, -25), (9, -19), (-30, 15), (-24, 10)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=1296; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[-9, 180, 981, -1152], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 2, so the tangent-cone sextic contains s=0 with multiplicity 0); F_P(w_def)=0 exactly on all 16 branches at x=[(32, 40), (20, 34)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[random5] V=[(-6, 13), (20, 4), (8, -29), (-12, 29)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=256; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[-1356, 28, 362, 966], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 2, so the tangent-cone sextic contains s=0 with multiplicity 0); F_P(w_def)=0 exactly on all 16 branches at x=[(22, 30), (22, 37)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
[random6] V=[(23, -27), (-1, -16), (24, 7), (24, -10)]: s-valuation of N_P = 2 (so s^2 | N_P, s does not divide F_P); deg F_P=[14], terms=140, content=16; Lemma 5.1 congruence True (rhs nonzero on H: True); p0=k=[-425, 17, -419, 827], all k_i!=0: True; order of F_P at p0 = 6, lowest part = N4(k^2 R(u))/s^2: True (s-valuation of N4(k^2R(u)) = 2, so the tangent-cone sextic contains s=0 with multiplicity 0); F_P(w_def)=0 exactly on all 16 branches at x=[(-39, 31), (26, 9)]: True; definition == three-point form: True; perturbed F_P does not vanish: True  => OK
Example 5.5: F_P/16 terms=116, max|coeff|=27, dihedral invariance True, number of orbits 21, orbit table equals Table 1 of the paper: True
Example 5.5: R_1..R_4 = b^2+c^2, c^2+d^2, d^2+a^2, a^2+b^2: True
ALL OK: True  (2.4s)
