2330 lines
56 KiB
Plaintext
2330 lines
56 KiB
Plaintext
{
|
|
"metadata": {
|
|
"language": "common-lisp",
|
|
"name": "",
|
|
"signature": "sha256:a288eb4e5bf779eb31582ec27583f8a0bf625b1b445095a088bafde8e2be5d58"
|
|
},
|
|
"nbformat": 3,
|
|
"nbformat_minor": 0,
|
|
"worksheets": [
|
|
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 1,
|
|
"metadata": {},
|
|
"source": [
|
|
"Chapter 1"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(ql:quickload \"kenzo\")"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 1,
|
|
"text": [
|
|
"(\"kenzo\")"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 1
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:cat-init)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"text": [
|
|
"\n",
|
|
"---done---"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 2,
|
|
"text": [
|
|
"NIL"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 2
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 3,
|
|
"metadata": {},
|
|
"source": [
|
|
"1.2.2 Ordering the generators"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:f-cmpr 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 3,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"F-CMPR\n",
|
|
"Args: (n1 n2)\n",
|
|
"Returns :LESS, :EQUAL, or :GREATER, according to the result of the canonical\n",
|
|
"comparison of the integers N1 and N2.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 3
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:f-cmpr 123 789)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 4,
|
|
"text": [
|
|
":LESS"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 4
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:s-cmpr 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 5,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"S-CMPR\n",
|
|
"Args: (symbol1 symbol2)\n",
|
|
"Returns :LESS, :EQUAL, or :GREATER, according to the result of the Lisp string\n",
|
|
"comparison function of the strings (SYMBOL-NAME SYMBOL1) and\n",
|
|
"(SYMBOL-NAME SYMBOL2).\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 5
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:s-cmpr 'circulation 'circular)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 6,
|
|
"text": [
|
|
":GREATER"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 6
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:l-cmpr 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 7,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"L-CMPR\n",
|
|
"Args: (list1 list2)\n",
|
|
"Returns :LESS, :EQUAL, or :GREATER, according to the lexicographical ordering\n",
|
|
"of the generator lists LIST1 and LIST2.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 7
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:l-cmpr '(1 a b) '(1 a))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 8,
|
|
"text": [
|
|
":GREATER"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 8
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 3,
|
|
"metadata": {},
|
|
"source": [
|
|
"1.2.3 Functions handling combinations"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:cmbn 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 9,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"CMBN\n",
|
|
"Args: (degr &rest rest)\n",
|
|
"Returns a combination of degree DEGR from a sum of terms provided as a sequence\n",
|
|
"CF1 GNRT1 CF2 GNRT2 ... CFn GNRTn of coefficient / generator pairs in REST.\n",
|
|
"REST can be of arbitrary even length and can be empty, in which case the\n",
|
|
"combination is an instance of the null combination of degree DEGR.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 9
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def comb1 (cat:cmbn 1 1 'u 2 'v 3 'w 4 'z))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 10,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * U>\n",
|
|
"<2 * V>\n",
|
|
"<3 * W>\n",
|
|
"<4 * Z>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 10
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:cmbn-non-zero-p 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 11,
|
|
"text": [
|
|
"\"-----------------------------------------------------------------[macro-doc]\n",
|
|
"CMBN-NON-ZERO-P\n",
|
|
"Args: (cmbn)\n",
|
|
"Tests if the combination CMBN is a non-null combination of any degree.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 11
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:cmbn-non-zero-p comb1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 12,
|
|
"text": [
|
|
"T"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 12
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:cmbn-list comb1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 13,
|
|
"text": [
|
|
"((1 . U) (2 . V) (3 . W) (4 . Z))"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 13
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def term3 (third (cat:cmbn-list comb1)))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 14,
|
|
"text": [
|
|
"(3 . W)"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 14
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:cffc term3)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 15,
|
|
"text": [
|
|
"3"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 15
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:gnrt term3)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 16,
|
|
"text": [
|
|
"W"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 16
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:cmbn-opps 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 17,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"CMBN-OPPS\n",
|
|
"Args: (cmbn)\n",
|
|
"Returns the combination opposite combination of CMBN.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 17
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def mcomb1 (cat:cmbn-opps comb1))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 18,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<-1 * U>\n",
|
|
"<-2 * V>\n",
|
|
"<-3 * W>\n",
|
|
"<-4 * Z>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 18
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:n-cmbn 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 19,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"N-CMBN\n",
|
|
"Args: (n cmbn)\n",
|
|
"Returns N times the combination CMBN. N must be non-zero.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 19
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def comb2 (cat:n-cmbn 10 comb1))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 20,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<10 * U>\n",
|
|
"<20 * V>\n",
|
|
"<30 * W>\n",
|
|
"<40 * Z>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 20
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:2cmbn-add 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 21,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"2CMBN-ADD\n",
|
|
"Args: (cmpr cmbn1 cmbn2)\n",
|
|
"Returns the combination, which is the sum of CMBN1 and CMBN2. The first\n",
|
|
"argument, CMPR, must be a function or macro, which is used to compare the\n",
|
|
"generators of the combination arguments and to order the terms of the result\n",
|
|
"combination.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 21
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def cmb12 (cat:2cmbn-add #'cat:s-cmpr comb1 comb2))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 22,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<11 * U>\n",
|
|
"<22 * V>\n",
|
|
"<33 * W>\n",
|
|
"<44 * Z>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 22
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:2cmbn-sbtr 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 23,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"2CMBN-SBTR\n",
|
|
"Args: (cmpr cmbn1 cmbn2)\n",
|
|
"Returns the combination, which is the difference of CMBN1 and CMBN2. The first\n",
|
|
"argument, CMPR, must be a function or macro, which is used to compare the\n",
|
|
"generators of the combination arguments and to order the terms of the result\n",
|
|
"combination.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 23
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:ncmbn-add 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 24,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"NCMBN-ADD\n",
|
|
"Args: (cmpr cmbn &rest rest)\n",
|
|
"Returns the sum of an arbitrary number of combinations. The first argument,\n",
|
|
"CMPR, must be a function or macro, which is used to compare the generators of\n",
|
|
"the input combinations and to order the terms of the result combination.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 24
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:ncmbn-add #'cat:s-cmpr\n",
|
|
" comb1 comb2 comb1 comb2 comb1 comb2 comb1 comb2 comb1 comb2)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 25,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<55 * U>\n",
|
|
"<110 * V>\n",
|
|
"<165 * W>\n",
|
|
"<220 * Z>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 25
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 3,
|
|
"metadata": {},
|
|
"source": [
|
|
"1.3.1 The function build-chcm"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 4,
|
|
"metadata": {},
|
|
"source": [
|
|
"A first example of a chain complex"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def diabolo-cmpr #'cat:s-cmpr)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 26,
|
|
"text": [
|
|
"#<FUNCTION CAT:S-CMPR>"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 26
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def diabolo-basis #'(lambda (dmn)\n",
|
|
" (case dmn\n",
|
|
" (0 '(s0 s1 s2 s3 s4 s5))\n",
|
|
" (1 '(s01 s02 s12 s23 s34 s35 s45))\n",
|
|
" (2 '(s345))\n",
|
|
" (otherwise nil))))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 27,
|
|
"text": [
|
|
"#<FUNCTION (LAMBDA (DMN) :IN \"/home/gerd/git/fishbowl-repl/fishbowl.lisp\") {100711F94B}>"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 27
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def diabolo-bspn 's0)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 28,
|
|
"text": [
|
|
"S0"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 28
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def diabolo-pure-dffr\n",
|
|
" #'(lambda (dmn gnr)\n",
|
|
" (unless (<= 0 dmn 2)\n",
|
|
" (error \"Incorrect dimension for diabolo-dp.\"))\n",
|
|
" (case dmn\n",
|
|
" (0 (cat:cmbn -1)) ; Note the null combination of degree -1\n",
|
|
" (1 (case gnr\n",
|
|
" (s01 (cat:cmbn 0 -1 's0 1 's1))\n",
|
|
" (s02 (cat:cmbn 0 -1 's0 1 's2))\n",
|
|
" (s12 (cat:cmbn 0 -1 's1 1 's2))\n",
|
|
" (s23 (cat:cmbn 0 -1 's2 1 's3))\n",
|
|
" (s34 (cat:cmbn 0 -1 's3 1 's4))\n",
|
|
" (s35 (cat:cmbn 0 -1 's3 1 's5))\n",
|
|
" (s45 (cat:cmbn 0 -1 's4 1 's5))))\n",
|
|
" (2 (case gnr\n",
|
|
" (s345 (cat:cmbn 1 1 's34 -1 's35 1 's45))))\n",
|
|
" (otherwise (error \"Bad generator for complex diabolo\")))))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 29,
|
|
"text": [
|
|
"#<FUNCTION (LAMBDA (DMN GNR) :IN \"/home/gerd/git/fishbowl-repl/fishbowl.lisp\") {100728D41B}>"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 29
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def diabolo-strt :GNRT)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 30,
|
|
"text": [
|
|
":GNRT"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 30
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def diabolo-orgn '(diabolo-for-example))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 31,
|
|
"text": [
|
|
"(DIABOLO-FOR-EXAMPLE)"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 31
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:build-chcm 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 32,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"BUILD-CHCM\n",
|
|
"Args: (&key cmpr basis bsgn intr-dffr strt orgn)\n",
|
|
"Returns an instance of the class CHAIN-COMPLEX. The keyword arguments are as\n",
|
|
"follows:\n",
|
|
"\n",
|
|
":CMPR CMPR, the comparison function for generators\n",
|
|
"\n",
|
|
":BASIS BASIS, the function defining the basis of the freee Z-modules C_p or the\n",
|
|
" the keyword :LOCALLY-EFFECTIVE\n",
|
|
"\n",
|
|
":BSGN BSGN, a generator, the base point of the underlying set\n",
|
|
"\n",
|
|
":INTR-DFFR INTR-DFFR, a Lisp function defining the differential homomorphism\n",
|
|
" for each p (d_p: C_p -> C_{p-1}\n",
|
|
"\n",
|
|
":STRT STRT, one of the keywords :GNRT or :CMBN, defining the mapping strategy\n",
|
|
" of the differential homomorphism, either by generator or by\n",
|
|
" combination. The default is :GNRT\n",
|
|
"\n",
|
|
":ORGN ORGN, a list containing a relevant and carefully chosen comment about\n",
|
|
" the origin of the chain complex. This comment should be unique\n",
|
|
" for a Kenzo session (between calls of CAT-INIT), as it is used\n",
|
|
" for caching purposes.\n",
|
|
"\n",
|
|
"Use this function instead of creating instances via the standard constructor\n",
|
|
"MAKE-INSTANCE.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 32
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def diabolo (cat:build-chcm :cmpr diabolo-cmpr :basis diabolo-basis\n",
|
|
" :bsgn diabolo-bspn :intr-dffr diabolo-pure-dffr\n",
|
|
" :strt diabolo-strt :orgn diabolo-orgn))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 33,
|
|
"text": [
|
|
"[K1 Chain-Complex]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 33
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:chcm 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 34,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"CHCM\n",
|
|
"Args: (idnm)\n",
|
|
"Return from the list *CHCM-LIST* the chain complex instance with Kenzo\n",
|
|
"identifier IDNUM or NIL, if it doesn't exist.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 34
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:chcm 1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 35,
|
|
"text": [
|
|
"[K1 Chain-Complex]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 35
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:orgn diabolo)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 36,
|
|
"text": [
|
|
"(DIABOLO-FOR-EXAMPLE)"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 36
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:idnm diabolo)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 37,
|
|
"text": [
|
|
"1"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 37
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:basis diabolo 0)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 38,
|
|
"text": [
|
|
"(S0 S1 S2 S3 S4 S5)"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 38
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:basis diabolo 1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 39,
|
|
"text": [
|
|
"(S01 S02 S12 S23 S34 S35 S45)"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 39
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:basis diabolo 2)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 40,
|
|
"text": [
|
|
"(S345)"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 40
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:basis diabolo 10)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 41,
|
|
"text": [
|
|
"NIL"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 41
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:dffr diabolo 2 's345)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 42,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * S34>\n",
|
|
"<-1 * S35>\n",
|
|
"<1 * S45>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 42
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:dffr diabolo (cat:dffr diabolo 2 's345))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 43,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 0}\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 43
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 4,
|
|
"metadata": {},
|
|
"source": [
|
|
"An important trivial case: the unit chain complex, $\\mathbb{Z}$"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def ZCC\n",
|
|
" (the cat:chain-complex\n",
|
|
" (cat:build-chcm\n",
|
|
" :cmpr #'(lambda (gnrt1 gnrt2)\n",
|
|
" (declare (ignore gnrt1 gnrt2))\n",
|
|
" (the cat:cmpr :equal))\n",
|
|
" :basis #'(lambda (n)\n",
|
|
" (the list\n",
|
|
" (if (zerop n) '(:Z-gnrt) cat:+empty-list+)))\n",
|
|
" :bsgn :Z-gnrt\n",
|
|
" :intr-dffr #'(lambda (cmbn)\n",
|
|
" (the cat:cmbn (cat:zero-cmbn (1- (cat:cmbn-degr cmbn)))))\n",
|
|
" :strt :cmbn\n",
|
|
" :orgn '(zcc-constant))))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 44,
|
|
"text": [
|
|
"[K3 Chain-Complex]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 44
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:z-chcm 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 45,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"Z-CHCM\n",
|
|
"Args: ()\n",
|
|
"Build the unit chain complex.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 45
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 4,
|
|
"metadata": {},
|
|
"source": [
|
|
"The chain complex $\\texttt{circle}$"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(defun CIRCLE ()\n",
|
|
" (the cat:chain-complex\n",
|
|
" (cat:build-chcm\n",
|
|
" :cmpr #'(lambda (gnrt1 gnrt2)\n",
|
|
" (declare (ignore gnrt1 gnrt2))\n",
|
|
" (the cat:cmpr :equal))\n",
|
|
" :basis #'(lambda (dmns)\n",
|
|
" (the list\n",
|
|
" (case dmns (0 '(*)) (1 '(s1))\n",
|
|
" (otherwise cat:+empty-list+))))\n",
|
|
" :bsgn '*\n",
|
|
" :intr-dffr #'cat:zero-intr-dffr\n",
|
|
" :strt :cmbn\n",
|
|
" :orgn '(circle))))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 46,
|
|
"text": [
|
|
"CIRCLE"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 46
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 2,
|
|
"metadata": {},
|
|
"source": [
|
|
"1.4 Morphisms"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:morphism 'type)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 47,
|
|
"text": [
|
|
"\"-----------------------------------------------------------------[class-doc]\n",
|
|
"MORPHISM\n",
|
|
"Slots: (sorc trgt degr intr strt ???-clnm ?-clnm rslts idnm orgn)\n",
|
|
"Intances of this class represent morphisms between chain complexes, and the\n",
|
|
"differential homomorphism of a chain complex is treated as a morphism of\n",
|
|
"degree -1. The class has 10 slots:\n",
|
|
"\n",
|
|
"1. SORC, an object of class CHAIN-COMPLEX, the source chain complex of this\n",
|
|
" morphism.\n",
|
|
"\n",
|
|
"2. TRGT, an object of class CHAIN-COMPLEX, the target chain complex of this\n",
|
|
" morphism.\n",
|
|
"\n",
|
|
"3. DEGR, an integer, the degree of the morphism.\n",
|
|
"\n",
|
|
"4. INTR, a Lisp function implementing the morphism, taking account of the\n",
|
|
" strategy STRT.\n",
|
|
"\n",
|
|
"5. STRT, a symbol, one of :GNRT or :CMBN.\n",
|
|
"\n",
|
|
"6. ???-CLNM, an integer updated by the system for internal statistics.\n",
|
|
"\n",
|
|
"7. ?-CLNM, another integer maintained by the system for internal pusposes.\n",
|
|
"\n",
|
|
"8. RSLTS, an array of length +MAXIMAL-DIMENSION+ reserved by the system for\n",
|
|
" caching intermediate results.\n",
|
|
"\n",
|
|
"9. IDNM, an integer, a system-generated identifier for this object.\n",
|
|
"\n",
|
|
"10. ORGN, a list containg a comment indicating the origin of the object. The\n",
|
|
" should be unique (per session), since it is used in the implementation for\n",
|
|
" caching purposes.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 47
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 3,
|
|
"metadata": {},
|
|
"source": [
|
|
"1.4.1 The function $\\texttt{build-mprh}$"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(documentation 'cat:build-mrph 'function)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 48,
|
|
"text": [
|
|
"\"--------------------------------------------------------------[function-doc]\n",
|
|
"BUILD-MRPH\n",
|
|
"Args: (&key sorc trgt degr intr strt orgn)\n",
|
|
"Returns an instance of the class MORPHISM. The keyword arguments are as\n",
|
|
"follows:\n",
|
|
"\n",
|
|
":SORC SORC, the source object, a CHAIN-COMPLEX type object\n",
|
|
"\n",
|
|
":TRGT TRGT, the target object, a CHAIN-COMPLEX type object\n",
|
|
"\n",
|
|
":DEGR DEGR, the degree of the morphism, an integer\n",
|
|
"\n",
|
|
":INTR INTR, the Lisp function defining the effective mapping\n",
|
|
"\n",
|
|
":STRT STRT, one of the keywords :GNRT or :CMBN, defining the mapping strategy\n",
|
|
" of the differential homomorphism, either by generator or by\n",
|
|
" combination. The default is :GNRT\n",
|
|
"\n",
|
|
":ORGN ORGN, a list containing a relevant and carefully chosen comment about\n",
|
|
" the origin of the chain complex. This comment should be unique\n",
|
|
" for a Kenzo session (between calls of CAT-INIT), as it is used\n",
|
|
" for caching purposes.\n",
|
|
"\n",
|
|
"Use this function instead of creating instances via the standard constructor\n",
|
|
"MAKE-INSTANCE.\n",
|
|
"------------------------------------------------------------------------------\""
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 48
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 4,
|
|
"metadata": {},
|
|
"source": [
|
|
"The differential homomorphism in a chain complex instance"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:cat-init)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"text": [
|
|
"\n",
|
|
"---done---"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 49,
|
|
"text": [
|
|
"NIL"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 49
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def ZCC (cat:z-chcm))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 50,
|
|
"text": [
|
|
"[K1 Chain-Complex]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 50
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def zero-morphism (cat:build-mrph :sorc ZCC\n",
|
|
" :trgt ZCC\n",
|
|
" :degr -1\n",
|
|
" :intr #'(lambda (comb)\n",
|
|
" (cat:cmbn (1- (cat:degr comb))))\n",
|
|
" :strt :cmbn\n",
|
|
" :orgn '(zero morphism on ZCC)))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 51,
|
|
"text": [
|
|
"[K3 Cohomology-Class on K1 of degree 1]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 51
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def id-morphism (cat:build-mrph :sorc ZCC\n",
|
|
" :trgt ZCC\n",
|
|
" :degr 0\n",
|
|
" :intr #'identity\n",
|
|
" :strt :cmbn\n",
|
|
" :orgn '(identity morphism on ZCC)))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 52,
|
|
"text": [
|
|
"[K4 Cohomology-Class on K1 of degree 0]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 52
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 3,
|
|
"metadata": {},
|
|
"source": [
|
|
"1.4.3 Functions defining morphisms"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def ccn-boundary #'(lambda (dgr gnr)\n",
|
|
" (if (evenp (+ dgr gnr))\n",
|
|
" (cat:cmbn (1- dgr) 1 (- gnr 10))\n",
|
|
" (cat:cmbn (1- dgr)))))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 53,
|
|
"text": [
|
|
"#<FUNCTION (LAMBDA (DGR GNR) :IN \"/home/gerd/git/fishbowl-repl/fishbowl.lisp\") {1004480C9B}>"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 53
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def ccn (cat:build-chcm :cmpr #'cat:f-cmpr\n",
|
|
" :basis #'(lambda (n) (cat:<a-b< (* 10 n) (* 10 (1+ n))))\n",
|
|
" :bsgn 0\n",
|
|
" :intr-dffr ccn-boundary\n",
|
|
" :strt :gnrt\n",
|
|
" :orgn '(ccn)))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 54,
|
|
"text": [
|
|
"[K5 Chain-Complex]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 54
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def upper-shift (cat:build-mrph\n",
|
|
" :sorc ccn :trgt ccn :strt :gnrt :degr +1\n",
|
|
" :intr #'(lambda (d gn) (cat:cmbn (1+ d) 1 (+ gn 10)))\n",
|
|
" :orgn '(ccn shift +10)))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 55,
|
|
"text": [
|
|
"[K7 Morphism (degree 1): K5 -> K5]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 55
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def lower-shift (cat:build-mrph\n",
|
|
" :sorc ccn :trgt ccn :strt :gnrt :degr -1\n",
|
|
" :intr #'(lambda (d gn) (cat:cmbn (1- d) 1 (- gn 10)))\n",
|
|
" :orgn '(ccn shift -10)))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 56,
|
|
"text": [
|
|
"[K8 Morphism (degree -1): K5 -> K5]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 56
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? ccn 2 22)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 57,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * 12>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 57
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? ccn (cat:? ccn 2 22))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 58,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 0}\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 58
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def combn (cat:cmbn 5 1 50 5 55 9 59))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 59,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 5}\n",
|
|
"<1 * 50>\n",
|
|
"<5 * 55>\n",
|
|
"<9 * 59>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 59
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? ccn combn)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 60,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 4}\n",
|
|
"<5 * 45>\n",
|
|
"<9 * 49>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 60
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? ccn (cat:? ccn combn))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 61,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 3}\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 61
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? upper-shift 0 6)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 62,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * 16>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 62
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? lower-shift 5 51)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 63,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 4}\n",
|
|
"<1 * 41>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 63
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? lower-shift (cat:? lower-shift 5 51))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 3}\n",
|
|
"<1 * 31>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def comb1 (cat:cmbn 1 1 10 2 11 3 12 4 13))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * 10>\n",
|
|
"<2 * 11>\n",
|
|
"<3 * 12>\n",
|
|
"<4 * 13>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def identity? (cat:cmps upper-shift lower-shift))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"[K9 Morphism (degree 0): K5 -> K5]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:degr identity?)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"0"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? identity? comb1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * 10>\n",
|
|
"<2 * 11>\n",
|
|
"<3 * 12>\n",
|
|
"<4 * 13>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:2cmbn-sbtr (cat:cmpr ccn) comb1 (cat:? identity? comb1))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def upper-shift2 (cat:cmps upper-shift upper-shift))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"[K10 Morphism (degree 2): K5 -> K5]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:degr upper-shift2)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"2"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? upper-shift2 comb1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 3}\n",
|
|
"<1 * 30>\n",
|
|
"<2 * 31>\n",
|
|
"<3 * 32>\n",
|
|
"<4 * 33>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def twice-up-shift (cat:add upper-shift upper-shift))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"[K11 Morphism (degree 1): K5 -> K5]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:degr twice-up-shift)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"1"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? twice-up-shift comb1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 2}\n",
|
|
"<2 * 20>\n",
|
|
"<4 * 21>\n",
|
|
"<6 * 22>\n",
|
|
"<8 * 23>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def up-d (cat:cmps upper-shift (cat:dffr1 ccn)))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"[K12 Morphism (degree 0): K5 -> K5]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def d-up (cat:cmps (cat:dffr1 ccn) upper-shift))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"[K13 Morphism (degree 0): K5 -> K5]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? up-d 1 11)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * 11>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? d-up 1 11)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:def comb3 (cat:cmbn 1 1 10 2 11 3 12 4 13 5 14 6 15))"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * 10>\n",
|
|
"<2 * 11>\n",
|
|
"<3 * 12>\n",
|
|
"<4 * 13>\n",
|
|
"<5 * 14>\n",
|
|
"<6 * 15>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? up-d comb3)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<2 * 11>\n",
|
|
"<4 * 13>\n",
|
|
"<6 * 15>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:? d-up comb3)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"\n",
|
|
"----------------------------------------------------------------------{CMBN 1}\n",
|
|
"<1 * 10>\n",
|
|
"<3 * 12>\n",
|
|
"<5 * 14>\n",
|
|
"------------------------------------------------------------------------------\n"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "heading",
|
|
"level": 3,
|
|
"metadata": {},
|
|
"source": [
|
|
"1.4.4 Accessing $\\texttt{Kenzo}$ objects"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:k 1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"[K1 Chain-Complex]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:kd 1)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"text": [
|
|
"\n",
|
|
"Object: [K1 Chain-Complex]\n",
|
|
" Origin: (Z-CHCM)\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"NIL"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:k 3)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"[K3 Cohomology-Class on K1 of degree 1]"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:kd 3)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"text": [
|
|
"\n",
|
|
"Object: [K3 Cohomology-Class on K1 of degree 1]\n",
|
|
" Origin: (ZERO MORPHISM ON ZCC)\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"NIL"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:kd 8)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"text": [
|
|
"\n",
|
|
"Object: [K8 Morphism (degree -1): K5 -> K5]\n",
|
|
" Origin: (CCN SHIFT -10)\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"NIL"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:kd 5)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"text": [
|
|
"\n",
|
|
"Object: [K5 Chain-Complex]\n",
|
|
" Origin: (CCN)\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"NIL"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:kd 9)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"text": [
|
|
"\n",
|
|
"Object: [K9 Morphism (degree 0): K5 -> K5]\n",
|
|
" Origin: (2MRPH-CMPS [K7 Morphism (degree 1): K5 -> K5] [K8 Morphism (degree -1): K5 -> K5] GNRT)\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"NIL"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"collapsed": false,
|
|
"input": [
|
|
"(cat:kd2 9)"
|
|
],
|
|
"language": "python",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"output_type": "stream",
|
|
"stream": "stdout",
|
|
"text": [
|
|
"\n",
|
|
"Object: [K9 Morphism (degree 0): K5 -> K5]\n",
|
|
" Origin: (2MRPH-CMPS [K7 Morphism (degree 1): K5 -> K5] [K8 Morphism (degree -1): K5 -> K5] GNRT)\n",
|
|
"\n",
|
|
"\n",
|
|
"Object: [K8 Morphism (degree -1): K5 -> K5]\n",
|
|
" Origin: (CCN SHIFT -10)\n",
|
|
"\n",
|
|
"\n",
|
|
"Object: [K7 Morphism (degree 1): K5 -> K5]\n",
|
|
" Origin: (CCN SHIFT 10)\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"output_type": "pyout",
|
|
"prompt_number": 64,
|
|
"text": [
|
|
"(9 8 7)"
|
|
]
|
|
}
|
|
],
|
|
"prompt_number": 64
|
|
}
|
|
],
|
|
"metadata": {}
|
|
}
|
|
]
|
|
} |