Skip to content
Snippets Groups Projects
other_P_choice.ipynb 9.2 KiB
Newer Older
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "2c1f46cb",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pseudowalls import *\n",
    "%display latex"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "48112244",
   "metadata": {},
   "source": [
    "# Initialize Cherns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "7a52d103",
   "metadata": {},
   "outputs": [],
   "source": [
    "var(\"R C D r c d A B\", domain=\"real\")\n",
    "P = A, B"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "cfde4b23",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle \\text{Chern Character:} \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = R \\\\ \\mathrm{ch}_{1} = C \\ell^{1} \\\\ \\mathrm{ch}_{2} = D \\ell^{2} \\end{array}\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle \\text{Chern Character:} \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = R \\\\ \\mathrm{ch}_{1} = C \\ell^{1} \\\\ \\mathrm{ch}_{2} = D \\ell^{2} \\end{array}$"
      ],
      "text/plain": [
       "<pseudowalls.chern_character.Chern_Char object at 0x7f56b7c82740>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "v = Chern_Char(R,C,D)\n",
    "v"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "f015f4ab",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle \\text{ Twisted Chern Character for $\\beta={ B }$ } \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = R \\\\ \\mathrm{ch}_{1} = {\\mathrm{ch}_1^B(v)} \\ell^{1} \\\\ \\mathrm{ch}_{2} = {\\mathrm{ch}_2^B(v)} \\ell^{2} \\end{array}\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle \\text{ Twisted Chern Character for $\\beta={ B }$ } \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = R \\\\ \\mathrm{ch}_{1} = {\\mathrm{ch}_1^B(v)} \\ell^{1} \\\\ \\mathrm{ch}_{2} = {\\mathrm{ch}_2^B(v)} \\ell^{2} \\end{array}$"
      ],
      "text/plain": [
       "<pseudowalls.chern_character.Twisted_Chern_Char object at 0x7f56b0027e80>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "twisted_v = Twisted_Chern_Char(B,\n",
    "            R,\n",
    "            var(\"twisted_v1\", latex_name = r\"\\mathrm{ch}_1^B(v)\", domain=\"real\"),\n",
    "            var(\"twisted_v2\", latex_name = r\"\\mathrm{ch}_2^B(v)\", domain=\"real\"),\n",
    ")\n",
    "twisted_v"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "6fced6d0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle \\text{Chern Character:} \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = r \\\\ \\mathrm{ch}_{1} = c \\ell^{1} \\\\ \\mathrm{ch}_{2} = d \\ell^{2} \\end{array}\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle \\text{Chern Character:} \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = r \\\\ \\mathrm{ch}_{1} = c \\ell^{1} \\\\ \\mathrm{ch}_{2} = d \\ell^{2} \\end{array}$"
      ],
      "text/plain": [
       "<pseudowalls.chern_character.Chern_Char object at 0x7f56afe16140>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "u = Chern_Char(r,c,d)\n",
    "u"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "711e4205",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle \\text{ Twisted Chern Character for $\\beta={ B }$ } \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = r \\\\ \\mathrm{ch}_{1} = {\\mathrm{ch}_1^B(u)} \\ell^{1} \\\\ \\mathrm{ch}_{2} = {\\mathrm{ch}_2^B(u)} \\ell^{2} \\end{array}\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle \\text{ Twisted Chern Character for $\\beta={ B }$ } \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = r \\\\ \\mathrm{ch}_{1} = {\\mathrm{ch}_1^B(u)} \\ell^{1} \\\\ \\mathrm{ch}_{2} = {\\mathrm{ch}_2^B(u)} \\ell^{2} \\end{array}$"
      ],
      "text/plain": [
       "<pseudowalls.chern_character.Twisted_Chern_Char object at 0x7f56b9a5fb20>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "twisted_u = Twisted_Chern_Char(B,\n",
    "            r,\n",
    "            var(\"twisted_u1\", latex_name = r\"\\mathrm{ch}_1^B(u)\", domain=\"real\"),\n",
    "            var(\"twisted_u2\", latex_name = r\"\\mathrm{ch}_2^B(u)\", domain=\"real\"),\n",
    ")\n",
    "twisted_u"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5f3e6e12",
   "metadata": {},
   "source": [
    "# Numerical Conditions"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1206d912",
   "metadata": {},
   "source": [
    "Condition of $P = (A,B)$ being on $\\Theta_v$ (i.e. $ch_2^{A,B}(v) = 0$) expressed in terms of twisted Chern character for $v$ at $\\beta=B$:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "17c390cd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle A^{2} = \\frac{2 \\, {\\mathrm{ch}_2^B(v)}}{R}\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle A^{2} = \\frac{2 \\, {\\mathrm{ch}_2^B(v)}}{R}$"
      ],
      "text/plain": [
       "A^2 == 2*twisted_v2/R"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A2_subs = solve(\n",
    "    stability.Tilt(*P).degree(twisted_v) == 0,\n",
    "    A^2)[0]\n",
    "\n",
    "A2_subs"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "11b9c67b",
   "metadata": {},
   "source": [
    "## Condition: $ch_2^{P}(u) > 0$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "47b34ed7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle -\\frac{1}{2} \\, A^{2} r + {\\mathrm{ch}_2^B(u)} > 0\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle -\\frac{1}{2} \\, A^{2} r + {\\mathrm{ch}_2^B(u)} > 0$"
      ],
      "text/plain": [
       "-1/2*A^2*r + twisted_u2 > 0"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stability.Tilt(*P).degree(twisted_u) > 0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "d8abf566",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle R {\\mathrm{ch}_2^B(u)} - r {\\mathrm{ch}_2^B(v)} > 0\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle R {\\mathrm{ch}_2^B(u)} - r {\\mathrm{ch}_2^B(v)} > 0$"
      ],
      "text/plain": [
       "R*twisted_u2 - r*twisted_v2 > 0"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "radius_condition = expand(\n",
    "    (stability.Tilt(*P).degree(twisted_u) / r > 0).expand().subs(\n",
    "        A2_subs\n",
    "    ) * r * R\n",
    ")\n",
    "radius_condition"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "194e313d",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle d > -\\frac{1}{2} \\, B^{2} r + B c + \\frac{r {\\mathrm{ch}_2^B(v)}}{R}\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle d > -\\frac{1}{2} \\, B^{2} r + B c + \\frac{r {\\mathrm{ch}_2^B(v)}}{R}$"
      ],
      "text/plain": [
       "d > -1/2*B^2*r + B*c + r*twisted_v2/R"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
    "radius_condition_d_bound = (\n",
    "    radius_condition\n",
    "    .subs(twisted_u.ch[2] == u.twist(B).ch[2])\n",
    "    .expand()\n",
    "    .add_to_both_sides(B*R*c - B^2*R*r/2 + r*twisted_v.ch[2])\n",
    "    .divide_both_sides(R)\n",
    "    .expand()\n",
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "e4fc4758",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<html>\\(\\displaystyle \\frac{1}{2} \\, B^{2} r - B c + d\\)</html>"
      ],
      "text/latex": [
       "$\\displaystyle \\frac{1}{2} \\, B^{2} r - B c + d$"
      ],
      "text/plain": [
       "1/2*B^2*r - B*c + d"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "u.twist(B).ch[2]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fe9fe5b8",
   "metadata": {},
   "source": [
    "## Condition: $\\Delta(u) \\geq 0$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f09514cb",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "SageMath 9.7",
   "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.10.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}