For a symmetric n by n Gram matrix A, n=1..4, over the prime field p=3 or5, use ...
https://datenvertrag.halowerk.com/v1/finite-field-quadratic-witt-decompositionOverview
For a symmetric n by n Gram matrix A, n=1..4, over the prime field p=3 or5, use q(x)=x A x^T. Return row basis B, G=B A B^T, hyperbolic_planes h, anisotropic_dimension a and radical_dimension r. Basis order consists of h adjacent hyperbolic pairs with Gram [[0,1],[1,0]], then an anisotropic block, then radical basis. All cross blocks are zero; n=2h+a+r. Exhaustive lexicographic vector enumeration and rank extension fix the witness.