summaryrefslogtreecommitdiffstats
path: root/2.py
blob: 2e50ff33e488fae28fa0c21645b2c09bca171546 (plain) (blame)
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
from libsolve import *

m = Matrix([
    [1, 1, -1, 1],
    [-1, -2, 2, -2],
    [1, 2, -1, 3],
    [-1, -2, 1, -2]
])

i = Matrix([
    [1, 0, 0, 0],
    [0, 1, 0, 0],
    [0, 0, 1, 0],
    [0, 0, 0, 1]
])


for mat in [m, i]:
    mat.make_S(1, 0, 2)
    mat.make_S(2, 3, 1)
    mat.make_U(0, 1)
    mat.make_U(2, 3)
    mat.make_S(2, 1, 1)
    mat.make_S(1, 2, 1)
    mat.make_S(2, 3, 1)
    mat.make_S(1, 0, -1)
    mat.make_U(1, 2)
    mat.make_D(1, -1)
    mat.make_D(2, -1)


print(m)
print(i)