Fixed issue #66.

This commit is contained in:
Gerd Heber 2015-11-08 19:17:23 -06:00
parent a13c03e3e3
commit 092164e786
2 changed files with 100 additions and 75 deletions

View File

@ -14,6 +14,17 @@
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"To load \"kenzo\":\n",
" Load 1 ASDF system:\n",
" kenzo\n",
"; Loading \"kenzo\"\n",
".\n"
]
},
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
@ -236,8 +247,8 @@
"Args: (degr &rest rest)\n", "Args: (degr &rest rest)\n",
"Returns a combination of degree DEGR from a sum of terms provided as a sequence\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", "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", "REST can be of arbitrary length including NIL, in which case the combination\n",
"combination is an instance of the null combination of degree DEGR.\n", "is an instance of the null combination of degree DEGR.\n",
"------------------------------------------------------------------------------\"" "------------------------------------------------------------------------------\""
] ]
}, },
@ -689,7 +700,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"#<Compiled-function CAT:S-CMPR #x302001BBC57F>" "#<Compiled-function CAT:S-CMPR #x1510B576>"
] ]
}, },
"execution_count": 26, "execution_count": 26,
@ -711,7 +722,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"#<Anonymous Function #x302001ECEC1F>" "#<Anonymous Function #x152BEA4E>"
] ]
}, },
"execution_count": 27, "execution_count": 27,
@ -760,7 +771,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"#<Anonymous Function #x302001F04C0F>" "#<Anonymous Function #x152CDB0E>"
] ]
}, },
"execution_count": 29, "execution_count": 29,
@ -1264,39 +1275,53 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"\"-----------------------------------------------------------------[class-doc]\n", "\"----------------------------------------------------------------[class-doc]\n",
"MORPHISM\n", "MORPHISM\n",
"Slots: (sorc trgt degr intr strt ???-clnm ?-clnm rslts idnm orgn)\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", "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", "differential homomorphism of a chain complex is treated as a morphism of\n",
"degree -1. The class has 10 slots:\n", "degree -1. The class has 10 slots:\n",
"\n", "\n",
"1. SORC, an object of class CHAIN-COMPLEX, the source chain complex of this\n", "1. SORC, an object of type CHAIN-COMPLEX, the source chain complex of this\n",
" morphism.\n", " morphism. Its reader function is SORC.\n",
"\n", "\n",
"2. TRGT, an object of class CHAIN-COMPLEX, the target chain complex of this\n", "2. TRGT, an object of type CHAIN-COMPLEX, the target chain complex of this\n",
" morphism.\n", " morphism. Its reader function is TRGT.\n",
"\n", "\n",
"3. DEGR, an integer, the degree of the morphism.\n", "3. DEGR, an integer, the degree of the morphism. Its reader function is DEGR.\n",
"\n", "\n",
"4. INTR, a Lisp function implementing the morphism, taking account of the\n", "4. INTR, a Lisp INTeRnal function implementing the morphism, taking account\n",
" strategy STRT.\n", " of the strategy STRT. Its reader function is INTR.\n",
"\n", "\n",
"5. STRT, a symbol, one of :GNRT or :CMBN.\n", "5. STRT, a symbol, one of :GNRT or :CMBN. Its reader function is STRT.\n",
"\n", "\n",
"6. ???-CLNM, an integer updated by the system for internal statistics.\n", " If this slot is :GNRT, the implementation of INTR is a function:\n",
" (function (degr gnrt) cmbn)\n",
" and for any call of this function, the result is stored in the slot\n",
" RSLTS to avoid later a possibly long recalculation for the same\n",
" argument.\n",
"\n", "\n",
"7. ?-CLNM, another integer maintained by the system for internal pusposes.\n", " If this slot is :CMBN, the implementation of INTR is a function:\n",
" (function (cmbn) cmbn)\n",
" and the RSLTS slot is not used. Think for example to an identity or\n",
" null function, where storing a result is wasted time.\n",
"\n",
"6. ???-CLNM, an integer updated by the system for internal statistics. Its\n",
" reader function is ???-CLNM.\n",
"\n",
"7. ?-CLNM, another integer maintained by the system for internal pusposes. Its\n",
" reader function is ?-CLNM.\n",
"\n", "\n",
"8. RSLTS, an array of length +MAXIMAL-DIMENSION+ reserved by the system for\n", "8. RSLTS, an array of length +MAXIMAL-DIMENSION+ reserved by the system for\n",
" caching intermediate results.\n", " caching intermediate results. Its reader function is RSLTS.\n",
"\n", "\n",
"9. IDNM, an integer, a system-generated identifier for this object.\n", "9. IDNM, an integer, a system-generated identifier for this object. Its reader\n",
" function is IDNM.\n",
"\n", "\n",
"10. ORGN, a list containg a comment indicating the origin of the object. The\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", " should be unique (per session), since it is used in the implementation for\n",
" caching purposes.\n", " caching purposes. Its reader function is ORGN.\n",
"------------------------------------------------------------------------------\"" "-----------------------------------------------------------------------------\""
] ]
}, },
"execution_count": 47, "execution_count": 47,
@ -1493,7 +1518,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"#<Anonymous Function #x302001F7293F>" "#<Anonymous Function #x153443A6>"
] ]
}, },
"execution_count": 53, "execution_count": 53,
@ -1788,7 +1813,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 65,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1805,7 +1830,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 65,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -1816,7 +1841,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 66,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1827,7 +1852,7 @@
"[K9 Morphism (degree 0): K5 -> K5]" "[K9 Morphism (degree 0): K5 -> K5]"
] ]
}, },
"execution_count": 64, "execution_count": 66,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -1838,7 +1863,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 67,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1849,7 +1874,7 @@
"0" "0"
] ]
}, },
"execution_count": 64, "execution_count": 67,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -1860,7 +1885,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 68,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1877,7 +1902,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 68,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -1888,7 +1913,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 69,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1901,7 +1926,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 69,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -1912,7 +1937,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 70,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1923,7 +1948,7 @@
"[K10 Morphism (degree 2): K5 -> K5]" "[K10 Morphism (degree 2): K5 -> K5]"
] ]
}, },
"execution_count": 64, "execution_count": 70,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -1934,7 +1959,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 71,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1945,7 +1970,7 @@
"2" "2"
] ]
}, },
"execution_count": 64, "execution_count": 71,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -1956,7 +1981,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 72,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1973,7 +1998,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 72,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -1984,7 +2009,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 73,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -1995,7 +2020,7 @@
"[K11 Morphism (degree 1): K5 -> K5]" "[K11 Morphism (degree 1): K5 -> K5]"
] ]
}, },
"execution_count": 64, "execution_count": 73,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2006,7 +2031,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 74,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2017,7 +2042,7 @@
"1" "1"
] ]
}, },
"execution_count": 64, "execution_count": 74,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2028,7 +2053,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 75,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2045,7 +2070,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 75,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2056,7 +2081,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 76,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2067,7 +2092,7 @@
"[K12 Morphism (degree 0): K5 -> K5]" "[K12 Morphism (degree 0): K5 -> K5]"
] ]
}, },
"execution_count": 64, "execution_count": 76,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2078,7 +2103,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 77,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2089,7 +2114,7 @@
"[K13 Morphism (degree 0): K5 -> K5]" "[K13 Morphism (degree 0): K5 -> K5]"
] ]
}, },
"execution_count": 64, "execution_count": 77,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2100,7 +2125,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 78,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2114,7 +2139,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 78,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2125,7 +2150,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 79,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2138,7 +2163,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 79,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2149,7 +2174,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 80,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2168,7 +2193,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 80,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2179,7 +2204,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 81,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2195,7 +2220,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 81,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2206,7 +2231,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 82,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2222,7 +2247,7 @@
"------------------------------------------------------------------------------\n" "------------------------------------------------------------------------------\n"
] ]
}, },
"execution_count": 64, "execution_count": 82,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2240,7 +2265,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 83,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2251,7 +2276,7 @@
"[K1 Chain-Complex]" "[K1 Chain-Complex]"
] ]
}, },
"execution_count": 64, "execution_count": 83,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2262,7 +2287,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 84,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2283,7 +2308,7 @@
"NIL" "NIL"
] ]
}, },
"execution_count": 64, "execution_count": 84,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2294,7 +2319,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 85,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2305,7 +2330,7 @@
"[K3 Cohomology-Class on K1 of degree 1]" "[K3 Cohomology-Class on K1 of degree 1]"
] ]
}, },
"execution_count": 64, "execution_count": 85,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2316,7 +2341,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 86,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2337,7 +2362,7 @@
"NIL" "NIL"
] ]
}, },
"execution_count": 64, "execution_count": 86,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2348,7 +2373,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 87,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2369,7 +2394,7 @@
"NIL" "NIL"
] ]
}, },
"execution_count": 64, "execution_count": 87,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2380,7 +2405,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 88,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2401,7 +2426,7 @@
"NIL" "NIL"
] ]
}, },
"execution_count": 64, "execution_count": 88,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2412,7 +2437,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 89,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2433,7 +2458,7 @@
"NIL" "NIL"
] ]
}, },
"execution_count": 64, "execution_count": 89,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@ -2444,7 +2469,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 64, "execution_count": 90,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
@ -2473,7 +2498,7 @@
"(9 8 7)" "(9 8 7)"
] ]
}, },
"execution_count": 64, "execution_count": 90,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }

View File

@ -137,8 +137,8 @@ CMBN
Args: (degr &rest rest) Args: (degr &rest rest)
Returns a combination of degree DEGR from a sum of terms provided as a sequence Returns a combination of degree DEGR from a sum of terms provided as a sequence
CF1 GNRT1 CF2 GNRT2 ... CFn GNRTn of coefficient / generator pairs in REST. CF1 GNRT1 CF2 GNRT2 ... CFn GNRTn of coefficient / generator pairs in REST.
REST can be of arbitrary even length and can be empty, in which case the REST can be of arbitrary length including NIL, in which case the combination
combination is an instance of the null combination of degree DEGR. is an instance of the null combination of degree DEGR.
------------------------------------------------------------------------------" ------------------------------------------------------------------------------"
(the cmbn (the cmbn
(make-cmbn :degr degr (make-cmbn :degr degr