2 Edwards–Montgomery addition-law bridge
The curve is \(-x^2 + y^2 = 1 + d x^2 y^2\) over an arbitrary field.
The unified addition formula \((x_3, y_3)\) with denominators \(1 \pm d x_1 x_2 y_1 y_2\).
For \(a = -1\), if \(-1\) is a square and \(d\) is not a square, both denominators of the unified law are nonzero for every pair of on-curve points.
The Edwards sum maps to the Montgomery sum when the Montgomery \(u\)-coordinates are distinct; the \(x_3 = 0\) torsion case is handled separately.
Under the completeness hypotheses and explicit non-degeneracy conditions on the three operands and intermediate sums, edAddField is associative.
Associativity also holds in the doubling case \(P = Q\), via the Montgomery tangent law, under the analogous explicit side conditions.
Adding an Edwards point to its negation yields the identity when \(1 + d x^2 y^2 \neq 0\).