Family ABCDG
Theorem and complete proof
General theory of the 4/9 and 5/9 orbits →Statement
Under the assumptions below, the formulas define an integral magic square of order 3 in which at least all 5 cells of the ABCDG mask are squares of integers. Other cells are allowed to be squares as well.
The parameters a, b, c, and d are arbitrary integers. Every auxiliary root introduced below is therefore integral.
Initial system and elimination of E, x, y
For every marked cell, introduce an integral root and substitute the corresponding Magic3 linear form. This gives the system:
The coefficient matrix of E, x, and y has rank 3. Eliminating them therefore leaves 2 independent homogeneous quadratic equations in the roots. The equations are derived and parametrized below.
Derivation of the root parametrization
Introduce the following auxiliary integers:
Define the declared cell values as the following explicit squares:
The yellow relation comes from two Gaussian rotations. For the brown relation, the quadric residual is reduced step by step to α² as displayed below. The final formula also proves that the chosen E reconstructs C and G without division.
An auxiliary red conic introduces r, s, u. After substitution into the brown quadric, the coefficient of the second pair becomes K=2r²−s². The pair P=Kc²−d², Q=2ucd parametrizes the resulting weighted conic; two Gaussian rotations then give β, γ, δ, η. The displayed chain of equalities solves both quadrics and reconstructs E without division.
Reconstruction of the magic square
Use the standard three-coordinate form:
Set the coordinates equal to the following linear combination of the square values already constructed:
The general linear lemma is applied directly: when the selected cell-form matrix has rank 3, its value vector lies in the image exactly when every vector in the left kernel annihilates it. The left kernel has dimension one for four cells and two for five cells. The colored identities above form precisely such a basis, while the displayed formulas for E, x, and y give the unique preimage.
Now substitute the coordinates into the nine Magic3 linear forms. Therefore
By the Magic3 form itself, every row, every column, and both diagonals sum to 3E. We have therefore obtained the required family of magic squares with square-valued mask ABCDG. This proves the claim.
Color lemmas used in this proof
Yellow equality of two sums of squares
A yellow four-cell support comes from composition of the Gaussian norm and gives an equality between two pairwise cell sums.
In this mask, the lemma variables are replaced by cells B, C, D, G; its conclusion is exactly the cell relation displayed above.
General statement and proof →Weighted brown conic
The brown support ABCG satisfies a separate weighted relation; the ABCDG family combines it with a yellow norm relation.
In this mask, the lemma variables are replaced by cells A, B, C, G; its conclusion is exactly the cell relation displayed above.
General statement and proof →The globally complete ABCDG algorithm
The polynomial formula in the preceding section constructs an explicit infinite subfamily. Enumerating every rational solution uses a different presentation of the same surface: a conic bundle over the projective line.
1. The global base
Let a,b,c,d,g be rational signed roots of the entries A,B,C,D,G. The two cell relations are
The first quadric is equivalent to det M=0 for the following matrix. At a projective point M cannot vanish: that would give b=c=d=g=0, and the second quadric would then give a=0. Thus M has rank one everywhere and a unique rational row direction [r:s].
The corresponding fiber coordinates P,Q recover all four roots of the yellow quadric:
After substitution, the second quadric becomes the fiber conic
2. Exact solution of every fiber
For a primitive representative [r:s], both conic coefficients are nonzero: vanishing would require a rational value of √2. Every fiber is therefore a smooth projective conic. Rational solubility of a ternary quadratic form over Q is decidable. The implementation returns either a rational point O or an exact local obstruction; a fiber is skipped only in the latter case.
Let F(X)=x²−(2s²−r²)y²−(2r²−s²)z² and let B be the bilinear form associated with F. Choose a coordinate j with Oⱼ≠0 and a vector U on the line Uⱼ=0. Then
Points [m:n] of the projective line give all directions U. Conversely, for X≠O take U=OⱼX−XⱼO; the unique tangent direction returns X=O. Hence the formula parametrizes the entire soluble fiber, not merely an open chart.
3. Complete fair enumeration
Projective pairs are enumerated by primitive integer representatives of height h([x:y])=max(|x|,|y|). An ordinary nested loop would remain forever on the first infinite fiber, so the base and fiber-parameter heights are dovetailed:
At step H, every pair with this height sum is processed. Thus every pair of rational parameters and every rational point of the surface appears after finitely many steps. The result is normalized to a primitive signed projective integer vector.
4. Explicit inverse
For a given nonzero point, the base direction is read from a nonzero column of M:
After canonical normalization of [r:s], the fiber coordinates are
The inverse projection on the recovered conic then reconstructs [m:n]. This finite construction applies to every rational point and is therefore a constructive proof of surjectivity.
5. Magic squares and the scope of the theorem
Among the finitely many signed lifts, retain the representative with nonnegative roots. The other four entries are recovered linearly; when necessary, multiplying the roots by 2 clears the denominator and multiplies every entry by 4. Positivity, pairwise distinctness, and the condition that exactly ABCDG are squares are decided by exact filters. The filtered iterator therefore reaches every normal exact ABCDG square and emits no extraneous square.
The result establishes global algorithmic completeness. It does not provide one surjective rational formula, a finite rational atlas, or a height-optimal enumeration.
Coverage completeness
Status: complete coverage. Completeness here refers to rational root vectors; integral representatives are obtained by clearing denominators and applying a common scale.
Broadest guaranteed subset
Every rational signed root vector (a,b,c,d,g) satisfying the two ABCDG quadrics, including the zero vector. Completeness is achieved by an effective conic-bundle algorithm; the polynomial formula displayed above remains a convenient subfamily of this complete set.
Inverse construction
At a nonzero point the matrix has rank one and a unique rational row direction [r:s]. Recover it as [b+d:c−g] when the first column is nonzero and as [c+g:d−b] otherwise. Then recover P,Q linearly, and the inverse projection on the corresponding conic returns the unique parameter [m:n]. Thus every rational point has a finite explicit inverse.
What remains outside the guarantee
No rational points lie outside the algorithm. A base with an empty conic is skipped only after the local-global problem for its ternary quadratic form has been decided exactly. The theorem does not assert the existence of one surjective rational formula, a finite rational atlas, or a height-optimal ordering.
Global completeness of ABCDG is proved in the effective algorithmic sense: soundness, surjectivity, and finite reachability of every rational point are established separately.