This commit is contained in:
William Ball 2021-06-01 20:37:27 -04:00
parent a13c1688eb
commit 15307ca83f
2 changed files with 279 additions and 92 deletions

View file

@ -16,7 +16,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 24, "execution_count": 1,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -43,7 +43,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 25, "execution_count": 2,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -59,7 +59,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 26, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -166,7 +166,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 27, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -178,7 +178,7 @@
"[ 0 0 0 1]" "[ 0 0 0 1]"
] ]
}, },
"execution_count": 27, "execution_count": 4,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -198,7 +198,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 28, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -235,7 +235,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 29, "execution_count": 6,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -249,7 +249,7 @@
"[-2 -2 -2 -4]" "[-2 -2 -2 -4]"
] ]
}, },
"execution_count": 29, "execution_count": 6,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -276,7 +276,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 30, "execution_count": 7,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -290,7 +290,7 @@
"[-1/4 -1/4 -1/4 1/8]" "[-1/4 -1/4 -1/4 1/8]"
] ]
}, },
"execution_count": 30, "execution_count": 7,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -301,7 +301,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 31, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -333,7 +333,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 32, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -342,7 +342,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 33, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -354,7 +354,7 @@
"[ 0 0 0 1]" "[ 0 0 0 1]"
] ]
}, },
"execution_count": 33, "execution_count": 10,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -365,7 +365,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 34, "execution_count": 11,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -374,7 +374,7 @@
"b1^2 + b2^2 + b3^2 - b1*b_avg - b2*b_avg - b3*b_avg + 1/4*b_avg^2" "b1^2 + b2^2 + b3^2 - b1*b_avg - b2*b_avg - b3*b_avg + 1/4*b_avg^2"
] ]
}, },
"execution_count": 34, "execution_count": 11,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -405,7 +405,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 35, "execution_count": 12,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -419,7 +419,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 36, "execution_count": 13,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -429,7 +429,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 37, "execution_count": 14,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -441,7 +441,7 @@
"[ -1 -1 -1 1/2]" "[ -1 -1 -1 1/2]"
] ]
}, },
"execution_count": 37, "execution_count": 14,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -452,7 +452,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 38, "execution_count": 15,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -466,7 +466,7 @@
"]" "]"
] ]
}, },
"execution_count": 38, "execution_count": 15,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -478,7 +478,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 39, "execution_count": 16,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -497,7 +497,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 40, "execution_count": 17,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -506,7 +506,7 @@
"(7, 2, 4, 6)" "(7, 2, 4, 6)"
] ]
}, },
"execution_count": 40, "execution_count": 17,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -518,7 +518,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 41, "execution_count": 18,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -527,7 +527,7 @@
"(-1, 4, 4, 6)" "(-1, 4, 4, 6)"
] ]
}, },
"execution_count": 41, "execution_count": 18,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -538,7 +538,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 42, "execution_count": 19,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -547,7 +547,7 @@
"(-1, 2, 2, 6)" "(-1, 2, 2, 6)"
] ]
}, },
"execution_count": 42, "execution_count": 19,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -558,7 +558,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 43, "execution_count": 20,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -567,7 +567,7 @@
"(-1, 2, 4, 14)" "(-1, 2, 4, 14)"
] ]
}, },
"execution_count": 43, "execution_count": 20,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -587,7 +587,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 44, "execution_count": 21,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -611,7 +611,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 45, "execution_count": 22,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -621,7 +621,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 46, "execution_count": 23,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -717,7 +717,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 47, "execution_count": 24,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -729,7 +729,7 @@
"[ 0 0 0 1 -1/2 1/2 1/2 1/2]" "[ 0 0 0 1 -1/2 1/2 1/2 1/2]"
] ]
}, },
"execution_count": 47, "execution_count": 24,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -773,7 +773,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 48, "execution_count": 25,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -787,7 +787,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 49, "execution_count": 26,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -799,7 +799,7 @@
"[-3 -3 -3 1]" "[-3 -3 -3 1]"
] ]
}, },
"execution_count": 49, "execution_count": 26,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -811,7 +811,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 50, "execution_count": 27,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -823,7 +823,7 @@
"[-6/5 -6/5 -6/5 2]" "[-6/5 -6/5 -6/5 2]"
] ]
}, },
"execution_count": 50, "execution_count": 27,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -834,7 +834,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 51, "execution_count": 28,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -846,7 +846,7 @@
"[bt4 b4 h14 h24]" "[bt4 b4 h14 h24]"
] ]
}, },
"execution_count": 51, "execution_count": 28,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -865,7 +865,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 52, "execution_count": 29,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -874,7 +874,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 53, "execution_count": 30,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -883,7 +883,7 @@
"5*b1^2 - 6*b1*b2 + 5*b2^2 - 6*b1*b3 - 6*b2*b3 + 5*b3^2 - 6*b1*b4 - 6*b2*b4 - 6*b3*b4 + 5*b4^2" "5*b1^2 - 6*b1*b2 + 5*b2^2 - 6*b1*b3 - 6*b2*b3 + 5*b3^2 - 6*b1*b4 - 6*b2*b4 - 6*b3*b4 + 5*b4^2"
] ]
}, },
"execution_count": 53, "execution_count": 30,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -910,7 +910,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 54, "execution_count": 31,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -931,7 +931,7 @@
"]" "]"
] ]
}, },
"execution_count": 54, "execution_count": 31,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -943,7 +943,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 55, "execution_count": 32,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -961,7 +961,7 @@
"[ 0 0 0 0 0 0 0 0]" "[ 0 0 0 0 0 0 0 0]"
] ]
}, },
"execution_count": 55, "execution_count": 32,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -980,7 +980,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 56, "execution_count": 33,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -1019,7 +1019,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 57, "execution_count": 34,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -1160,7 +1160,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 58, "execution_count": 35,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -1305,7 +1305,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 59, "execution_count": 36,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -1456,7 +1456,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 60, "execution_count": 37,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -1481,7 +1481,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 61, "execution_count": 38,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -1492,7 +1492,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 62, "execution_count": 39,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -1529,7 +1529,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 63, "execution_count": 40,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -1685,7 +1685,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 41,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -1726,7 +1726,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 65, "execution_count": 42,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -1863,7 +1863,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 66, "execution_count": 43,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -2016,7 +2016,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 67, "execution_count": 44,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -2048,24 +2048,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 81, "execution_count": 45,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{
"data": {
"text/html": [
"<html><script type=\"math/tex; mode=display\">\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left[0 = 0, 1 = 1, 0 = 0, 1 = 1, b_{5} = 1, b_{6} = 0\\right]</script></html>"
],
"text/latex": [
"$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left[0 = 0, 1 = 1, 0 = 0, 1 = 1, b_{5} = 1, b_{6} = 0\\right]$$"
],
"text/plain": [
"[0 == 0, 1 == 1, 0 == 0, 1 == 1, b5 == 1, b6 == 0]"
]
},
"metadata": {},
"output_type": "display_data"
},
{ {
"name": "stdout", "name": "stdout",
"output_type": "stream", "output_type": "stream",
@ -2134,7 +2119,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 69, "execution_count": 46,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -2178,7 +2163,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 70, "execution_count": 47,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -2196,7 +2181,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 71, "execution_count": 48,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -2205,7 +2190,7 @@
"-1/2*b2*bt1 - 1/2*b1*bt2 + h11*h12 + h21*h22" "-1/2*b2*bt1 - 1/2*b1*bt2 + h11*h12 + h21*h22"
] ]
}, },
"execution_count": 71, "execution_count": 48,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2218,7 +2203,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 72, "execution_count": 49,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -2255,7 +2240,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 73, "execution_count": 50,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -2296,7 +2281,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 74, "execution_count": 51,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -2305,7 +2290,7 @@
"-x^6 + x^5 + x^4 - x^3 - 2*x^2 + 2*x" "-x^6 + x^5 + x^4 - x^3 - 2*x^2 + 2*x"
] ]
}, },
"execution_count": 74, "execution_count": 51,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2316,7 +2301,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 75, "execution_count": 52,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -2360,7 +2345,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 76, "execution_count": 53,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -2543,7 +2528,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 77, "execution_count": 54,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@ -2563,7 +2548,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 78, "execution_count": 55,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@ -2964,7 +2949,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 79, "execution_count": 56,
"metadata": { "metadata": {
"scrolled": true "scrolled": true
}, },
@ -3106,7 +3091,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 80, "execution_count": 57,
"metadata": { "metadata": {
"scrolled": false "scrolled": false
}, },
@ -3297,6 +3282,207 @@
"show(8 * equation)\n", "show(8 * equation)\n",
"show(weyl_generators(mat, standard_basis(4)))" "show(weyl_generators(mat, standard_basis(4)))"
] ]
},
{
"cell_type": "code",
"execution_count": 68,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<html><script type=\"math/tex; mode=display\">\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{1}{2 \\, {\\left(2 \\, \\sqrt{6} - 5\\right)}}</script></html>"
],
"text/latex": [
"$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}-\\frac{1}{2 \\, {\\left(2 \\, \\sqrt{6} - 5\\right)}}$$"
],
"text/plain": [
"-1/2/(2*sqrt(6) - 5)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"def abbc_coords_3d(b, h1, h2, h3):\n",
" return (1-h1^2-h2^2-h3^2)/b\n",
"\n",
"show(simplify(abbc_coords_3d(10-4*sqrt(6), 0, 0, 0)))"
]
},
{
"cell_type": "code",
"execution_count": 64,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<html><script type=\"math/tex; mode=display\">\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(\\begin{array}{rrrrr}\n",
"-\\frac{1}{2} & -\\frac{1}{2} & -\\frac{1}{2} & -\\frac{1}{2} & \\sqrt{6} + \\frac{5}{2} \\\\\n",
"1 & 1 & 1 & 1 & -4 \\, \\sqrt{6} + 10 \\\\\n",
"1 & -1 & 0 & 0 & 0 \\\\\n",
"0 & 0 & 1 & -1 & 0 \\\\\n",
"-\\frac{1}{2} \\, \\sqrt{2} & -\\frac{1}{2} \\, \\sqrt{2} & \\frac{1}{2} \\, \\sqrt{2} & \\frac{1}{2} \\, \\sqrt{2} & 0\n",
"\\end{array}\\right)</script></html>"
],
"text/latex": [
"$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(\\begin{array}{rrrrr}\n",
"-\\frac{1}{2} & -\\frac{1}{2} & -\\frac{1}{2} & -\\frac{1}{2} & \\sqrt{6} + \\frac{5}{2} \\\\\n",
"1 & 1 & 1 & 1 & -4 \\, \\sqrt{6} + 10 \\\\\n",
"1 & -1 & 0 & 0 & 0 \\\\\n",
"0 & 0 & 1 & -1 & 0 \\\\\n",
"-\\frac{1}{2} \\, \\sqrt{2} & -\\frac{1}{2} \\, \\sqrt{2} & \\frac{1}{2} \\, \\sqrt{2} & \\frac{1}{2} \\, \\sqrt{2} & 0\n",
"\\end{array}\\right)$$"
],
"text/plain": [
"[ -1/2 -1/2 -1/2 -1/2 sqrt(6) + 5/2]\n",
"[ 1 1 1 1 -4*sqrt(6) + 10]\n",
"[ 1 -1 0 0 0]\n",
"[ 0 0 1 -1 0]\n",
"[ -1/2*sqrt(2) -1/2*sqrt(2) 1/2*sqrt(2) 1/2*sqrt(2) 0]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"\n",
"W = matrix([\n",
" [-1/2, -1/2, -1/2, -1/2, 5/2+sqrt(6)],\n",
" [1, 1, 1, 1, 10-4*sqrt(6)],\n",
" [1, -1, 0, 0, 0],\n",
" [0, 0, 1, -1, 0],\n",
" [-1/sqrt(2), -1/sqrt(2), 1/sqrt(2), 1/sqrt(2), 0]\n",
"])\n",
"show(W)"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<html><script type=\"math/tex; mode=display\">\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(\\begin{array}{rrrrr}\n",
"0 & -\\frac{1}{2} & 0 & 0 & 0 \\\\\n",
"-\\frac{1}{2} & 0 & 0 & 0 & 0 \\\\\n",
"0 & 0 & 1 & 0 & 0 \\\\\n",
"0 & 0 & 0 & 1 & 0 \\\\\n",
"0 & 0 & 0 & 0 & 1\n",
"\\end{array}\\right)</script></html>"
],
"text/latex": [
"$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(\\begin{array}{rrrrr}\n",
"0 & -\\frac{1}{2} & 0 & 0 & 0 \\\\\n",
"-\\frac{1}{2} & 0 & 0 & 0 & 0 \\\\\n",
"0 & 0 & 1 & 0 & 0 \\\\\n",
"0 & 0 & 0 & 1 & 0 \\\\\n",
"0 & 0 & 0 & 0 & 1\n",
"\\end{array}\\right)$$"
],
"text/plain": [
"[ 0 -1/2 0 0 0]\n",
"[-1/2 0 0 0 0]\n",
"[ 0 0 1 0 0]\n",
"[ 0 0 0 1 0]\n",
"[ 0 0 0 0 1]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"P = matrix([\n",
" [0, -1/2, 0, 0, 0],\n",
" [-1/2, 0, 0, 0, 0],\n",
" [0, 0, 1, 0, 0],\n",
" [0, 0, 0, 1, 0],\n",
" [0, 0, 0, 0, 1]\n",
"])\n",
"show(P)"
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<html><script type=\"math/tex; mode=display\">\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(\\begin{array}{rrrrr}\n",
"2 & 0 & 0 & 0 & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} \\\\\n",
"0 & 2 & 0 & 0 & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} \\\\\n",
"0 & 0 & 2 & 0 & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} \\\\\n",
"0 & 0 & 0 & 2 & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} \\\\\n",
"-\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} & {\\left(2 \\, \\sqrt{6} + 5\\right)} {\\left(2 \\, \\sqrt{6} - 5\\right)}\n",
"\\end{array}\\right)</script></html>"
],
"text/latex": [
"$$\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left(\\begin{array}{rrrrr}\n",
"2 & 0 & 0 & 0 & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} \\\\\n",
"0 & 2 & 0 & 0 & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} \\\\\n",
"0 & 0 & 2 & 0 & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} \\\\\n",
"0 & 0 & 0 & 2 & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} \\\\\n",
"-\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} & -\\frac{3}{2} \\, \\sqrt{6} + \\frac{5}{4} & {\\left(2 \\, \\sqrt{6} + 5\\right)} {\\left(2 \\, \\sqrt{6} - 5\\right)}\n",
"\\end{array}\\right)$$"
],
"text/plain": [
"[ 2 0 0 0 -3/2*sqrt(6) + 5/4]\n",
"[ 0 2 0 0 -3/2*sqrt(6) + 5/4]\n",
"[ 0 0 2 0 -3/2*sqrt(6) + 5/4]\n",
"[ 0 0 0 2 -3/2*sqrt(6) + 5/4]\n",
"[ -3/2*sqrt(6) + 5/4 -3/2*sqrt(6) + 5/4 -3/2*sqrt(6) + 5/4 -3/2*sqrt(6) + 5/4 (2*sqrt(6) + 5)*(2*sqrt(6) - 5)]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"show(W.transpose() * P * W)"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {},
"outputs": [
{
"ename": "AttributeError",
"evalue": "'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense' object has no attribute 'full_simplify'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-75-c08f2798205a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 10\u001b[0m ])\n\u001b[1;32m 11\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 12\u001b[0;31m \u001b[0mshow\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mW\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtranspose\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mP\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mW\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfull_simplify\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m/usr/lib/python3.9/site-packages/sage/structure/element.pyx\u001b[0m in \u001b[0;36msage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4716)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 491\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'LeftZeroSemigroup_with_category.element_class'\u001b[0m \u001b[0mobject\u001b[0m \u001b[0mhas\u001b[0m \u001b[0mno\u001b[0m \u001b[0mattribute\u001b[0m \u001b[0;34m'blah_blah'\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 492\u001b[0m \"\"\"\n\u001b[0;32m--> 493\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgetattr_from_category\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 494\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 495\u001b[0m \u001b[0mcdef\u001b[0m \u001b[0mgetattr_from_category\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/lib/python3.9/site-packages/sage/structure/element.pyx\u001b[0m in \u001b[0;36msage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4828)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 504\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 505\u001b[0m \u001b[0mcls\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mP\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_abstract_element_class\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 506\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mgetattr_from_other_class\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcls\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 507\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 508\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__dir__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/usr/lib/python3.9/site-packages/sage/cpython/getattr.pyx\u001b[0m in \u001b[0;36msage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2625)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 370\u001b[0m \u001b[0mdummy_error_message\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcls\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 371\u001b[0m \u001b[0mdummy_error_message\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mname\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 372\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdummy_error_message\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 373\u001b[0m \u001b[0mattribute\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m<\u001b[0m\u001b[0mobject\u001b[0m\u001b[0;34m>\u001b[0m\u001b[0mattr\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 374\u001b[0m \u001b[0;31m# Check for a descriptor (__get__ in Python)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mAttributeError\u001b[0m: 'sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense' object has no attribute 'full_simplify'"
]
}
],
"source": [
"bt = 2 * (2 + sqrt(3))\n",
"b = 1 / (2 + sqrt(3))\n",
"\n",
"W = matrix([\n",
" [2, 2, 2, 2, 2, 2, 2, 2, bt, bt, bt, bt, bt, bt, bt, bt],\n",
" [1, 1, 1, 1, 1, 1, 1, 1, b, b, b, b, b, b, b, b],\n",
" [1, 1, 1, 1, -1, -1, -1, -1] * 2,\n",
" [1, 1, -1, -1, 1, 1, -1, -1] * 2,\n",
" [1, -1, 1, -1, 1, -1, 1, -1] * 2\n",
"])\n",
"\n",
"show(W.transpose() * P * W)"
]
} }
], ],
"metadata": { "metadata": {

1
fractaldimension.ipynb Normal file

File diff suppressed because one or more lines are too long