{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 6.1 (A Curve of Critical Points)\n", "A lattice path model with an infinite number of critical points. \n", "*Requirements: None*" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "-(x*y + x*z + y*z + x/y + y/x + x/z + y/z + z/x + z/y + 1/(x*y) + 1/(x*z) + 1/(y*z))*t*x*y*z + 1" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Define the characteristic polynomial and denominator H for the lattice path model\n", "var('x,y,z,t')\n", "ST = [(0,i,j) for i in [-1,1] for j in [-1,1]]\n", "ST += [(i,0,j) for i in [-1,1] for j in [-1,1]]\n", "ST += [(i,j,0) for i in [-1,1] for j in [-1,1]]\n", "S = add(x^i*y^j*z^k for (i,j,k) in ST)\n", "H = 1 - t*x*y*z*S\n", "H" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[[x == 1, y == 1/4/r1, z == -1, t == r1], [x == 1, y == -1, z == 1/4/r2, t == r2], [x == -1, y == 1/4/r3, z == 1, t == r3], [x == -1, y == 1, z == 1/4/r4, t == r4], [x == 1/4/r5, y == -1, z == 1, t == r5], [x == 1/4/r6, y == 1, z == -1, t == r6], [x == 1, y == 1, z == -1, t == (1/4)], [x == 1, y == -1, z == 1, t == (1/4)], [x == 1, y == 1, z == 1, t == (1/12)], [x == -1, y == -1, z == 1, t == (-1/4)], [x == -1, y == 1, z == -1, t == (-1/4)], [x == -1, y == -1, z == -1, t == (-1/12)]]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Solve the smooth critical point equations for the main diagonal direction\n", "CPeqs = [H] + [diff(H,x)*x - diff(H,v)*v for v in [y,z,t]]\n", "CPs = solve(CPeqs,[x,y,z,t])\n", "CPs" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/latex": [ "\\begin{math}\n", "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left[\\left[x = 1, y = 1, z = 1, t = \\left(\\frac{1}{12}\\right)\\right], \\left[x = \\left(-1\\right), y = \\left(-1\\right), z = \\left(-1\\right), t = \\left(-\\frac{1}{12}\\right)\\right]\\right]\n", "\\end{math}" ], "text/plain": [ "[[x == 1, y == 1, z == 1, t == (1/12)],\n", " [x == -1, y == -1, z == -1, t == (-1/12)]]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# We get the two isolated minimal critical points\n", "show(list(filter(lambda L: abs(t.subs(L))== 1/12, CPs)))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/latex": [ "\\begin{math}\n", "\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left[\\left[x = 1, y = \\frac{1}{4 \\, r_{1}}, z = \\left(-1\\right), t = r_{1}\\right], \\left[x = 1, y = \\left(-1\\right), z = \\frac{1}{4 \\, r_{2}}, t = r_{2}\\right], \\left[x = \\left(-1\\right), y = \\frac{1}{4 \\, r_{3}}, z = 1, t = r_{3}\\right], \\left[x = \\left(-1\\right), y = 1, z = \\frac{1}{4 \\, r_{4}}, t = r_{4}\\right], \\left[x = \\frac{1}{4 \\, r_{5}}, y = \\left(-1\\right), z = 1, t = r_{5}\\right], \\left[x = \\frac{1}{4 \\, r_{6}}, y = 1, z = \\left(-1\\right), t = r_{6}\\right], \\left[x = 1, y = 1, z = \\left(-1\\right), t = \\left(\\frac{1}{4}\\right)\\right], \\left[x = 1, y = \\left(-1\\right), z = 1, t = \\left(\\frac{1}{4}\\right)\\right], \\left[x = \\left(-1\\right), y = \\left(-1\\right), z = 1, t = \\left(-\\frac{1}{4}\\right)\\right], \\left[x = \\left(-1\\right), y = 1, z = \\left(-1\\right), t = \\left(-\\frac{1}{4}\\right)\\right]\\right]\n", "\\end{math}" ], "text/plain": [ "[[x == 1, y == 1/4/r1, z == -1, t == r1],\n", " [x == 1, y == -1, z == 1/4/r2, t == r2],\n", " [x == -1, y == 1/4/r3, z == 1, t == r3],\n", " [x == -1, y == 1, z == 1/4/r4, t == r4],\n", " [x == 1/4/r5, y == -1, z == 1, t == r5],\n", " [x == 1/4/r6, y == 1, z == -1, t == r6],\n", " [x == 1, y == 1, z == -1, t == (1/4)],\n", " [x == 1, y == -1, z == 1, t == (1/4)],\n", " [x == -1, y == -1, z == 1, t == (-1/4)],\n", " [x == -1, y == 1, z == -1, t == (-1/4)]]" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# And the curves of non-minimal critical points \n", "# (note that some points are represented multiple times)\n", "show(list(filter(lambda L: abs(t.subs(L)) != 1/12, CPs)))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "SageMath 9.2", "language": "sage", "name": "sagemath" }, "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.8.5" } }, "nbformat": 4, "nbformat_minor": 2 }