/usr/share/axiom-20170501/src/algebra/QFORM.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39  | )abbrev domain QFORM QuadraticForm
++ Author: Stephen M. Watt
++ Date Created: August 1988
++ Date Last Updated: May 17, 1991
++ Description:
++ This domain provides modest support for quadratic forms.
QuadraticForm(n, K) : SIG == CODE where
  n : PositiveInteger
  K : Field
  SM ==> SquareMatrix
  V  ==> DirectProduct
 
  SIG ==> AbelianGroup with
      quadraticForm : SM(n, K) -> %
        ++ quadraticForm(m) creates a quadratic form from a symmetric,
        ++ square matrix m.
      matrix : % -> SM(n, K)
        ++ matrix(qf) creates a square matrix from the quadratic form qf.
      elt : (%, V(n, K)) -> K
        ++ elt(qf,v) evaluates the quadratic form qf on the vector v, 
        ++ producing a scalar.
 
  CODE ==> SM(n,K) add
        Rep := SM(n,K)
 
        quadraticForm m ==
            not symmetric? m =>
                error "quadraticForm requires a symmetric matrix"
            m::%
        matrix q == q pretend SM(n,K)
        elt(q,v) == dot(v, (matrix q * v))
 |