kenzo/examples/02_Objects_with_effective_homology.ipynb

2696 lines
89 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Objects with effective homology\n",
"\n",
"## Introduction\n",
"\n",
"The present chapter describes the set of programming tools for handling *objects with effective homology*. The theoretical material may be found in the paper *Constructive Algebraic Topology* by Julio Rubio Garcia and Francis Sergeraert (Available at the web site\n",
"[**https://www-fourier.ujf-grenoble.fr/~sergerar/**](https://www-fourier.ujf-grenoble.fr/~sergerar/)). The terminology used in this chapter is compatible with this reference. The terminology used in this chapter is compatible with this reference.\n",
"\n",
"## Reduction\n",
"\n",
"A *reduction* in `Kenzo` is a 5-tuple $(\\hat C, C, f, g, h)$:\n",
"$$\n",
"\\begin{aligned}\n",
"\\hat{C}\\quad & \\qquad\\stackrel{h}{\\longrightarrow} & \\mbox{$^s\\hat{C}$} \\\\\n",
"{\\scriptstyle f} \\downarrow \\uparrow {\\scriptstyle g} & & \\\\\n",
"C\\quad & &\n",
"\\end{aligned}\n",
"$$\n",
"where $\\hat C$ and $C$ are chain complexes, $f$ and $g$ chain complex morphisms and\n",
"$h$ a homotopy operator. Hereafter, $\\hat C$ is called the *top chain complex* and $C$ the *bottom chain complex*. ${}^s\\hat C$ is $\\hat C$ shifted, i.e. $h$ has degree $1$. The mappings $f$, $g$, $h$, together with the differential operator $d$ on $\\hat C$, must verify the following relations:\n",
"$$\n",
"\\begin{aligned}\n",
"f \\circ g & = & 1_C \\\\\n",
"h \\circ d + d \\circ h & = & 1_{\\hat C} - g \\circ f \\\\\n",
"f \\circ h & = & 0 \\\\\n",
"h \\circ g & = & 0 \\\\\n",
"h \\circ h & = & 0 \n",
"\\end{aligned}\n",
"$$\n",
"The morphisms $f$ and $g$ and the homotopy operator $h$ describe the (big) chain complex $\\hat C$ as the direct sum\n",
"$$ \\hat C= \\hat C_1 \\oplus \\hat C_2$$\n",
"where $\\hat C_1 = Im(g) \\simeq C$ and $\\hat C_2= Ker(f)$. The summands $\\hat{C}_1$ and $\\hat{C}_2$ are sub-chain complexes of $\\hat{C}$ and the second one is acyclic, provided with an explicit contraction, namely the restriction of $h$ to $\\hat{C}_2$.\n",
"\n",
"\n",
"### Representation of a reduction\n",
"\n",
"A reduction is implemented as an instance of the `CLOS` class `REDUCTION`, whose definition is:\n",
"\n",
"```commonlisp\n",
"(DEFCLASS REDUCTION ()\n",
" ;; Top Chain Complex\n",
" ((tcc :type chain-complex :initarg :tcc :reader tcc1)\n",
" ;; Bottom Chain Complex\n",
" (bcc :type chain-complex :initarg :bcc :reader bcc1)\n",
" (f :type morphism :initarg :f :reader f1)\n",
" (g :type morphism :initarg :g :reader g1)\n",
" (h :type morphism :initarg :h :reader h1)\n",
" ;; IDentification NuMber\n",
" (idnm :type fixnum :initform (incf *idnm-counter*) :reader idnm)\n",
" ;; ORiGiN\n",
" (orgn :type list :initarg :orgn :reader orgn)))\n",
"```\n",
"\n",
"This class has 7 slots:\n",
"\n",
"1. `tcc`, the object of type `chain-complex` representing the chain complex $\\hat C$ (top chain complex).\n",
"2. `bcc`, the object of type `chain-complex` representing the chain complex $C$ (bottom chain complex).\n",
"3. `f`, the object of type `morphism` representing the morphism $f$.\n",
"4. `g`, the object of type `morphism` representing the morphism $g$.\n",
"5. `h`, the object of type `morphism` representing the morphism $h$.\n",
"6. `idmn`, an integer, number plate for the object.\n",
"7. `orgn`, a comment list carefully chosen.\n",
"\n",
"The accessors of the slots are the functions whose name appears after the specifier `:reader` in the class definition. A printing method has been associated to the class `REDUCTION` and the external representation of an instance is a string like `[Kn Reduction K n' => Kn'']`, where `n` is the identification number of the reduction, `n'` (resp. `n''`) is the identification number of the top (resp. bottom) chain complex.\n",
"\n",
"\n",
"### The function `build-rdct`\n",
"\n",
"To facilitate the construction of instances of the `REDUCTION` class, the\n",
"software provides the function `build-rdct`.\n",
"\n",
"```commonlisp\n",
"build-rdct :f f :g g :h h :orgn orgn\n",
"```\n",
"\n",
"defined with keyword parameters. The returned value is an instance of the class `REDUCTION`. \n",
"The keyword arguments are:\n",
"\n",
"- *f*, the object of type `morphism` representing the morphism $f$.\n",
"- *g*, the object of type `morphism` representing the morphism $g$.\n",
"- *h*, the object of type `morphism` representing the morphism $h$.\n",
"- *orgn*, the comment list carefully chosen since the system does not build a new instance of the class if it finds in the list of already built reductions, `*rdct-list*`, a reduction with the same comment list.\n",
"\n",
"The `tcc` slot and the `bcc` slot of the instance are taken respectively from the `sorc` slot (source slot) and the `trgt` slot (target slot) of the morphism $f$. The function `build-rdct` controls the validity of the degrees of the morphisms and pushes the new created instance on the list `*rdct-list*`.\n",
"\n",
"### Useful macros and functions\n",
"\n",
"`(cat-init)` *[Function]*\n",
"> Clear among others, the list `*rdct-list*`, list of user created reductions and reset the global counter to 1. See also the description of this function in chapter 1.\n",
"\n",
"`(rdct` *n*`)` *[Function]*\n",
"> Retrieve in the list `*rdct-list*` the reduction instance whose identification (as `Kenzo` object) is *n*. If it does not exist, return `NIL`.\n",
"\n",
"`(bcc` *rdct* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a reduction *rdct*) this macro selects the bottom chain complex of the reduction. Otherwise, it applies the differential of the bottom chain complex of the reduction *rdct* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(tcc` *rdct* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a reduction *rdct*) this macro selects the top chain complex of the reduction. Otherwise, it applies the differential of the top chain complex of the reduction *rdct* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(f` *rdct* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a reduction *rdct*) this macro selects the morphism $f$ of the reduction. Otherwise, it applies the morphism $f$ of the reduction *rdct* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(g` *rdct* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a reduction *rdct* this macro selects the morphism $g$ of the reduction. Otherwise, it applies the morphism $g$ of the reduction *rdc* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(h` *rdct* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a reduction *rdct*) this macro selects the morphism $h$ of the reduction. Otherwise, it applies the morphism $h$ of the reduction *rdc* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(trivial-rdct` *chcm*`)` *[Function]*\n",
"> Build the trivial reduction involving only the chain complex chcm, as shown in the following diagram,\n",
"$$\n",
"\\begin{aligned}\n",
" C \\quad & \\quad\\stackrel{Zero} {\\longrightarrow} & {}^s C \\\\\n",
" {\\scriptstyle {Id}} \\downarrow \\uparrow {\\scriptstyle {Id}} & & \\\\\n",
" C \\quad & &\n",
"\\end{aligned}\n",
"$$\n",
"where the morphism *Zero* is the zero morphism of degree 1 in the chain complex $C$ and *Id* is the identity morphism in that chain complex (see the functions `zero-mrph` and `idnt-mrph` in the chain complex chapter).\n",
"\n",
"`(cmps` *brdct trdct*`)` *[Method]*\n",
"> Build a new reduction from the two reductions $b$ and $t$ (here, respectively *brdct* and *trdct*). This is done by a call to `build-rdct` with the following parameters:\n",
"$$\n",
"\\begin{aligned}\n",
"f & = & f_{b}\\circ f_{t}, \\\\\n",
"g & = & g_{t}\\circ g_{b}, \\\\\n",
"h & = & h_{t} + g_{t} \\circ h_{b} \\circ f_{t}.\n",
"\\end{aligned}\n",
"$$\n",
"The compositions and additions of morphisms are realized respectively by the methods `cmps`, `i-cmps` and `add` (see chapter 1). We recall that the `tcc` and the `bcc` slots of this new created reduction are respectively the source and target slots of the new morphim $f$.\n",
"\n",
"### Verification functions\n",
"\n",
"The two following functions are very helpful to verify the coherence of the the various mappings involved in a reduction. Let us recall the diagram of a reduction:\n",
"$$\n",
"\\begin{aligned}\n",
"\\hat{C} \\quad & \\quad\\stackrel{h}{\\longrightarrow} & \\mbox{$^s\\hat{C}$} \\\\\n",
"{\\scriptstyle f} \\downarrow \\uparrow {\\scriptstyle g} & & \\\\\n",
"C \\quad & &\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"`(pre-check-rdct` *rdct*`)` *[Function]*\n",
"> Assign to the following lisp global variables, the morphism instances computed from the morphisms of the reduction *rdct*, according to the formulas:\n",
"$$\n",
"\\begin{aligned}\n",
" \\mathtt{*tdd*} & = & d_{\\hat C} \\circ d_{\\hat C},\\\\\n",
" \\mathtt{*bdd*} & = & d_C \\circ d_C , \\\\\n",
" \\mathtt{*id-fg*} & = & f \\circ g - Id_C, \\\\\n",
" \\mathtt{*id-gf-dh-hd*} & = & Id_{\\hat C} - g \\circ f - (d_{\\hat C} \\circ h + h \\circ d_{\\hat C}),\\\\\n",
" \\mathtt{*hh*} & = & h \\circ h, \\\\\n",
" \\mathtt{*fh*} & = & f \\circ h, \\\\\n",
" \\mathtt{*hg*} & = & h \\circ g, \\\\\n",
" \\mathtt{*df-fd*} & = & d_C \\circ f - f \\circ d_{\\hat C}, \\\\\n",
" \\mathtt{*dg-gd*} & = & d_{\\hat C} \\circ g - g \\circ d_C.\n",
"\\end{aligned}\n",
"$$\n",
"In these formulas $d_C$ and $d_{\\hat C}$ are the respective boundary operators of the\n",
"chain complexes $C$ and $\\hat C$. $Id_C$ and $Id_{\\hat C}$ are the identity morphisms\n",
"on the chain complexes $C$ and $\\hat C$ built by the function `idnt-mrph`\n",
"\n",
"`(check-rdct)` *[Function]*\n",
"> Map all the morphisms prepared by the function *pre-check-rdct* on chosen combinations.\n",
"This function having no parameters, the user must assign to the two lisp global variables:\n",
"`*tc*` and `*bc*`, valid combinations belonging respectively to $\\hat C$ and $C$. The call to this function is simply `(check-rdct)`. This function knows what morphism to apply\n",
"to the combinations and pauses after each evaluation to allow the user to inspect each result.\n",
"To resume the execution, the user must enter a blank character. If the morphisms are coherent, the result of each mapping is a null combination.\n",
"\n",
"#### Example\n",
"\n",
"To show an example about the verification functions, we first define a locally effective version\n",
"of the standard simplex $\\Delta^n$. The following function `cdelta` builds the standard simplex\n",
"in dimension *dmns*. In using the created chain complex, the user must bear in mind that\n",
"the only valid vertices are the vertices numbered from $(0)$ to $(dmns)$."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"CDELTA"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(defun cdelta (dmns)\n",
" (build-chcm\n",
" :cmpr #'l-cmpr\n",
" :basis :locally-effective\n",
" :bsgn '(0)\n",
" :intr-dffr\n",
" #'(lambda (degr gmsm)\n",
" (make-cmbn\n",
" :degr (1- degr)\n",
" :list (do ((rslt +empty-list+\n",
" (cons (cons sign\n",
" (append\n",
" (subseq gmsm 0 nark)\n",
" (subseq gmsm (1+ nark))))\n",
" rslt))\n",
" (sign 1 (- sign))\n",
" (nark 0 (1+ nark)))\n",
" ((> nark degr) rslt))))\n",
" :strt :gnrt\n",
" :orgn `(locally effective version of C_* delta ,dmns)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now, let us define 3 functions `make-f`, `make-g` and `make-h` which build the following respective morphisms between $\\Delta^m$ and $\\Delta^n$:\n",
"\n",
"- `(make-f tdms bdms)` builds a projection morphism $f$ from $\\Delta^{tdms}$ to $\\Delta^{bdms}$, $tdms>=bdms$, where the vertices $(0)$ to $(dms)$ of $\\Delta^{tdms}$ are applied on the vertices of the same number in $\\Delta^{bdms}$ and the vertices $(bdms+1)$ to $(tdms)$ are applied on the vertex $(bdms)$ of $\\Delta^{bdms}$.\n",
"- `(make-g tdms bdms)` builds the injection morphism $g$ from $\\Delta^{bdms}$ to $\\Delta^{tdms}$ (the slot `:intr` is the identity function).\n",
"- `(make-h tdms bdms)` builds a homotopy morphism of degree 1, $h$, from $\\Delta^{tdms}$ to itself, connecting w.r.t. the homotopy relation, the chain map $g \\circ f$ with the identity morphism $Id$."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"MAKE-F"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(defun make-f (tdmns bdmns)\n",
" (build-mrph\n",
" :sorc (cdelta tdmns) :trgt (cdelta bdmns) :degr 0\n",
" :intr #'(lambda (degr gmsm)\n",
" (let ((pos (position-if #'(lambda (vertex) (>= vertex bdmns))\n",
" gmsm)))\n",
" (if pos\n",
" (if (< pos degr)\n",
" (zero-cmbn degr)\n",
" (cmbn degr 1 (nconc (butlast gmsm) (list bdmns))))\n",
" (cmbn degr 1 gmsm))))\n",
" :strt :gnrt\n",
" :orgn `(projection delta ,tdmns => delta ,bdmns)))"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"MAKE-G"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(defun make-g (tdmns bdmns)\n",
" (build-mrph\n",
" :sorc (cdelta bdmns) :trgt (cdelta tdmns) :degr 0\n",
" :intr #'identity\n",
" :strt :cmbn\n",
" :orgn `(injection delta ,bdmns => delta ,tdmns)))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"MAKE-H"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(defun make-h (tdmns bdmns)\n",
" (build-mrph\n",
" :sorc (cdelta tdmns) :trgt (cdelta tdmns) :degr +1\n",
" :intr #'(lambda (degr gmsm)\n",
" (let ((pos (position-if #'(lambda (vertex) (>= vertex bdmns))\n",
" gmsm)))\n",
" (if pos\n",
" (if (member bdmns gmsm)\n",
" (zero-cmbn (1+ degr))\n",
" (cmbn (1+ degr) (-1-expt-n pos)\n",
" (append (subseq gmsm 0 pos) (list bdmns)\n",
" (subseq gmsm pos))))\n",
" (zero-cmbn (1+ degr)))))\n",
" :strt :gnrt\n",
" :orgn `(homotopy for delta ,tdmns => ,bdmns)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We may now define a function to build a reduction. One has not to define a priori the standard\n",
"simplices: this is done in all the functions and we know that there is no duplication, because\n",
"before creation, the system checks, owing to the comment list, if the instance of a class (here a chain complex) already exists."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"MAKE-RDCT"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(defun make-rdct (tdmns bdmns)\n",
" (let ((rdct (build-rdct\n",
" :f (make-f tdmns bdmns)\n",
" :g (make-g tdmns bdmns)\n",
" :h (make-h tdmns bdmns)\n",
" :orgn `(reduction delta ,tdmns ,bdmns))))\n",
" rdct))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We now build with a simple call to the function `make-rdct` the chain complexes corresponding \n",
"to $\\Delta^6$ and $\\Delta^3$, the 3 morphisms $f$, $g$, $h$ and the reduction. The lisp utility function `inspect` gives an idea of the organisation of the class instance. Then we verify the coherency of the reduction with the functions `pre-check-rdct` and `check-rdct`."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K8 Reduction K1 => K3]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def rdct (make-rdct 6 3))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"The object is a STANDARD-OBJECT of type REDUCTION.\n",
"0. TCC: [K1 Chain-Complex]\n",
"1. BCC: [K3 Chain-Complex]\n",
"2. F: [K5 Morphism (degree 0): K1 -> K3]\n",
"3. G: [K6 Morphism (degree 0): K3 -> K1]\n",
"4. H: [K7 Morphism (degree 1): K1 -> K1]\n",
"5. IDNM: 8\n",
"6. ORGN: (REDUCTION DELTA 6 3)\n",
"\n",
"> "
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(inspect rdct)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"(REDUCTION DELTA 6 3)"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(orgn rdct)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(pre-check-rdct rdct)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 2}\n",
"<1 * (0 1 2)>\n",
"<10 * (1 2 3)>\n",
"<100 * (1 2 4)>\n",
"<1000 * (2 3 4)>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(setf *tc* (cmbn 2 1 '(0 1 2) 10 '(1 2 3) 100 '(1 2 4) 1000 '(2 3 4)))"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<4 * (0 1 2 3)>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(setf *bc* (cmbn 3 4 '(0 1 2 3)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this documentation, we use the non-interactive function `check-rdct-no-wait` which does the whole check at once without waiting the newline input between two elementary checks."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"*TC* => \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"<1 * (0 1 2)>\n",
"<10 * (1 2 3)>\n",
"<100 * (1 2 4)>\n",
"<1000 * (2 3 4)>\n",
"------------------------------------------------------------------------------\n",
"\n",
"*BC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<4 * (0 1 2 3)>\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *TDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 0}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *BDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DF-FD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DG-GD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-FG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-GF-DH-HD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *FH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(check-rdct-no-wait)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We do now the same thing with a more complicated reduction which is the\n",
"composition of the two following reductions:"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K35 Reduction K1 => K30]"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def trdct (make-rdct 6 4))"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K39 Reduction K30 => K3]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def brdct (make-rdct 4 3))"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K45 Reduction K1 => K3]"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(setf rdct (cmps brdct trdct))"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(pre-check-rdct rdct)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"*TC* => \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"<1 * (0 1 2)>\n",
"<10 * (1 2 3)>\n",
"<100 * (1 2 4)>\n",
"<1000 * (2 3 4)>\n",
"------------------------------------------------------------------------------\n",
"\n",
"*BC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<4 * (0 1 2 3)>\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *TDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 0}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *BDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DF-FD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DG-GD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-FG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-GF-DH-HD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *FH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(check-rdct-no-wait)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Homotopy equivalence\n",
"\n",
"A *homotopy equivalence* between two chain complexes $C$ and $EC$ is a pair of reductions:\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" & \\qquad\\hat{C} & \\\\\n",
" \\rho_1\\swarrow\\nearrow & & \\nwarrow\\searrow \\rho_2 \\\\\n",
"C \\quad & & EC\\quad\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"If $C$ and $EC$ are *free* $\\mathbb{Z}$-chain complexes, a usual chain equivalence between them can be\n",
"organized in this way. Frequently the chain complexes $C$ and $\\hat C$ are *locally effective*\n",
"and on the contrary, the chain complex $EC$ is *effective*, so that $EC$ can be understood\n",
"as a description of the homology of $C$. More precisely, $EC$ is a tool allowing one to compute the\n",
"homology of $C$. The chain complexe $\\hat C$ is only an intermediate object.\n",
"\n",
"### Representation of a homotopy equivalence\n",
"\n",
"A homotopy equivalence is implemented as an instance of the `CLOS` class `HOMOTOPY-EQUIVALENCE`,\n",
"whose definition is\n",
"\n",
"```commonlisp\n",
"(DEFCLASS HOMOTOPY-EQUIVALENCE ()\n",
" ;; Left Bottom Chain Complex\n",
" ((lbcc :type chain-complex :initarg :lbcc :reader lbcc1)\n",
" ;; Top Chain Complex\n",
" (tcc :type chain-complex :initarg :tcc :reader tcc1)\n",
" ;; Bottom Right Chain Complex\n",
" (rbcc :type chain-complex :initarg :rbcc :reader rbcc1)\n",
" ;; Left f\n",
" (lf :type morphism :initarg :lf :reader lf1)\n",
" ;; Left g\n",
" (lg :type morphism :initarg :lg :reader lg1)\n",
" ;; Left h\n",
" (lh :type morphism :initarg :lh :reader lh1)\n",
" ;; Right f\n",
" (rf :type morphism :initarg :rf :reader rf1)\n",
" ;; Right g\n",
" (rg :type morphism :initarg :rg :reader rg1)\n",
" ;; Right h\n",
" (rh :type morphism :initarg :rh :reader rh1)\n",
" ;; Left ReDuCTion\n",
" (lrdct :type reduction :initarg :lrdct :reader lrdct)\n",
" ;; Right ReDuCTion\n",
" (rrdct :type reduction :initarg :rrdct :reader rrdct)\n",
" ;; IDentification NuMber\n",
" (idnm :type fixnum :initform (incf *idnm-counter*) :reader idnm)\n",
" (orgn :type list :initarg :orgn :reader orgn)))\n",
"```\n",
"\n",
"This class has 13 slots:\n",
"\n",
"- `lbcc`, the object of type `chain complex` representing the chain complex $C$ (**l**eft **b**ottom **c**hain **c**omplex on the diagram).\n",
"- `tcc`, the object of type `chain complex` representing the chain complex $\\hat C$ (**t**op **c**hain **c**omplex).\n",
"- `rbcc`, the object of type `chain complex` representing the chain complex $EC$ (**r**ight **b**ottom **c**hain **c**omplex on the diagram).\n",
"- `lf`, the object of type `morphism` representing the morphism $f$ of the (**l**eft) reduction $\\rho_1$.\n",
"- `lg`, the object of type `morphism` representing the morphism $g$ of the (**l**eft) reduction $\\rho_1$.\n",
"- `lh`, the object of type `morphism` representing the morphism $h$ of the (**l**eft) reduction $\\rho_1$.\n",
"- `rf`, the object of type `morphism` representing the morphism $f$ of the (**r**ight) reduction $\\rho_2$.\n",
"- `rg`, the object of type `morphism` representing the morphism $g$ of the (**r**ight) reduction $\\rho_2$.\n",
"- `rh`, the object of type `morphism` representing the morphism $h$ of the (**r**ight) reduction $\\rho_2$.\n",
"- `lrdc`, the object of type `reduction` representing the (**l**eft) reduction $\\rho_1$.\n",
"- `rrdc`, the object of type `reduction` representing the (**r**ight) reduction $\\rho_2$.\n",
"- `idn`, an integer, number plate for the object, set by the system.\n",
"- `orgn`, an adequate comment list.\n",
"\n",
"When an instance is created, the printing method associated to the class `HOMOTOPY EQUIVALENCE` prints a string like `[Kn Homotopy-Equivalence Ka <= Kb => Kc]`, where `n` is the number plate of the equivalence, `a` is the id number of $C$, `b` the id number of $\\hat C$, `c` the id number of $EC$.\n",
"\n",
"\n",
"### The function `build-hmeq`\n",
"\n",
"To facilitate the construction of instances of the `HOMOTOPY-EQUIVALENCE` class, the program provides the function, (in fact a method), `build-hmeq` which may be used in the following ways:\n",
"either with the two reductions $\\rho_1$ and $\\rho_2$ or explicitly with the morphisms.\n",
"The selection of the adequate method is done by inspecting the first keyword, which is \n",
"`:lrdct` in the first case and `:lf` in the second one. In both cases the returned value is an instance of the class `HOMOTOPY-EQUIVALENCE`.\n",
"\n",
"1) `(build-hmeq :lrdct` *lrdct* `:rrdct` *rrdc* `:orgn` *orgn*`)` *[Method]*\n",
"> The keyword arguments are:\n",
"- *lrdct*, the object of type `reduction` representing the reduction $\\rho_1$.\n",
"- *rrdct*, the object of type `reduction` representing the reduction $\\rho_2$.\n",
"- *org*, the comment list.\n",
"The function `build-heq-from-rdc` calls internally the standard constructor `make-instance`. All the needed information is contained in the two reductions.\n",
"\n",
"2) `(build-hmeq :lf` *lf* `:lg` *lg* `:lh` *lh* `:rf` *rf* `:rg` *rg* `:rh` *rh* `:orgn` *orgn*`)` *[Method]*\n",
"> The keyword arguments are:\n",
"- *lf*, the object of type `morphism` representing the morphism $f$ of the reduction $\\rho_1$.\n",
"- *lg*, the object of type `morphism` representing the morphism $g$ of the reduction $\\rho_1$.\n",
"- *lh*, the object of type `morphism` representing the morphism $h$ of the reduction $\\rho_1$.\n",
"- *rf*, the object of type `morphism` representing the morphism $f$ of the reduction $\\rho_2$.\n",
"- *rg*, the object of type `morphism` representing the morphism $g$ of the reduction $\\rho_2$.\n",
"- *rh*, the object of type `morphism` representing the morphism $h$ of the reduction $\\rho_2$.\n",
"- *org*, the comment list.\n",
"\n",
"All the needed information is contained in the morphism structures.\n",
"In both cases, the method pushes the created instance onto the list `*hmeq-list*`.\n",
"\n",
"### Useful macros and functions\n",
"\n",
"`(cat-init)` *[Function]*\n",
"> Clear among others, the list `*hmeq-list*`, list of user created homotopy equivalences and reset the global counter to 1.\n",
"\n",
"`(hmeq` *n*`)` *[Function]*\n",
"> Retrieve in the list `*hmeq-list*` the homotopy equivalence instance whose identification is $n$. If it does not exist, return `NIL`.\n",
"\n",
"`(lbcc` *hmeq* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a homotopy equivalence *hmeq*) this macro selects the left bottom chain complex of the homotopy equivalence. Otherwise, it applies the differential of the left bottom chain complex of *hmeq* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(rbcc` *hmeq* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a homotopy equivalence *hmeq*) this macro selects the right bottom chain complex of the homotopy equivalence. Otherwise, it applies the differential of the right bottom chain complex of *hmeq* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(lf` *hmeq* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a homotopy equivalence *hmeq*) this macro selects the morphism $f$ of the left reduction of *hmeq*. Otherwise, it applies the morphism $f$ of the left reduction of *hmeq* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(lg` *hmeq* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a homotopy equivalence *hmeq*) this macro selects the morphism $g$ of the left reduction of *hmeq*. Otherwise, it applies the morphism $g$ of the left reduction of *hmeq* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(lh` *hmeq* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a homotopy equivalence *hmeq*) this macro selects the morphism $h$ of the left reduction of *hmeq*. Otherwise, it applies the morphism $h$ of the left reduction of *hmeq* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(rf` *hmeq* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a homotopy equivalence *hmeq*) this macro selects the morphism $f$ of the right reduction of *hmeq*. Otherwise, it applies the morphism $f$ of the right reduction of *hmeq* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(rg` *hmeq* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a homotopy equivalence *hmeq*) this macro selects the morphism $g$ of the right reduction of *hmeq*. Otherwise, it applies the morphism $g$ of the right reduction of *hmeq* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(rh` *hmeq* `&rest` *args*`)` *[Macro]*\n",
"> With only one argument (a homotopy equivalence *hmeq*) this macro selects the morphism $h$ of the right reduction of *hmeq*. Otherwise, it applies the morphism $h$ of the right reduction of *hmeq* on the arguments *args*, (either *degree generator* or *cmb*).\n",
"\n",
"`(trivial-hmeq` *chcm*`)` *[Function]*\n",
"> Build the trivial homotopy equivalence involving only the chain complex *chcm*. In that case,\n",
"the 3 chain complexes $C$, $EC$ and $\\hat C$ are the chain complex *chcm* itself and the reductions $\\rho_1$ and $\\rho_2$ are, of course, the trivial reductions on *chcm* built by the statement `(trivial-rdct chcm)`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## The perturbation lemma machinery\n",
"\n",
"For a good understanding of the lisp functions involved in the machinery in question,\n",
"we recall the *perturbation lemma* (**Ronald Brown**. *The twisted Eilenberg--Zilber theorem*.\n",
"Celebrazioni Arch. Secolo XX Simp. Top., 1967, pp 34-37.). In the basic (resp. trivial) perturbation lemma, the given perturbation concerns the **top** (resp. **bottom**) chain complex.\n",
"\n",
"**Theorem 1 (Basic perturbation lemma)** - Let\n",
"$\\rho=(\\hat{C},C,f,g,h)$ a reduction and $\\hat{\\delta}$ a *perturbation* of $d_{\\hat{C}}$, that is, an operator defined on $\\hat{C}$ of degree -1 satisfying the relation $(d_{\\hat{C}}+\\hat{\\delta})\\circ(d_{\\hat{C}}+\\hat{\\delta})=0$. Furthermore, the composite function $h\\circ\\hat{\\delta}$ is assumed *locally nilpotent*, that is, $\\forall x \\in \\hat{C}$, $(h\\circ\\hat{\\delta})^nx=0$, for $n$ sufficiently large. Then a new reduction $\\rho'=(\\hat{C}',C',f',g',h')$ can be constructed where:\n",
"1. $\\hat{C}'$ is the chain complex obtained from $C$ by replacing the old differential $d_{\\hat{C}}$ by $(d_{\\hat{C}}+\\hat{\\delta}),$\n",
"2. the new chain complex $C'$ is obtained from the chain complex $C$ only by replacing the old differential $d_C$ by $(d_C + \\delta),$ with $\\delta = f \\circ {\\hat \\delta} \\circ \\phi \\circ g =\n",
" f \\circ \\psi \\circ {\\hat \\delta} \\circ g,$\n",
"3. $f'= f \\circ \\psi = f \\circ (Id - {\\hat \\delta} \\circ \\phi \\circ h),$\n",
"4. $g'= \\phi \\circ g,$\n",
"5. $h'= \\phi \\circ h = h \\circ \\psi$,\n",
"with \n",
"$$\n",
"\\phi=\\sum_{i=0}^{\\infty}{(-1)^i(h \\circ \\hat{\\delta})^i}\n",
"$$\n",
"and\n",
"$$\n",
"\\psi=\\sum_{i=0}^{\\infty}{(-1)^i(\\hat{\\delta}\\circ h)^i} = Id - {\\hat \\delta} \\circ \\phi \\circ h,\n",
"$$\n",
"the convergence being ensured by the locally nilpotency of $h \\circ \\hat{\\delta}$ and $\\hat{\\delta} \\circ h$.\n",
"\n",
"**Theorem 2 (Trivial perturbation lemma)** - Let\n",
"$\\rho=(\\hat{C},C,f,g,h)$ a reduction and ${\\check\\delta}$ a *perturbation* of $d_C$, that is, an operator defined on $C$ of degree -1 satisfying the relation $(d_C+{\\check\\delta})\\circ (d_C+{\\check\\delta})=0$. Then a new reduction $\\rho'=(\\hat{C}',C',f',g',h')$ can be constructed where:\n",
"1. $\\hat{C}'$ is the chain complex obtained from $C$ by replacing the old differential $d_{\\hat{C}}$ by $(d_{\\hat{C}}+ g \\circ {\\check\\delta} \\circ f),$\n",
"2. the new chain complex $C'$ is obtained from the chain complex $C$ only by replacing the old differential $d_C$ by $(d_C +{\\check \\delta}),$ \n",
"3. $f'= f,$\n",
"4. $g'= g,$\n",
"5. $h'= h.$\n",
"\n",
"### Useful functions related to the perturbation lemma\n",
"\n",
"The functions implementing the perturbation-lemma are actually the heart of the program. They allow us\n",
"to implement the effective versions of the classical spectral sequences (Serre, Eilenberg-Moore, ...). \n",
"\n",
"`(add` *rdct perturbation*`)` *[Method]*\n",
"> Build a new reduction from the object of type `reduction`, *rdct* and \n",
"the object of type `morphism`, *perturbation*, applying the formulas given in the perturbation lemma. In fact, this method calls one or the other of the two following functions according as the perturbation is on the top or on the bottom chain complex and returns the values of the called function.\n",
"\n",
"`(basic-perturbation-lemma` *reduction top-perturbation*`)` *[Function]*\n",
"> Return a double value: the perturbed reduction and the computed bottom-perturbation (a morphism)\n",
"$f \\circ {\\hat \\delta}\\circ \\phi \\circ g$. Of course, to avoid unuseful computations when the morphisms are effectively applied, the function takes in account the simplifications involved for instance when some morphisms are the null morphism.\n",
"\n",
"`(easy-perturbation-lemma` *reduction bottom-perturbation*`)` *[Function]*\n",
"> Return a double value: the perturbed reduction and the computed top-perturbation (a morphism) $g \\circ {\\check \\delta} \\circ f$. Of course, to avoid useless computation when the morphisms will be applied, the function takes in account the simplifications involved for instance when some morphisms are the null morphism.\n",
"\n",
"`(special-bpl` *reduction top-perturbation*`)` *[Function]*\n",
"> This function is analogous to `basic-perturbation-lemma` and is used in some special cases when the morphism $g$ is invariant.\n",
"\n",
"`(special-bpl2` *reduction top-perturbation*`)` *[Function]*\n",
"> [analogous to special-bpl when $f$ is invariant.]\n",
"\n",
"`(bpl-*-sigma` *homotopy perturbation*`)` *[Function]*\n",
"> Construct the principal series $\\phi=\\sum_{i=0}^{\\infty}{(-1)^i(h \\circ \\hat{\\delta})^i}$ of the basic perturbation lemma.\n",
"\n",
"`(add` *hmeq lb-perturbation*`)` *[Method]*\n",
"> Build a homotopy equivalence from the `homotopy-equivalence` *hmeq* and the `morphism` *lb-perturbation*, a perturbation of the differential of the left bottom chain complex of *hmeq*. From *hmeq*:\n",
"$$\n",
"\\begin{aligned}\n",
" & \\qquad\\hat{C} & \\\\\n",
" \\rho_1\\swarrow\\nearrow & & \\nwarrow\\searrow \\rho_2 \\\\\n",
"C\\quad & & EC\n",
"\\end{aligned}\n",
"$$\n",
"the method `add` builds the new homotopy equivalence:\n",
"$$\n",
"\\begin{aligned}\n",
" & \\qquad\\hat{C}' & \\\\\n",
" \\rho'_1\\swarrow\\nearrow & & \\nwarrow\\searrow \\rho'_2 \\\\\n",
"C'\\quad & & EC'\n",
"\\end{aligned}\n",
"$$\n",
"where the construction steps are the following:\n",
"- The reduction $\\rho'_1$ is computed with the method `add` for a reduction with arguments: the left reduction of *hmeq* and the perturbation *lb-perturbation*. The trivial perturbation lemma is applied. As a bonus, this returns also the top perturbation, say $\\delta$ to be applied to $\\hat{C}$.\n",
"- The reduction $\\rho'_2$ is computed with the previous method `add` with arguments: the right reduction of *hmeq* and the top perturbation $\\delta$ just computed. That time, the basic perturbation lemma is applied.\n",
"- The function `build-hmeq` is called with parameters $\\rho'_1$ and $\\rho'_2$.\n",
"\n",
"#### Example\n",
"\n",
"We shall apply these methods and functions in the following chapters. Let us show on a trivial example\n",
"how this machinery works. First, we build a trivial homotopy equivalence on $\\Delta^4$. Then we build a new one by perturbing the differential of the left bottom chain complex with its opposite. The last call shows how this perturbation has been propagated."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K66 Homotopy-Equivalence K30 <= K30 => K30]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def hmeq (trivial-hmeq (cdelta 4)))"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K74 Homotopy-Equivalence K69 <= K69 => K69]"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(setf hmeq (add hmeq (opps (dffr (cdelta 4)))))"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(gnrt-? (dffr (rbcc hmeq)) 3 '(0 1 2 3))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Bicones\n",
"\n",
"Given 3 chain complexes $B$, $C$ and $D$, together with 2 chain homomorphisms $f_1$ and $f_2$ of degree $0$ (commuting with the differentials), as shown in the following diagram, a bicone on these chain complexes is a chain complex, $BCN(f_1,f_2)$ where the $n$-th chain group $[BCN(f_1,f_2)]$ is $B_n \\oplus C_{n+1} \\oplus D_n$.\n",
"$$\n",
"\\begin{aligned}\n",
"B & & & \\qquad D & \\\\\n",
"& f_1 \\searrow & & \\swarrow f_2 & \\\\\n",
"& & C \\qquad& &\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"### Representation of a combination in a bicone\n",
"\n",
"To distinguish to which chain complex belongs a generator in a combination of a bicone, the following convention has been adopted: if `gb` is a generator of any degree of $B$, it will be represented in the bicone by the list `(:BcnB gb)` and printed as `<BcnB gb>`. The symbols for $C$ and $D$ are respectively `:BcnC` and `:BcnD`. The 3 macros `bcnb`, `bcnc` and `bcnd` may be used to build such a generator. The building function for combinations, `cmbn`, may be used in the following way:"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<2 * <BcnB B1>>\n",
"<4 * <BcnB B1>>\n",
"<6 * <BcnB B3>>\n",
"<3 * <BcnB C1>>\n",
"<5 * <BcnB C1>>\n",
"<7 * <BcnB D1>>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def comb-bic (cmbn 3 2 (bcnb 'b1) 4 (bcnb 'b1) 6 (bcnb 'b3)\n",
" 3 (bcnb 'c1) 5 (bcnb 'c1) 7 (bcnb 'd1)))"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"((2 . <BcnB B1>) (4 . <BcnB B1>) (6 . <BcnB B3>) (3 . <BcnB C1>) (5 . <BcnB C1>) (7 . <BcnB D1>))"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(cmbn-list comb-bic)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Useful functions and macros for bicones\n",
"\n",
"`(bcnb` *gnrt*`)` *[Macro]*\n",
"> Build the representation of the generator *gnrt* belonging to the chain complex $B$.\n",
"\n",
"`(bcnc` *gnrt*`)` *[Macro]*\n",
"> Build the representation of the generator *gnrt* belonging to the chain complex $C$.\n",
"\n",
"`(bcnd` *gnrt*`)` *[Macro]*\n",
"> Build the representation of the generator *gnrt* belonging to the chain complex $D$.\n",
"\n",
"`(make-bicn-cmbn` *cmbnb cmbnc cmbnd*`)` *[Function]*\n",
"> Build a bicone combination from the 3 combinations *cmbnb*, *cmbnc* and *cmbnd* belonging respectively and in that order to $B$, $C$ and $D$. The degrees of the combinations *cmbnb* and *cmbnd* must be the same, say $n$. The degree of *cmbnc* must be $n+1$. The degree of the new created combination is $n$.\n",
"\n",
"`(bicn-cmbn-cmbnb` *cmbn*`)` *[Function]*\n",
"> Extract from the bicone combination of degree $n$, *cmbn*, the combination relative to $B$ as a legal combination of degree $n$ in $B$. If there is no $B$-component, return the null combination of degree $n$.\n",
"\n",
"`(bicn-cmbn-cmbnc` *cmbn*`)` *[Function]*\n",
"> Extract from the bicone combination of degree $n$, *cmbn*, the combination relative to $C$ as a legal combination of degree $n+1$ in $C$. If there is no $C$-component, return the null combination of degree $n+1$.\n",
"\n",
"`(bicn-cmbn-cmbnd` *cmbn*`)` *[Function]*\n",
"> Extract from the bicone combination of degree $n$, *cmbn*, the combination relative to $D$ as a legal combination of degree $n$ in $D$. If there is no $D$-component, return the null combination of degree $n$\n",
"\n",
"`(dispatch-bicn-cmbn` *cmbn*`)` *[Function]*\n",
"> Give the 3-values result made of the 3 combinations components of the bicone combination *cmbn*. These combinations are valid combinations in their respective chain complexes.\n",
"\n",
"#### Examples"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<2 * B1>\n",
"<4 * B2>\n",
"<6 * B3>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def comb-b (cmbn 3 2 'b1 4 'b2 6 'b3))"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 4}\n",
"<3 * C1>\n",
"<5 * C2>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def comb-c (cmbn 4 3 'c1 5 'c2))"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<7 * D1>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def comb-d (cmbn 3 7 'd1))"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<2 * <BcnB B1>>\n",
"<4 * <BcnB B2>>\n",
"<6 * <BcnB B3>>\n",
"<3 * <BcnC C1>>\n",
"<5 * <BcnC C2>>\n",
"<7 * <BcnD D1>>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def comb-bic (make-bicn-cmbn comb-b comb-c comb-d))"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<2 * B1>\n",
"<4 * B2>\n",
"<6 * B3>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(bicn-cmbn-cmbnb comb-bic)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 4}\n",
"<3 * C1>\n",
"<5 * C2>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(bicn-cmbn-cmbnc comb-bic)"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<7 * D1>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(bicn-cmbn-cmbnd comb-bic)"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"(\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<2 * B1>\n",
"<4 * B2>\n",
"<6 * B3>\n",
"------------------------------------------------------------------------------\n",
" \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"<3 * C1>\n",
"<5 * C2>\n",
"------------------------------------------------------------------------------\n",
" \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<7 * D1>\n",
"------------------------------------------------------------------------------\n",
")"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(multiple-value-bind (b c d)\n",
" (dispatch-bicn-cmbn comb-bic)\n",
" (list b c d))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Construction of a bicone from 2 reductions\n",
"\n",
"From the slots of the respective chain complexes $B$, $C$ and $D$, it is possible to build the bicone chain complex. The 3 essential functions are the following:\n",
"\n",
"`(bicone-cmpr cmprb cmprc cmprd)` *[Function]*\n",
"> From the 3 comparison functions *cmprb*, *cmprc* and *cmprd*, build a comparison function adequate to compare the generators as represented in the bicone.\n",
"\n",
"`(bicone-basis basisb basisc basisd)` *[Function]*\n",
"> From the 3 basis function *basisb*, *basisc* and *basisd*, build a basis function for the bicone. If at least one of the chain complex component of the bicone is *locally effective*, the function returns the symbol `:locally-effective`.\n",
"\n",
"`(bicone-intr-dffr cmprc dffrb dffrc dffrd f1 f2)` *[Function]*\n",
"Define the differential in the bicone according to the formula:\n",
"$$\n",
"d(cb, cc, cd)= (d_B(cb), f_1(cb) + f_2(cd) - d_C(cc), d_D(cd)),\n",
"$$\n",
"where the notation is self explanatory. One sees that one needs the comparison operator *cmprc* of $C$, to order correctly the second combination of the resulting triple.\n",
"\n",
"Let us consider now 2 reductions $(\\hat C_1, C_1, f1, g1, h1)$ and $(\\hat C_2, C_2, f2, g2, h2)$\n",
"in which $C_1 = C_2$. It is possible to define a bicone, with the identification $\\hat C_1=B, C_1=C_2=C, \\hat C_2=D$. This is realised by the following function:\n",
"\n",
"`(bicone rdct1 rdct2)` *[Function]*\n",
"> Build the bicone chain complex from the objects ot type `reduction` *rdct1* and *rdct2*.\n",
"The bicone is built with the following identification: $B$ is the top chain complex of *rdct1*,\n",
"$D$ is the top chain complex of *rdct2*. The bottom chain complexes of both *rdct1* and *rdct2*\n",
"must be the same and $C$ is that chain complex. Of course, both chain morphisms $f_1$ and\n",
"$f_2$ are respectively the morphism $f$ of the reductions. The construction of the bicone is realised\n",
"by a call to the building function `build-chcm` using the 3 functions `bicone-cmpr`, `bicone-basis` and `bicone-intr-dffr` with arguments coming from *rdct1* an *rdct2*. \n",
"The slot `bsgn` (base point) is let undefined and the strategy is by combination.\n",
"\n",
"#### Example\n",
"\n",
"Let us take again the example with the standard simplex $\\Delta^n$. The following function defines an effective version of ${\\cal C}_*(\\Delta^n)$, so we may ask for the basis in some dimensions."
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(cat-init)"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"REDEFINITION-WITH-DEFUN: \n",
" #<SB-KERNEL:REDEFINITION-WITH-DEFUN {1006BBCF83}>\n"
]
},
{
"data": {
"text/plain": [
"CDELTA"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(defun cdelta (dmns)\n",
" (build-chcm\n",
" :cmpr #'l-cmpr\n",
" :basis #'(lambda (n)\n",
" (mapcar #'dlop-int-ext (funcall (delta-n-basis dmns) n)))\n",
" :bsgn '(0)\n",
" :intr-dffr\n",
" #'(lambda (degr gmsm)\n",
" (make-cmbn\n",
" :degr (1- degr)\n",
" :list (do ((rslt +empty-list+\n",
" (cons (cons sign\n",
" (append\n",
" (subseq gmsm 0 nark)\n",
" (subseq gmsm (1+ nark))))\n",
" rslt))\n",
" (sign 1 (- sign))\n",
" (nark 0 (1+ nark)))\n",
" ((> nark degr) rslt))))\n",
" :strt :gnrt\n",
" :orgn `(Effective version of C_* delta ,dmns)))"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K1 Chain-Complex]"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def delta3 (cdelta 3))"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"((0) (1) (2) (3))"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(basis delta3 0)"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"((0 1) (0 2) (1 2) (0 3) (1 3) (2 3))"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(basis delta3 1)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"((0 1 2) (0 1 3) (0 2 3) (1 2 3))"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(basis delta3 2)"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"((0 1 2 3))"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(basis delta3 3)"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(basis delta3 4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Using the function `make-rdct` defined in previous example which builds a reduction between \n",
"$\\Delta^m$ and $\\Delta^n$, we may create a bicone chain complex with the function `bicone` and ask for basis in some dimensions."
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K15 Chain-Complex]"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def bic (bicone (make-rdct 3 2) (make-rdct 4 2)))"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"(<BcnB (0)> <BcnB (1)> <BcnB (2)> <BcnB (3)> <BcnC (0 1)> <BcnC (0 2)> <BcnC (1 2)> <BcnD (0)> <BcnD (1)> <BcnD (2)> ...)"
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(basis bic 0)"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"(<BcnB (0 1)> <BcnB (0 2)> <BcnB (1 2)> <BcnB (0 3)> <BcnB (1 3)> <BcnB (2 3)> <BcnC (0 1 2)> <BcnD (0 1)> <BcnD (0 2)> <BcnD (1 2)> ...)"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(basis bic 1)"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"(<BcnD (0 1 2 3 4)>)"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(basis bic 4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We verify the validity of the differential in the bicone `bic`."
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 1}\n",
"<3 * <BcnB (0 1)>>\n",
"<-3 * <BcnB (0 3)>>\n",
"<3 * <BcnB (1 3)>>\n",
"<12 * <BcnC (0 1 2)>>\n",
"<-4 * <BcnC (0 1 3)>>\n",
"<4 * <BcnC (0 2 3)>>\n",
"<-4 * <BcnC (1 2 3)>>\n",
"<5 * <BcnD (0 1)>>\n",
"<-5 * <BcnD (0 4)>>\n",
"<5 * <BcnD (1 4)>>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(? bic (cmbn 2 3 (bcnb '(0 1 3)) 4 (bcnc '(0 1 2 3)) 5 (bcnd '(0 1 4))))"
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 0}\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(? bic *)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Composition of homotopy equivalences\n",
"\n",
"Let us consider 2 homotopy equivalences, as in the following diagram.\n",
"$$\n",
"\\begin{aligned}\n",
"& \\qquad B & & & & \\qquad D \\\\\n",
" \\rho_1 \\swarrow\\nearrow & & \\nwarrow\\searrow \\rho_2 & \n",
"& \\rho'_1\\swarrow\\nearrow & & \\nwarrow\\searrow\\rho'_2 \\\\\n",
"A \\quad & & C & & C \\quad & & E \\quad\n",
"\\end{aligned}\n",
"$$\n",
"where the right bottom complex of the first one is the same as the left bottom complex of the second. We may use then the bicone concept to build a bicone chain complex with $B$, $C$ and $D$, say $BCN$, and finally build a new homotopy equivalence between $A$, $BCN$ and $E$.\n",
"\n",
"$$\n",
"\\begin{aligned}\n",
" & \\qquad BCN & \\\\\n",
" \\rho''_1 \\swarrow\\nearrow & & \\nwarrow\\searrow \\rho''_2 \\\\\n",
"A \\quad & & E\\quad\n",
"\\end{aligned}\n",
"$$\n",
"\n",
"This is realized by the method `cmps`.\n",
"\n",
"`(cmps` *hmeq1 hmeq2*`)` *[Method]*\n",
"> Build a homotopy equivalence by composition of both homotopy equivalences *hmeq1*, *hmeq2*. The system controls the validity of the composition.\n",
"\n",
"### Example\n",
"\n",
"Starting with a very simple chain complex and the trivial homotopy equivalence on the chain complex, we verify the correctness of various compositions. The chain complex `c` has only one vertex `(a)` in every dimension and the differential is the null morphism."
]
},
{
"cell_type": "code",
"execution_count": 45,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(cat-init)"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K1 Chain-Complex]"
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def c (build-chcm\n",
" :cmpr #'s-cmpr\n",
" :basis #'(lambda (dmns) (declare (ignore dmns)) '(a))\n",
" :bsgn 'a\n",
" :intr-dffr #'zero-intr-dffr\n",
" :strt :cmbn\n",
" :orgn '(c)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We build the trivial homotopy equivalence on `c` and we compose it with itself."
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K6 Homotopy-Equivalence K1 <= K1 => K1]"
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def h1 (trivial-hmeq c))"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K17 Homotopy-Equivalence K1 <= K7 => K1]"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def h2 (cmps h1 h1))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We verify the coherency of the morphisms in the left and right reduction of `h2`. The combination `*tc*` must belong to a bicone whereas `*bc*` belongs to `c`."
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(pre-check-rdct (lrdct h2))"
]
},
{
"cell_type": "code",
"execution_count": 50,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * <BcnB A>>\n",
"<10 * <BcnC A>>\n",
"<100 * <BcnD A>>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 50,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(setf *tc* (cmbn 3 1 (bcnb 'a) 10 (bcnc 'a) 100 (bcnd 'a)))"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * A>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(setf *bc* (cmbn 3 1 'a))"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"*TC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * <BcnB A>>\n",
"<10 * <BcnC A>>\n",
"<100 * <BcnD A>>\n",
"------------------------------------------------------------------------------\n",
"\n",
"*BC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * A>\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *TDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *BDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DF-FD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DG-GD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-FG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-GF-DH-HD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 5}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *FH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(check-rdct-no-wait)"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 53,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(pre-check-rdct (rrdct h2))"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"*TC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * <BcnB A>>\n",
"<10 * <BcnC A>>\n",
"<100 * <BcnD A>>\n",
"------------------------------------------------------------------------------\n",
"\n",
"*BC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * A>\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *TDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *BDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DF-FD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DG-GD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-FG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-GF-DH-HD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 5}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *FH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(check-rdct-no-wait)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We compose now `h2` with itself. We let `*bc*` unchanged, but `*tc*` is a little more complicated because the chain complexes $B$ and $D$ are themselves bicones."
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"[K65 Homotopy-Equivalence K1 <= K55 => K1]"
]
},
"execution_count": 55,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(def h3 (cmps h2 h2))"
]
},
{
"cell_type": "code",
"execution_count": 56,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"data": {
"text/plain": [
"\n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * <BcnB <BcnB A>>>\n",
"<10 * <BcnB <BcnC A>>>\n",
"<100 * <BcnB <BcnD A>>>\n",
"<1000 * <BcnC A>>\n",
"<10000 * <BcnD <BcnB A>>>\n",
"<5234 * <BcnD <BcnC A>>>\n",
"<223 * <BcnD <BcnD A>>>\n",
"------------------------------------------------------------------------------\n"
]
},
"execution_count": 56,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(setf *tc* (cmbn 3 1 (bcnb (bcnb 'a)) 10 (bcnb (bcnc 'a)) 100 (bcnb (bcnd 'a))\n",
" 1000 (bcnc 'a) 10000 (bcnd (bcnb 'a)) 5234 (bcnd (bcnc 'a))\n",
" 223 (bcnd (bcnd 'a))))"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(pre-check-rdct (lrdct h3))"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"*TC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * <BcnB <BcnB A>>>\n",
"<10 * <BcnB <BcnC A>>>\n",
"<100 * <BcnB <BcnD A>>>\n",
"<1000 * <BcnC A>>\n",
"<10000 * <BcnD <BcnB A>>>\n",
"<5234 * <BcnD <BcnC A>>>\n",
"<223 * <BcnD <BcnD A>>>\n",
"------------------------------------------------------------------------------\n",
"\n",
"*BC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * A>\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *TDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *BDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DF-FD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DG-GD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-FG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-GF-DH-HD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 5}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *FH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(check-rdct-no-wait)"
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(pre-check-rdct (rrdct h3))"
]
},
{
"cell_type": "code",
"execution_count": 60,
"metadata": {
"collapsed": false,
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"*TC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * <BcnB <BcnB A>>>\n",
"<10 * <BcnB <BcnC A>>>\n",
"<100 * <BcnB <BcnD A>>>\n",
"<1000 * <BcnC A>>\n",
"<10000 * <BcnD <BcnB A>>>\n",
"<5234 * <BcnD <BcnC A>>>\n",
"<223 * <BcnD <BcnD A>>>\n",
"------------------------------------------------------------------------------\n",
"\n",
"*BC* => \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"<1 * A>\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *TDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *BDD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 1}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DF-FD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *DG-GD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 2}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-FG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *ID-GF-DH-HD* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 3}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 5}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *FH* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"Checking *HG* = 0\n",
"Result: \n",
"----------------------------------------------------------------------{CMBN 4}\n",
"------------------------------------------------------------------------------\n",
"\n",
"---done---"
]
},
{
"data": {
"text/plain": [
"NIL"
]
},
"execution_count": 60,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(check-rdct-no-wait)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Lisp files concerned in this chapter\n",
"\n",
"`effective-homology.lisp`, `cones.lisp`.\n",
"\n",
"[`classes.lisp`, `macros.lisp`, `various.lisp`]."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "SBCL Lisp",
"language": "lisp",
"name": "lisp"
},
"language_info": {
"codemirror_mode": "text/x-common-lisp",
"mimetype": "text/x-common-lisp",
"name": "common-lisp",
"pygments_lexer": "common-lisp",
"version": "X3J13"
}
},
"nbformat": 4,
"nbformat_minor": 0
}