aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/30-endlichekoerper/rechnungen
diff options
context:
space:
mode:
Diffstat (limited to 'buch/chapters/30-endlichekoerper/rechnungen')
-rw-r--r--buch/chapters/30-endlichekoerper/rechnungen/invbeispiel.maxima53
1 files changed, 17 insertions, 36 deletions
diff --git a/buch/chapters/30-endlichekoerper/rechnungen/invbeispiel.maxima b/buch/chapters/30-endlichekoerper/rechnungen/invbeispiel.maxima
index 4770926..bc8e967 100644
--- a/buch/chapters/30-endlichekoerper/rechnungen/invbeispiel.maxima
+++ b/buch/chapters/30-endlichekoerper/rechnungen/invbeispiel.maxima
@@ -11,56 +11,41 @@ factor(m);
modulus:false;
M: matrix(
- [ 0, 0, 0, -3 ],
- [ 1, 0, 0, -2 ],
- [ 0, 1, 0, -2 ],
- [ 0, 0, 1, -1 ]
+ [ 0, 0, -3 ],
+ [ 1, 0, -2 ],
+ [ 0, 1, -2 ]
);
M: mod(M, 7);
M0: identfor(M);
M1: M;
M2: M.M1;
-M3: M.M2;
a0: 1;
a1: 2;
-a2: 9;
-a3: 1;
+a2: 2;
-a: a0 + a1*X + a2*X^2 + a3*X^3;
+a: a0 + a1*X + a2*X^2;
-A: a0*M0 + a1*M1 + a2*M2 + a3*M3;
+A: a0*M0 + a1*M1 + a2*M2;
A: mod(A, 7);
T: matrix(
- [ A[1,1], A[1,2], A[1,3], A[1,4], 1, 0, 0, 0 ],
- [ A[2,1], A[2,2], A[2,3], A[2,4], 0, 1, 0, 0 ],
- [ A[3,1], A[3,2], A[3,3], A[3,4], 0, 0, 1, 0 ],
- [ A[4,1], A[4,2], A[4,3], A[4,4], 0, 0, 0, 1 ]
+ [ A[1,1], A[1,2], A[1,3], 1, 0, 0 ],
+ [ A[2,1], A[2,2], A[2,3], 0, 1, 0 ],
+ [ A[3,1], A[3,2], A[3,3], 0, 0, 1 ]
);
t: inv_mod(T[1,1], 7);
T[1]: mod(t * T[1], 7);
T[2]: mod(T[2] - T[2,1]*T[1], 7);
T[3]: mod(T[3] - T[3,1]*T[1], 7);
-T[4]: mod(T[4] - T[4,1]*T[1], 7);
t: inv_mod(T[2,2], 7);
T[2]: mod(t * T[2], 7);
T[3]: mod(T[3] - T[3,2] * T[2], 7);
-T[4]: mod(T[4] - T[4,2] * T[2], 7);
t: inv_mod(T[3,3], 7);
T[3]: mod(t * T[3], 7);
-T[4]: mod(T[4] - T[4,3] * T[3], 7);
-
-t: inv_mod(T[4,4], 7);
-T[4]: mod(t * T[4], 7);
-T;
-
-T[3]: mod(T[3] - T[3,4] * T[4], 7);
-T[2]: mod(T[2] - T[2,4] * T[4], 7);
-T[1]: mod(T[1] - T[1,4] * T[4], 7);
T[2]: mod(T[2] - T[2,3] * T[3], 7);
T[1]: mod(T[1] - T[1,3] * T[3], 7);
@@ -70,10 +55,9 @@ T[1]: mod(T[1] - T[1,2] * T[2], 7);
T;
C: matrix(
- [ T[1,5], T[1,6], T[1,7], T[1,8] ],
- [ T[2,5], T[2,6], T[2,7], T[2,8] ],
- [ T[3,5], T[3,6], T[3,7], T[3,8] ],
- [ T[4,5], T[4,6], T[4,7], T[4,8] ]
+ [ T[1,4], T[1,5], T[1,6] ],
+ [ T[2,4], T[2,5], T[2,6] ],
+ [ T[3,4], T[3,5], T[3,6] ]
);
mod(A.C, 7);
@@ -81,17 +65,14 @@ mod(A.C, 7);
b0: C[1,1];
b1: C[2,1];
b2: C[3,1];
-b3: C[4,1];
-Cc: mod(b0*M0 + b1*M1 + b2*M2 + b3*M3, 7);
+Cc: mod(b0*M0 + b1*M1 + b2*M2, 7);
C - Cc;
-b: b0 + b1*X + b2*X^2 + b3*X^3;
+b: b0 + b1*X + b2*X^2;
p: expand(a*b);
-p: expand(p - 5 * m * X^3);
-p: expand(p - 40 * m * X^2);
-p: expand(p + 35 * m * X);
-p: expand(p + 9 * m);
+pp: 3*X^4 + X^3 + 3*X^2 + 6*X;
+
+divide(pp, m, X);
-mod(28 * M0 + 125*M1 - 18*M2,7);