{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "897a772f-1c3e-4af9-844f-e584af67fe4b", "metadata": {}, "outputs": [], "source": [ "import os \n", "import sys\n", "sys.path.insert(0, os.path.abspath('../..'))\n", "\n", "import sympy as sp\n", "import numpy as np\n", "import itertools as it\n", "import pysymmpol as sy\n", "import pysymmpol.utils as ut\n", "from IPython.display import display, Latex" ] }, { "cell_type": "markdown", "id": "3edb64f5-5599-444f-be6d-c7b80fafb61e", "metadata": {}, "source": [ "# Class: HallLittlewoodPolynomial" ] }, { "cell_type": "markdown", "id": "c389d95f-87a7-4fd4-b619-1f3c8cce9de7", "metadata": {}, "source": [ "We finally consider the Hall-Littlewood polynomials. We have chosen the deformation parameter as $Q$, instead $t$ -- since $t$ is related to our Miwa coordianates. " ] }, { "cell_type": "markdown", "id": "0a1fa7db-9a53-4baf-a16b-1feab057eb36", "metadata": {}, "source": [ "## Basic Usage" ] }, { "cell_type": "code", "execution_count": 2, "id": "bba74741-a4bf-4a31-aab9-6307d142d6a8", "metadata": {}, "outputs": [], "source": [ "# Define the deformation parameter\n", "Q = sp.Symbol('Q')" ] }, { "cell_type": "code", "execution_count": 7, "id": "af06fb41-e245-4062-8f59-012e433465eb", "metadata": {}, "outputs": [], "source": [ "# Build Young diagrams for a given partition\n", "part = (4,2)\n", "yg = sy.YoungDiagram(part)" ] }, { "cell_type": "code", "execution_count": 8, "id": "84e58fc2-a79d-4703-aa82-0354abe2731f", "metadata": {}, "outputs": [], "source": [ "hl = sy.HallLittlewoodPolynomial(yg)" ] }, { "cell_type": "code", "execution_count": 9, "id": "2b6e0a73-fdd4-4b8e-8177-04a89286af3f", "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle - Q x_{1}^{3} x_{2}^{3} + x_{1}^{4} x_{2}^{2} + x_{1}^{3} x_{2}^{3} + x_{1}^{2} x_{2}^{4}$" ], "text/plain": [ "-Q*x1**3*x2**3 + x1**4*x2**2 + x1**3*x2**3 + x1**2*x2**4" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Let us build the coordinates\n", "n = 2\n", "x = ut.create_x_coord(n)\n", "\n", "# Explicit expression for the Hall-Littlewood polynomial\n", "hl.explicit(x, Q).expand()" ] }, { "cell_type": "code", "execution_count": 10, "id": "cae7db2c-12f3-4841-b80c-ffd372868ecf", "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle \\operatorname{Poly}{\\left( x_{1}^{4}x_{2}^{2} - x_{1}^{3}x_{2}^{3}Q + x_{1}^{3}x_{2}^{3} + x_{1}^{2}x_{2}^{4}, x_{1}, x_{2}, Q, domain=\\mathbb{Q} \\right)}$" ], "text/plain": [ "Poly(x1**4*x2**2 - x1**3*x2**3*Q + x1**3*x2**3 + x1**2*x2**4, x1, x2, Q, domain='QQ')" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# As before \n", "hl.explicit(x, Q, True)" ] }, { "cell_type": "code", "execution_count": 11, "id": "88c6ad90-c9ac-49f5-b7a8-4330e794cc51", "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/latex": [ "$\\displaystyle - Q^{3} x_{1}^{2} x_{2}^{2} x_{3}^{2} + Q^{2} x_{1}^{3} x_{2}^{2} x_{3} + Q^{2} x_{1}^{3} x_{2} x_{3}^{2} + Q^{2} x_{1}^{2} x_{2}^{3} x_{3} + 2 Q^{2} x_{1}^{2} x_{2}^{2} x_{3}^{2} + Q^{2} x_{1}^{2} x_{2} x_{3}^{3} + Q^{2} x_{1} x_{2}^{3} x_{3}^{2} + Q^{2} x_{1} x_{2}^{2} x_{3}^{3} - Q x_{1}^{4} x_{2} x_{3} - Q x_{1}^{3} x_{2}^{3} - 3 Q x_{1}^{3} x_{2}^{2} x_{3} - 3 Q x_{1}^{3} x_{2} x_{3}^{2} - Q x_{1}^{3} x_{3}^{3} - 3 Q x_{1}^{2} x_{2}^{3} x_{3} - 4 Q x_{1}^{2} x_{2}^{2} x_{3}^{2} - 3 Q x_{1}^{2} x_{2} x_{3}^{3} - Q x_{1} x_{2}^{4} x_{3} - 3 Q x_{1} x_{2}^{3} x_{3}^{2} - 3 Q x_{1} x_{2}^{2} x_{3}^{3} - Q x_{1} x_{2} x_{3}^{4} - Q x_{2}^{3} x_{3}^{3} + x_{1}^{4} x_{2}^{2} + x_{1}^{4} x_{2} x_{3} + x_{1}^{4} x_{3}^{2} + x_{1}^{3} x_{2}^{3} + 2 x_{1}^{3} x_{2}^{2} x_{3} + 2 x_{1}^{3} x_{2} x_{3}^{2} + x_{1}^{3} x_{3}^{3} + x_{1}^{2} x_{2}^{4} + 2 x_{1}^{2} x_{2}^{3} x_{3} + 3 x_{1}^{2} x_{2}^{2} x_{3}^{2} + 2 x_{1}^{2} x_{2} x_{3}^{3} + x_{1}^{2} x_{3}^{4} + x_{1} x_{2}^{4} x_{3} + 2 x_{1} x_{2}^{3} x_{3}^{2} + 2 x_{1} x_{2}^{2} x_{3}^{3} + x_{1} x_{2} x_{3}^{4} + x_{2}^{4} x_{3}^{2} + x_{2}^{3} x_{3}^{3} + x_{2}^{2} x_{3}^{4}$" ], "text/plain": [ "-Q**3*x1**2*x2**2*x3**2 + Q**2*x1**3*x2**2*x3 + Q**2*x1**3*x2*x3**2 + Q**2*x1**2*x2**3*x3 + 2*Q**2*x1**2*x2**2*x3**2 + Q**2*x1**2*x2*x3**3 + Q**2*x1*x2**3*x3**2 + Q**2*x1*x2**2*x3**3 - Q*x1**4*x2*x3 - Q*x1**3*x2**3 - 3*Q*x1**3*x2**2*x3 - 3*Q*x1**3*x2*x3**2 - Q*x1**3*x3**3 - 3*Q*x1**2*x2**3*x3 - 4*Q*x1**2*x2**2*x3**2 - 3*Q*x1**2*x2*x3**3 - Q*x1*x2**4*x3 - 3*Q*x1*x2**3*x3**2 - 3*Q*x1*x2**2*x3**3 - Q*x1*x2*x3**4 - Q*x2**3*x3**3 + x1**4*x2**2 + x1**4*x2*x3 + x1**4*x3**2 + x1**3*x2**3 + 2*x1**3*x2**2*x3 + 2*x1**3*x2*x3**2 + x1**3*x3**3 + x1**2*x2**4 + 2*x1**2*x2**3*x3 + 3*x1**2*x2**2*x3**2 + 2*x1**2*x2*x3**3 + x1**2*x3**4 + x1*x2**4*x3 + 2*x1*x2**3*x3**2 + 2*x1*x2**2*x3**3 + x1*x2*x3**4 + x2**4*x3**2 + x2**3*x3**3 + x2**2*x3**4" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Let us build the coordinates n > len(part)\n", "n = 3\n", "x = ut.create_x_coord(n)\n", "\n", "# Explicit expression for the Hall-Littlewood polynomial\n", "hl.explicit(x, Q).expand().factor().expand()" ] }, { "cell_type": "code", "execution_count": 12, "id": "8e37c3dc-4383-4947-9677-5b15e888c3cf", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Let us build the coordinates n < len(part)\n", "n = 1\n", "x = ut.create_x_coord(n)\n", "\n", "# Explicit expression for the Hall-Littlewood polynomial\n", "hl.explicit(x, Q)" ] }, { "cell_type": "markdown", "id": "4900aded-7019-4179-b058-be48f5ad7ca8", "metadata": {}, "source": [ "## Limits Q=0 and Q=1" ] }, { "cell_type": "markdown", "id": "04a29394-5412-49b7-a55f-f6f3c411a5af", "metadata": {}, "source": [ "One important thing: We need to crete the x coordinates as well the power sums for them, since the Schur polynomials are defined via Miwa coordinates. " ] }, { "cell_type": "code", "execution_count": 13, "id": "039a2fec-5509-494b-95b6-73c04d0ee50e", "metadata": {}, "outputs": [], "source": [ "# We want to find the limits Q = 0 and Q = 1\n", "sc = sy.SchurPolynomial(yg)\n", "mp = sy.MonomialPolynomial(yg)" ] }, { "cell_type": "code", "execution_count": 14, "id": "b80b328b-1e67-4768-ad49-03201b34e21e", "metadata": {}, "outputs": [], "source": [ "n = 2\n", "x = ut.create_x_coord(n)\n", "X = ut.tx_power_sum(yg.boxes, n)" ] }, { "cell_type": "code", "execution_count": 15, "id": "739e8702-6a2c-4d9b-80ec-4465d5ea3b8c", "metadata": {}, "outputs": [], "source": [ "hl = sy.HallLittlewoodPolynomial(yg)" ] }, { "cell_type": "markdown", "id": "094a8766-0d22-457d-a675-bf5db9f979f3", "metadata": {}, "source": [ "### Schur Polynomials" ] }, { "cell_type": "code", "execution_count": 16, "id": "6bf6f92d-8c47-451f-a62d-3a8ce9afb1d2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# The limit Q=0 is the Schur polynomial.\n", "hl.explicit(x, 0).factor() == sc.explicit(X).factor()" ] }, { "cell_type": "markdown", "id": "58d57d66-96da-4057-9c3f-e9b72af35901", "metadata": {}, "source": [ "### Monomial Symmetric Polynomials" ] }, { "cell_type": "code", "execution_count": 17, "id": "e73cb1a8-3329-495d-a31d-ae6820a50d36", "metadata": {}, "outputs": [], "source": [ "hl = sy.HallLittlewoodPolynomial(yg)" ] }, { "cell_type": "code", "execution_count": 19, "id": "60a087e8-cade-40b7-b2d8-1e6934a637c1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# The limit Q=1 is the Schur polynomial.\n", "hl.explicit(x, 1).factor() == mp.explicit(x).factor()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.2" } }, "nbformat": 4, "nbformat_minor": 5 }