{ "cells": [ { "cell_type": "markdown", "id": "alien-benchmark", "metadata": {}, "source": [ "# Complex projective space and a wedge of spheres" ] }, { "cell_type": "code", "execution_count": 1, "id": "encouraging-gauge", "metadata": { "execution": { "iopub.execute_input": "2022-05-29T19:44:55.629193Z", "iopub.status.busy": "2022-05-29T19:44:55.628933Z", "iopub.status.idle": "2022-05-29T19:44:55.948427Z", "shell.execute_reply": "2022-05-29T19:44:55.947745Z" } }, "outputs": [], "source": [ "from steenroder import barcodes, wedge, sphere, suspension, cone\n", "from examples import cp2\n", "import numpy as np\n", "\n", "def print_rel_barcodes(k, filtration):\n", " '''Auxiliary function to print outputs in the\n", " persistent relative cohomology context'''\n", " barcode, steenrod_barcode = barcodes(k, filtration)\n", " print(f'*) Regular (infinite only):')\n", " for d, bars in enumerate(barcode):\n", " print(d, bars[np.where(bars == -1)[0],:])\n", " print(f'*) Sq^{k} (non-zero only):')\n", " for d, bars in enumerate(steenrod_barcode):\n", " if bars.size > 0:\n", " print(d, bars)\n", " \n", "def print_abs_barcodes(k, filtration, length=1):\n", " '''Auxiliary function to print outputs in the\n", " persistent absolute cohomology context'''\n", " barcode, steenrod_barcode = barcodes(k, filtration, absolute=True)\n", " print(f'*) Regular (length > {length} only):')\n", " for d, bars in enumerate(barcode):\n", " print(d, bars[np.where(bars[:,1]-bars[:,0] > length)])\n", " print(f'*) Sq^{k} (non-zero only):')\n", " for d, bars in enumerate(steenrod_barcode):\n", " if bars.size > 0:\n", " print(d, bars)" ] }, { "cell_type": "markdown", "id": "amino-buyer", "metadata": {}, "source": [ "We will be mostly interested in $Sq^k$ when $k = 2$." ] }, { "cell_type": "code", "execution_count": 2, "id": "associate-pursuit", "metadata": { "execution": { "iopub.execute_input": "2022-05-29T19:44:55.953177Z", "iopub.status.busy": "2022-05-29T19:44:55.951795Z", "iopub.status.idle": "2022-05-29T19:44:55.956659Z", "shell.execute_reply": "2022-05-29T19:44:55.956113Z" } }, "outputs": [], "source": [ "k = 2" ] }, { "cell_type": "markdown", "id": "supported-buddy", "metadata": {}, "source": [ "## $\\mathbb CP^2$ and $S^2 \\vee S^4$" ] }, { "cell_type": "code", "execution_count": 3, "id": "violent-local", "metadata": { "execution": { "iopub.execute_input": "2022-05-29T19:44:55.960976Z", "iopub.status.busy": "2022-05-29T19:44:55.959839Z", "iopub.status.idle": "2022-05-29T19:45:44.997049Z", "shell.execute_reply": "2022-05-29T19:45:44.996410Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Persistent relative cohomology:\n", "\n", "**) CP^2:\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "*) Regular (infinite only):\n", "0 [[-1 0]]\n", "1 []\n", "2 [[-1 13]]\n", "3 []\n", "4 [[ -1 254]]\n", "*) Sq^2 (non-zero only):\n", "4 [[-1 13]]\n", "\n", "**) S^2 v S^4:\n", "*) Regular (infinite only):\n", "0 [[-1 0]]\n", "1 []\n", "2 [[-1 13]]\n", "3 []\n", "4 [[-1 74]]\n", "*) Sq^2 (non-zero only):\n" ] } ], "source": [ "print('Persistent relative cohomology:')\n", "print('\\n**) CP^2:')\n", "print_rel_barcodes(k, cp2)\n", "print('\\n**) S^2 v S^4:')\n", "s2_s4 = wedge(sphere(2), sphere(4))\n", "print_rel_barcodes(k, s2_s4)" ] }, { "cell_type": "markdown", "id": "metallic-wisconsin", "metadata": {}, "source": [ "## $\\Sigma\\mathbb CP^2$ and $\\Sigma(S^2 \\vee S^4)$" ] }, { "cell_type": "code", "execution_count": 4, "id": "functioning-active", "metadata": { "execution": { "iopub.execute_input": "2022-05-29T19:45:45.000431Z", "iopub.status.busy": "2022-05-29T19:45:45.000163Z", "iopub.status.idle": "2022-05-29T19:45:57.908897Z", "shell.execute_reply": "2022-05-29T19:45:57.908258Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Persistent relative cohomology:\n", "**) Suspension of CP^2:\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "*) Regular (infinite only):\n", "0 [[-1 0]]\n", "1 []\n", "2 []\n", "3 [[ -1 525]]\n", "4 []\n", "5 [[ -1 766]]\n", "*) Sq^2 (non-zero only):\n", "5 [[254 269]\n", " [ -1 525]]\n", "\n", "**) Suspension of S^2 v S^4:\n", "*) Regular (infinite only):\n", "0 [[-1 0]]\n", "1 []\n", "2 []\n", "3 [[ -1 165]]\n", "4 []\n", "5 [[ -1 226]]\n", "*) Sq^2 (non-zero only):\n" ] } ], "source": [ "print('Persistent relative cohomology:')\n", "print('**) Suspension of CP^2:')\n", "sus_cp2 = suspension(cp2)\n", "print_rel_barcodes(2, sus_cp2)\n", "\n", "print('\\n**) Suspension of S^2 v S^4:')\n", "sus_s2_s4 = suspension(s2_s4)\n", "print_rel_barcodes(2, sus_s2_s4)" ] }, { "cell_type": "markdown", "id": "martial-implement", "metadata": {}, "source": [ "## $\\mathrm{C}\\,\\Sigma\\,\\mathbb CP^2$ and $\\mathrm{C}\\,\\Sigma(S^2 \\vee S^4)$" ] }, { "cell_type": "code", "execution_count": 5, "id": "impaired-might", "metadata": { "execution": { "iopub.execute_input": "2022-05-29T19:45:57.912437Z", "iopub.status.busy": "2022-05-29T19:45:57.912164Z", "iopub.status.idle": "2022-05-29T19:46:10.976551Z", "shell.execute_reply": "2022-05-29T19:46:10.975748Z" }, "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Persistent absolute cohomology\n", "**) Cone on the suspension of CP^2:\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "*) Regular (length > 30 only):\n", "0 []\n", "1 []\n", "2 [[ 13 269]]\n", "3 [[ 525 1293]\n", " [ 781 1037]]\n", "4 [[254 510]]\n", "5 [[ 766 1534]\n", " [1022 1278]]\n", "6 []\n", "*) Sq^2 (non-zero only):\n", "4 [[254 269]]\n", "5 [[1022 1037]\n", " [ 766 1293]]\n", "\n", "**) Cone on the suspension of S^2 v S^4:\n", "*) Regular (length > 30 only):\n", "0 []\n", "1 []\n", "2 [[13 89]]\n", "3 [[165 393]\n", " [241 317]]\n", "4 [[ 74 150]]\n", "5 [[226 454]\n", " [302 378]]\n", "6 []\n", "*) Sq^2 (non-zero only):\n" ] } ], "source": [ "print('Persistent absolute cohomology')\n", "min_length_bars = 30\n", "\n", "print('**) Cone on the suspension of CP^2:')\n", "cone_sus_cp2 = cone(sus_cp2)\n", "print_abs_barcodes(k, cone_sus_cp2, min_length_bars)\n", "\n", "print('\\n**) Cone on the suspension of S^2 v S^4:')\n", "cone_sus_s2_s4 = cone(sus_s2_s4)\n", "print_abs_barcodes(k, cone_sus_s2_s4, min_length_bars)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.8.12" } }, "nbformat": 4, "nbformat_minor": 5 }