diff options
author | LordMcFungus <mceagle117@gmail.com> | 2021-03-22 18:05:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 18:05:11 +0100 |
commit | 76d2d77ddb2bed6b7c6b8ec56648d85da4103ab7 (patch) | |
tree | 11b2d41955ee4bfa0ae5873307c143f6b4d55d26 /buch/chapters/30-endlichekoerper/rechnungen | |
parent | more chapter structure (diff) | |
parent | add title image (diff) | |
download | SeminarMatrizen-76d2d77ddb2bed6b7c6b8ec56648d85da4103ab7.tar.gz SeminarMatrizen-76d2d77ddb2bed6b7c6b8ec56648d85da4103ab7.zip |
Merge pull request #1 from AndreasFMueller/master
update
Diffstat (limited to 'buch/chapters/30-endlichekoerper/rechnungen')
4 files changed, 185 insertions, 0 deletions
diff --git a/buch/chapters/30-endlichekoerper/rechnungen/euinv.maxima b/buch/chapters/30-endlichekoerper/rechnungen/euinv.maxima new file mode 100644 index 0000000..ce5b7f2 --- /dev/null +++ b/buch/chapters/30-endlichekoerper/rechnungen/euinv.maxima @@ -0,0 +1,31 @@ +m: X^3 +2*X^2 + 2*X + 3; +f: 2*X^2 + 2*X + 1; + +q0: 4*X+4; +r0: 4*X+6; +expand(q0*f+r0); + +q1: 4*X+5; +r1: 6; +expand(q1*r0+r1); + +q2: 3*X+1; +r2: 0; +expand(q2*r1+r2); + +Q0: matrix([ 0, 1 ], [ 1, (7*X+7)-q0 ]); +Q1: matrix([ 0, 1 ], [ 1, (7*X+7)-q1 ]); +Q2: matrix([ 0, 1 ], [ 1, (7*X+7)-q2 ]); + +Q: expand(Q1 . Q0); +s: Q[1,1]; +t: Q[1,2]; +expand(s*m+t*f); + +Q: expand(Q2 . Q); + +s: Q[1,1]; +t: Q[1,2]; + +expand(s*m+t*f); + diff --git a/buch/chapters/30-endlichekoerper/rechnungen/invbeispiel.maxima b/buch/chapters/30-endlichekoerper/rechnungen/invbeispiel.maxima new file mode 100644 index 0000000..f227f3a --- /dev/null +++ b/buch/chapters/30-endlichekoerper/rechnungen/invbeispiel.maxima @@ -0,0 +1,81 @@ +/* + * invbeispiel.maxima + * + * (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ + +m: X^3 + 2*X^2 + 2*X + 3; + +modulus:7; +factor(m); +modulus:false; + +M: matrix( + [ 0, 0, -3 ], + [ 1, 0, -2 ], + [ 0, 1, -2 ] +); +M: mod(M, 7); +M0: identfor(M); +M1: M; +M2: M.M1; + +a0: 1; +a1: 2; +a2: 2; + +a: a0 + a1*X + a2*X^2; + +A: a0*M0 + a1*M1 + a2*M2; +A: mod(A, 7); + +T: matrix( + [ 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; + +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; + +t: inv_mod(T[3,3], 7); +T[3]: mod(t * T[3], 7); +T; + +T[2]: mod(T[2] - T[2,3] * T[3], 7); +T[1]: mod(T[1] - T[1,3] * T[3], 7); +T; + +T[1]: mod(T[1] - T[1,2] * T[2], 7); +T; + +C: matrix( + [ 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); + +b0: C[1,1]; +b1: C[2,1]; +b2: C[3,1]; + +Cc: mod(b0*M0 + b1*M1 + b2*M2, 7); +C - Cc; + +b: b0 + b1*X + b2*X^2; +p: expand(a*b); + +pp: 3*X^4 + X^3 + 3*X^2 + 6*X; + +divide(pp, m, X); + diff --git a/buch/chapters/30-endlichekoerper/rechnungen/inverse.maxima b/buch/chapters/30-endlichekoerper/rechnungen/inverse.maxima new file mode 100644 index 0000000..5f3682f --- /dev/null +++ b/buch/chapters/30-endlichekoerper/rechnungen/inverse.maxima @@ -0,0 +1,35 @@ +/* + * inverse.maxima + * + * (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ +n: 5; +m: X^5 + 15*X^3 - 30*X^2 + 45; + +M: matrix( + [ 0, 0, 0, 0, -45 ], + [ 1, 0, 0, 0, 0 ], + [ 0, 1, 0, 0, 30 ], + [ 0, 0, 1, 0, -15 ], + [ 0, 0, 0, 1, 0 ] +); +M2: M.M; +M3: M.M2; +M4: M.M3; + +y: a0 + a1*X + a2*X^2 + a3*X^3 + a4*X^4; +Y: a0*identfor(M) + a1*M + a2*M2 + a3*M3 + a4*M4; + +B: invert(Y); + +b0: B[1,1]; +b1: B[2,1]; +b2: B[3,1]; +b3: B[4,1]; +b4: B[5,1]; + +Z: b0*identfor(M) + b1*M + b2*M2 + b3*M3 + b4*M4; +z: b0 + b1*X + b2*X^2 + b3*X^3 + b4*X^4; + +w: expand(y*z); +remainder(w, m, X); diff --git a/buch/chapters/30-endlichekoerper/rechnungen/multiplikation.maxima b/buch/chapters/30-endlichekoerper/rechnungen/multiplikation.maxima new file mode 100644 index 0000000..e09f848 --- /dev/null +++ b/buch/chapters/30-endlichekoerper/rechnungen/multiplikation.maxima @@ -0,0 +1,38 @@ +/* + * multiplikation.maxima + * + * (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ + +Malpha: matrix( +[ 0, 0, 0, 0, 0, 0, -m0 ], +[ 1, 0, 0, 0, 0, 0, -m1 ], +[ 0, 1, 0, 0, 0, 0, -m2 ], +[ 0, 0, 1, 0, 0, 0, -m3 ], +[ 0, 0, 0, 1, 0, 0, -m4 ], +[ 0, 0, 0, 0, 1, 0, -m5 ], +[ 0, 0, 0, 0, 0, 1, -m6 ] +); + +Malpha2: expand(Malpha . Malpha); +Malpha3: expand(Malpha . Malpha2); +Malpha4: expand(Malpha . Malpha3); +Malpha5: expand(Malpha . Malpha4); +Malpha6: expand(Malpha . Malpha5); +Malpha7: expand(Malpha . Malpha6); +Malpha8: expand(Malpha . Malpha7); + +p: m0 * identfor(Malpha) ++ m1 * Malpha ++ m2 * Malpha2 ++ m3 * Malpha3 ++ m4 * Malpha4 ++ m5 * Malpha5 ++ m6 * Malpha6 ++ Malpha7; +expand(p); + + +m(X) := m0 + m1*X + m2*X^2 + m3*X^3 + m4*X^4 + m5*X^5 + m6*X^6 + X^7; + +invert(Malpha); |