Created
May 29, 2021 01:52
-
-
Save YasuakiHonda/916110963413460b7d5c400f0fd4e241 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{12}$}{\\it applyLFT}\\left(M , z\\right):=\\frac{M_{1,1}\\,z+M_{1,2}}{M_{2,1}\\,z+M_{2,2}}\\]" | |
], | |
"text/plain": [ | |
" M z + M\n", | |
" 1, 1 1, 2\n", | |
"(%o12) applyLFT(M, z) := ---------------\n", | |
" M z + M\n", | |
" 2, 1 2, 2" | |
], | |
"text/x-maxima": [ | |
"applyLFT(M,z):=(M[1,1]*z+M[1,2])/(M[2,1]*z+M[2,2])" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(M,z):=(M[1,1]*z+M[1,2])/(M[2,1]*z+M[2,2]);" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{14}$}{\\it genmat}\\left(n\\right):=\\begin{pmatrix}a_{n} & b_{n} \\\\ 1 & 0 \\\\ \\end{pmatrix}\\]" | |
], | |
"text/plain": [ | |
" [ a b ]\n", | |
"(%o14) genmat(n) := [ n n ]\n", | |
" [ ]\n", | |
" [ 1 0 ]" | |
], | |
"text/x-maxima": [ | |
"genmat(n):=matrix([a[n],b[n]],[1,0])" | |
] | |
}, | |
"execution_count": 14, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"genmat(n):=matrix([a[n],b[n]],[1,0]);" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{23}$}\\frac{a_{1}\\,a_{2}+b_{1}}{a_{2}}\\]" | |
], | |
"text/plain": [ | |
" a a + b\n", | |
" 1 2 1\n", | |
"(%o23) ----------\n", | |
" a\n", | |
" 2" | |
], | |
"text/x-maxima": [ | |
"(a[1]*a[2]+b[1])/a[2]" | |
] | |
}, | |
"execution_count": 23, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(genmat(1),a[2]);" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{24}$}\\frac{a_{1}\\,a_{2}\\,a_{3}+b_{1}\\,a_{3}+a_{1}\\,b_{2}}{a_{2}\\,a_{3}+b_{2}}\\]" | |
], | |
"text/plain": [ | |
" a a a + b a + a b\n", | |
" 1 2 3 1 3 1 2\n", | |
"(%o24) ------------------------\n", | |
" a a + b\n", | |
" 2 3 2" | |
], | |
"text/x-maxima": [ | |
"(a[1]*a[2]*a[3]+b[1]*a[3]+a[1]*b[2])/(a[2]*a[3]+b[2])" | |
] | |
}, | |
"execution_count": 24, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(genmat(1).genmat(2),a[3]),factor;" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{27}$}\\frac{a_{1}\\,a_{2}\\,a_{3}\\,a_{4}+b_{1}\\,a_{3}\\,a_{4}+a_{1}\\,b_{2}\\,a_{4}+a_{1}\\,a_{2}\\,b_{3}+b_{1}\\,b_{3}}{a_{2}\\,a_{3}\\,a_{4}+b_{2}\\,a_{4}+a_{2}\\,b_{3}}\\]" | |
], | |
"text/plain": [ | |
" a a a a + b a a + a b a + a a b + b b\n", | |
" 1 2 3 4 1 3 4 1 2 4 1 2 3 1 3\n", | |
"(%o27) ----------------------------------------------------\n", | |
" a a a + b a + a b\n", | |
" 2 3 4 2 4 2 3" | |
], | |
"text/x-maxima": [ | |
"(a[1]*a[2]*a[3]*a[4]+b[1]*a[3]*a[4]+a[1]*b[2]*a[4]+a[1]*a[2]*b[3]+b[1]*b[3])\n", | |
" /(a[2]*a[3]*a[4]+b[2]*a[4]+a[2]*b[3])" | |
] | |
}, | |
"execution_count": 27, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(genmat(1).genmat(2).genmat(3),a[4]),factor;" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{28}$}\\frac{a_{1}\\,a_{2}\\,a_{3}\\,a_{4}\\,a_{5}+b_{1}\\,a_{3}\\,a_{4}\\,a_{5}+a_{1}\\,b_{2}\\,a_{4}\\,a_{5}+a_{1}\\,a_{2}\\,b_{3}\\,a_{5}+b_{1}\\,b_{3}\\,a_{5}+a_{1}\\,a_{2}\\,a_{3}\\,b_{4}+b_{1}\\,a_{3}\\,b_{4}+a_{1}\\,b_{2}\\,b_{4}}{a_{2}\\,a_{3}\\,a_{4}\\,a_{5}+b_{2}\\,a_{4}\\,a_{5}+a_{2}\\,b_{3}\\,a_{5}+a_{2}\\,a_{3}\\,b_{4}+b_{2}\\,b_{4}}\\]" | |
], | |
"text/plain": [ | |
"(%o28) (a a a a a + b a a a + a b a a + a a b a + b b a\n", | |
" 1 2 3 4 5 1 3 4 5 1 2 4 5 1 2 3 5 1 3 5\n", | |
" + a a a b + b a b + a b b )/(a a a a + b a a + a b a\n", | |
" 1 2 3 4 1 3 4 1 2 4 2 3 4 5 2 4 5 2 3 5\n", | |
" + a a b + b b )\n", | |
" 2 3 4 2 4" | |
], | |
"text/x-maxima": [ | |
"(a[1]*a[2]*a[3]*a[4]*a[5]+b[1]*a[3]*a[4]*a[5]+a[1]*b[2]*a[4]*a[5]\n", | |
" +a[1]*a[2]*b[3]*a[5]+b[1]*b[3]*a[5]\n", | |
" +a[1]*a[2]*a[3]*b[4]+b[1]*a[3]*b[4]+a[1]*b[2]*b[4])\n", | |
" /(a[2]*a[3]*a[4]*a[5]+b[2]*a[4]*a[5]+a[2]*b[3]*a[5]+a[2]*a[3]*b[4]+b[2]*b[4])" | |
] | |
}, | |
"execution_count": 28, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(genmat(1).genmat(2).genmat(3).genmat(4),a[5]),factor;" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 29, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{29}$}{\\it mprod}\\left(n\\right):=\\mathbf{if}\\;n=1\\;\\mathbf{then}\\;{\\it genmat}\\left(1\\right)\\;\\mathbf{else}\\;{\\it mprod}\\left(n-1\\right)\\cdot {\\it genmat}\\left(n\\right)\\]" | |
], | |
"text/plain": [ | |
"(%o29) mprod(n) := if n = 1 then genmat(1) else mprod(n - 1) . genmat(n)" | |
], | |
"text/x-maxima": [ | |
"mprod(n):=if n = 1 then genmat(1) else mprod(n-1) . genmat(n)" | |
] | |
}, | |
"execution_count": 29, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"mprod(n):=if n=1 then genmat(1) else mprod(n-1).genmat(n);" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 38, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{37}$}\\frac{b_{1}}{a_{2}}\\]" | |
], | |
"text/plain": [ | |
" b\n", | |
" 1\n", | |
"(%o37) --\n", | |
" a\n", | |
" 2" | |
], | |
"text/x-maxima": [ | |
"b[1]/a[2]" | |
] | |
}, | |
"execution_count": 38, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(mprod(1),a[2])-a[1],factor;" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{36}$}-\\frac{b_{1}\\,b_{2}}{a_{2}\\,\\left(a_{2}\\,a_{3}+b_{2}\\right)}\\]" | |
], | |
"text/plain": [ | |
" b b\n", | |
" 1 2\n", | |
"(%o36) - ---------------\n", | |
" a (a a + b )\n", | |
" 2 2 3 2" | |
], | |
"text/x-maxima": [ | |
"-(b[1]*b[2])/(a[2]*(a[2]*a[3]+b[2]))" | |
] | |
}, | |
"execution_count": 36, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(mprod(2),a[3])-applyLFT(mprod(1),a[2]),factor;" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 35, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{35}$}\\frac{b_{1}\\,b_{2}\\,b_{3}}{\\left(a_{2}\\,a_{3}+b_{2}\\right)\\,\\left(a_{2}\\,a_{3}\\,a_{4}+b_{2}\\,a_{4}+a_{2}\\,b_{3}\\right)}\\]" | |
], | |
"text/plain": [ | |
" b b b\n", | |
" 1 2 3\n", | |
"(%o35) ---------------------------------------\n", | |
" (a a + b ) (a a a + b a + a b )\n", | |
" 2 3 2 2 3 4 2 4 2 3" | |
], | |
"text/x-maxima": [ | |
"(b[1]*b[2]*b[3])/((a[2]*a[3]+b[2])*(a[2]*a[3]*a[4]+b[2]*a[4]+a[2]*b[3]))" | |
] | |
}, | |
"execution_count": 35, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(mprod(3),a[4])-applyLFT(mprod(2),a[3]),factor;" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 34, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\[\\tag{${\\it \\%o}_{34}$}-\\frac{b_{1}\\,b_{2}\\,b_{3}\\,b_{4}}{\\left(a_{2}\\,a_{3}\\,a_{4}+b_{2}\\,a_{4}+a_{2}\\,b_{3}\\right)\\,\\left(a_{2}\\,a_{3}\\,a_{4}\\,a_{5}+b_{2}\\,a_{4}\\,a_{5}+a_{2}\\,b_{3}\\,a_{5}+a_{2}\\,a_{3}\\,b_{4}+b_{2}\\,b_{4}\\right)}\\]" | |
], | |
"text/plain": [ | |
"(%o34) - (b b b b )/((a a a + b a + a b )\n", | |
" 1 2 3 4 2 3 4 2 4 2 3\n", | |
" (a a a a + b a a + a b a + a a b + b b ))\n", | |
" 2 3 4 5 2 4 5 2 3 5 2 3 4 2 4" | |
], | |
"text/x-maxima": [ | |
"-(b[1]*b[2]*b[3]*b[4])/((a[2]*a[3]*a[4]+b[2]*a[4]+a[2]*b[3])\n", | |
" *(a[2]*a[3]*a[4]*a[5]+b[2]*a[4]*a[5]+a[2]*b[3]*a[5]\n", | |
" +a[2]*a[3]*b[4]+b[2]*b[4]))" | |
] | |
}, | |
"execution_count": 34, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"applyLFT(mprod(4),a[5])-applyLFT(mprod(3),a[4]),factor;" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Maxima", | |
"language": "maxima", | |
"name": "maxima" | |
}, | |
"language_info": { | |
"codemirror_mode": "maxima", | |
"file_extension": ".mac", | |
"mimetype": "text/x-maxima", | |
"name": "maxima", | |
"pygments_lexer": "maxima", | |
"version": "5.44.0" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment