GA Operation Pipeline¶
The Core Product Path¶
For most developer work, the critical call chain is:
GA::GP,GA::IP, orGA::OPinMV_Operators.hProduct(...)template inMV_Operators.hProductInnerLoop_*ProductOperator(...)- blade-level operator in
Blade_Operators.h - target multivector accumulation via
AddValueBlade(...)
That split is deliberate.
MV_Operators.hdecides traversal and accumulation.Blade_Operators.hdecides the algebraic meaning of one blade-blade product.- the multivector type decides storage.
Bit-Level Geometric Product¶
GPSign(...) is the heart of the implementation.
It does three things:
- compute the resulting blade id with xor,
- compute sign changes from basis-vector swaps,
- apply extra sign flips caused by the metric signature.
This means the expensive algebraic reasoning is reduced to cheap bit arithmetic.
Congruence-Aware Product¶
GP_Congruence(...) fuses product and modular reduction.
That matters for the cryptography examples because it:
- keeps coefficients in the expected centered interval,
- reduces risk of drifting outside modulus assumptions,
- avoids a second full traversal when product and reduction always occur together.
Involution Handling¶
Product(...) also supports reverse and conjugation via flags and callback hooks.
That design avoids copy-pasting traversal code for:
- ordinary products,
- reversed products,
- conjugated products.
Instead, the traversal is generic and only the sign behavior changes.
Inversion Flow¶
GA::Inverse(...) in Algo.h is the main higher-order algorithm.
It works as follows:
- apply congruence to the input multivector,
- compute the blade mask of the smallest product-closed sub-algebra containing the input,
- build the product matrix for left multiplication by that multivector,
- map the scalar unit into the same matrix space,
- solve the linear system with Gaussian elimination,
- map the solution back into a multivector.
This is the most important architectural bridge between Tan.GA and Tan.Math.
Where To Debug Specific Failures¶
If the wrong blade appears:
- start in
Blade_Operators.h
If the right blades appear with wrong coefficients:
- inspect
Blade_Operators.handDynamicMultivector.h
If modular products behave oddly:
- inspect
Congruence.h,InlineMath.h, andGP_Congruence(...)
If inversion fails for a multivector that should be invertible:
- inspect
Algo.h,Matrix_MapToBladeMask.h, andTan.Math/Matrix.Algo.GE.h