# Revision history [back]

First off, Grobner basis approach can work only for polynomial equations, while your eq1 is not such. Luckily, it can be converted into a polynomial one: (N + (1 - 2*y)^2)) - (4*A+2)^2 == 0.

When all equations are polynomial, we can define a polynomial ring and compute all solutions as the variety of the ideal generated by the polynomials (lhs) from the given equations:

R.<N,A,y,a,B,b,C,c,D,d,w,V,v,Z,z,U,u> = PolynomialRing(QQ)
eq = [ N-4899,
(N + (1 - 2*y)^2) - (4*A+2)^2,
4*A+1-2*(y-1)-a,
8*(A-1)*a-(N-36)-(a-6)^2,
((a-7)-2*(B-1))*((a-5)-2*(B-1))+1-(b-6)^2,
((b-7)-2*(C-1))*((b-5)-2*(C-1))+1-(c-6)^2,
((c-7)-2*(D-1))*((c-5)-2*(D-1))+1-(d-6)^2,
8*(B-1)*a-(a-6)^2+36-(16*B*(B+1)+3),
8*(C-1)*b-(b-6)^2+36-(16*C*(C+1)+3),
8*(D-1)*c-(c-6)^2+36-(16*D*(D+1)+3),
d-13,
8*(A-1)*(4*A+1)-(16*A*(A+1)+3-36)-(w-6)^2,
((w-7)-2*(V-1))*((w-5)-2*(V-1))+1-(v-6)^2,
((v-7)-2*(Z-1))*((v-5)-2*(Z-1))+1-(z-6)^2,
((z-7)-2*(U-1))*((z-5)-2*(U-1))+1-(u-6)^2,
8*(V-1)*w-(w-6)^2+36-(16*V*(V+1)+3),
8*(Z-1)*v-(v-6)^2+36-(16*Z*(Z+1)+3),
8*(U-1)*z-(z-6)^2+36-(16*U*(U+1)+3),
u-13]
J = R.ideal(eq)
print( J.variety() )


which gives us the following 32 solutions:

[{u: 13, U: 5, z: 21, Z: 9, v: 37, V: 17, w: 69, d: 13, D: 5, c: 21, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: 9, v: 37, V: 17, w: 69, d: 13, D: 5, c: 21, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: 9, v: 37, V: 17, w: 69, d: 13, D: -3, c: -9, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: 9, v: 37, V: 17, w: 69, d: 13, D: -3, c: -9, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: 9, v: 37, V: -15, w: -57, d: 13, D: 5, c: 21, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: 9, v: 37, V: -15, w: -57, d: 13, D: 5, c: 21, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: 9, v: 37, V: -15, w: -57, d: 13, D: -3, c: -9, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: 9, v: 37, V: -15, w: -57, d: 13, D: -3, c: -9, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: -7, v: -25, V: 17, w: 69, d: 13, D: 5, c: 21, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: -7, v: -25, V: 17, w: 69, d: 13, D: 5, c: 21, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: -7, v: -25, V: 17, w: 69, d: 13, D: -3, c: -9, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: -7, v: -25, V: 17, w: 69, d: 13, D: -3, c: -9, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: -7, v: -25, V: -15, w: -57, d: 13, D: 5, c: 21, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: -7, v: -25, V: -15, w: -57, d: 13, D: 5, c: 21, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: -7, v: -25, V: -15, w: -57, d: 13, D: -3, c: -9, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: 5, z: 21, Z: -7, v: -25, V: -15, w: -57, d: 13, D: -3, c: -9, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: 9, v: 37, V: 17, w: 69, d: 13, D: 5, c: 21, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: 9, v: 37, V: 17, w: 69, d: 13, D: 5, c: 21, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: 9, v: 37, V: 17, w: 69, d: 13, D: -3, c: -9, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: 9, v: 37, V: 17, w: 69, d: 13, D: -3, c: -9, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: 9, v: 37, V: -15, w: -57, d: 13, D: 5, c: 21, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: 9, v: 37, V: -15, w: -57, d: 13, D: 5, c: 21, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: 9, v: 37, V: -15, w: -57, d: 13, D: -3, c: -9, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: 9, v: 37, V: -15, w: -57, d: 13, D: -3, c: -9, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: -7, v: -25, V: 17, w: 69, d: 13, D: 5, c: 21, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: -7, v: -25, V: 17, w: 69, d: 13, D: 5, c: 21, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: -7, v: -25, V: 17, w: 69, d: 13, D: -3, c: -9, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: -7, v: -25, V: 17, w: 69, d: 13, D: -3, c: -9, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: -7, v: -25, V: -15, w: -57, d: 13, D: 5, c: 21, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: -7, v: -25, V: -15, w: -57, d: 13, D: 5, c: 21, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: -7, v: -25, V: -15, w: -57, d: 13, D: -3, c: -9, C: 9, b: 37, B: 17, a: 69, y: 1, A: 17, N: 4899},
{u: 13, U: -3, z: -9, Z: -7, v: -25, V: -15, w: -57, d: 13, D: -3, c: -9, C: -7, b: -25, B: 17, a: 69, y: 1, A: 17, N: 4899}]