-- -*- M2-comint -*- hash: 13871393811937105583

i1 : R = QQ[x];

i2 : f = {x^4 - 6*x^2 - 7*x - 6};

i3 : alpha = getGlobalA1Degree f

o3 = | -7 -6 0 1 |
     | -6 0  1 0 |
     | 0  1  0 0 |
     | 1  0  0 0 |

o3 : GrothendieckWittClass

i4 : K = frac R;

i5 : q = (x^2 + x - 2)/(3*x + 5);

i6 : beta = getGlobalUnstableA1Degree(q)

o6 = (| 11 5 |, 8)
      | 5  3 |

o6 : UnstableGrothendieckWittClass

i7 : getWittIndex alpha

o7 = 2

i8 : getIntegralDiscriminant alpha

o8 = 1

i9 : getHasseWittInvariant(alpha, 3)

o9 = 1

i10 : getSumDecompositionString alpha

o10 = 2H

i11 : twoH = makeDiagonalForm(QQ, (1,-1,1,-1))

o11 = | 1 0  0 0  |
      | 0 -1 0 0  |
      | 0 0  1 0  |
      | 0 0  0 -1 |

o11 : GrothendieckWittClass

i12 : isIsomorphicForm(alpha, twoH)

o12 = true

i13 : getSumDecomposition beta

o13 = (| 11 0  |, 8)
       | 0  22 |

o13 : UnstableGrothendieckWittClass

i14 : gamma = makeGWuClass(matrix(QQ, {{11, 0},{0,22}}), 8)

o14 = (| 11 0  |, 8)
       | 0  22 |

o14 : UnstableGrothendieckWittClass

i15 : isIsomorphicForm(beta, gamma)

o15 = true

i16 : 
