{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Please wait (about a minute) so that the text cells in the notebook may be parsed \n", "\n", "Then you can then successfully \"shift return\" so that cells are executed." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Symmetric Functions in sage\n", "\n", "This is an introduction to symmetric functions via sage, intended to go with the lectures of F. Bergeron in the AEC school of 2018 (see the notes). We mostly follow the notation conventions of Macdonald's book: *Symmetric Functions and Hall Polynomials*, Second Edition,\n", "Oxford Mathematical Monographs, 1998.\n", "We mainly describe how to manipulate \"abstract\" symmetric functions (with coefficients in the ring of rational coefficient fractions in $q$ and $t$). As we will see, these are indexed by partitions.\n", "\n", "### Partitions\n", "\n", "Recall that a __partition__ $\\mu$ of $n$, one writes $\\mu\\vdash n$ or $n=|\\mu|$, is a sequence of integers $(\\mu_0,\\mu_1,\\ldots, \\mu_{k-1})$ (the $\\mu_i$'s are the __parts__ of $\\mu$) with $\\mu_0\\geq \\mu_1\\geq\\,\\cdots\\,\\geq\\mu_{k-1}>0$, and $n=\\mu_0+\\mu_1+\\ldots+\\mu_{k-1}$. The number $\\ell(\\mu):=k$ of parts of $\\mu$ is said to be its __length__. A partition $\\mu$ may also be described as a __Ferrers diagram__, which is the $n$-subset of $\\mathbb{N}\\times \\mathbb{N}$:\n", " $$\\{(a,b)\\ |\\ 0\\leq a<\\mu_i\\quad{\\rm and}\\quad b<\\ell(\\mu)\\}.$$\n", "This set is also denoted $\\mu$, and its elements are the __cells__ of $\\mu$. \n", "The __conjuguate__ of $\\mu$, is the partition $\\mu'$ such that\n", " $$ \\mu'=\\{(b,a)\\ |\\ (a,b)\\in\\mu\\}.$$\n", "Parts of $\\mu$ are the lengths of the __rows__ of its diagram, and parts of $\\mu'$ are the lengths of its __columns__.\n", "For more, see https://en.wikipedia.org/wiki/Partition_(number_theory)\n", "\n", "### The six bases\n", "\n", "Symmetric Functions are linear combinations of one of the following six classical bases of symmetric functions:\n", "\n", "- The __monomial__ symmetric functions $p_\\mu=p_{\\mu_1}p_{\\mu_2}\\cdots p_{\\mu_2}$\n", "- The __(complete) homogeneous__ symmetric functions $h_\\mu=h_{\\mu_1}h_{\\mu_2}\\cdots h_{\\mu_2}$\n", "- The __elementary__ symmetric functions $e_\\mu=e_{\\mu_1}e_{\\mu_2}\\cdots e_{\\mu_2}$\n", "- The __monomial__ functions $m_{\\mu}$\n", "- The __Schur__ functions $s_{\\mu}$\n", "- The __forgotten__ symmetric functions $f_{\\mu}$\n", "\n", "We will se below how to pass from one to another.\n", "\n", "### To get started, one executes the following cell with \"shift return\". Then, keep on doing it." ] }, { "cell_type": "code", "execution_count": 98, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Defining e as shorthand for Symmetric Functions over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field in the elementary basis\n", "Defining f as shorthand for Symmetric Functions over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field in the forgotten basis\n", "Defining h as shorthand for Symmetric Functions over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field in the homogeneous basis\n", "Defining m as shorthand for Symmetric Functions over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field in the monomial basis\n", "Defining p as shorthand for Symmetric Functions over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field in the powersum basis\n", "Defining s as shorthand for Symmetric Functions over Fraction Field of Multivariate Polynomial Ring in q, t over Rational Field in the Schur basis\n" ] } ], "source": [ "%display latex \n", "\n", "def mystr(i): \n", " if i<10: \n", " return str(i) \n", " else: \n", " return ''.join([str(i),\".\"])\n", " \n", "def compact(mu):\n", " if mu==Partition([]): return 0\n", " else: return (''.join(mystr(i) for i in mu))\n", "\n", "Partition._latex_= compact\n", "Composition._latex_= compact\n", "\n", "Sym = SymmetricFunctions(FractionField(QQ['q','t']))\n", "Sym.inject_shorthands()\n", "H = Sym.macdonald().Ht()\n", "H.print_options(prefix=\"H\")\n", "t=H.t\n", "q=H.q\n", "\n", "X=s[1]\n", "One=s([])\n", "f = e.dual_basis(prefix='f');\n", "\n", "M=(1-t)*(1-q)\n", "S = SymmetricFunctions(QQ)\n", "\n", "f._latex_term = lambda mu: \"\\mathbb{1}\" if mu==[] else \"f_{%s}\"%(''.join(mystr(i) for i in mu))\n", "H._latex_term = lambda mu: \"\\mathbb{1}\" if mu==[] else \"H_{%s}\"%(''.join(mystr(i) for i in mu))\n", "s._latex_term = lambda mu: \"\\mathbb{1}\" if mu==[] else \"s_{%s}\"%(''.join(mystr(i) for i in mu))\n", "p._latex_term = lambda mu: \"\\mathbb{1}\" if mu==[] else \"p_{%s}\"%(''.join(mystr(i) for i in mu))\n", "h._latex_term = lambda mu: \"\\mathbb{1}\" if mu==[] else \"h_{%s}\"%(''.join(mystr(i) for i in mu))\n", "e._latex_term = lambda mu: \"\\mathbb{1}\" if mu==[] else \"e_{%s}\"%(''.join(mystr(i) for i in mu))\n", "m._latex_term = lambda mu: \"\\mathbb{1}\" if mu==[] else \"m_{%s}\"%(''.join(mystr(i) for i in mu))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Partitions \n", "### To have a \"function\" version of $z_\\mu$ we set:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "def zee(mu):\n", " mu=Partition(mu)\n", " return mu.aut()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Using partitions, their cells, length, size, zee value, and conjugate\n", "\n", "Partitions are displayed as words, with the convention that parts of size larger than $9$ are followed by a \".\"" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1]]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(Partitions(5))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[7, 3, 3, 3, 2, 1]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mu=Partition([7,3,3,3,2,1])\n", "mu" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[(0, 0),\n", " (0, 1),\n", " (0, 2),\n", " (0, 3),\n", " (0, 4),\n", " (0, 5),\n", " (0, 6),\n", " (1, 0),\n", " (1, 1),\n", " (1, 2),\n", " (2, 0),\n", " (2, 1),\n", " (2, 2),\n", " (3, 0),\n", " (3, 1),\n", " (3, 2),\n", " (4, 0),\n", " (4, 1),\n", " (5, 0)]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mu.cells()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "6" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mu.length()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[([4], 1), ([3, 1], 2), ([2, 2], 2), ([2, 1, 1], 3), ([1, 1, 1, 1], 4)]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[(nu,nu.length()) for nu in Partitions(4)]" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "19" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mu.size()" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[6, 5, 4, 1, 1, 1, 1]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mu.conjugate()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[([4], [1, 1, 1, 1]),\n", " ([3, 1], [2, 1, 1]),\n", " ([2, 2], [2, 2]),\n", " ([2, 1, 1], [3, 1]),\n", " ([1, 1, 1, 1], [4])]" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[(nu,nu.conjugate()) for nu in Partitions(4)]" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "2268" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "zee(mu)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[([4], 4), ([3, 1], 3), ([2, 2], 8), ([2, 1, 1], 4), ([1, 1, 1, 1], 24)]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[(nu,zee(nu)) for nu in Partitions(4)]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### One can restrict to subsets of partitions, such as limiting the number or size of parts; or to partitions lying inside another" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[[9, 1], [8, 2], [7, 3], [6, 4], [5, 5]]" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(Partitions(10,length=2))" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[[4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1]]" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "list(Partitions(5,outer=[4,3,2,1]))" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "x^6 + 3*x^5 + 3*x^4 + 3*x^3 + 2*x^2 + x + 1" ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "add(Partitions(k,outer=[3,2,1]).cardinality()*x^k for k in range(7))" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [], "source": [ "def delta(n):\n", " return Partition([n-1-k for k in range(n-1)])" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[4, 3, 2, 1]" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "delta(5)" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "1" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "2" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "5" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "14" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "42" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "132" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for n in range(1,7):\n", " show(add(Partitions(k,outer=delta(n)).cardinality() for k in range(binomial(n,2)+1)))" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "x^9 + x^8 + 2*x^7 + 3*x^6 + 3*x^5 + 3*x^4 + 3*x^3 + 2*x^2 + x + 1" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fx=add(Partitions(k,outer=[3,3,3]).cardinality()*x^k for k in range(10))\n", "fx" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(x^4 + x^3 + x^2 + x + 1)*(x^2 - x + 1)*(x^2 + 1)*(x + 1)" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "factor(fx)" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(x^6 - 1)*(x^5 - 1)*(x^4 - 1)/((x^3 - 1)*(x^2 - 1)*(x - 1))" ] }, "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "q_binomial(6,3,x)" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(x^4 + x^3 + x^2 + x + 1)*(x^2 - x + 1)*(x^2 + 1)*(x + 1)" ] }, "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ "factor(_)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Calculations of the cardinalities of these sets are \"efficient\"" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "496025142797537184410324879054927095334462742231683423624" ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Partitions(3000).cardinality()" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "1500" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Partitions(3000,length=2).cardinality()" ] }, { "cell_type": "code", "execution_count": 39, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "5604" ] }, "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Partitions(30,outer=delta(100)).cardinality()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Symmetric functions\n", "\n", "### Displaying abstract symmetric functions" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(m[3, 2, 1], s[3, 3, 2, 2, 2, 1], h[3, 2, 1], p[22, 1], e[7, 5, 4])" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m[3,2,1],s[3,3,2,2,2,1], h[3,2,1], p[22,1], e[7,5,4]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Explicit expansion of a symmetric function in a set of variables (by default $x_0,x_1,\\ldots, x_{n-1}$)\n", "\n", "Simple examples include\n", "$$p_k(x_0,x_1,\\ldots, x_{n-1})= x_0^k+x_1^k+\\ldots +x_{n-1}^k,$$\n", "\n", "$$e_n(x_0,x_1,\\ldots, x_{n-1}) = x_0x_1\\cdots x_{n-1}.$$\n", "Recall that Python (and hence sage) likes to have \"ranges\" of length $n$ to go from\"0\" to \"$n-1$\".\n", "### In sage\n", "\n", "For any $g$, the expression $g(x_0,x_1,\\ldots,x_{n-1})$ is obtained via \n", "$$g.{\\rm expand}(n)$$" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "x0^3*x1^2*x2 + x0^2*x1^3*x2 + x0^3*x1*x2^2 + x0*x1^3*x2^2 + x0^2*x1*x2^3 + x0*x1^2*x2^3 + x0^3*x1^2*x3 + x0^2*x1^3*x3 + x0^3*x2^2*x3 + x1^3*x2^2*x3 + x0^2*x2^3*x3 + x1^2*x2^3*x3 + x0^3*x1*x3^2 + x0*x1^3*x3^2 + x0^3*x2*x3^2 + x1^3*x2*x3^2 + x0*x2^3*x3^2 + x1*x2^3*x3^2 + x0^2*x1*x3^3 + x0*x1^2*x3^3 + x0^2*x2*x3^3 + x1^2*x2*x3^3 + x0*x2^2*x3^3 + x1*x2^2*x3^3" ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m[3,2,1].expand(4)" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "x0^5 + x1^5 + x2^5 + x3^5 + x4^5 + x5^5" ] }, "execution_count": 43, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p[5].expand(6)" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "x0*x1*x2 + x0*x1*x3 + x0*x2*x3 + x1*x2*x3 + x0*x1*x4 + x0*x2*x4 + x1*x2*x4 + x0*x3*x4 + x1*x3*x4 + x2*x3*x4" ] }, "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e[3].expand(5)" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "x0^3*x1*x2 + x0^2*x1^2*x2 + x0*x1^3*x2 + x0^2*x1*x2^2 + x0*x1^2*x2^2 + x0*x1*x2^3 + x0^3*x1*x3 + x0^2*x1^2*x3 + x0*x1^3*x3 + x0^3*x2*x3 + 3*x0^2*x1*x2*x3 + 3*x0*x1^2*x2*x3 + x1^3*x2*x3 + x0^2*x2^2*x3 + 3*x0*x1*x2^2*x3 + x1^2*x2^2*x3 + x0*x2^3*x3 + x1*x2^3*x3 + x0^2*x1*x3^2 + x0*x1^2*x3^2 + x0^2*x2*x3^2 + 3*x0*x1*x2*x3^2 + x1^2*x2*x3^2 + x0*x2^2*x3^2 + x1*x2^2*x3^2 + x0*x1*x3^3 + x0*x2*x3^3 + x1*x2*x3^3" ] }, "execution_count": 45, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3,1,1].expand(4)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### One may use an \"optional alphabet\"" ] }, { "cell_type": "code", "execution_count": 46, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "x^2*y + x*y^2 + x^2*z + 2*x*y*z + y^2*z + x*z^2 + y*z^2" ] }, "execution_count": 46, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g = s[2,1]\n", "g.expand(3, alphabet =['x','y','z'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### The monomial basis is the \"simplest\"\n", "By definition the __complete homogeneous__ symmetric functions $h_n$ \n", "is the summ of all monomial summetric functions $m_\\mu$, for $\\mu$ partition of $n$. Thus" ] }, { "cell_type": "code", "execution_count": 47, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "m[1, 1, 1, 1] + m[2, 1, 1] + m[2, 2] + m[3, 1] + m[4]" ] }, "execution_count": 47, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m(h[4])" ] }, { "cell_type": "code", "execution_count": 48, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(h[5],\n", " m[1, 1, 1, 1, 1] + m[2, 1, 1, 1] + m[2, 2, 1] + m[3, 1, 1] + m[3, 2] + m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[4, 1],\n", " 5*m[1, 1, 1, 1, 1] + 4*m[2, 1, 1, 1] + 3*m[2, 2, 1] + 3*m[3, 1, 1] + 2*m[3, 2] + 2*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[3, 2],\n", " 10*m[1, 1, 1, 1, 1] + 7*m[2, 1, 1, 1] + 5*m[2, 2, 1] + 4*m[3, 1, 1] + 3*m[3, 2] + 2*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[3, 1, 1],\n", " 20*m[1, 1, 1, 1, 1] + 13*m[2, 1, 1, 1] + 8*m[2, 2, 1] + 7*m[3, 1, 1] + 4*m[3, 2] + 3*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[2, 2, 1],\n", " 30*m[1, 1, 1, 1, 1] + 18*m[2, 1, 1, 1] + 11*m[2, 2, 1] + 8*m[3, 1, 1] + 5*m[3, 2] + 3*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[2, 1, 1, 1],\n", " 60*m[1, 1, 1, 1, 1] + 33*m[2, 1, 1, 1] + 18*m[2, 2, 1] + 13*m[3, 1, 1] + 7*m[3, 2] + 4*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[1, 1, 1, 1, 1],\n", " 120*m[1, 1, 1, 1, 1] + 60*m[2, 1, 1, 1] + 30*m[2, 2, 1] + 20*m[3, 1, 1] + 10*m[3, 2] + 5*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((h(mu),m(h(mu))))" ] }, { "cell_type": "code", "execution_count": 49, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(p[5], m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[4, 1], m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[3, 2], m[3, 2] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[3, 1, 1], 2*m[3, 1, 1] + m[3, 2] + 2*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[2, 2, 1], 2*m[2, 2, 1] + 2*m[3, 2] + m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[2, 1, 1, 1],\n", " 6*m[2, 1, 1, 1] + 6*m[2, 2, 1] + 6*m[3, 1, 1] + 4*m[3, 2] + 3*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[1, 1, 1, 1, 1],\n", " 120*m[1, 1, 1, 1, 1] + 60*m[2, 1, 1, 1] + 30*m[2, 2, 1] + 20*m[3, 1, 1] + 10*m[3, 2] + 5*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((p(mu),m(p(mu))))" ] }, { "cell_type": "code", "execution_count": 50, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(e[5], m[1, 1, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[4, 1], 5*m[1, 1, 1, 1, 1] + m[2, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[3, 2], 10*m[1, 1, 1, 1, 1] + 3*m[2, 1, 1, 1] + m[2, 2, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[3, 1, 1], 20*m[1, 1, 1, 1, 1] + 7*m[2, 1, 1, 1] + 2*m[2, 2, 1] + m[3, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[2, 2, 1],\n", " 30*m[1, 1, 1, 1, 1] + 12*m[2, 1, 1, 1] + 5*m[2, 2, 1] + 2*m[3, 1, 1] + m[3, 2])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[2, 1, 1, 1],\n", " 60*m[1, 1, 1, 1, 1] + 27*m[2, 1, 1, 1] + 12*m[2, 2, 1] + 7*m[3, 1, 1] + 3*m[3, 2] + m[4, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[1, 1, 1, 1, 1],\n", " 120*m[1, 1, 1, 1, 1] + 60*m[2, 1, 1, 1] + 30*m[2, 2, 1] + 20*m[3, 1, 1] + 10*m[3, 2] + 5*m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((e(mu),m(e(mu))))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Coefficients of the monomial-expansion of Schur functions are Kostka numbers\n", "$$s_\\mu=\\sum_{\\mu\\vdash n} K_{\\mu,\\nu} m_\\nu$$\n", "Here, $K_{\\mu,\\nu}$ is the number of __semi-standard tableaux__ of __shape__ $\\mu$ and __content__ $\\nu$." ] }, { "cell_type": "code", "execution_count": 51, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "168*m[1, 1, 1, 1, 1, 1, 1, 1, 1] + 77*m[2, 1, 1, 1, 1, 1, 1, 1] + 36*m[2, 2, 1, 1, 1, 1, 1] + 17*m[2, 2, 2, 1, 1, 1] + 8*m[2, 2, 2, 2, 1] + 16*m[3, 1, 1, 1, 1, 1, 1] + 8*m[3, 2, 1, 1, 1, 1] + 4*m[3, 2, 2, 1, 1] + 2*m[3, 2, 2, 2] + 2*m[3, 3, 1, 1, 1] + m[3, 3, 2, 1]" ] }, "execution_count": 51, "metadata": {}, "output_type": "execute_result" } ], "source": [ "m(s[3,3,2,1])" ] }, { "cell_type": "code", "execution_count": 52, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "17" ] }, "execution_count": 52, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mu=[3,3,2,1]\n", "nu=[2,2,2,1,1,1]\n", "SemistandardTableaux(mu, nu).cardinality()" ] }, { "cell_type": "code", "execution_count": 53, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(s[5],\n", " m[1, 1, 1, 1, 1] + m[2, 1, 1, 1] + m[2, 2, 1] + m[3, 1, 1] + m[3, 2] + m[4, 1] + m[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[4, 1],\n", " 4*m[1, 1, 1, 1, 1] + 3*m[2, 1, 1, 1] + 2*m[2, 2, 1] + 2*m[3, 1, 1] + m[3, 2] + m[4, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[3, 2],\n", " 5*m[1, 1, 1, 1, 1] + 3*m[2, 1, 1, 1] + 2*m[2, 2, 1] + m[3, 1, 1] + m[3, 2])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[3, 1, 1], 6*m[1, 1, 1, 1, 1] + 3*m[2, 1, 1, 1] + m[2, 2, 1] + m[3, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[2, 2, 1], 5*m[1, 1, 1, 1, 1] + 2*m[2, 1, 1, 1] + m[2, 2, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[2, 1, 1, 1], 4*m[1, 1, 1, 1, 1] + m[2, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[1, 1, 1, 1, 1], m[1, 1, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((s(mu),m(s(mu))))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### defining \"Kostka\"" ] }, { "cell_type": "code", "execution_count": 54, "metadata": {}, "outputs": [], "source": [ "def Kostka(mu,nu):\n", " return SemistandardTableaux(mu, nu).cardinality()" ] }, { "cell_type": "code", "execution_count": 55, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[5, 3, 2, 1]" ] }, "execution_count": 55, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mu=Partition([5,3,2,1])\n", "n=mu.size()\n", "s(add(Kostka(mu,nu)*m(nu) for nu in Partitions(n)))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Some other changes of basis between symmetric functions\n", "\n", "Recall that the __complete homogeneous__ symmetric functions $h_d$ are related to __power sum__ symmetric functions $p_{\\mu}$ by the formula :\n", "$$h_d = \\sum \\limits_{\\mu \\vdash d} \\frac{1}{z_{\\mu}}p_{\\mu}$$\n", "where $z_\\mu$ is the number of \"automorphisms\" of a permutation having cycle structure $\\mu$. For example,\n", "$$h_4=\\frac{1}{24}p_{1111} + \\frac{1}{4}p_{211} + \\frac{1}{8}p_{22} + \\frac{1}{3}p_{31} + \\frac{1}{4}p_{4}$$\n", "### In sage:\n" ] }, { "cell_type": "code", "execution_count": 56, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "1/24*p[1, 1, 1, 1] + 1/4*p[2, 1, 1] + 1/8*p[2, 2] + 1/3*p[3, 1] + 1/4*p[4]" ] }, "execution_count": 56, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p(h[4])" ] }, { "cell_type": "code", "execution_count": 57, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(h[4],\n", " 1/24*p[1, 1, 1, 1] + 1/4*p[2, 1, 1] + 1/8*p[2, 2] + 1/3*p[3, 1] + 1/4*p[4])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[3, 1], 1/6*p[1, 1, 1, 1] + 1/2*p[2, 1, 1] + 1/3*p[3, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[2, 2], 1/4*p[1, 1, 1, 1] + 1/2*p[2, 1, 1] + 1/4*p[2, 2])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[2, 1, 1], 1/2*p[1, 1, 1, 1] + 1/2*p[2, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[1, 1, 1, 1], p[1, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(4):\n", " show((h(mu),p(h(mu))))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### By direct formula" ] }, { "cell_type": "code", "execution_count": 58, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 58, "metadata": {}, "output_type": "execute_result" } ], "source": [ "h(sum(p(mu)/zee(mu) for mu in Partitions(4)))==h[4]" ] }, { "cell_type": "code", "execution_count": 59, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "h[]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "h[1]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "h[2]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "h[3]" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "h[4]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for k in range(5):\n", " show(h(sum(p(mu)/zee(mu) for mu in Partitions(k))))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### More examples" ] }, { "cell_type": "code", "execution_count": 60, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[3, 3, 2, 1] + s[3, 3, 3] + s[4, 2, 2, 1] + 2*s[4, 3, 1, 1] + 4*s[4, 3, 2] + 3*s[4, 4, 1] + 2*s[5, 2, 1, 1] + 3*s[5, 2, 2] + 7*s[5, 3, 1] + 4*s[5, 4] + s[6, 1, 1, 1] + 6*s[6, 2, 1] + 6*s[6, 3] + 3*s[7, 1, 1] + 5*s[7, 2] + 3*s[8, 1] + s[9]" ] }, "execution_count": 60, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(h[3,3,2,1])" ] }, { "cell_type": "code", "execution_count": 61, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(h[5], s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[4, 1], s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[3, 2], s[3, 2] + s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[3, 1, 1], s[3, 1, 1] + s[3, 2] + 2*s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[2, 2, 1], s[2, 2, 1] + s[3, 1, 1] + 2*s[3, 2] + 2*s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[2, 1, 1, 1],\n", " s[2, 1, 1, 1] + 2*s[2, 2, 1] + 3*s[3, 1, 1] + 3*s[3, 2] + 3*s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[1, 1, 1, 1, 1],\n", " s[1, 1, 1, 1, 1] + 4*s[2, 1, 1, 1] + 5*s[2, 2, 1] + 6*s[3, 1, 1] + 5*s[3, 2] + 4*s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((h(mu),s(h(mu))))" ] }, { "cell_type": "code", "execution_count": 62, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[1, 1, 1, 1, 1, 1, 1, 1, 1] + 3*s[2, 1, 1, 1, 1, 1, 1, 1] + 5*s[2, 2, 1, 1, 1, 1, 1] + 6*s[2, 2, 2, 1, 1, 1] + 4*s[2, 2, 2, 2, 1] + 3*s[3, 1, 1, 1, 1, 1, 1] + 6*s[3, 2, 1, 1, 1, 1] + 7*s[3, 2, 2, 1, 1] + 3*s[3, 2, 2, 2] + 3*s[3, 3, 1, 1, 1] + 4*s[3, 3, 2, 1] + s[3, 3, 3] + s[4, 1, 1, 1, 1, 1] + 2*s[4, 2, 1, 1, 1] + 2*s[4, 2, 2, 1] + s[4, 3, 1, 1] + s[4, 3, 2]" ] }, "execution_count": 62, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(e[3,3,2,1])" ] }, { "cell_type": "code", "execution_count": 63, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(e[5], s[1, 1, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[4, 1], s[1, 1, 1, 1, 1] + s[2, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[3, 2], s[1, 1, 1, 1, 1] + s[2, 1, 1, 1] + s[2, 2, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[3, 1, 1], s[1, 1, 1, 1, 1] + 2*s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[2, 2, 1],\n", " s[1, 1, 1, 1, 1] + 2*s[2, 1, 1, 1] + 2*s[2, 2, 1] + s[3, 1, 1] + s[3, 2])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[2, 1, 1, 1],\n", " s[1, 1, 1, 1, 1] + 3*s[2, 1, 1, 1] + 3*s[2, 2, 1] + 3*s[3, 1, 1] + 2*s[3, 2] + s[4, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(e[1, 1, 1, 1, 1],\n", " s[1, 1, 1, 1, 1] + 4*s[2, 1, 1, 1] + 5*s[2, 2, 1] + 6*s[3, 1, 1] + 5*s[3, 2] + 4*s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((e(mu),s(e(mu))))" ] }, { "cell_type": "code", "execution_count": 64, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(p[5], s[1, 1, 1, 1, 1] - s[2, 1, 1, 1] + s[3, 1, 1] - s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[4, 1], -s[1, 1, 1, 1, 1] + s[2, 2, 1] - s[3, 2] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[3, 2],\n", " -s[1, 1, 1, 1, 1] + s[2, 1, 1, 1] - s[2, 2, 1] + s[3, 2] - s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[3, 1, 1],\n", " s[1, 1, 1, 1, 1] + s[2, 1, 1, 1] - s[2, 2, 1] - s[3, 2] + s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[2, 2, 1], s[1, 1, 1, 1, 1] + s[2, 2, 1] - 2*s[3, 1, 1] + s[3, 2] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[2, 1, 1, 1],\n", " -s[1, 1, 1, 1, 1] - 2*s[2, 1, 1, 1] - s[2, 2, 1] + s[3, 2] + 2*s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(p[1, 1, 1, 1, 1],\n", " s[1, 1, 1, 1, 1] + 4*s[2, 1, 1, 1] + 5*s[2, 2, 1] + 6*s[3, 1, 1] + 5*s[3, 2] + 4*s[4, 1] + s[5])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((p(mu),s(p(mu))))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### The omega involution\n", "\n", "The __$\\omega$ involution__ is the multiplicative, linear extension of the map which sends $p_n$ to $(-1)^{n-1}p_n$." ] }, { "cell_type": "code", "execution_count": 65, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "-p[4]" ] }, "execution_count": 65, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p[4].omega()" ] }, { "cell_type": "code", "execution_count": 66, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[4, 3, 2]" ] }, "execution_count": 66, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3,3,2,1].omega()" ] }, { "cell_type": "code", "execution_count": 67, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(s[5], s[1, 1, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[4, 1], s[2, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[3, 2], s[2, 2, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[3, 1, 1], s[3, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[2, 2, 1], s[3, 2])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[2, 1, 1, 1], s[4, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(s[1, 1, 1, 1, 1], s[5])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((s(mu),s(mu).omega()))" ] }, { "cell_type": "code", "execution_count": 68, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(h[5], e[5])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[4, 1], e[4, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[3, 2], e[3, 2])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[3, 1, 1], e[3, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[2, 2, 1], e[2, 2, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[2, 1, 1, 1], e[2, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(h[1, 1, 1, 1, 1], e[1, 1, 1, 1, 1])" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for mu in Partitions(5):\n", " show((h(mu),e(h(mu).omega())))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Scalar Products\n", "\n", "The Hall scalar product is the standard scalar product on the algebra of symmetric functions. It makes the Schur functions into an orthonormal basis. To define it, one sets \n", "$$\\langle p_\\mu,p_\\lambda\\rangle = z_\\mu\\,\\delta_{\\mu,\\lambda}$$\n", "with $\\delta_{\\mu,\\lambda}$ the Kronecker \"$\\delta$\"." ] }, { "cell_type": "code", "execution_count": 69, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "8" ] }, "execution_count": 69, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p([2,2,1]).scalar(p([2,2,1]))" ] }, { "cell_type": "code", "execution_count": 70, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[1 0 0 0 0 0 0]\n", "[0 1 0 0 0 0 0]\n", "[0 0 1 0 0 0 0]\n", "[0 0 0 1 0 0 0]\n", "[0 0 0 0 1 0 0]\n", "[0 0 0 0 0 1 0]\n", "[0 0 0 0 0 0 1]" ] }, "execution_count": 70, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Matrix([[p(mu).scalar(p(nu)/zee(mu)) for nu in Partitions(5)] for mu in Partitions(5)])" ] }, { "cell_type": "code", "execution_count": 99, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[1 0 0 0 0 0 0]\n", "[0 1 0 0 0 0 0]\n", "[0 0 1 0 0 0 0]\n", "[0 0 0 1 0 0 0]\n", "[0 0 0 0 1 0 0]\n", "[0 0 0 0 0 1 0]\n", "[0 0 0 0 0 0 1]" ] }, "execution_count": 99, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Matrix([[f(mu).scalar(e(nu)) for nu in Partitions(5)] for mu in Partitions(5)])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### The involution $\\omega$ respects the scalar product\n", "$$\\langle \\omega g_1,\\omega g_2\\rangle = \\langle g_1, g_2\\rangle$$" ] }, { "cell_type": "code", "execution_count": 100, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 100, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3,2,2].scalar(h[2,2,2,1])==(s[3,2,2].omega()).scalar(e[2,2,2,1])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The ring structure\n", "\n", "Symmetric functions are closed under linear combination and product. In particular, we have an expansion\n", " $$s_\\mu s_\\nu=\\sum_{\\lambda} c_{\\mu,\\nu}^\\lambda s_\\lambda.$$\n", " It is a fact that the $c_{\\mu,\\nu}^\\lambda$ are positive integers, known as the __Littlewood-Richardson coefficients__" ] }, { "cell_type": "code", "execution_count": 101, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[3, 2, 2, 2, 1] + s[3, 3, 2, 1, 1] + s[3, 3, 2, 2] + s[4, 2, 2, 1, 1] + s[4, 2, 2, 2] + s[4, 3, 1, 1, 1] + 2*s[4, 3, 2, 1] + s[4, 4, 1, 1] + s[4, 4, 2] + s[5, 2, 2, 1] + s[5, 3, 1, 1] + s[5, 3, 2] + s[5, 4, 1]" ] }, "execution_count": 101, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(s[3,2]*s[2,2,1])" ] }, { "cell_type": "code", "execution_count": 102, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "e[1, 1, 1, 1] - 4*e[2, 1, 1] + 4*e[2, 2] + e[2, 2, 1] - e[3, 2]" ] }, "execution_count": 102, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e(p([2,2])+m([1,1])*s([2,1]))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Speed of calculation\n", "Although the expressions rapidily become big, and thus not really worth displaying, the calculations are relatively fast as illustrated in the following. Here \"len(g)\" displays the length of the expression explicitly calculated." ] }, { "cell_type": "code", "execution_count": 103, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "2986" ] }, "execution_count": 103, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len(s[10,5,5,3]*s[12,5,2])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Kronecker product\n", "This is defined by setting \n", "$$ p_\\mu * p_\\lambda = z_\\mu\\,\\delta_{\\mu,\\lambda}\\, p_\\mu$$" ] }, { "cell_type": "code", "execution_count": 104, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "6*p[3, 2]" ] }, "execution_count": 104, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p[3,2].kronecker_product(p[3,2])" ] }, { "cell_type": "code", "execution_count": 105, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ p[5] 0 0 0 0 0 0]\n", "[ 0 p[4, 1] 0 0 0 0 0]\n", "[ 0 0 p[3, 2] 0 0 0 0]\n", "[ 0 0 0 p[3, 1, 1] 0 0 0]\n", "[ 0 0 0 0 p[2, 2, 1] 0 0]\n", "[ 0 0 0 0 0 p[2, 1, 1, 1] 0]\n", "[ 0 0 0 0 0 0 p[1, 1, 1, 1, 1]]" ] }, "execution_count": 105, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Matrix([[p(mu).kronecker_product(p(nu)/zee(nu)) for nu in Partitions(5)] for mu in Partitions(5)])" ] }, { "cell_type": "code", "execution_count": 106, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2] + s[4, 1] + s[5]" ] }, "execution_count": 106, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3,2].kronecker_product(s[3,2])" ] }, { "cell_type": "code", "execution_count": 107, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "2*s[2, 1, 1, 1, 1, 1, 1, 1] + 5*s[2, 2, 1, 1, 1, 1, 1] + 8*s[2, 2, 2, 1, 1, 1] + 6*s[2, 2, 2, 2, 1] + 7*s[3, 1, 1, 1, 1, 1, 1] + 18*s[3, 2, 1, 1, 1, 1] + 25*s[3, 2, 2, 1, 1] + 11*s[3, 2, 2, 2] + 16*s[3, 3, 1, 1, 1] + 22*s[3, 3, 2, 1] + 6*s[3, 3, 3] + 10*s[4, 1, 1, 1, 1, 1] + 29*s[4, 2, 1, 1, 1] + 30*s[4, 2, 2, 1] + 30*s[4, 3, 1, 1] + 22*s[4, 3, 2] + 11*s[4, 4, 1] + 10*s[5, 1, 1, 1, 1] + 29*s[5, 2, 1, 1] + 16*s[5, 2, 2] + 25*s[5, 3, 1] + 6*s[5, 4] + 10*s[6, 1, 1, 1] + 18*s[6, 2, 1] + 8*s[6, 3] + 7*s[7, 1, 1] + 5*s[7, 2] + 2*s[8, 1]" ] }, "execution_count": 107, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(s[3,2]*s[2,2]).kronecker_product(s[3,3,3])" ] }, { "cell_type": "code", "execution_count": 108, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 108, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(s[3,2]*s[2,2])==(s[3,2]*s[2,2]).kronecker_product(h[9])" ] }, { "cell_type": "code", "execution_count": 109, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[2, 2, 2, 2, 1] + s[3, 2, 2, 1, 1] + s[3, 2, 2, 2] + s[3, 3, 1, 1, 1] + s[3, 3, 2, 1] + s[4, 2, 2, 1] + s[4, 3, 1, 1] + s[4, 3, 2] + s[4, 4, 1]" ] }, "execution_count": 109, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(s[3,2]*s[2,2]).kronecker_product(e[9])" ] }, { "cell_type": "code", "execution_count": 110, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 110, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(s[3,2]*s[2,2]).omega()==(s[3,2]*s[2,2]).kronecker_product(e[9])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Plethysm\n", "\n", "This is the operation characterized by the properties \n", "\n", "- $(f_1+f_2)\\circ g =(f_1\\circ g)+(f_2\\circ g)$, \n", "- $(f_1\\cdot f_2)\\circ g =(f_1\\circ g)\\cdot (f_2\\circ g)$, \n", "- $p_k\\circ(g_1+g_2) =(p_k\\circ g_1)+(p_k\\circ g_2)$, \n", "- $p_k\\circ (g_1\\cdot g_2) =(p_k\\circ g_1)+(p_k\\circ g_2)$, \n", "- $p_k\\circ p_n =p_{kn}$, - $p_k\\circ x =x^k$, if $x$ is a **variable** \n", "- $p_k\\circ c =c$, if $c$ is a **constant**\n", "\n", "In sage **variables** in a plethysm may set be using the option `include=[x1,x2,...,xk]`, and **constants**, using the option `exclude=[c1,c2,...,ck]`. " ] }, { "cell_type": "code", "execution_count": 111, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[4, 4, 4] + s[6, 4, 2] + s[6, 6] + s[7, 4, 1] + s[8, 2, 2] + s[8, 4] + s[9, 3] + s[10, 2] + s[12]" ] }, "execution_count": 111, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(h[3].plethysm(h([4])))" ] }, { "cell_type": "code", "execution_count": 112, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^12+q^11+2*q^10+3*q^9+4*q^8+4*q^7+5*q^6+4*q^5+4*q^4+3*q^3+2*q^2+q+1)*s[]" ] }, "execution_count": 112, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3](s[4](One*(1+q)))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### One should compare this with sage's \"q_binomial\" here imported" ] }, { "cell_type": "code", "execution_count": 113, "metadata": {}, "outputs": [], "source": [ "from sage.combinat.q_analogues import *" ] }, { "cell_type": "code", "execution_count": 114, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "q^12 + q^11 + 2*q^10 + 3*q^9 + 4*q^8 + 4*q^7 + 5*q^6 + 4*q^5 + 4*q^4 + 3*q^3 + 2*q^2 + q + 1" ] }, "execution_count": 114, "metadata": {}, "output_type": "execute_result" } ], "source": [ "q_binomial(7,3)" ] }, { "cell_type": "code", "execution_count": 115, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "q^2*s[2, 2] + (q^3+q^2+q)*s[3, 1] + (q^4+q^3+q^2+q+1)*s[4]" ] }, "execution_count": 115, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[4](X*(1+q))" ] }, { "cell_type": "code", "execution_count": 116, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^6/(q^10-q^9-q^8+2*q^5-q^2-q+1))*s[1, 1, 1, 1] + (q^3/(q^8-2*q^7+2*q^5-2*q^4+2*q^3-2*q+1))*s[2, 1, 1] + (q^2/(q^8-q^7-2*q^6+q^5+2*q^4+q^3-2*q^2-q+1))*s[2, 2] + (q/(q^8-2*q^7+2*q^5-2*q^4+2*q^3-2*q+1))*s[3, 1] + (1/(q^10-q^9-q^8+2*q^5-q^2-q+1))*s[4]" ] }, "execution_count": 116, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[4](X/(1-q))" ] }, { "cell_type": "code", "execution_count": 117, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[4, 4, 4] + s[6, 4, 2] + s[7, 4, 1] + s[8, 2, 2] + s[9, 3]" ] }, "execution_count": 117, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3](s[4])-s[2](s[6])" ] }, { "cell_type": "code", "execution_count": 118, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(1/(q^4*t^4-q^4-t^4+1))*p[4]" ] }, "execution_count": 118, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p[4](X/M)" ] }, { "cell_type": "code", "execution_count": 119, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "q^3*e[3]" ] }, "execution_count": 119, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e[3](q*X)" ] }, { "cell_type": "code", "execution_count": 120, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(1/6*q^3-1/2*q^2+1/3*q)*e[1, 1, 1] + (q^2-q)*e[2, 1] + q*e[3]" ] }, "execution_count": 120, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e[3](q*X,exclude={q})" ] }, { "cell_type": "code", "execution_count": 121, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "q^6*s[1, 1, 1, 1] + (q^5+q^4+q^3)*s[2, 1, 1] + (q^4+q^2)*s[2, 2] + (q^3+q^2+q)*s[3, 1] + s[4]" ] }, "execution_count": 121, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[4](X/(1-q))*q_factorial(4)*(1-q)^4" ] }, { "cell_type": "code", "execution_count": 122, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "q^6*s[1, 1, 1, 1] + (q^5+q^4+q^3)*s[2, 1, 1] + (q^4+q^2)*s[2, 2] + (q^3+q^2+q)*s[3, 1] + s[4]" ] }, "execution_count": 122, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(H[4])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Schur Positivity\n", "\n", "When computing with symmetric functions, one often wants to check a given symmetric function is Schur positive or not. In our current setup, this means that coefficients polynomials in $\\mathbb{N}[q,t]$. The following function returns `True` if the given symmetric function is Schur positive and `False` if not." ] }, { "cell_type": "code", "execution_count": 123, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "True\n" ] } ], "source": [ "F = s([4,1])+s([3,2])\n", "print(F.is_schur_positive())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Schur positivity is a rare phenomena in general, but symmetric functions that come from representation theory are Schur positive. One can show that the probability that a degree $n$ monomial positive is Schur positive is equal to\n", "\n", "$$\\prod_{\\mu\\vdash n}\\frac{1}{k_\\mu},\\qquad {\\rm where}\\qquad k_\\mu:=\\sum_{\\nu\\vdash n} K_{\\mu,\\nu},$$\n", "\n", "with $K_{\\mu,\\nu}$ the **Kostka numbers**. Recall that these occur in the expansion of the Schur functions in terms of the monomial functions:\n", "\n", "$$s_\\mu=\\sum_\\nu K_{\\mu,\\nu}\\, m_\\nu.$$\n", "\n", "### define in sage" ] }, { "cell_type": "code", "execution_count": 124, "metadata": {}, "outputs": [], "source": [ "def K(mu,nu):\n", " return s(mu).scalar(h(nu))\n", "\n", "def k(mu):\n", " n=add(j for j in mu)\n", " return add(K(mu,nu) for nu in Partitions(n))\n", "\n", "def prob_Schur_positive(n): return 1/mul(k(mu) for mu in Partitions(n))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Rareness of Schur-positivity is then demonstrated by the values:" ] }, { "cell_type": "code", "execution_count": 125, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[1, 1/2, 1/9, 1/560, 1/480480, 1/1027458432000, 1/2465474364698304960000]" ] }, "execution_count": 125, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[prob_Schur_positive(n) for n in range(1,8)]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Hopf structure, tensor product, and important identities\n", "\n", "Many important identities between symmetric functions can be linked to \"the\" Hopf algebra structure on the ring of symmetric function. In part, this means that we have a **coproduct** on symmetric functions that may be described $$g(\\mathbf{y}+\\mathbf{z})= \\sum_{k+j=n}\\sum_{\\mu\\vdash k,\\ \\nu\\vdash j} a_{\\mu,\\nu}\\, s_\\mu(\\mathbf{y}) s_\\nu(\\mathbf{z})$$\n", " \n", "### This is readilly defined in sage via tensor products, setting" ] }, { "cell_type": "code", "execution_count": 126, "metadata": {}, "outputs": [], "source": [ "One=s[0]\n", "X=s[1]\n", "Y=tensor([X,One])\n", "Z=tensor([One,X])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### we get" ] }, { "cell_type": "code", "execution_count": 127, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[] # s[3] + s[1] # s[2] + s[2] # s[1] + s[3] # s[]" ] }, "execution_count": 127, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3](Y+Z)" ] }, { "cell_type": "code", "execution_count": 128, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[] # s[3, 2, 1] + s[1] # s[2, 2, 1] + s[1] # s[3, 1, 1] + s[1] # s[3, 2] + s[1, 1] # s[2, 1, 1] + s[1, 1] # s[2, 2] + s[1, 1] # s[3, 1] + s[1, 1, 1] # s[2, 1] + s[2] # s[2, 1, 1] + s[2] # s[2, 2] + s[2] # s[3, 1] + s[2, 1] # s[1, 1, 1] + 2*s[2, 1] # s[2, 1] + s[2, 1] # s[3] + s[2, 1, 1] # s[1, 1] + s[2, 1, 1] # s[2] + s[2, 2] # s[1, 1] + s[2, 2] # s[2] + s[2, 2, 1] # s[1] + s[3] # s[2, 1] + s[3, 1] # s[1, 1] + s[3, 1] # s[2] + s[3, 1, 1] # s[1] + s[3, 2] # s[1] + s[3, 2, 1] # s[]" ] }, "execution_count": 128, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3,2,1](Y+Z)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Skew Schur fonctions arise when one considers the effect of coproduct on Schur functions themselves\n", "\n", "$$ s_\\mu(Y+Z) = \\sum_{\\nu\\subseteq \\mu} s_{\\mu/\\nu}(Y)\\otimes s_\\nu(Z).$$\n" ] }, { "cell_type": "code", "execution_count": 129, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[2, 1, 1] + s[2, 2] + s[3, 1]" ] }, "execution_count": 129, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[3,2,1].skew_by(s[2])" ] }, { "cell_type": "code", "execution_count": 130, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 130, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mu=Partition([3,2,1])\n", "s(mu)(Y+Z)==add(tensor([s(mu).skew_by(s(nu)),s(nu)]) for k in range(7) for nu in Partitions(k))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Cauchy kernel formula is\n", "\n", "$$\\sum_{n\\geq 0} h_n(\\mathbf{y}\\mathbf{z})=\\prod_{i,j}\\frac{1}{1-y_iz_j}$$\n", "written here using plethystic notation. Its degree $n$ homogeneous component plays a crucial role in the description of \"dual bases\" with respect to the scalar product. We have\n", "\n", "$$h_n(\\mathbf{y}\\mathbf{z})=\\sum_{\\mu\\vdash n} u_\\mu\\otimes v_\\mu\n", " \\qquad {\\rm iff}\\qquad\n", " \\langle u_\\mu,v_\\lambda\\rangle=\\delta_{\\mu\\lambda}, \\qquad\n", " (\\delta_{\\mu \\lambda}:\\ \\hbox{Kronecker \"delta\"})`$$\n", "\n", "One says that $\\{u_\\mu\\}_\\mu$ and $\\{v_\\lambda\\}_\\lambda$ are **dual bases**. Schur functions are self dual, the dual of the $h_{\\mu}$ are the $m_\\mu$, that of the $p_\\mu$ are the $p_{\\mu}/z_{\\mu}$. The \"forgotten\" symmetric function $f_{\\mu}$ appear as the dual of the $e_{\\mu}$." ] }, { "cell_type": "code", "execution_count": 131, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[1, 1, 1, 1] # s[1, 1, 1, 1] + s[2, 1, 1] # s[2, 1, 1] + s[2, 2] # s[2, 2] + s[3, 1] # s[3, 1] + s[4] # s[4]" ] }, "execution_count": 131, "metadata": {}, "output_type": "execute_result" } ], "source": [ "add(tensor([s(mu),s(mu)]) for mu in Partitions(4))" ] }, { "cell_type": "code", "execution_count": 132, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[1, 1, 1, 1] # s[1, 1, 1, 1] + s[2, 1, 1] # s[2, 1, 1] + s[2, 2] # s[2, 2] + s[3, 1] # s[3, 1] + s[4] # s[4]" ] }, "execution_count": 132, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s[4](Y*Z)" ] }, { "cell_type": "code", "execution_count": 133, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "h[1, 1, 1, 1] # m[1, 1, 1, 1] + h[2, 1, 1] # m[2, 1, 1] + h[2, 2] # m[2, 2] + h[3, 1] # m[3, 1] + h[4] # m[4]" ] }, "execution_count": 133, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tensor([h,m])(s[4](Y*Z))" ] }, { "cell_type": "code", "execution_count": 134, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "1/24*p[1, 1, 1, 1] # p[1, 1, 1, 1] + 1/4*p[2, 1, 1] # p[2, 1, 1] + 1/8*p[2, 2] # p[2, 2] + 1/3*p[3, 1] # p[3, 1] + 1/4*p[4] # p[4]" ] }, "execution_count": 134, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tensor([p,p])(s[4](Y*Z))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The combinatorial normalization of Macdonald polynomials\n", "The well known Macdonald symmetric functions are implemented in sage. They have been initialized at the beginning of our sesssion. These are eigenfunctions of the operator $\\nabla$. (See further below for more informations about $\\nabla$.)" ] }, { "cell_type": "code", "execution_count": 135, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "q*t*s[1, 1, 1] + (q+t)*s[2, 1] + s[3]" ] }, "execution_count": 135, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(H([2,1]))" ] }, { "cell_type": "code", "execution_count": 136, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "((-q)/(-q*t^2+t^3+q^2-q*t))*McdHt[1, 1, 1] + ((q^2+q*t+t^2)/(-q^2*t^2+q^3+t^3-q*t))*McdHt[2, 1] + (t/(-q^3+q^2*t+q*t-t^2))*McdHt[3]" ] }, "execution_count": 136, "metadata": {}, "output_type": "execute_result" } ], "source": [ "H(s[2,1])" ] }, { "cell_type": "code", "execution_count": 137, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[q^6*McdHt[4],\n", " q^3*t*McdHt[3, 1],\n", " q^2*t^2*McdHt[2, 2],\n", " q*t^3*McdHt[2, 1, 1],\n", " t^6*McdHt[1, 1, 1, 1]]" ] }, "execution_count": 137, "metadata": {}, "output_type": "execute_result" } ], "source": [ "[H(mu).nabla() for mu in Partitions(4)]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Macdonald eigenoperators\n", "\n", "The **nabla operator** is characterized as having the combinatorial Macdonald symmetric functions $H_{\\mu}=H_{\\mu}(\\mathbf{x};q,t)$ as eigenfunctions:\n", "\n", "$$\\nabla H_{\\mu} = t^{n(\\mu)} q^{n(\\mu')} H_{\\mu},$$\n", "\n", "where $\\mu$ is a partition, $\\mu'$ its conjugate, and $n(\\mu)$ is set to be equal to $\\sum_i (i-1)\\mu_i$. " ] }, { "cell_type": "code", "execution_count": 138, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "q^4*t^2*McdHt[3, 2]" ] }, "execution_count": 138, "metadata": {}, "output_type": "execute_result" } ], "source": [ "H[3,2].nabla()" ] }, { "cell_type": "code", "execution_count": 139, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^3+q^2*t+q*t^2+t^3+q*t)*s[1, 1, 1] + (q^2+q*t+t^2+q+t)*s[2, 1] + s[3]" ] }, "execution_count": 139, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(e[3].nabla())" ] }, { "cell_type": "code", "execution_count": 140, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "e[1, 1, 1, 1] + (q^3+2*q^2+3*q)*e[2, 1, 1] + (q^4+q^2)*e[2, 2] + (q^5+q^4+2*q^3)*e[3, 1] + q^6*e[4]" ] }, "execution_count": 140, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e[4].nabla(t=1)" ] }, { "cell_type": "code", "execution_count": 141, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^2+q*t+t^2+q+t)*e[2, 1] + (q^3+q^2*t+q*t^2+t^3+1)*e[3]" ] }, "execution_count": 141, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e[4].nabla().skew_by(p[1]).nabla(power=-1)" ] }, { "cell_type": "code", "execution_count": 142, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[1, 1, 1] - 1/(q*t)*s[2, 1] - (1/(-q^2*t^2))*s[3]" ] }, "execution_count": 142, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(s[4]*(-1/(q*t))^3).nabla().skew_by(p[1]).nabla(power=-1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The $\\Delta_f$ operators" ] }, { "cell_type": "code", "execution_count": 143, "metadata": {}, "outputs": [], "source": [ "def B_mu(mu):\n", " mu=Partition(mu)\n", " return sum((t**i*q**j) for i,j in mu.cells())\n", "\n", "def Delta(F,G):\n", " if F==0:\n", " return 0\n", " else:\n", " return s(add(c*F(B_mu(mu)*One)*H(mu) for mu,c in H(G)))" ] }, { "cell_type": "code", "execution_count": 144, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^3+q^2*t+q*t^2+t^3+q^2+q*t+t^2+q+t+1)*s[1, 1, 1, 1] + (q^2+q*t+t^2+q+t+1)*s[2, 1, 1] + (q+t)*s[2, 2]" ] }, "execution_count": 144, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Delta(e[1],e[4])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The $D_k$ operators" ] }, { "cell_type": "code", "execution_count": 145, "metadata": {}, "outputs": [], "source": [ "def D_k(k,g):\n", " if k<0:\n", " return (D_k(0,g.skew_by(p[-k]))-D_k(0,g).skew_by(p[-k]))\n", " elif k>0:\n", " return (D_k(0,g*p[k])-D_k(0,g)*p[k])/(1-q^k)/(1-t^k)\n", " else:\n", " return g-M*Delta(e[1],g)" ] }, { "cell_type": "code", "execution_count": 146, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "s[1, 1, 1] - 1/(q*t)*s[2, 1] - (1/(-q^2*t^2))*s[3]" ] }, "execution_count": 146, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1/M*D_k(-1,(s[4]*(-1/(q*t))^3))" ] }, { "cell_type": "code", "execution_count": 147, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^4*t+q^3*t^2+q^2*t^3+q*t^4-q^4-q^3*t-q^2*t^2-q*t^3-t^4)*s[1, 1, 1, 1, 1] + (q^3*t+q^2*t^2+q*t^3-q^3-q^2*t-q*t^2-t^3)*s[2, 1, 1, 1] + (q^2*t+q*t^2-q^2-q*t-t^2+1)*s[2, 2, 1]" ] }, "execution_count": 147, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(D_k(1,e[4]))" ] }, { "cell_type": "code", "execution_count": 148, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^4*t+q^3*t^2+q^2*t^3+q*t^4-q^4-q^3*t-q^2*t^2-q*t^3-t^4)*s[1, 1, 1, 1, 1] + (q^3*t+q^2*t^2+q*t^3-q^3-q^2*t-q*t^2-t^3)*s[2, 1, 1, 1] + (q^2*t+q*t^2-q^2-q*t-t^2+1)*s[2, 2, 1]" ] }, "execution_count": 148, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(e[4](X+M)*add((-1)^k*e[k] for k in range(8))).restrict_degree(5,exact=true)" ] }, { "cell_type": "code", "execution_count": 149, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(-q^4*t-q^3*t^2-q^2*t^3-q*t^4+q^4+q^3*t+q^2*t^2+q*t^3+t^4)*s[1, 1, 1, 1] + (-q^3*t-q^2*t^2-q*t^3+q^3+q^2*t+q*t^2+t^3-1)*s[2, 1, 1] + (-q^2*t-q*t^2+q^2+2*q*t+t^2-q-t)*s[2, 2]" ] }, "execution_count": 149, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(D_k(0,e[4]))" ] }, { "cell_type": "code", "execution_count": 150, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(-q^4*t-q^3*t^2-q^2*t^3-q*t^4+q^4+q^3*t+q^2*t^2+q*t^3+t^4)*s[1, 1, 1, 1] + (-q^3*t-q^2*t^2-q*t^3+q^3+q^2*t+q*t^2+t^3-1)*s[2, 1, 1] + (-q^2*t-q*t^2+q^2+2*q*t+t^2-q-t)*s[2, 2]" ] }, "execution_count": 150, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(e[4](X+M)*add((-1)^k*e[k] for k in range(8))).restrict_degree(4,exact=true)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### At $q=t=1$, the scalar product of $\\nabla(e_n)$ with $p_1^n$ gives $(n+1)^{n-1}$" ] }, { "cell_type": "code", "execution_count": 151, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "q^3 + q^2*t + q*t^2 + t^3 + 2*q^2 + 3*q*t + 2*t^2 + 2*q + 2*t + 1" ] }, "execution_count": 151, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(e[3].nabla()).scalar(p[1]^3)" ] }, { "cell_type": "code", "execution_count": 152, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(1, 1)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(2, 3)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(3, 16)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(4, 125)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(5, 1296)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for n in range(1,6):\n", " show((n,(e[n].nabla()).scalar(p[1]^n).substitute({q:1,t:1})))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### At $q=t=1$, the scalar product of $\\nabla(e_n)$ with $e_n$ gives the Catalan number $\\frac{1}{n+1}\\binom{2n}{n}$." ] }, { "cell_type": "code", "execution_count": 153, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(1, 1)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(2, 2)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(3, 5)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(4, 14)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(5, 42)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for n in range(1,6):\n", " show((n,(e[n].nabla()).scalar(e[n]).substitute({q:1,t:1})))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### There are also interesting conjectures on the effect of $\\nabla$ on Schur functions." ] }, { "cell_type": "code", "execution_count": 154, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^6*t^3+q^5*t^4+q^4*t^5+q^3*t^6)*s[1, 1, 1, 1, 1] + (q^6*t^2+2*q^5*t^3+2*q^4*t^4+2*q^3*t^5+q^2*t^6+q^4*t^3+q^3*t^4)*s[2, 1, 1, 1] + (q^5*t^2+2*q^4*t^3+2*q^3*t^4+q^2*t^5)*s[2, 2, 1] + (q^5*t^2+q^4*t^3+q^3*t^4+q^2*t^5+q^4*t^2+2*q^3*t^3+q^2*t^4)*s[3, 1, 1] + (q^4*t^2+q^3*t^3+q^2*t^4)*s[3, 2] + (q^3*t^2+q^2*t^3)*s[4, 1]" ] }, "execution_count": 154, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(-s([2,2,1])).nabla()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## The $(q,t)$-Catalan polynomials arise as\n", "$$C_n(q,t) = \\langle \\nabla e_n , e_n \\rangle.$$\n" ] }, { "cell_type": "code", "execution_count": 155, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(1, 1)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(2, q + t)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(3, q^3 + q^2*t + q*t^2 + t^3 + q*t)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(4,\n", " q^6 + q^5*t + q^4*t^2 + q^3*t^3 + q^2*t^4 + q*t^5 + t^6 + q^4*t + q^3*t^2 + q^2*t^3 + q*t^4 + q^3*t + q^2*t^2 + q*t^3)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(5,\n", " q^10 + q^9*t + q^8*t^2 + q^7*t^3 + q^6*t^4 + q^5*t^5 + q^4*t^6 + q^3*t^7 + q^2*t^8 + q*t^9 + t^10 + q^8*t + q^7*t^2 + q^6*t^3 + q^5*t^4 + q^4*t^5 + q^3*t^6 + q^2*t^7 + q*t^8 + q^7*t + 2*q^6*t^2 + 2*q^5*t^3 + 2*q^4*t^4 + 2*q^3*t^5 + 2*q^2*t^6 + q*t^7 + q^6*t + q^5*t^2 + 2*q^4*t^3 + 2*q^3*t^4 + q^2*t^5 + q*t^6 + q^4*t^2 + q^3*t^3 + q^2*t^4)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from sage.combinat.q_analogues import *\n", "for n in range (1,6) :\n", " show((n,e[n].nabla().scalar(e[n])))" ] }, { "cell_type": "code", "execution_count": 156, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(1, 1)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(2, q + t)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(3, q^3 + q^2*t + q*t^2 + t^3 + q*t)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(4,\n", " q^6 + q^5*t + q^4*t^2 + q^3*t^3 + q^2*t^4 + q*t^5 + t^6 + q^4*t + q^3*t^2 + q^2*t^3 + q*t^4 + q^3*t + q^2*t^2 + q*t^3)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(5,\n", " q^10 + q^9*t + q^8*t^2 + q^7*t^3 + q^6*t^4 + q^5*t^5 + q^4*t^6 + q^3*t^7 + q^2*t^8 + q*t^9 + t^10 + q^8*t + q^7*t^2 + q^6*t^3 + q^5*t^4 + q^4*t^5 + q^3*t^6 + q^2*t^7 + q*t^8 + q^7*t + 2*q^6*t^2 + 2*q^5*t^3 + 2*q^4*t^4 + 2*q^3*t^5 + 2*q^2*t^6 + q*t^7 + q^6*t + q^5*t^2 + 2*q^4*t^3 + 2*q^3*t^4 + q^2*t^5 + q*t^6 + q^4*t^2 + q^3*t^3 + q^2*t^4)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for n in range (1,6) :\n", " show((n,qt_catalan_number(n)))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Rectangular Catalan combinatorics\n", "\n", "### $(m,n)$-Dyck paths" ] }, { "cell_type": "code", "execution_count": 157, "metadata": {}, "outputs": [], "source": [ "def staircase(m,n):\n", " return Partition([(m*(n-k))//n for k in range(1,n+1)])\n", "\n", "def Dyck(m,n):\n", " N=staircase(m,n).size()\n", " return Set([mu for k in range(N+1) for mu in Partitions(k, outer=staircase(m,n))])" ] }, { "cell_type": "code", "execution_count": 158, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(1, 1)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(2, 2)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(3, 5)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(4, 14)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "(5, 42)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for n in range(1,6):\n", " show((n,Dyck(n,n).cardinality()))" ] }, { "cell_type": "code", "execution_count": 163, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ 1 1 1 1 1 1]\n", "[ 1 2 2 3 3 4]\n", "[ 1 2 5 5 7 12]\n", "[ 1 3 5 14 14 23]\n", "[ 1 3 7 14 42 42]\n", "[ 1 4 12 23 42 132]" ] }, "execution_count": 163, "metadata": {}, "output_type": "execute_result" } ], "source": [ "matrix([[Dyck(k,j).cardinality() for k in range(1,7)] for j in range(1,7)])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### $(m,n)$-Parking functions" ] }, { "cell_type": "code", "execution_count": 160, "metadata": {}, "outputs": [], "source": [ "def Parking_functions(m,n):\n", " return Set([pf for mu in Dyck(m,n) for pf in StandardSkewTableaux([add_ones(mu,n),mu])])\n", "\n", "def add_ones(mu,n):\n", " mu=Partition(mu)\n", " return [k+1 for k in mu]+[1 for j in range(n-mu.length())]\n", "\n", "def Parking_functions_mu(mu,n):\n", " return StandardSkewTableaux([add_ones(mu,n),mu])" ] }, { "cell_type": "code", "execution_count": 164, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ 1 1 1 1 1 1]\n", "[ 1 3 3 5 5 7]\n", "[ 1 4 16 16 25 49]\n", "[ 1 11 27 125 125 243]\n", "[ 1 16 81 256 1296 1296]\n", "[ 1 42 378 1184 3125 16807]" ] }, "execution_count": 164, "metadata": {}, "output_type": "execute_result" } ], "source": [ "matrix([[Parking_functions(k,j).cardinality() for k in range(1,7)] for j in range(1,7)])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Symmetric function version of Bizley formula" ] }, { "cell_type": "code", "execution_count": 165, "metadata": {}, "outputs": [], "source": [ "def Bizley(m,n):\n", " d=gcd(m,n)\n", " a=m/d\n", " b=n/d\n", " return e(add(1/mu.aut()*mul(1/a*e[k*b](k*a*X) for k in mu) for mu in Partitions(d))) " ] }, { "cell_type": "code", "execution_count": 166, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "42" ] }, "execution_count": 166, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Bizley(5,5).scalar(e[5])" ] }, { "cell_type": "code", "execution_count": 167, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "3*e[1, 1, 1, 1] + 11*e[2, 1, 1] + 3*e[2, 2] + 5*e[3, 1] + e[4]" ] }, "execution_count": 167, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Bizley(6,4)" ] }, { "cell_type": "code", "execution_count": 168, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "23" ] }, "execution_count": 168, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Bizley(6,4).scalar(e[4])" ] }, { "cell_type": "code", "execution_count": 169, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "23" ] }, "execution_count": 169, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Dyck(4,6).cardinality()" ] }, { "cell_type": "code", "execution_count": 170, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "2*e[2, 2, 1, 1] + e[2, 2, 2] + e[3, 1, 1, 1] + 7*e[3, 2, 1] + 2*e[3, 3] + 3*e[4, 1, 1] + 3*e[4, 2] + 3*e[5, 1] + e[6]" ] }, "execution_count": 170, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Bizley(4,6)" ] }, { "cell_type": "code", "execution_count": 171, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "23" ] }, "execution_count": 171, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Bizley(4,6).scalar(e[6])" ] }, { "cell_type": "code", "execution_count": 172, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "23" ] }, "execution_count": 172, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Dyck(4,6).cardinality()" ] }, { "cell_type": "code", "execution_count": 173, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "1184" ] }, "execution_count": 173, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Bizley(4,6).scalar(e[1]^6)" ] }, { "cell_type": "code", "execution_count": 174, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "1184" ] }, "execution_count": 174, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Parking_functions(4,6).cardinality()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Elliptic Hall algebra operators, and effect" ] }, { "cell_type": "code", "execution_count": 181, "metadata": {}, "outputs": [], "source": [ "@cached_function\n", "def e_mn(m,n=None):\n", " if n==None:\n", " return e_mn(m,m)\n", " elif m<0: return 0\n", " else:\n", " d=gcd(m,n)\n", " a=m//d\n", " b=n//d\n", " return Theta(e[d],a,b)\n", "\n", "def Theta(g,c=1,d=1):\n", " n=g.degree()\n", " return sum(g.scalar(q_mu(mu))*Q(1,mu,c,d) for mu in Partitions(n))\n", "\n", "def Q(g,mu,c,d):\n", " mu=Partition(mu)\n", " if mu.is_empty(): return g\n", " else: \n", " nu=Partition([mu[k] for k in range(1,mu.length())])\n", " return Q(Qk(g,mu[0]*c,mu[0]*d),nu,c,d)\n", "\n", "def Qk(g,m,n):\n", " if m == 0: return g*e[1]\n", " elif n == 0: return g-(1-t)*(1-q)*Delta(e[1],g)\n", " else : \n", " [u,v]=split(m,n)\n", " [u1,u2]=u\n", " [v1,v2]=v\n", " return s(1/((1-t)*(1-q))*(Qk(Qk(g,u1,u2),v1,v2)-Qk(Qk(g,v1,v2),u1,u2)))\n", "\n", "def split(m,n): \n", " if m==1: return [vector([m,n-1]),vector([0,1])]\n", " elif n==1: return [vector([1,0]),vector([m-1,n])]\n", " elif gcd(m,n)<>1: \n", " d=gcd(m,n) \n", " v=split(m/d,n/d)[0]\n", " u=vector([m,n])-v\n", " return [v,u]\n", " L=[[i-floor(i*m/n)*n/m,floor(i*m/n),i] for i in range(1,n)]\n", " s=min([L[i][0]] for i in range(n-1))[0]\n", " v=vector([[t[1],t[2]] for t in L if t[0]==s][0])\n", " u=vector([m,n])-v\n", " d=Matrix([u,v]).det()\n", " if d<0: return [v,u]\n", " else: return [u,v]\n", "\n", "def q_mu(mu): \n", " mu=Partition(mu)\n", " return (((q*t-1)/(q*t))**(mu.length()))*f(mu)(X*q*t/(q*t-1))\n", "\n", "def to_q1_t1(F):\n", " return F.map_coefficients(lambda c: c.substitute({q:1,t:1}))" ] }, { "cell_type": "code", "execution_count": 182, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^6+q^5*t+q^4*t^2+q^3*t^3+q^2*t^4+q*t^5+t^6+q^4*t+q^3*t^2+q^2*t^3+q*t^4+q^3*t+q^2*t^2+q*t^3)*s[1, 1, 1, 1] + (q^5+q^4*t+q^3*t^2+q^2*t^3+q*t^4+t^5+q^4+2*q^3*t+2*q^2*t^2+2*q*t^3+t^4+q^3+2*q^2*t+2*q*t^2+t^3+q*t)*s[2, 1, 1] + (q^4+q^3*t+q^2*t^2+q*t^3+t^4+q^2*t+q*t^2+q^2+q*t+t^2)*s[2, 2] + (q^3+q^2*t+q*t^2+t^3+q^2+q*t+t^2+q+t)*s[3, 1] + s[4]" ] }, "execution_count": 182, "metadata": {}, "output_type": "execute_result" } ], "source": [ "s(e[4].nabla())" ] }, { "cell_type": "code", "execution_count": 183, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^6+q^5*t+q^4*t^2+q^3*t^3+q^2*t^4+q*t^5+t^6+q^4*t+q^3*t^2+q^2*t^3+q*t^4+q^3*t+q^2*t^2+q*t^3)*s[1, 1, 1, 1] + (q^5+q^4*t+q^3*t^2+q^2*t^3+q*t^4+t^5+q^4+2*q^3*t+2*q^2*t^2+2*q*t^3+t^4+q^3+2*q^2*t+2*q*t^2+t^3+q*t)*s[2, 1, 1] + (q^4+q^3*t+q^2*t^2+q*t^3+t^4+q^2*t+q*t^2+q^2+q*t+t^2)*s[2, 2] + (q^3+q^2*t+q*t^2+t^3+q^2+q*t+t^2+q+t)*s[3, 1] + s[4]" ] }, "execution_count": 183, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e_mn(4)" ] }, { "cell_type": "code", "execution_count": 184, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(q^8+q^7*t+q^6*t^2+q^5*t^3+q^4*t^4+q^3*t^5+q^2*t^6+q*t^7+t^8+q^6*t+q^5*t^2+q^4*t^3+q^3*t^4+q^2*t^5+q*t^6+q^5*t+2*q^4*t^2+2*q^3*t^3+2*q^2*t^4+q*t^5)*s[1, 1, 1, 1, 1, 1] + (q^7+q^6*t+q^5*t^2+q^4*t^3+q^3*t^4+q^2*t^5+q*t^6+t^7+q^6+2*q^5*t+2*q^4*t^2+2*q^3*t^3+2*q^2*t^4+2*q*t^5+t^6+q^5+3*q^4*t+4*q^3*t^2+4*q^2*t^3+3*q*t^4+t^5+q^3*t+q^2*t^2+q*t^3)*s[2, 1, 1, 1, 1] + (q^6+q^5*t+q^4*t^2+q^3*t^3+q^2*t^4+q*t^5+t^6+q^5+2*q^4*t+2*q^3*t^2+2*q^2*t^3+2*q*t^4+t^5+2*q^4+4*q^3*t+5*q^2*t^2+4*q*t^3+2*t^4+q^2*t+q*t^2)*s[2, 2, 1, 1] + (q^5+q^4*t+q^3*t^2+q^2*t^3+q*t^4+t^5+q^3*t+q^2*t^2+q*t^3+q^3+2*q^2*t+2*q*t^2+t^3)*s[2, 2, 2] + (q^5+q^4*t+q^3*t^2+q^2*t^3+q*t^4+t^5+q^4+2*q^3*t+2*q^2*t^2+2*q*t^3+t^4+q^3+2*q^2*t+2*q*t^2+t^3)*s[3, 1, 1, 1] + (q^4+q^3*t+q^2*t^2+q*t^3+t^4+2*q^3+3*q^2*t+3*q*t^2+2*t^3+q^2+2*q*t+t^2)*s[3, 2, 1] + (q^2+q*t+t^2)*s[3, 3] + (q^2+q*t+t^2)*s[4, 1, 1] + (q+t)*s[4, 2]" ] }, "execution_count": 184, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e_mn(4,6)" ] }, { "cell_type": "code", "execution_count": 187, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "2*e[2, 2, 1, 1] + e[2, 2, 2] + e[3, 1, 1, 1] + 7*e[3, 2, 1] + 2*e[3, 3] + 3*e[4, 1, 1] + 3*e[4, 2] + 3*e[5, 1] + e[6]" ] }, "execution_count": 187, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e(to_q1_t1(e_mn(4,6)))" ] }, { "cell_type": "code", "execution_count": 188, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "2*e[2, 2, 1, 1] + e[2, 2, 2] + e[3, 1, 1, 1] + 7*e[3, 2, 1] + 2*e[3, 3] + 3*e[4, 1, 1] + 3*e[4, 2] + 3*e[5, 1] + e[6]" ] }, "execution_count": 188, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Bizley(4,6)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SageMath 8.2", "language": "", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.14" } }, "nbformat": 4, "nbformat_minor": 2 }