This commit is contained in:
William Ball 2021-03-29 17:16:35 -07:00
parent 495139741f
commit d740a18fe1

View file

@ -16,7 +16,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
@ -30,7 +30,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"metadata": {},
"outputs": [
{
@ -42,7 +42,7 @@
"[ 0 0 0 1]"
]
},
"execution_count": 2,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@ -62,7 +62,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"metadata": {
"scrolled": true
},
@ -113,7 +113,7 @@
"[-2 -2 -2 -4]"
]
},
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@ -140,7 +140,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {
"scrolled": true
},
@ -154,7 +154,7 @@
"[-1/4 -1/4 -1/4 1/8]"
]
},
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@ -165,7 +165,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
@ -197,7 +197,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
@ -206,7 +206,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"outputs": [
{
@ -218,7 +218,7 @@
"[ 0 0 0 1]"
]
},
"execution_count": 8,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@ -229,7 +229,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 11,
"metadata": {},
"outputs": [
{
@ -238,7 +238,7 @@
"b1^2 + b2^2 + b3^2 - b1*b_avg - b2*b_avg - b3*b_avg + 1/4*b_avg^2"
]
},
"execution_count": 9,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@ -269,20 +269,21 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"def weyl_generators(matrix, alphas):\n",
" retval = []\n",
" for alpha in alphas:\n",
" retval.append(identity_matrix(len(alphas)) - 2 * alpha * alpha.transpose() * matrix)\n",
" scale_factor = (alpha.transpose() * matrix * alpha)[0][0]\n",
" retval.append(identity_matrix(len(alphas)) - 2 * alpha * alpha.transpose() * matrix / scale_factor)\n",
" return retval"
]
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
@ -292,7 +293,30 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[ 2 0 0 -1]\n",
"[ 0 2 0 -1]\n",
"[ 0 0 2 -1]\n",
"[ -1 -1 -1 1/2]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"4 * M.inverse()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
@ -302,23 +326,23 @@
"[-1 0 0 1] [ 1 0 0 0] [ 1 0 0 0] [ 1 0 0 0]\n",
"[ 0 1 0 0] [ 0 -1 0 1] [ 0 1 0 0] [ 0 1 0 0]\n",
"[ 0 0 1 0] [ 0 0 1 0] [ 0 0 -1 1] [ 0 0 1 0]\n",
"[ 0 0 0 1], [ 0 0 0 1], [ 0 0 0 1], [ 1 1 1 1/2]\n",
"[ 0 0 0 1], [ 0 0 0 1], [ 0 0 0 1], [ 4 4 4 -1]\n",
"]"
]
},
"execution_count": 12,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"S_i = weyl_generators(2 * M.inverse(), standard_basis(4))\n",
"S_i = weyl_generators(4 * M.inverse(), standard_basis(4))\n",
"S_i"
]
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
@ -337,7 +361,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 17,
"metadata": {},
"outputs": [
{
@ -346,7 +370,7 @@
"(7, 2, 4, 6)"
]
},
"execution_count": 14,
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@ -358,7 +382,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 18,
"metadata": {},
"outputs": [
{
@ -367,7 +391,7 @@
"(-1, 4, 4, 6)"
]
},
"execution_count": 15,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
@ -378,7 +402,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 19,
"metadata": {},
"outputs": [
{
@ -387,7 +411,7 @@
"(-1, 2, 2, 6)"
]
},
"execution_count": 16,
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
@ -396,36 +420,9 @@
"S3 * root"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For some reason, I have no idea why, $s_4$ doesn't seem to work. Instead this weird matrix does appear to work."
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(-1, 2, 4, 8)"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"S4 * root"
]
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 20,
"metadata": {},
"outputs": [
{
@ -434,18 +431,13 @@
"(-1, 2, 4, 14)"
]
},
"execution_count": 18,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"matrix([\n",
" [1, 0, 0, 0],\n",
" [0, 1, 0, 0],\n",
" [0, 0, 1, 0],\n",
" [4, 4, 4, -1]\n",
"]) * root"
"S4 * root"
]
},
{
@ -459,7 +451,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
@ -483,7 +475,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 22,
"metadata": {},
"outputs": [
{
@ -548,7 +540,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
@ -565,7 +557,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 24,
"metadata": {},
"outputs": [
{
@ -577,7 +569,7 @@
"[ 0 0 0 1 -1/2 1/2 1/2 1/2]"
]
},
"execution_count": 22,
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
@ -594,7 +586,7 @@
" [0, 2, 0, -1],\n",
"])\n",
"\n",
"Wc.transpose().echelon_form()"
"Wc.transpose().rref()"
]
},
{
@ -621,7 +613,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
@ -635,7 +627,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 26,
"metadata": {},
"outputs": [
{
@ -647,7 +639,7 @@
"[-3 -3 -3 1]"
]
},
"execution_count": 24,
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
@ -659,30 +651,30 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[ 5 -3 -3 -3]\n",
"[-3 5 -3 -3]\n",
"[-3 -3 5 -3]\n",
"[-3 -3 -3 5]"
"[ 2 -6/5 -6/5 -6/5]\n",
"[-6/5 2 -6/5 -6/5]\n",
"[-6/5 -6/5 2 -6/5]\n",
"[-6/5 -6/5 -6/5 2]"
]
},
"execution_count": 25,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"32 * m.inverse()"
"32 * m.inverse() * 2/5"
]
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 28,
"metadata": {},
"outputs": [
{
@ -694,7 +686,7 @@
"[bt4 b4 h14 h24]"
]
},
"execution_count": 26,
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
@ -713,7 +705,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
@ -722,7 +714,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 30,
"metadata": {},
"outputs": [
{
@ -731,7 +723,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"
]
},
"execution_count": 28,
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
@ -758,7 +750,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 31,
"metadata": {
"scrolled": true
},
@ -767,26 +759,31 @@
"data": {
"text/plain": [
"[\n",
"[-1 6 6 6] [ 1 0 0 0] [ 1 0 0 0] [ 1 0 0 0]\n",
"[ 0 1 0 0] [ 6 -1 6 6] [ 0 1 0 0] [ 0 1 0 0]\n",
"[ 0 0 1 0] [ 0 0 1 0] [ 6 6 -1 6] [ 0 0 1 0]\n",
"[ 0 0 0 1], [ 0 0 0 1], [ 0 0 0 1], [ 6 6 6 -1]\n",
"[ -1 6/5 6/5 6/5] [ 1 0 0 0] [ 1 0 0 0]\n",
"[ 0 1 0 0] [6/5 -1 6/5 6/5] [ 0 1 0 0]\n",
"[ 0 0 1 0] [ 0 0 1 0] [6/5 6/5 -1 6/5]\n",
"[ 0 0 0 1], [ 0 0 0 1], [ 0 0 0 1],\n",
"\n",
"[ 1 0 0 0]\n",
"[ 0 1 0 0]\n",
"[ 0 0 1 0]\n",
"[6/5 6/5 6/5 -1]\n",
"]"
]
},
"execution_count": 29,
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"S_i = weyl_generators(m, standard_basis(4))\n",
"S_i = weyl_generators(m.inverse(), standard_basis(4))\n",
"S_i"
]
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 32,
"metadata": {
"scrolled": true
},
@ -794,23 +791,23 @@
{
"data": {
"text/plain": [
"[ 1 -3 -3 -3 -1 -1 -1 -5]\n",
"[-3 1 -3 -3 -1 -1 -5 -1]\n",
"[-3 -3 1 -3 -1 -5 -1 -1]\n",
"[-3 -3 -3 1 -5 -1 -1 -1]\n",
"[-1 -1 -1 -5 1 -3 -3 -3]\n",
"[-1 -1 -5 -1 -3 1 -3 -3]\n",
"[-1 -5 -1 -1 -3 -3 1 -3]\n",
"[-5 -1 -1 -1 -3 -3 -3 1]"
"[ 1 0 0 0 1/2 1/2 1/2 -1/2]\n",
"[ 0 1 0 0 1/2 1/2 -1/2 1/2]\n",
"[ 0 0 1 0 1/2 -1/2 1/2 1/2]\n",
"[ 0 0 0 1 -1/2 1/2 1/2 1/2]\n",
"[ 0 0 0 0 0 0 0 0]\n",
"[ 0 0 0 0 0 0 0 0]\n",
"[ 0 0 0 0 0 0 0 0]\n",
"[ 0 0 0 0 0 0 0 0]"
]
},
"execution_count": 30,
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Wc * P * Wc.transpose()"
"(Wc * P * Wc.transpose()).rref()"
]
},
{
@ -823,7 +820,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 33,
"metadata": {},
"outputs": [],
"source": [
@ -839,7 +836,7 @@
" relation = root_matrix.transpose().rref() * vector([ var('b' + str(i)) for i in range(1, root_matrix.dimensions()[0] + 1)])\n",
" \n",
" # step 2: find matrix of quadratic form\n",
" W = root_matrix[0:4]\n",
" W = root_matrix[-4:]\n",
" M = W * P * W.transpose()\n",
" \n",
" # step 3: repeat with arbitrary matrix\n",
@ -858,7 +855,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 34,
"metadata": {},
"outputs": [
{
@ -877,14 +874,19 @@
"data": {
"text/plain": [
"[\n",
"[-9 6 6 6] [ 1 0 0 0] [ 1 0 0 0] [ 1 0 0 0]\n",
"[ 0 1 0 0] [ 6 -9 6 6] [ 0 1 0 0] [ 0 1 0 0]\n",
"[ 0 0 1 0] [ 0 0 1 0] [ 6 6 -9 6] [ 0 0 1 0]\n",
"[ 0 0 0 1], [ 0 0 0 1], [ 0 0 0 1], [ 6 6 6 -9]\n",
"[ -1 6/5 6/5 6/5] [ 1 0 0 0] [ 1 0 0 0]\n",
"[ 0 1 0 0] [6/5 -1 6/5 6/5] [ 0 1 0 0]\n",
"[ 0 0 1 0] [ 0 0 1 0] [6/5 6/5 -1 6/5]\n",
"[ 0 0 0 1], [ 0 0 0 1], [ 0 0 0 1],\n",
"\n",
"[ 1 0 0 0]\n",
"[ 0 1 0 0]\n",
"[ 0 0 1 0]\n",
"[6/5 6/5 6/5 -1]\n",
"]"
]
},
"execution_count": 32,
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
@ -900,7 +902,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 35,
"metadata": {},
"outputs": [
{
@ -920,13 +922,13 @@
"text/plain": [
"[\n",
"[-1 4 4 2] [ 1 0 0 0] [ 1 0 0 0] [ 1 0 0 0]\n",
"[ 0 1 0 0] [ 4 -7 0 4] [ 0 1 0 0] [ 0 1 0 0]\n",
"[ 0 0 1 0] [ 0 0 1 0] [ 4 0 -7 4] [ 0 0 1 0]\n",
"[ 0 1 0 0] [ 1 -1 0 1] [ 0 1 0 0] [ 0 1 0 0]\n",
"[ 0 0 1 0] [ 0 0 1 0] [ 1 0 -1 1] [ 0 0 1 0]\n",
"[ 0 0 0 1], [ 0 0 0 1], [ 0 0 0 1], [ 2 4 4 -1]\n",
"]"
]
},
"execution_count": 33,
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
@ -949,7 +951,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 36,
"metadata": {},
"outputs": [
{
@ -975,7 +977,7 @@
"]"
]
},
"execution_count": 34,
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
@ -1019,7 +1021,8 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
}
},
"name": "Apollonian Circle Packings.ipynb"
},
"nbformat": 4,
"nbformat_minor": 4