Use when working with lattices, quadratic forms, or discrete subgroups of Euclidean space
Do not confuse inner products (which require positive definiteness and symmetry) with more general bilinear forms. Use precise terminology:
Examples of forms that are NOT inner products:
Convention: B*{ij} = 2 × cos(π/M*{ij}) (our Gram matrix)
Definiteness criteria (inverted from literature):
| Group type | Standard literature | Our convention |
|---|---|---|
| Finite | Positive definite (λ > 0) | Negative definite (λ < 0) |
| Affine | Positive semidefinite (λ=0) | Negative semidefinite (λ=0) |
| Hyperbolic | Indefinite (mixed signs) | Indefinite (mixed signs) |
Definiteness is defined by the signs and behavior of B(v,v), not by eigenvalue analysis. This applies even for infinite modules, or over rings (ℤ, etc.), where spectral concepts do not apply. Always use algebraic and form-based criteria for classification—never rely solely on eigenvalue counts or numerical spectra.
IntegralLattice (not IntegerLattice or Sage's length routines).When reasoning about bilinear forms on free ℤ-modules:
orthogonal complement is only well-defined for symmetric (and sometimes skew-symmetric) forms. For a general bilinear form, orthogonality may not be symmetric or even meaningful as a submodule.norm_squared (B(v,v)) only makes sense for symmetric forms. There is no notion of length or norm for a general bilinear form.reflection operation (across a subspace/module) only makes sense when the form is symmetric, as it depends on the geometric notion of orthogonality and norm.Critical mathematical error: Extending the definitions of orthogonal complement, norm, reflection, and related concepts from vector spaces with inner products to general free ℤ-modules with bilinear forms can lead to incorrect mathematics. Only use these constructions when the underlying bilinear form and module structure mathematically warrant them.
See these for further mathematical and implementation guidance:
/docs/api-planning/BILINEAR_FORMS_MATHEMATICAL_NOTES.md/docs/MATHEMATICAL_THEORY.md/docs/REQUIREMENTS.md/docs/api-planning/Reminder: Mathematical definitions are primary. Implement algorithms based on mathematical structure (e.g. definiteness), not just eigenvalue counting.