diff --git a/examples/Overview.ipynb b/examples/Overview.ipynb new file mode 100644 index 0000000..345699d --- /dev/null +++ b/examples/Overview.ipynb @@ -0,0 +1,983 @@ +{ + "metadata": { + "language": "common-lisp", + "name": "", + "signature": "sha256:369b292c1ecc74297adacb6883a5c1faf08191eaf887911e6915d0cc592d4b0d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Overview" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In this overview we try to show, without entering in detailed explanations, various possibilities of $\\texttt{Kenzo}$ in algebraic topology.\n", + "\n", + "Load the $\\texttt{Kenzo}$ software as follows:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(ql:quickload \"kenzo\")" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The main functionality of the $\\texttt{Kenzo}$ software is defined package in the $\\texttt{cat}$ Lisp package. Initialize the $\\texttt{cat}$ package as follows:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:cat-init)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Print the $\\texttt{Kenzo}$ version as follows:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:kenzo-version)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us begin by the space $\\mathrm{Moore}(\\mathbb{Z}/2\\mathbb{Z}, 3)$ described as a simplicial set having only three non--degenerate simplices, namely in dimension $0$, $3$ and $4$. In the representation created by the software, the $0$--simplex (base point), 15 the $3$--simplex and the $4$--simplex are respectively labelled $\\texttt{\"*\"}$, $\\texttt{M3}$ and $\\texttt{N4}$. Two faces of the $4$-simplex $\\texttt{N4}$ are identified with the $3$-simplex $\\texttt{M3}$, the others being contracted on the base point. To create the simplicial set one types simply: " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar m23 (cat:moore 2 3))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The system answers that a $\\texttt{Kenzo}$ object has been created, with number $1$ and type $\\texttt{SIMPLICIAL SET}$. This object may be referenced by the symbol $\\texttt{m23}$." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "m23" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We may compute the homology groups of this space, using the underlying chain complex induced by the simplicial set description. Here we compute the $H_i$ from $0$ to $4$ included. When in the answer the component part is void, it means that the corresponding homology group is null." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology m23 0 5)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As $\\texttt{m23}$ is a simplicial set, it is possible to create the cartesian product $\\texttt{m23}\\times\\texttt{m23}$ by the function $\\texttt{crts-prdc}$. This is a new simplicial set." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar m23xm23 (cat:crts-prdc m23 m23))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "m23xm23" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Being a simplicial set, $\\texttt{m23xm23}$ is also a chain complex object and we may for instance ask for the basis in dimension $6$" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:basis m23xm23 6)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(length (cat:basis m23xm23 6))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The number of elements of the basis is quite large (230). The user will note that the basis elements are formed by cartesian products of *degenerated simplices*. In the list, an element like $\\texttt{}$ means $\\eta_1\\eta_0\\mathrm{N4}\\times\\eta_5\\eta_3\\eta_2\\mathrm{M3}$.\n", + "\n", + "We may construct also the tensor product $\\mathrm{m23}\\otimes\\mathrm{m23}$ from the underlying chain complex of the simplicial set $\\texttt{m23}$. This tensor product is a new chain complex and we see that the basis in dimension $6$ has only one element:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar t2m23 (cat:tnsr-prdc m23 m23))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "t2m23" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:basis t2m23 6)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The Eilenberg-Zilber theorem is used to compute the homology groups of the cartesian product space: as chain complexes, $\\texttt{m23xm23}$ and $\\texttt{t2m23}$ have the same homology groups, but the computations using the tensor product are considerably faster." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology m23xm23 0 8)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us consider now the space $\\mathrm{K}(\\mathbb{Z}, 1)$. This is an Abelian simplicial group created in $\\texttt{Kenzo}$ by the function $\\texttt{k-z}$. In this simplicial group, a simplex in dimension $n$ \n", + "is mathematically represented by a sequence of integers, known as a *bar* object: $$ [a_1 \\mid a_2 \\mid \\ldots \\mid a_n].$$ \n", + "In $\\texttt{Kenzo}$, a non-degenerate simplex of $\\mathrm{K}(\\mathbb{Z}, 1)$ in dimension $n$ will be simply a list of $n$ non-null integers, for instance: $\\texttt{(2 3 4 5)}$. In dimension $0$, the only \n", + "simplex is $\\texttt{NIL}$ (the base point)." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar kz1 (cat:k-z 1))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "kz1" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "But this object is also a *coalgebra* and an *algebra*, and we may \n", + "see the effect of the respective induced *coproduct* and *product*: " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:cprd kz1 4 '(2 3 4 5))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:aprd kz1 6 (cat:tnpr 2 '(1 2) 4 '(3 4 5 6)))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The printed results are the printed representation of *combinations*, i.e., integer linear combinations of generators resulting from the application of the morphisms. The degree of the combination is indicated by the information: $\\texttt{CMBN n}$. \n", + "\n", + "In the same way, we may create the Abelian simplicial groups $\\mathrm{K}(\\mathbb{Z}/2\\mathbb{Z}, n)$:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar k-z2-2 (cat:k-z2 2))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "k-z2-2" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology k-z2-2 4)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us play now with the sphere $S^3$ and its loop spaces. $S^3$ and $\\Omega^2 S^3$ are created by \n", + "respective calls to the functions $\\texttt{sphere}$ and $\\texttt{loop-space}$. Then we compute the $H_4$ and $H_5$ of $\\Omega^2 S^3$:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar s3 (cat:sphere 3))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "s3" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar o2s3 (cat:loop-space s3 2))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "o2s3" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology o2s3 4 6)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us take now the first loop space $\\Omega^1 S^3$" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar os3 (cat:loop-space s3))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "os3" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In the following instruction, we locate in the symbol $\\texttt{L1}$ the canonical generator of $\\pi_2 (\\Omega^1S^3)$, that is the $2$--simplex coming from the original sphere. In fact, the object created by the command $\\texttt{(loop3 0 's3 1)}$ is the \"word\" $S3^1$ belonging to the Kan simplicial version $G(S^3)$ (a simplicial group) of the loop space $\\Omega S^3$." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar L1 (cat:loop3 0 's3 1))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L1" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us consider also the $2$--degeneracy of the base point of the loop space. In the printed result, the user will recognize the degeneracy $\\eta_1\\eta_0$ of the null loop, base point of $\\Omega^1 S^3$: " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar null-simp (cat:absm 3 cat:+null-loop+))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "null-simp" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We may build now a new space by pasting a disk $D3$ as indicated by the following call. It means that we \"paste\" to the space $\\texttt{os3}$ a $3$--simplex named $\\texttt{D3}$, the attaching map being described by the list of its faces in dimension $2$." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar dos3 (cat:disk-pasting os3 3 ' \n", + " (list L1 null-simp L1 null-simp)))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "dos3" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us compute a few homology groups of the new space $\\texttt{dos3}$:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology dos3 2 4)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "But more interesting, let us build the loop space of the object $\\texttt{dos3}$ and let us compute the homology in dimension $5$:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar odos3 (cat:loop-space dos3))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "odos3" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology odos3 5)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us continue with the Kan theory. First, we check that $S^3$ is not of type Kan and that $\\Omega S^3$ is indeed of type Kan and a non--Abelian simplicial group." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(typep s3 'cat:kan)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(typep os3 'cat:kan)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(typep os3 'cat:simplicial-group)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(typep os3 'cat:ab-simplicial-group)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us create the word $L2=(S3)^2$, i.e an object belonging to $\\Omega S^3$ and let us apply the product of the underlying algebra upon $L2 \\otimes L2$:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar L2 (cat:loop3 0 's3 2))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L2" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar square (cat:aprd os3 4 (cat:tnpr 2 L2 2 L2)))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "square" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We see that the result is a linear combination of words composed from degeneracies of $\\texttt{L2}$. The following instruction selects the generator part of the \n", + "second element of the previous combination." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar L4 (cat:gnrt (second (cat:cmbn-list square))))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "L4" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us use the lisp function $\\texttt{mapcar}$ (one among the various iteration functions of Lisp) to create the list of the faces 1, 2, 3 and 4 of the object $\\texttt{L4}$, this list is a \"Kan hat\"." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar hat (mapcar #'(lambda (i) (cat:face os3 i 4 l4)) '(1 2 3 4)))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "hat" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The function $\\texttt{kfll}$ tries to find a filling of this \"Kan hat\", and we see that the face $2$ of the resulting simplex (which is very different from $\\texttt{L4}$) is the same as the face $2$ of $\\texttt{L4}$." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar kan-simplex (cat:kfll os3 0 4 hat)) " + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "kan-simplex" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:face os3 2 4 kan-simplex)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(second hat)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let ${\\cal G}$ be a simplicial group $0$--reduced. $\\Omega S^3$ is such a group. The software $\\texttt{Kenzo}$ allows the construction of the universal bundle $\\bar{\\cal W}{\\cal G}$, i.e. the classifying space of ${\\cal G}$. In our case, as $\\Omega S^3$ in non--Abelian, the result is not a simplicial group but only a simplicial set. We verify that the $H_4$ is null." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar cls-os3 (cat:classifying-space os3))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "cls-os3" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(typep cls-os3 'cat:simplicial-group)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology cls-os3 4)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let us end this short overview with an example of computation of homotopy groups. The method used in $\\texttt{Kenzo}$ is the Whitehead tower. In this current version only the case where the first non--null homology group (in non--null dimension) is $\\mathbb{Z}$ or $\\mathbb{Z}/{2\\mathbb{Z}}$ can be processed; however if this homology group is a direct sum of several copies of $\\mathbb{Z}$ or $\\mathbb{Z}/{2 \\mathbb{Z}}$, then the corresponding stage of the Whitehead tower may also be constructed step by step.\n", + "\n", + "We take again $\\mathrm{Moore}(\\mathbb{Z}/2\\mathbb{Z}, 3)$ whose $H_3$ is $\\mathbb{Z}/2\\mathbb{Z}$. First the fundamental cohomology class is constructed:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar ch3 (cat:chml-clss m23 3))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ch3" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Then the function $\\texttt{z2-whitehead}$ is called to build a fibration over the simplicial set $\\texttt{m23}$ canonically associated to the cohomology class $\\texttt{ch3}$." + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar f3 (cat:z2-whitehead m23 ch3))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "f3" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Then the total space of the fibration is built:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar x4 (cat:fibration-total f3))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x4" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The $H_4$ of this total space is the $\\pi_4$ of $\\mathrm{Moore}(\\mathbb{Z}/2\\mathbb{Z})$:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology x4 3 5)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We may now iterate the process, to compute the $\\pi_5$ of $\\mathrm{Moore}(\\mathbb{Z}/2\\mathbb{Z})$:" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar ch4 (cat:chml-clss x4 4))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "ch4" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar f4 (cat:z2-whitehead x4 ch4))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "f4" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(defvar x5 (cat:fibration-total f4))" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "x5" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "(cat:homology x5 4 6)" + ], + "language": "python", + "metadata": {}, + "outputs": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "So $\\pi_5(\\mathrm{Moore}(\\mathbb{Z}/2\\mathbb{Z}))$ is $\\mathbb{Z}/4\\mathbb{Z}$." + ] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file