diff --git a/examples/Chapter2.ipynb b/examples/Chapter2.ipynb index 9566aa1..f1b3997 100644 --- a/examples/Chapter2.ipynb +++ b/examples/Chapter2.ipynb @@ -840,6 +840,375 @@ "source": [ "(cat:check-rdct-no-wait)" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 2.4.1 Useful functions related to the perturbation lemma\n", + "#### Example" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "[K66 Homotopy-Equivalence K30 <= K30 => K30]" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:def hmeq (cat:trivial-hmeq (cdelta 4)))" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "[K74 Homotopy-Equivalence K69 <= K69 => K69]" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(setf hmeq (cat:add hmeq (cat:opps (cat:dffr (cdelta 4)))))" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 2}\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:gnrt-? (cat:dffr (cat:rbcc hmeq)) 3 '(0 1 2 3))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 2.5.1 Representation of a combination in a bicone" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 3}\n", + "<2 * >\n", + "<4 * >\n", + "<6 * >\n", + "<3 * >\n", + "<5 * >\n", + "<7 * >\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:def comb-bic (cat:cmbn 3 2 (cat:bcnb 'b1) 4 (cat:bcnb 'b1) 6 (cat:bcnb 'b3)\n", + " 3 (cat:bcnb 'c1) 5 (cat:bcnb 'c1) 7 (cat:bcnb 'd1)))" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "((2 . ) (4 . ) (6 . ) (3 . ) (5 . ) (7 . ))" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:cmbn-list comb-bic)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 2.5.2 Useful functions and macros for bicones\n", + "#### Examples" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 3}\n", + "<2 * B1>\n", + "<4 * B2>\n", + "<6 * B3>\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:def comb-b (cat:cmbn 3 2 'b1 4 'b2 6 'b3))" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 4}\n", + "<3 * C1>\n", + "<5 * C2>\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:def comb-c (cat:cmbn 4 3 'c1 5 'c2))" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 3}\n", + "<7 * D1>\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:def comb-d (cat:cmbn 3 7 'd1))" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 3}\n", + "<2 * >\n", + "<4 * >\n", + "<6 * >\n", + "<3 * >\n", + "<5 * >\n", + "<7 * >\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:def comb-bic (cat:make-bicn-cmbn comb-b comb-c comb-d))" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 3}\n", + "<2 * B1>\n", + "<4 * B2>\n", + "<6 * B3>\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:bicn-cmbn-cmbnb comb-bic)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 4}\n", + "<3 * C1>\n", + "<5 * C2>\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:bicn-cmbn-cmbnc comb-bic)" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "----------------------------------------------------------------------{CMBN 3}\n", + "<7 * D1>\n", + "------------------------------------------------------------------------------\n" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(cat:bicn-cmbn-cmbnd comb-bic)" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": 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": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(multiple-value-bind (b c d)\n", + " (cat:dispatch-bicn-cmbn comb-bic)\n", + " (list b c d))" + ] } ], "metadata": {