In the first version (M, lowestDeg) refers to mat2betti(M, lowestDeg), and in the second version (M,B) refers to (M,0,B).
i1 : d = {0,1,3,4}
o1 = {0, 1, 3, 4}
o1 : List
|
i2 : M = facetEquation(d,1,-5,5)
o2 = | 45 -32 21 -12 |
| 32 -21 12 -5 |
| 21 -12 5 0 |
| 12 -5 0 3 |
| 5 0 -3 4 |
| 0 3 -4 3 |
| 0 0 0 0 |
| 0 0 0 0 |
| 0 0 0 0 |
| 0 0 0 0 |
| 0 0 0 0 |
11 4
o2 : Matrix ZZ <-- ZZ
|
i3 : B = pureBettiDiagram d
0 1 2 3
o3 = total: 1 2 2 1
0: 1 2 . .
1: . . 2 1
o3 : BettiTally
|
i4 : dotProduct(M,-5,B)
o4 = 6
|
i5 : A = matrix"1,1,0; 0,1,1; 0,1,1"
o5 = | 1 1 0 |
| 0 1 1 |
| 0 1 1 |
3 3
o5 : Matrix ZZ <-- ZZ
|
i6 : B = matrix"0,1,-2;0,0,0;0,0,0"
o6 = | 0 1 -2 |
| 0 0 0 |
| 0 0 0 |
3 3
o6 : Matrix ZZ <-- ZZ
|
i7 : dotProduct(A, B)
o7 = 1
|
i8 : A1 = mat2betti A
0 1 2
o8 = total: 1 3 2
0: 1 1 .
1: . 1 1
2: . 1 1
o8 : BettiTally
|
i9 : B1 = mat2betti B
1 2
o9 = total: 1 -2
0: 1 -2
o9 : BettiTally
|
i10 : dotProduct(A1, B1)
o10 = 1
|
i11 : dotProduct(A, 0, B1)
o11 = 1
|
i12 : dotProduct(A, B1)
o12 = 1
|