diff --git a/docs/notebooks/BigInts.ipynb b/docs/notebooks/BigInts.ipynb index e5e0777..016f9d1 100644 --- a/docs/notebooks/BigInts.ipynb +++ b/docs/notebooks/BigInts.ipynb @@ -19,16 +19,24 @@ { "cell_type": "code", "execution_count": 1, - "id": "95cc03ee", + "id": "08a49b81", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2147483648" + ] + } + ], "source": [ "1 31 << " ] }, { "cell_type": "markdown", - "id": "d677df93", + "id": "5511a7ed", "metadata": {}, "source": [ "We can `inscribe` a constant function `base` to keep this value handy." @@ -39,14 +47,20 @@ "execution_count": 2, "id": "b34d58ef", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [] + } + ], "source": [ "unit [base] swoncat inscribe" ] }, { "cell_type": "markdown", - "id": "713e5a2e", + "id": "bc03dac4", "metadata": {}, "source": [ "This also permits a kind of parameterization. E.g. let's say we wanted to use base 10 for our digits, maybe during debugging. All that requires is to rebind the symbol `base` to 10." @@ -54,7 +68,7 @@ }, { "cell_type": "markdown", - "id": "f46632bd", + "id": "d053ebb8", "metadata": {}, "source": [ "We could define a Boolean predicate that returns `true` for integers that are valid as digits and `false` otherwise:" @@ -65,7 +79,13 @@ "execution_count": 3, "id": "35476eac", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [] + } + ], "source": [ "[valid_digit [0 >] [base <] &&] inscribe" ] @@ -91,7 +111,7 @@ { "cell_type": "code", "execution_count": 5, - "id": "4286d332", + "id": "03a8fe65", "metadata": {}, "outputs": [ { @@ -269,7 +289,7 @@ }, { "cell_type": "markdown", - "id": "1ef0b3f4", + "id": "8f7cf20d", "metadata": {}, "source": [ "#### Representing Zero\n", @@ -299,7 +319,7 @@ }, { "cell_type": "markdown", - "id": "038c99b9", + "id": "4bb42882", "metadata": {}, "source": [ "I think this is better than returning `[0]` because that amounts to a single leading zero.\n", @@ -340,7 +360,7 @@ }, { "cell_type": "markdown", - "id": "d8b91cb4", + "id": "4cfbb371", "metadata": {}, "source": [ "Try it out:" @@ -397,7 +417,7 @@ { "cell_type": "code", "execution_count": 16, - "id": "599ea445", + "id": "a571e98a", "metadata": {}, "outputs": [ { @@ -436,7 +456,7 @@ }, { "cell_type": "markdown", - "id": "14724d21", + "id": "1370319c", "metadata": {}, "source": [ "Try it out:" @@ -462,7 +482,7 @@ }, { "cell_type": "markdown", - "id": "c5a054dc", + "id": "5741b48c", "metadata": {}, "source": [ "With negative numbers:" @@ -796,7 +816,7 @@ }, { "cell_type": "markdown", - "id": "c8057aca", + "id": "f85b4be1", "metadata": {}, "source": [ "That's no good, we lose the sign. Time to deal with that." @@ -822,7 +842,7 @@ }, { "cell_type": "markdown", - "id": "e24c6a90", + "id": "b1c3e7eb", "metadata": {}, "source": [ "We want to get the sign bit and the Python int," @@ -848,7 +868,7 @@ }, { "cell_type": "markdown", - "id": "cbe4e915", + "id": "5236f004", "metadata": {}, "source": [ "and then use the sign bit to negate the Python int if the bigint was negative:" @@ -950,7 +970,7 @@ { "cell_type": "code", "execution_count": 38, - "id": "feca2542", + "id": "1ad99efa", "metadata": {}, "outputs": [ { @@ -980,7 +1000,7 @@ }, { "cell_type": "markdown", - "id": "9a639b8f", + "id": "632dc05c", "metadata": {}, "source": [ "### The predicate\n", @@ -1006,7 +1026,7 @@ { "cell_type": "code", "execution_count": 39, - "id": "9945efb8", + "id": "f33ca7b0", "metadata": {}, "outputs": [ { @@ -1029,7 +1049,7 @@ }, { "cell_type": "markdown", - "id": "a84b971e", + "id": "d404aabf", "metadata": {}, "source": [ "Then we can `map` our predicate over this list to be sure ti does what we want:" @@ -1055,7 +1075,7 @@ }, { "cell_type": "markdown", - "id": "634d2203", + "id": "00049aff", "metadata": {}, "source": [ "We want to *and* the bools and invert the result:" @@ -1181,7 +1201,7 @@ }, { "cell_type": "markdown", - "id": "65947d5d", + "id": "71697765", "metadata": {}, "source": [ "Try it out:" @@ -1264,7 +1284,7 @@ { "cell_type": "code", "execution_count": 46, - "id": "8370ffc0", + "id": "4fce2757", "metadata": {}, "outputs": [ { @@ -1281,7 +1301,7 @@ }, { "cell_type": "markdown", - "id": "a1d1ae27", + "id": "0f8a18ff", "metadata": {}, "source": [ "Try it out:" @@ -1308,7 +1328,7 @@ }, { "cell_type": "markdown", - "id": "a59f645b", + "id": "007ba148", "metadata": {}, "source": [ "We can use this function to convert the carry flag to an integer and then add it to the sum of the two digits:" @@ -1448,7 +1468,7 @@ }, { "cell_type": "markdown", - "id": "0b9effb9", + "id": "56369ede", "metadata": {}, "source": [ "Try it out:" @@ -1536,7 +1556,7 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 91, "id": "b46a62ba", "metadata": {}, "outputs": [ @@ -1601,7 +1621,7 @@ }, { "cell_type": "markdown", - "id": "5fc15f8a", + "id": "5df77def", "metadata": {}, "source": [ "If it's empty... (omitting the \"\\_actd_\" prefix for clarity)\n", @@ -1613,7 +1633,7 @@ }, { "cell_type": "markdown", - "id": "dbb26dfa", + "id": "4c49b3c6", "metadata": {}, "source": [ "Note that this implies:\n", @@ -1683,7 +1703,7 @@ }, { "cell_type": "markdown", - "id": "eb5a91c8", + "id": "dccff48c", "metadata": {}, "source": [ "Try it out:" @@ -1790,7 +1810,7 @@ { "cell_type": "code", "execution_count": 64, - "id": "8aee87f9", + "id": "33bc080f", "metadata": {}, "outputs": [ { @@ -1819,7 +1839,7 @@ { "cell_type": "code", "execution_count": 65, - "id": "170d4947", + "id": "1ac813da", "metadata": {}, "outputs": [ { @@ -1834,7 +1854,7 @@ }, { "cell_type": "markdown", - "id": "2b7c6397", + "id": "e5f77e9c", "metadata": {}, "source": [ "Try it out:" @@ -2414,9 +2434,25 @@ "add-bigints" ] }, + { + "cell_type": "code", + "execution_count": 95, + "id": "e9dc6852", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [] + } + ], + "source": [ + "clear" + ] + }, { "cell_type": "markdown", - "id": "a9894e7e", + "id": "21102239", "metadata": {}, "source": [ "## Subtraction of Like Signs `sub-digits`\n", @@ -2431,26 +2467,13 @@ }, { "cell_type": "markdown", - "id": "980a57b2", + "id": "ccfd7c6d", "metadata": {}, "source": [ "### Refactoring For The Win\n", "\n", "\n", - "We noted above that the algorithm for subtraction is similar to that for addition. Maybe we can reuse *more* than just `P` and `P'`?\n", - "\n", - " initial-carry == false rollup\n", - " sub-digits' == [P] [sub.THEN] [sub.R0] [sub.R1] genrec\n", - " sub-digits == initial-carry add-digits'\n", - " sub.THEN == [P'] [sub.THEN'] [sub.ELSE] ifte" - ] - }, - { - "cell_type": "markdown", - "id": "445c7b48", - "metadata": {}, - "source": [ - "In fact, I think we could refactor (prematurely, two cases is one too few) something like this?\n", + "We noted above that the algorithm for subtraction is similar to that for addition. Maybe we can reuse *more* than just `P` and `P'`? In fact, I think we could refactor (prematurely, two cases is one too few) something like this?\n", "\n", " [sub.THEN'] [sub.ELSE] [sub.R0] [sub.R1] foo\n", " ---------------------------------------------------------------------\n", @@ -2459,7 +2482,7 @@ }, { "cell_type": "markdown", - "id": "730b04ef", + "id": "16e993be", "metadata": {}, "source": [ "or just\n", @@ -2473,7 +2496,7 @@ }, { "cell_type": "markdown", - "id": "06e9be73", + "id": "d5008dc0", "metadata": {}, "source": [ "`foo` is something like:\n", @@ -2490,7 +2513,7 @@ }, { "cell_type": "markdown", - "id": "5e3e91ea", + "id": "db8ee8e6", "metadata": {}, "source": [ "That leaves `[P]`...\n", @@ -2506,7 +2529,7 @@ }, { "cell_type": "markdown", - "id": "82d2c37b", + "id": "3ef96e1b", "metadata": {}, "source": [ "Ergo:\n", @@ -2537,35 +2560,53 @@ }, { "cell_type": "markdown", - "id": "d9308c19", + "id": "dbfebd04", "metadata": {}, "source": [ - "This doesn't go quite far enough, I think.\n", - "\n", - " R0 == uncons-two [add-with-carry] dipd\n", + "But this doesn't go quite far enough, I think.\n", "\n", + " R0 == uncons-two [add-with-carry] dipd" + ] + }, + { + "cell_type": "markdown", + "id": "d4d65bf2", + "metadata": {}, + "source": [ "I think `R0` will pretty much always do:\n", "\n", - " uncons-two [combine-two-values] dipd\n", - "\n", + " uncons-two [combine-two-values] dipd" + ] + }, + { + "cell_type": "markdown", + "id": "35ff6c75", + "metadata": {}, + "source": [ "And so it should be refactored further to something like:\n", "\n", " [F] R0\n", " -------------------------\n", - " uncons-two [F] dipd\n", - "\n", + " uncons-two [F] dipd" + ] + }, + { + "cell_type": "markdown", + "id": "07804405", + "metadata": {}, + "source": [ "And then `add-digits'` becomes just:\n", "\n", "\n", " add-digits' == [one-empty-list]\n", " [both-empty]\n", " [add-with-carry]\n", - " combine-two-lists\n" + " combine-two-lists" ] }, { "cell_type": "markdown", - "id": "7ad6e389", + "id": "0dfff37b", "metadata": {}, "source": [ "If we factor `ditch-empty-list` out of `one-empty-list`, and `pop` from `both-empty`:\n", @@ -2578,7 +2619,7 @@ }, { "cell_type": "markdown", - "id": "d1a07253", + "id": "0f3be915", "metadata": {}, "source": [ "Let's figure out the new form.\n", @@ -2596,61 +2637,42 @@ " [uncons-two [COMBINE-VALUES] dipd]\n", " [i cons] genrec\n", "\n", - "eh?\n", - "\n", + "eh?" + ] + }, + { + "cell_type": "markdown", + "id": "7d4ee083", + "metadata": {}, + "source": [ "Let's not over think it.\n", "\n", " [ONE-EMPTY] [ditch-empty-list] swoncat [BOTH-EMPTY] [pop] swoncat [COMBINE-VALUES] \n", - " [ditch-empty-list ONE-EMPTY] [pop BOTH-EMPTY] [COMBINE-VALUES]\n", - "\n", + " [ditch-empty-list ONE-EMPTY] [pop BOTH-EMPTY] [COMBINE-VALUES]" + ] + }, + { + "cell_type": "markdown", + "id": "b5c20b1c", + "metadata": {}, + "source": [ "With:\n", "\n", " [C] [A] [B] sandwich\n", " --------------------------\n", - " [A [C] B]\n", - "\n", - "\n", - " [ditch-empty-list ONE-EMPTY] [pop BOTH-EMPTY] [COMBINE-VALUES] [uncons-two] [dipd] sandwich\n", - " [ditch-empty-list ONE-EMPTY] [pop BOTH-EMPTY] [uncons-two [COMBINE-VALUES] dipd]\n", - "\n", - "So to get from \n", - "\n", - " [A] [B] [C]\n", - "\n", - "to:\n", - "\n", - " [ditch-empty-list A] [pop B] [uncons-two [C] dipd]\n", - "\n", - "we use:\n", - "\n", - " [[[ditch-empty-list] swoncat] dip [pop] swoncat] dip [uncons-two] [dipd] sandwich\n", - "\n", - "It's gnarly, but simple:\n", - "\n", - " _foo0 == [[[ditch-empty-list] swoncat] dip [pop] swoncat] dip [uncons-two] [dipd] sandwich\n", - "\n", - "\n", - " [A] [B] [C] _foo0\n", - " [ditch-empty-list A] [pop B] [uncons-two [C] dipd]\n", - " [A'] [B'] [C']\n", - "\n", - "\n", - " [P] [[P'] [A'] [B'] ifte] [C'] [i cons] genrec\n", - "\n" + " [A [C] B]" ] }, { "cell_type": "code", - "execution_count": 90, - "id": "bca290a2", + "execution_count": 93, + "id": "55f64814", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", - "text": [ - "[true 578 1]" - ] + "text": [] } ], "source": [ @@ -2660,7 +2682,7 @@ { "cell_type": "code", "execution_count": 91, - "id": "995209f5", + "id": "04e2d0d0", "metadata": {}, "outputs": [ { @@ -2678,7 +2700,7 @@ { "cell_type": "code", "execution_count": 92, - "id": "79be30a9", + "id": "a28d9323", "metadata": {}, "outputs": [ { @@ -2693,28 +2715,58 @@ "sandwich" ] }, + { + "cell_type": "markdown", + "id": "06c700d6", + "metadata": {}, + "source": [ + "So to get from \n", + "\n", + " [A] [B] [C]\n", + "\n", + "to:\n", + "\n", + " [ditch-empty-list A] [pop B] [uncons-two [C] dipd]\n", + "\n", + "we use:\n", + "\n", + " [[[ditch-empty-list] swoncat] dip [pop] swoncat] dip [uncons-two] [dipd] sandwich\n", + "\n", + "It's gnarly, but simple:" + ] + }, { "cell_type": "code", - "execution_count": 93, - "id": "3f4f41a4", + "execution_count": 103, + "id": "063b3760", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", - "text": [ - "[A] [B] [C]" - ] + "text": [] } ], "source": [ - "clear [A] [B] [C]" + "clear\n", + "[_foo0.0 [[ditch-empty-list] swoncat] dip] inscribe\n", + "[_foo0.1 [pop] swoncat] inscribe\n", + "[_foo0.3 [_foo0.0 _foo0.1] dip] inscribe\n", + "[_foo0.4 [uncons-two] [dipd] sandwich] inscribe\n", + "[_foo0 _foo0.3 _foo0.4] inscribe\n", + "\n", + "[_foo1 [\n", + " [ifte] ccons\n", + " [P'] swons \n", + " [P] swap \n", + " ] dip\n", + "] inscribe" ] }, { "cell_type": "code", - "execution_count": 94, - "id": "1a24786c", + "execution_count": 104, + "id": "151f9f3d", "metadata": {}, "outputs": [ { @@ -2726,71 +2778,13 @@ } ], "source": [ - "[[[ditch-empty-list] swoncat] dip [pop] swoncat] dip [uncons-two] [dipd] sandwich" + "[A] [B] [C] _foo0" ] }, { "cell_type": "code", - "execution_count": 95, - "id": "ac572a3d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[A'] [B'] [C']" - ] - } - ], - "source": [ - "clear [A'] [B'] [C']" - ] - }, - { - "cell_type": "code", - "execution_count": 96, - "id": "6680dbed", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[P] [[P'] [A'] [B'] ifte] [C']" - ] - } - ], - "source": [ - "[\n", - "[ifte] ccons\n", - "[P'] swons \n", - "[P] swap \n", - "] dip" - ] - }, - { - "cell_type": "code", - "execution_count": 97, - "id": "0560f261", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[A] [B] [C]" - ] - } - ], - "source": [ - "clear [A] [B] [C]" - ] - }, - { - "cell_type": "code", - "execution_count": 98, - "id": "1501ec7a", + "execution_count": 105, + "id": "3f482224", "metadata": {}, "outputs": [ { @@ -2802,50 +2796,21 @@ } ], "source": [ - "[\n", - " [\n", - " [ditch-empty-list] swoncat\n", - " ]\n", - " dip\n", - " [pop] swoncat\n", - "]\n", - "dip\n", - "\n", - "[uncons-two] [dipd] sandwich\n", - "\n", - "[\n", - " [ifte] ccons\n", - " [P'] swons \n", - " [P] swap \n", - "]\n", - "dip" + "_foo1" ] }, { "cell_type": "code", - "execution_count": 99, - "id": "b15cc92c", + "execution_count": null, + "id": "fba574be", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[add-carry-to-digits] [swap carry] [add-with-carry]" - ] - } - ], - "source": [ - "clear\n", - "[add-carry-to-digits]\n", - "[swap carry]\n", - "[add-with-carry]" - ] + "outputs": [], + "source": [] }, { "cell_type": "code", - "execution_count": 100, - "id": "9373f2d1", + "execution_count": 106, + "id": "4b90e664", "metadata": {}, "outputs": [ { @@ -2857,117 +2822,80 @@ } ], "source": [ - "[\n", - " [\n", - " [ditch-empty-list] swoncat\n", - " ]\n", - " dip\n", - " [pop] swoncat\n", - "]\n", - "dip\n", + "clear\n", + "[add-carry-to-digits]\n", + "[swap carry]\n", + "[add-with-carry]\n", + "_foo0 _foo1" + ] + }, + { + "cell_type": "markdown", + "id": "c9d4432e", + "metadata": {}, + "source": [ + "Compare the above with what we wanted:\n", "\n", - "[uncons-two] [dipd] sandwich\n", + " [P]\n", + " [\n", + " [P']\n", + " [ditch-empty-list ONE-EMPTY]\n", + " [pop BOTH-EMPTY]\n", + " ifte\n", + " ]\n", + " [uncons-two [COMBINE-VALUES] dipd]\n", "\n", - "[\n", - " [ifte] ccons\n", - " [P'] swons \n", - " [P] swap \n", - "]\n", - "dip" + "Allwe need to do is add:\n", + "\n", + " [i cons] genrec" ] }, { "cell_type": "code", "execution_count": null, - "id": "2ae01bac", + "id": "77e1ba72", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", - "execution_count": 101, - "id": "853d1e66", + "execution_count": 107, + "id": "0c11e3a8", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "false [3 2 1] [4 3 2]" + "false [3 2 1] [6 5 4] [P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd]" ] } ], "source": [ "clear\n", - "false [3 2 1] [4 3 2]" - ] - }, - { - "cell_type": "code", - "execution_count": 102, - "id": "138ddd1a", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "false [3 2 1] [4 3 2] [add-carry-to-digits] [swap carry] [add-with-carry]" - ] - } - ], - "source": [ + "\n", + "[3 2 1] [6 5 4] initial-carry\n", + "\n", "[add-carry-to-digits]\n", "[swap carry]\n", - "[add-with-carry]" + "[add-with-carry]\n", + "_foo0 _foo1" ] }, { "cell_type": "code", - "execution_count": 103, - "id": "79d83a50", - "metadata": {}, + "execution_count": 108, + "id": "301c4fb0", + "metadata": { + "scrolled": true + }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "false [3 2 1] [4 3 2] [P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd]" - ] - } - ], - "source": [ - "[\n", - " [\n", - " [ditch-empty-list] swoncat\n", - " ]\n", - " dip\n", - " [pop] swoncat\n", - "]\n", - "dip\n", - "\n", - "[uncons-two] [dipd] sandwich\n", - "\n", - "[\n", - " [ifte] ccons\n", - " [P'] swons \n", - " [P] swap \n", - "]\n", - "dip" - ] - }, - { - "cell_type": "code", - "execution_count": 104, - "id": "1acaaa2d", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[7 5 3]" + "[9 7 5]" ] } ], @@ -2975,9 +2903,132 @@ "[i cons] genrec" ] }, + { + "cell_type": "code", + "execution_count": 110, + "id": "115d4c56", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [] + } + ], + "source": [ + "clear\n", + "[build-two-list-combiner _foo0 _foo1 [i cons]] inscribe\n", + "[combine-two-lists [add-carry-to-digits] [swap carry] [add-with-carry] build-two-list-combiner] inscribe" + ] + }, { "cell_type": "markdown", - "id": "182465de", + "id": "5e7c24c4", + "metadata": {}, + "source": [ + " combine-two-lists == build-two-list-combiner [i cons] genrec\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "id": "810427a9", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false [3 2 1] [6 5 4] [P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd] [i cons]" + ] + } + ], + "source": [ + "clear\n", + "\n", + "[3 2 1] [6 5 4] initial-carry\n", + "combine-two-lists" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "id": "0ba7548f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[9 7 5]" + ] + } + ], + "source": [ + "genrec" + ] + }, + { + "cell_type": "code", + "execution_count": 113, + "id": "a94d2e37", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[9 7 5]" + ] + } + ], + "source": [ + "[base 10] inscribe" + ] + }, + { + "cell_type": "code", + "execution_count": 114, + "id": "7787e86b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[true 6 5 4 3 2 1]" + ] + } + ], + "source": [ + "clear\n", + "\n", + "123456 to_bigint\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "id": "fa37c40c", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [] + } + ], + "source": [ + "clear" + ] + }, + { + "cell_type": "markdown", + "id": "c45ce348", "metadata": {}, "source": [ "So that's nice.\n", @@ -2987,7 +3038,7 @@ }, { "cell_type": "markdown", - "id": "f51d940d", + "id": "5f739deb", "metadata": {}, "source": [ "\n", @@ -2999,32 +3050,15 @@ }, { "cell_type": "code", - "execution_count": 105, - "id": "23939b0b", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [] - } - ], - "source": [ - "clear\n", - "[build-two-list-combiner [[[ditch-empty-list] swoncat] dip [pop] swoncat] dip [uncons-two] [dipd] sandwich [[ifte] ccons [P'] swons [P] swap ] dip] inscribe" - ] - }, - { - "cell_type": "code", - "execution_count": 106, - "id": "4bd81381", + "execution_count": 118, + "id": "850a1421", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd]" + "[P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd] [i cons]" ] } ], @@ -3037,16 +3071,34 @@ }, { "cell_type": "markdown", - "id": "2398f155", + "id": "930acbc8", "metadata": {}, "source": [ - "Now grab the definition, add the `[i cons] genrec` and symbol (name) and inscribe it:" + "Now grab the definition, add the `genrec` and symbol (name) and inscribe it:" ] }, { "cell_type": "code", - "execution_count": 107, - "id": "458515b0", + "execution_count": 119, + "id": "67e321e7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[add-digits' [P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd] [i cons] genrec]" + ] + } + ], + "source": [ + "[genrec] ccons ccons [add-digits'] swoncat" + ] + }, + { + "cell_type": "code", + "execution_count": 120, + "id": "c616033e", "metadata": {}, "outputs": [ { @@ -3056,12 +3108,12 @@ } ], "source": [ - "[[i cons] genrec] ccons cons [add-digits'] swoncat inscribe" + " inscribe" ] }, { "cell_type": "markdown", - "id": "d3bb85e0", + "id": "985e3f81", "metadata": {}, "source": [ "Try it out..." @@ -3069,8 +3121,8 @@ }, { "cell_type": "code", - "execution_count": 108, - "id": "dc6ee9a2", + "execution_count": 121, + "id": "1a18ddd7", "metadata": {}, "outputs": [ { @@ -3087,15 +3139,15 @@ }, { "cell_type": "code", - "execution_count": 109, - "id": "b90a2400", + "execution_count": 122, + "id": "3c639487", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "false [7 5 3] [2147483647]" + "false [7 5 3] [9]" ] } ], @@ -3105,8 +3157,8 @@ }, { "cell_type": "code", - "execution_count": 110, - "id": "a9cb79ca", + "execution_count": 123, + "id": "c9222cab", "metadata": {}, "outputs": [ { @@ -3123,8 +3175,8 @@ }, { "cell_type": "code", - "execution_count": 111, - "id": "6bc5604e", + "execution_count": 124, + "id": "f3bc8d28", "metadata": {}, "outputs": [ { @@ -3137,6 +3189,142 @@ "clear" ] }, + { + "cell_type": "markdown", + "id": "2cec47e6", + "metadata": {}, + "source": [ + "#### Demonstrate `add-bigints`" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "id": "6168ebb7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[true 4 3 2 1] [true 9 9 9]" + ] + } + ], + "source": [ + "1234 999 [to_bigint] ii " + ] + }, + { + "cell_type": "code", + "execution_count": 126, + "id": "b8fee2d5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[true 3 3 2 2]" + ] + } + ], + "source": [ + "add-bigints" + ] + }, + { + "cell_type": "code", + "execution_count": 127, + "id": "9dc66c3b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2233" + ] + } + ], + "source": [ + "from_bigint" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "id": "82e85105", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2233 2233" + ] + } + ], + "source": [ + "1234 999 +" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "87862546", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "465edd01", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6a5453b3", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6c1b83b4", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5559f087", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "76f5198f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9e8c8cba", + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "id": "13336d40", @@ -3340,7 +3528,7 @@ { "cell_type": "code", "execution_count": 120, - "id": "b8a9166f", + "id": "a4e1f728", "metadata": {}, "outputs": [ { @@ -3364,7 +3552,7 @@ { "cell_type": "code", "execution_count": 121, - "id": "de01b93b", + "id": "dc7c151a", "metadata": {}, "outputs": [ { @@ -3535,7 +3723,7 @@ { "cell_type": "code", "execution_count": 128, - "id": "588f44dd", + "id": "4efc8f76", "metadata": {}, "outputs": [ { @@ -3591,7 +3779,7 @@ { "cell_type": "code", "execution_count": 129, - "id": "6c6d096e", + "id": "7d973f7f", "metadata": {}, "outputs": [ { @@ -3620,7 +3808,7 @@ { "cell_type": "code", "execution_count": 130, - "id": "04e77a5d", + "id": "9239e0c4", "metadata": {}, "outputs": [ { @@ -3649,7 +3837,7 @@ { "cell_type": "code", "execution_count": 131, - "id": "08fb5519", + "id": "0c58a6e0", "metadata": {}, "outputs": [ { @@ -3677,7 +3865,7 @@ }, { "cell_type": "markdown", - "id": "91b70814", + "id": "97c4afb5", "metadata": {}, "source": [ "#### `compare-pairs`\n", @@ -3705,7 +3893,7 @@ { "cell_type": "code", "execution_count": 132, - "id": "4dbd1321", + "id": "7f302157", "metadata": {}, "outputs": [ { @@ -3725,7 +3913,7 @@ { "cell_type": "code", "execution_count": 133, - "id": "21eb7f92", + "id": "d25ef02e", "metadata": {}, "outputs": [ { @@ -3744,7 +3932,7 @@ }, { "cell_type": "markdown", - "id": "ed30c362", + "id": "f6eb7683", "metadata": {}, "source": [ " THEN.rec == pop true" @@ -3798,7 +3986,7 @@ { "cell_type": "code", "execution_count": 136, - "id": "22a0f5a2", + "id": "4ef5f503", "metadata": {}, "outputs": [ { @@ -3815,16 +4003,16 @@ }, { "cell_type": "markdown", - "id": "305505ea", + "id": "d665b767", "metadata": {}, "source": [ - "Whoops! I forgot to remove the already-checked pair from the list of pairs!" + "Whoops! I forgot to remove the already-checked pair from the list of pairs! (Later on I discover that the logic is inverted here: `>=` not `<` d'oh!)" ] }, { "cell_type": "code", - "execution_count": 137, - "id": "2d72984f", + "execution_count": 246, + "id": "7f060f83", "metadata": {}, "outputs": [ { @@ -3840,7 +4028,7 @@ " [bool not]\n", " [pop false]\n", " [\n", - " [first [<] infrst]\n", + " [first [>=] infrst]\n", " [pop true]\n", " ]\n", " [[rest] swoncat ifte]\n", @@ -3850,7 +4038,7 @@ }, { "cell_type": "markdown", - "id": "dee91d11", + "id": "f80c5ba9", "metadata": {}, "source": [ "This is clunky and inefficient but it works." @@ -3859,7 +4047,7 @@ { "cell_type": "code", "execution_count": 138, - "id": "65c7868b", + "id": "8d74a801", "metadata": {}, "outputs": [ { @@ -3877,7 +4065,7 @@ { "cell_type": "code", "execution_count": 139, - "id": "402e132c", + "id": "0104d2b0", "metadata": {}, "outputs": [ { @@ -3895,7 +4083,7 @@ { "cell_type": "code", "execution_count": 140, - "id": "dcc99a68", + "id": "4728d141", "metadata": {}, "outputs": [ { @@ -3929,7 +4117,7 @@ { "cell_type": "code", "execution_count": 142, - "id": "cbafd48e", + "id": "7983881c", "metadata": {}, "outputs": [ { @@ -3947,7 +4135,7 @@ { "cell_type": "code", "execution_count": 143, - "id": "54e1955a", + "id": "677757c5", "metadata": {}, "outputs": [ { @@ -3965,7 +4153,7 @@ { "cell_type": "code", "execution_count": 144, - "id": "2a9308d7", + "id": "5691f813", "metadata": {}, "outputs": [ { @@ -3991,7 +4179,7 @@ { "cell_type": "code", "execution_count": 145, - "id": "62b77ed8", + "id": "b95fe984", "metadata": {}, "outputs": [ { @@ -4020,7 +4208,7 @@ { "cell_type": "code", "execution_count": 146, - "id": "3a638a41", + "id": "b5ddac15", "metadata": {}, "outputs": [ { @@ -4048,7 +4236,7 @@ { "cell_type": "code", "execution_count": 147, - "id": "d6ce2f51", + "id": "d4077376", "metadata": {}, "outputs": [ { @@ -4086,7 +4274,7 @@ { "cell_type": "code", "execution_count": 149, - "id": "16bc3266", + "id": "e7c3b141", "metadata": {}, "outputs": [ { @@ -4106,7 +4294,7 @@ { "cell_type": "code", "execution_count": 150, - "id": "7d72e659", + "id": "95c7308d", "metadata": {}, "outputs": [ { @@ -4124,7 +4312,7 @@ { "cell_type": "code", "execution_count": 151, - "id": "0f979905", + "id": "5e43ba80", "metadata": {}, "outputs": [ { @@ -4144,7 +4332,7 @@ { "cell_type": "code", "execution_count": 152, - "id": "3869793c", + "id": "20070426", "metadata": {}, "outputs": [ { @@ -4162,7 +4350,7 @@ { "cell_type": "code", "execution_count": 154, - "id": "2cc01414", + "id": "c97b0df9", "metadata": {}, "outputs": [ { @@ -4178,7 +4366,7 @@ { "cell_type": "code", "execution_count": 155, - "id": "8684e3b9", + "id": "980a1bbf", "metadata": {}, "outputs": [ { @@ -4193,8 +4381,8 @@ }, { "cell_type": "code", - "execution_count": 157, - "id": "e28a82a2", + "execution_count": 199, + "id": "4f429421", "metadata": {}, "outputs": [ { @@ -4212,7 +4400,7 @@ { "cell_type": "code", "execution_count": 158, - "id": "1045f1b4", + "id": "5a6419ee", "metadata": {}, "outputs": [ { @@ -4230,7 +4418,7 @@ { "cell_type": "code", "execution_count": 159, - "id": "27f5aa22", + "id": "cd586291", "metadata": {}, "outputs": [ { @@ -4248,7 +4436,7 @@ { "cell_type": "code", "execution_count": null, - "id": "12fdc27a", + "id": "d3cb18d6", "metadata": {}, "outputs": [], "source": [] @@ -4256,7 +4444,7 @@ { "cell_type": "code", "execution_count": 160, - "id": "3c808285", + "id": "35fb22d2", "metadata": {}, "outputs": [ { @@ -4274,7 +4462,7 @@ { "cell_type": "code", "execution_count": 161, - "id": "01cf41eb", + "id": "36d74e5b", "metadata": {}, "outputs": [ { @@ -4291,7 +4479,7 @@ }, { "cell_type": "markdown", - "id": "f0404217", + "id": "a1ebc16c", "metadata": {}, "source": [ "And so it goes.\n", @@ -4307,8 +4495,8 @@ }, { "cell_type": "code", - "execution_count": 171, - "id": "2f87357e", + "execution_count": 202, + "id": "dd645337", "metadata": {}, "outputs": [ { @@ -4318,12 +4506,49 @@ } ], "source": [ - "clear" + "clear\n", + "[check-gt [gt-bigint] [swap [not] dipd] [] ifte] inscribe" + ] + }, + { + "cell_type": "code", + "execution_count": 203, + "id": "935552d4", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false [4 5 6] [3 2 1]" + ] + } + ], + "source": [ + "false [4 5 6] [3 2 1]" + ] + }, + { + "cell_type": "code", + "execution_count": 204, + "id": "05100765", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true [3 2 1] [4 5 6]" + ] + } + ], + "source": [ + "check-gt" ] }, { "cell_type": "markdown", - "id": "04f07811", + "id": "97693e57", "metadata": {}, "source": [ "### Subtraction, at last...\n", @@ -4370,7 +4595,7 @@ }, { "cell_type": "markdown", - "id": "ffb9f421", + "id": "7c0fbfaf", "metadata": {}, "source": [ " sub-carry-from-digits\n", @@ -4382,9 +4607,27 @@ "I'll do it in the morning, and if my logic is correct and I haven't bungled typing it in, the whole thing should just work! OMG? Tomorrow..." ] }, + { + "cell_type": "code", + "execution_count": 195, + "id": "b6c2e9ee", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "24 true" + ] + } + ], + "source": [ + "[sub-carry-from-digits popd] inscribe" + ] + }, { "cell_type": "markdown", - "id": "dbd7e544", + "id": "a0067046", "metadata": {}, "source": [ " sub-carry == pop\n", @@ -4394,7 +4637,7 @@ }, { "cell_type": "markdown", - "id": "c2634788", + "id": "49387109", "metadata": {}, "source": [ " carry a b sub-with-carry\n", @@ -4410,7 +4653,7 @@ { "cell_type": "code", "execution_count": 182, - "id": "5e1a2bd3", + "id": "0237bb03", "metadata": {}, "outputs": [ { @@ -4430,7 +4673,7 @@ { "cell_type": "code", "execution_count": 193, - "id": "11537a57", + "id": "c8de9645", "metadata": { "scrolled": true }, @@ -4450,7 +4693,7 @@ { "cell_type": "code", "execution_count": 194, - "id": "1c5e8fae", + "id": "aa66a6ae", "metadata": {}, "outputs": [ { @@ -4465,10 +4708,84 @@ "sub-with-carry" ] }, + { + "cell_type": "code", + "execution_count": 229, + "id": "3f75130f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [] + } + ], + "source": [ + "clear" + ] + }, + { + "cell_type": "code", + "execution_count": 230, + "id": "c22775e9", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [] + } + ], + "source": [ + "[sub-like-bigints [uncons] dip rest check-gt sub-digits cons] inscribe\n", + "[sub-digits initial-carry sub-digits'] inscribe\n", + "[sub-digits'\n", + " [sub-carry-from-digits]\n", + " [swap sub-carry]\n", + " [sub-with-carry]\n", + " build-two-list-combiner\n", + " \n", + "] inscribe" + ] + }, + { + "cell_type": "code", + "execution_count": 231, + "id": "ac670030", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false [3 2 1] [6 5 4] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd]" + ] + } + ], + "source": [ + "clear\n", + "false\n", + "[3 2 1] [6 5 4]\n", + "[sub-carry-from-digits]\n", + " [swap sub-carry]\n", + " [sub-with-carry]\n", + " build-two-list-combiner" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "490548dc", + "id": "8fbba815", + "metadata": {}, + "outputs": [], + "source": [ + "[i cons] genrec\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cce0cc68", "metadata": {}, "outputs": [], "source": [] @@ -4476,7 +4793,7 @@ { "cell_type": "code", "execution_count": null, - "id": "89687215", + "id": "9163ad94", "metadata": {}, "outputs": [], "source": [] @@ -4484,7 +4801,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a60f97f8", + "id": "d862f5a8", "metadata": {}, "outputs": [], "source": [] @@ -4492,7 +4809,519 @@ { "cell_type": "code", "execution_count": null, - "id": "5d4412e6", + "id": "976c4d53", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 212, + "id": "3b05693f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[true 12345] [true 109]" + ] + } + ], + "source": [ + "clear\n", + "12345 to_bigint 109 to_bigint" + ] + }, + { + "cell_type": "code", + "execution_count": 213, + "id": "fc69485b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false false [109] [12345] [P] [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] uncons-two [sub-with-carry] dipd]" + ] + } + ], + "source": [ + "sub-like-bigints" + ] + }, + { + "cell_type": "markdown", + "id": "ca954866", + "metadata": {}, + "source": [ + " false false [109] [12345]\n", + " [P]\n", + " [\n", + " [P']\n", + " [ditch-empty-list sub-carry-from-digits]\n", + " [pop swap sub-carry]\n", + " ifte\n", + " ]\n", + " [\n", + " [uncons-two [sub-with-carry] dipd]\n", + " i cons\n", + " ]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "45a744b7", + "metadata": {}, + "outputs": [], + "source": [ + "[i cons] genrec" + ] + }, + { + "cell_type": "markdown", + "id": "bc354239", + "metadata": {}, + "source": [ + "- Did I redefine something?\n", + "- Did a definition not make it into the dictionary?\n", + "- Trace in the Notebooks should show a trace even if an exception is encountered.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 215, + "id": "9b2fd2fb", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "==== Help on P ====\n", + "\n", + "P ≡ [bool] ii & not\n", + "\n", + "---- end ( P )\n", + "\n", + "\n", + "false false [109] [12345] [P] [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] uncons-two [sub-with-carry] dipd]" + ] + } + ], + "source": [ + "[P] help" + ] + }, + { + "cell_type": "code", + "execution_count": 216, + "id": "3a69a1a2", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "==== Help on P' ====\n", + "\n", + "P' ≡ [bool] ii |\n", + "\n", + "---- end ( P' )\n", + "\n", + "\n", + "false false [109] [12345] [P] [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] uncons-two [sub-with-carry] dipd]" + ] + } + ], + "source": [ + "[P'] help" + ] + }, + { + "cell_type": "code", + "execution_count": 224, + "id": "e29a136f", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false false [109] [12345]" + ] + } + ], + "source": [ + "pop" + ] + }, + { + "cell_type": "code", + "execution_count": 220, + "id": "7499c430", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false false [109] [12345]" + ] + } + ], + "source": [ + " [109] [12345] " + ] + }, + { + "cell_type": "code", + "execution_count": 225, + "id": "1f38a3a1", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false false [109] [12345] true" + ] + } + ], + "source": [ + "[P'] nullary\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 221, + "id": "31103274", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false false [109] [12345] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte]" + ] + } + ], + "source": [ + " [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte]\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 221, + "id": "9f3e739d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false false [109] [12345] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte]" + ] + } + ], + "source": [ + " [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte]\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "11639f03", + "metadata": {}, + "outputs": [], + "source": [ + " uncons-two [sub-with-carry] dipd" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2889ee5e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "328334db", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "76e3a1ca", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "93d70133", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 240, + "id": "f2bc1f16", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [] + } + ], + "source": [ + "clear" + ] + }, + { + "cell_type": "code", + "execution_count": 241, + "id": "c404eb99", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false [3 2 1] [6 5 4] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap pop] ifte] [uncons-two [sub-with-carry] dipd]" + ] + } + ], + "source": [ + "clear\n", + "false\n", + "[3 2 1] [6 5 4]\n", + "[sub-carry-from-digits]\n", + " [swap pop]\n", + " [sub-with-carry]\n", + " build-two-list-combiner" + ] + }, + { + "cell_type": "code", + "execution_count": 242, + "id": "74502c4c", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2147483645 2147483644 2147483644]" + ] + } + ], + "source": [ + "[i cons] genrec\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "39a842e5", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 243, + "id": "ecb3de02", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "false [6 5 4] [3 2 1] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap pop] ifte] [uncons-two [sub-with-carry] dipd]" + ] + } + ], + "source": [ + "clear\n", + "false\n", + "[3 2 1] [6 5 4] swap\n", + "[sub-carry-from-digits]\n", + " [swap pop]\n", + " [sub-with-carry]\n", + " build-two-list-combiner" + ] + }, + { + "cell_type": "code", + "execution_count": 244, + "id": "0bf21e08", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[3 3 3]" + ] + } + ], + "source": [ + "[i cons] genrec\n" + ] + }, + { + "cell_type": "markdown", + "id": "74054f2f", + "metadata": {}, + "source": [ + "That sure fucking *looks* like it works." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "20462cd5", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": 247, + "id": "2ab1031c", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true [6 5 4] [3 2 1]" + ] + } + ], + "source": [ + "clear\n", + "false\n", + "[3 2 1] [6 5 4] check-gt" + ] + }, + { + "cell_type": "code", + "execution_count": 248, + "id": "1b908ee7", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "true [6 5 4] [3 2 1] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap pop] ifte] [uncons-two [sub-with-carry] dipd]" + ] + } + ], + "source": [ + "[sub-carry-from-digits]\n", + " [swap pop]\n", + " [sub-with-carry]\n", + " build-two-list-combiner" + ] + }, + { + "cell_type": "code", + "execution_count": 249, + "id": "e223937e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[2 3 3]" + ] + } + ], + "source": [ + "[i cons] genrec\n" + ] + }, + { + "cell_type": "code", + "execution_count": 251, + "id": "a5747b29", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-333" + ] + } + ], + "source": [ + "clear 123 456 -" + ] + }, + { + "cell_type": "markdown", + "id": "64c14e67", + "metadata": {}, + "source": [ + "Almost." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c9999912", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "29a0586c", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bb8cb15e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6a5b3ace", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "417e2d45", "metadata": {}, "outputs": [], "source": [] diff --git a/implementations/Python/bi.txt b/implementations/Python/bi.txt index fbfe266..ad357b3 100644 --- a/implementations/Python/bi.txt +++ b/implementations/Python/bi.txt @@ -4,9 +4,261 @@ joy? <-top +joy? +[base 2147483648] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] [sub-carry-from-digits popd] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] [sub-carry-from-digits popd] [_sub-with-carry0 rolldown bool-to-int [-] ii] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] [sub-carry-from-digits popd] [_sub-with-carry0 rolldown bool-to-int [-] ii] [_sub-with-carry1 [base + base mod] [0 <] cleave] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] [sub-carry-from-digits popd] [_sub-with-carry0 rolldown bool-to-int [-] ii] [_sub-with-carry1 [base + base mod] [0 <] cleave] [sub-with-carry _sub-with-carry0 _sub-with-carry1] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] [sub-carry-from-digits popd] [_sub-with-carry0 rolldown bool-to-int [-] ii] [_sub-with-carry1 [base + base mod] [0 <] cleave] [sub-with-carry _sub-with-carry0 _sub-with-carry1] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] [sub-carry-from-digits popd] [_sub-with-carry0 rolldown bool-to-int [-] ii] [_sub-with-carry1 [base + base mod] [0 <] cleave] [sub-with-carry _sub-with-carry0 _sub-with-carry1] [sub-like-bigints [uncons] dip rest check-gt sub-digits cons] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] [sub-carry-from-digits popd] [_sub-with-carry0 rolldown bool-to-int [-] ii] [_sub-with-carry1 [base + base mod] [0 <] cleave] [sub-with-carry _sub-with-carry0 _sub-with-carry1] [sub-like-bigints [uncons] dip rest check-gt sub-digits cons] [sub-digits initial-carry sub-digits'] <-top + +joy? +[base 2147483648] [ditch-empty-list [bool] [popd] [pop] ifte] [bool-to-int [0] [1] branch] [uncons-two [uncons] ii swapd] [sandwich swap [cons] dip swoncat] [digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] [to-bigint [!-] [abs digitalize] cleave cons] [prep rest 1 0 rolldown] [from-bigint' [next-digit] step popd] [next-digit [increase-power] [accumulate-digit] clop popdd] [increase-power popop base *] [accumulate-digit rolldown * +] [sign-int [first] [prep from-bigint'] cleave] [neg-if-necessary swap [neg] [] branch] [from-bigint sign-int neg-if-necessary] [add-with-carry _add-with-carry0 _add-with-carry1] [_add-with-carry0 [bool-to-int] dipd + +] [_add-with-carry1 base [mod] [>=] clop] [add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] [_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] [_actd_R0.else popd 1 false rolldown] [_actd_R0.then 0 swap uncons [add-with-carry] dip] [add-digits initial-carry add-digits'] [initial-carry false rollup] [add-digits' [P] [THEN] [R0] [R1] genrec] [P [bool] ii & not] [THEN [P'] [THEN'] [ELSE] ifte] [R0 uncons-two [add-with-carry] dipd] [R1 i cons] [P' [bool] ii |] [THEN' ditch-empty-list add-carry-to-digits] [ELSE pop swap [] [1 swons] branch] [same-sign [first] ii xor not] [add-like-bigints [uncons] dip rest add-digits cons] [add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] [build-two-list-combiner _btlc0 _btlc1 [i cons]] [_btlc0.0 [[ditch-empty-list] swoncat] dip] [_btlc0.1 [pop] swoncat] [_btlc0.3 [_btlc0.0 _btlc0.1] dip] [_btlc0.4 [uncons-two] [dipd] sandwich] [_btlc0 _btlc0.3 _btlc0.4] [_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] [carry [] [1 swons] branch] [compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] [xR1 uncons-two [unit cons swons] dipd] [xP [bool] ii & not] [BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] [gt-bigint <<{} [xP] [BASE] [xR1] tailrec] [check-gt [gt-bigint] [swap [not] dipd] [] ifte] [sub-carry-from-digits popd] [_sub-with-carry0 rolldown bool-to-int [-] ii] [_sub-with-carry1 [base + base mod] [0 <] cleave] [sub-with-carry _sub-with-carry0 _sub-with-carry1] [sub-like-bigints [uncons] dip rest check-gt sub-digits cons] [sub-digits initial-carry sub-digits'] <-top + joy? <-top +joy? + <-top + +joy? +[add-carry-to-digits] <-top + +joy? +[add-carry-to-digits] [swap carry] <-top + +joy? +[add-carry-to-digits] [swap carry] [add-with-carry] <-top + +joy? +[P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd] [i cons] <-top + +joy? +[[P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd] [i cons] genrec] <-top + +joy? +[add-digits' [P] [[P'] [ditch-empty-list add-carry-to-digits] [pop swap carry] ifte] [uncons-two [add-with-carry] dipd] [i cons] genrec] <-top + +joy? + <-top + +joy? + <-top + +joy? +[sub-carry-from-digits] <-top + +joy? +[sub-carry-from-digits] [swap sub-carry] <-top + +joy? +[sub-carry-from-digits] [swap sub-carry] [sub-with-carry] <-top + +joy? +[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] <-top + +joy? +[[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] <-top + +joy? +[sub-digits' [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] <-top + joy? <-top @@ -17,582 +269,322 @@ joy? <-top joy? - <-top +[sub-digits initial-carry sub-digits'] <-top joy? - <-top +[sub-digits initial-carry sub-digits'] <-top joy? - <-top +[sub-digits initial-carry sub-digits'] <-top + +joy? [sub-digits initial-carry sub-digits'] true [456] [123] • sub-digits + [sub-digits initial-carry sub-digits'] true [456] [123] • initial-carry sub-digits' + [sub-digits initial-carry sub-digits'] true [456] [123] • false rollup sub-digits' + [sub-digits initial-carry sub-digits'] true [456] [123] false • rollup sub-digits' + [sub-digits initial-carry sub-digits'] true false [456] [123] • sub-digits' + [sub-digits initial-carry sub-digits'] true false [456] [123] • [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] • [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] • [uncons-two [sub-with-carry] dipd] [i cons] genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] • [i cons] genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] • genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] • ifte +[sub-digits initial-carry sub-digits'] true false [456] [123] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [[123] [456] false true [sub-digits initial-carry sub-digits']] [P] • infra first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] • P [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] • [bool] ii & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] [bool] • ii & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false [456] • bool [123] bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true • [123] bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true [123] • bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true true • & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true true • and not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true • not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false false • [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false false [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] • swaack first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [false false true [sub-digits initial-carry sub-digits']] • first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] false • choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] • i + [sub-digits initial-carry sub-digits'] true false [456] [123] • uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false [456] [123] • [uncons] ii swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false [456] [123] [uncons] • ii swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false [456] • uncons [123] uncons swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] • [123] uncons swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] [123] • uncons swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] 123 [] • swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] 123 [] • [swap] dip [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] 123 [] [swap] • dip [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] 123 • swap [] [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 [] • [] [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 [] [] • [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 [] [] [sub-with-carry] • dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 • sub-with-carry [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 • _sub-with-carry0 _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 • rolldown bool-to-int [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 false • bool-to-int [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 false • [0] [1] branch [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 false [0] • [1] branch [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 false [0] [1] • branch [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 • 0 [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 0 • [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 0 [-] • ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 • - 0 - _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 • sub 0 - _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • 0 - _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 0 • - _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 0 • sub _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • [base + base mod] [0 <] cleave [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] • [0 <] cleave [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • cleave [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • fork popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • [i] app2 popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] [i] • app2 popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • grba swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] • stack popd [0 <] swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • popd [0 <] swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • [0 <] swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [0 <] • swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • [stack popd] dip swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [stack popd] • dip swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] • stack popd [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] [[0 <] 333 true [sub-digits initial-carry sub-digits']] • popd [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] • [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [[0 <] 333 true [sub-digits initial-carry sub-digits']] • [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] • [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] [infrst] • cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [[0 <] 333 true [sub-digits initial-carry sub-digits']] [[i] infrst] • ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • [i] infrst [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [i] • infrst [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [i] • infra first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] • i [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • base + base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • 2147483648 + base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 2147483648 • + base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 2147483648 • add base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 2147483981 • base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 2147483981 • 2147483648 mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 2147483981 2147483648 • mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [333 true [sub-digits initial-carry sub-digits']] • swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [333 true [sub-digits initial-carry sub-digits']] • first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 • [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] • [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] • infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] • infra first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] • i [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • 0 < [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 0 • < [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 0 • lt [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false • [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false [333 333 true [sub-digits initial-carry sub-digits']] • swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 [false true [sub-digits initial-carry sub-digits']] • first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 false • popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 false • [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 false [] • [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] • i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] • [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] • [uncons-two [sub-with-carry] dipd] [i cons] genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] • [i cons] genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] • genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] • ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [[] [] false 333 true [sub-digits initial-carry sub-digits']] [P] • infra first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • P [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [bool] ii & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [bool] • ii & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] • bool [] bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false • [] bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false [] • bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false false • & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false false • and not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false • not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false true • [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false true [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] • swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [true false 333 true [sub-digits initial-carry sub-digits']] • first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] true • choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] • i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P'] • [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P'] [ditch-empty-list sub-carry-from-digits] • [pop swap sub-carry] ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] • ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [pop swap sub-carry] [ditch-empty-list sub-carry-from-digits] [[] [] false 333 true [sub-digits initial-carry sub-digits']] [P'] • infra first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • P' [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [bool] ii | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [bool] • ii | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] • bool [] bool | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false • [] bool | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false [] • bool | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false false • | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false false • or [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false • [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] • swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [pop swap sub-carry] [ditch-empty-list sub-carry-from-digits] [false false 333 true [sub-digits initial-carry sub-digits']] • first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [pop swap sub-carry] [ditch-empty-list sub-carry-from-digits] false • choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [pop swap sub-carry] • i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • pop swap sub-carry cons + [sub-digits initial-carry sub-digits'] true 333 false [] • swap sub-carry cons + [sub-digits initial-carry sub-digits'] true 333 [] false • sub-carry cons + [sub-digits initial-carry sub-digits'] true [456] [123] • sub-digits + [sub-digits initial-carry sub-digits'] true [456] [123] • initial-carry sub-digits' + [sub-digits initial-carry sub-digits'] true [456] [123] • false rollup sub-digits' + [sub-digits initial-carry sub-digits'] true [456] [123] false • rollup sub-digits' + [sub-digits initial-carry sub-digits'] true false [456] [123] • sub-digits' + [sub-digits initial-carry sub-digits'] true false [456] [123] • [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] • [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] • [uncons-two [sub-with-carry] dipd] [i cons] genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] • [i cons] genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] • genrec + [sub-digits initial-carry sub-digits'] true false [456] [123] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] • ifte +[sub-digits initial-carry sub-digits'] true false [456] [123] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [[123] [456] false true [sub-digits initial-carry sub-digits']] [P] • infra first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] • P [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] • [bool] ii & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] [bool] • ii & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false [456] • bool [123] bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true • [123] bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true [123] • bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true true • & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true true • and not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false true • not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false false • [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] swaack first choice i + [sub-digits initial-carry sub-digits'] true false false [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [123] [456] false true [sub-digits initial-carry sub-digits']] • swaack first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [false false true [sub-digits initial-carry sub-digits']] • first choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] false • choice i + [sub-digits initial-carry sub-digits'] true false [456] [123] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] • i + [sub-digits initial-carry sub-digits'] true false [456] [123] • uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false [456] [123] • [uncons] ii swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false [456] [123] [uncons] • ii swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false [456] • uncons [123] uncons swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] • [123] uncons swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] [123] • uncons swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] 123 [] • swapd [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] 123 [] • [swap] dip [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] 123 [] [swap] • dip [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 [] 123 • swap [] [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 [] • [] [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 [] [] • [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 [] [] [sub-with-carry] • dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 • sub-with-carry [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 • _sub-with-carry0 _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false 456 123 • rolldown bool-to-int [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 false • bool-to-int [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 false • [0] [1] branch [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 false [0] • [1] branch [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 false [0] [1] • branch [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 • 0 [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 0 • [-] ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 0 [-] • ii _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 • - 0 - _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 456 123 • sub 0 - _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • 0 - _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 0 • - _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 0 • sub _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • _sub-with-carry1 [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • [base + base mod] [0 <] cleave [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] • [0 <] cleave [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • cleave [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • fork popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • [i] app2 popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] [i] • app2 popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] [i] • [grba swap grba swap] dip [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] [i] [grba swap grba swap] • dip [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • grba swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [0 <] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] • stack popd [0 <] swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • popd [0 <] swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • [0 <] swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [0 <] • swap grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • grba swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • [stack popd] dip swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [stack popd] • dip swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] • stack popd [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] [[0 <] 333 true [sub-digits initial-carry sub-digits']] • popd [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] • [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • swap [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [[0 <] 333 true [sub-digits initial-carry sub-digits']] • [i] [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] • [infrst] cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] [infrst] • cons ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [[0 <] 333 true [sub-digits initial-carry sub-digits']] [[i] infrst] • ii popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] • [i] infrst [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [i] • infrst [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [[base + base mod] 333 true [sub-digits initial-carry sub-digits']] [i] • infra first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [base + base mod] • i [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • base + base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • 2147483648 + base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 2147483648 • + base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 2147483648 • add base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 2147483981 • base mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 2147483981 • 2147483648 mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 2147483981 2147483648 • mod [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • [333 true [sub-digits initial-carry sub-digits']] swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [333 true [sub-digits initial-carry sub-digits']] • swaack first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [333 true [sub-digits initial-carry sub-digits']] • first [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 • [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] • [i] infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] • infrst popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 [[0 <] 333 true [sub-digits initial-carry sub-digits']] [i] • infra first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 [0 <] • i [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 • 0 < [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 0 • < [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 0 • lt [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false • [333 333 true [sub-digits initial-carry sub-digits']] swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true false [333 333 true [sub-digits initial-carry sub-digits']] • swaack first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 [false true [sub-digits initial-carry sub-digits']] • first popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 333 false • popdd [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 false • [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 false [] • [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] • i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] • [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] • [uncons-two [sub-with-carry] dipd] [i cons] genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] • [i cons] genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] • genrec cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] • ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [[] [] false 333 true [sub-digits initial-carry sub-digits']] [P] • infra first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • P [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [bool] ii & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [bool] • ii & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] • bool [] bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false • [] bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false [] • bool & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false false • & not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false false • and not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false • not [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false true • [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false true [[[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [] [] false 333 true [sub-digits initial-carry sub-digits']] • swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [true false 333 true [sub-digits initial-carry sub-digits']] • first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [uncons-two [sub-with-carry] dipd [[P] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] [uncons-two [sub-with-carry] dipd] [i cons] genrec] i cons] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] true • choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [[P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte] • i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P'] • [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P'] [ditch-empty-list sub-carry-from-digits] • [pop swap sub-carry] ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [P'] [ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] • ifte cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [pop swap sub-carry] [ditch-empty-list sub-carry-from-digits] [[] [] false 333 true [sub-digits initial-carry sub-digits']] [P'] • infra first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • P' [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • [bool] ii | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [bool] • ii | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] • bool [] bool | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false • [] bool | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false [] • bool | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false false • | [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false false • or [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false • [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false false [[ditch-empty-list sub-carry-from-digits] [pop swap sub-carry] [] [] false 333 true [sub-digits initial-carry sub-digits']] • swaack first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [pop swap sub-carry] [ditch-empty-list sub-carry-from-digits] [false false 333 true [sub-digits initial-carry sub-digits']] • first choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [pop swap sub-carry] [ditch-empty-list sub-carry-from-digits] false • choice i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] [pop swap sub-carry] • i cons + [sub-digits initial-carry sub-digits'] true 333 false [] [] • pop swap sub-carry cons + [sub-digits initial-carry sub-digits'] true 333 false [] • swap sub-carry cons + [sub-digits initial-carry sub-digits'] true 333 [] false • sub-carry cons + +[sub-digits initial-carry sub-digits'] <-top joy? - <-top - -joy? - <-top - -joy? - <-top - -joy? - <-top - -joy? - <-top - -joy? - <-top - -joy? - <-top - -joy? - <-top - -joy? - <-top - -joy? - <-top - -joy? -false [2147483647 2147483647 2147483647 2147483647] [1] <-top - -joy? false [2147483647 2147483647 2147483647 2147483647] [1] • add_digits - false [2147483647 2147483647 2147483647 2147483647] [1] • [_add_p] [_add_then] [_add_R0] [_add_R1] genrec cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_p] • [_add_then] [_add_R0] [_add_R1] genrec cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_p] [_add_then] • [_add_R0] [_add_R1] genrec cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_p] [_add_then] [_add_R0] • [_add_R1] genrec cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_p] [_add_then] [_add_R0] [_add_R1] • genrec cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_p] [_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] • ifte cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [_add_then] [[1] [2147483647 2147483647 2147483647 2147483647] false] [_add_p] • infra first choice i cons - false [2147483647 2147483647 2147483647 2147483647] [1] • _add_p [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false [2147483647 2147483647 2147483647 2147483647] [1] • [bool not] ii & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false [2147483647 2147483647 2147483647 2147483647] [1] [bool not] • ii & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false [2147483647 2147483647 2147483647 2147483647] • bool not [1] bool not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false true • not [1] bool not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false false • [1] bool not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false false [1] • bool not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false false true • not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false false false • & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false false false • and [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false false • [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons - false false [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [1] [2147483647 2147483647 2147483647 2147483647] false] • swaack first choice i cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [_add_then] [false false] • first choice i cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [_add_then] false • choice i cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] • i cons - false [2147483647 2147483647 2147483647 2147483647] [1] • _add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1 cons - false [2147483647 2147483647 2147483647 2147483647] [1] • [_add_rec_pred] [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1 cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_rec_pred] • [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1 cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_rec_pred] [THEN0] • [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1 cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_rec_pred] [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] • _add_R1 cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_rec_pred] [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] • [THEN1] cons concat [ELSE] ifte cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_rec_pred] [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] [THEN1] • cons concat [ELSE] ifte cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_rec_pred] [THEN0] [[[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] • concat [ELSE] ifte cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_rec_pred] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] • [ELSE] ifte cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [_add_rec_pred] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] • ifte cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [ELSE] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [[1] [2147483647 2147483647 2147483647 2147483647] false] [_add_rec_pred] • infra first choice i cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] • _add_rec_pred [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] • [bool] ii & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [bool] • ii & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false [2147483647 2147483647 2147483647 2147483647] • bool [1] bool & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false true • [1] bool & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false true [1] • bool & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false true true • & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false true true • and [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false true • [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] swaack first choice i cons cons - false true [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [1] [2147483647 2147483647 2147483647 2147483647] false] • swaack first choice i cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [ELSE] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [true false] • first choice i cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [ELSE] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] true • choice i cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] • i cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] • THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] • uncons-two [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] • [uncons] ii swapd [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false [2147483647 2147483647 2147483647 2147483647] [1] [uncons] • ii swapd [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false [2147483647 2147483647 2147483647 2147483647] • uncons [1] uncons swapd [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 [2147483647 2147483647 2147483647] • [1] uncons swapd [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 [2147483647 2147483647 2147483647] [1] • uncons swapd [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 [2147483647 2147483647 2147483647] 1 [] • swapd [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 [2147483647 2147483647 2147483647] 1 [] • [swap] dip [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 [2147483647 2147483647 2147483647] 1 [] [swap] • dip [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 [2147483647 2147483647 2147483647] 1 • swap [] [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 1 [2147483647 2147483647 2147483647] • [] [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 1 [2147483647 2147483647 2147483647] [] • [add-with-carry] dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 1 [2147483647 2147483647 2147483647] [] [add-with-carry] • dipd [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 1 • add-with-carry [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 1 • _add-with-carry0 _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 1 • [bool_to_int] dipd + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false 2147483647 1 [bool_to_int] • dipd + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false • bool_to_int 2147483647 1 + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false • [0] [1] branch 2147483647 1 + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false [0] • [1] branch 2147483647 1 + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - false [0] [1] • branch 2147483647 1 + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - • 0 2147483647 1 + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 • 2147483647 1 + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 2147483647 • 1 + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 2147483647 1 • + + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 2147483647 1 • add + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 2147483648 • + _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 2147483648 • add _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 • _add-with-carry1 [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 • base [mod] [>=] clop [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 • 2147483648 [mod] [>=] clop [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 • [mod] [>=] clop [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] • [>=] clop [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] • clop [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] • cleave popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] • fork popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] • [i] app2 popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] [i] • app2 popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] [i] • [grba swap grba swap] dip [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] [i] [grba swap grba swap] • dip [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] • grba swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [>=] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] • stack popd [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] [[mod] 2147483648 2147483648] • popd [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] • [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] [>=] • swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648] • grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648] • [stack popd] dip swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648] [stack popd] • dip swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [>=] • stack popd [[mod] 2147483648 2147483648] swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [>=] [[>=] 2147483648 2147483648] • popd [[mod] 2147483648 2147483648] swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[>=] 2147483648 2147483648] • [[mod] 2147483648 2147483648] swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[>=] 2147483648 2147483648] [[mod] 2147483648 2147483648] • swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] [[>=] 2147483648 2147483648] • [i] [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] [[>=] 2147483648 2147483648] [i] • [infrst] cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] [[>=] 2147483648 2147483648] [i] [infrst] • cons ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] [[>=] 2147483648 2147483648] [[i] infrst] • ii popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] • [i] infrst [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] [i] • infrst [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [[mod] 2147483648 2147483648] [i] • infra first [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [mod] • i [2147483648 2147483648] swaack first [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 • mod [2147483648 2147483648] swaack first [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 • [2147483648 2147483648] swaack first [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 [2147483648 2147483648] • swaack first [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [0] • first [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 0 • [[>=] 2147483648 2147483648] [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 0 [[>=] 2147483648 2147483648] • [i] infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 0 [[>=] 2147483648 2147483648] [i] • infrst popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 0 [[>=] 2147483648 2147483648] [i] • infra first popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 [>=] • i [0 2147483648 2147483648] swaack first popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 • >= [0 2147483648 2147483648] swaack first popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 • ge [0 2147483648 2147483648] swaack first popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - true • [0 2147483648 2147483648] swaack first popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - true [0 2147483648 2147483648] • swaack first popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 0 [true] • first popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 2147483648 0 true • popdd popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 2147483648 0 true • popdd [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 true • [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 true [2147483647 2147483647 2147483647] • [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 true [2147483647 2147483647 2147483647] [] • [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1 cons cons - 0 true [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] • THEN1 cons cons - 0 true [2147483647 2147483647 2147483647] [] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] • i cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • [_add_p] [_add_then] [_add_R0] [_add_R1] genrec cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_p] • [_add_then] [_add_R0] [_add_R1] genrec cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_p] [_add_then] • [_add_R0] [_add_R1] genrec cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_p] [_add_then] [_add_R0] • [_add_R1] genrec cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_p] [_add_then] [_add_R0] [_add_R1] • genrec cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_p] [_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] • ifte cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [_add_then] [[] [2147483647 2147483647 2147483647] true 0] [_add_p] • infra first choice i cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • _add_p [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • [bool not] ii & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [bool not] • ii & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true [2147483647 2147483647 2147483647] • bool not [] bool not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true true • not [] bool not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true false • [] bool not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true false [] • bool not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true false false • not & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true false true • & [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true false true • and [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true false • [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons - 0 true false [[_add_then] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [] [2147483647 2147483647 2147483647] true 0] • swaack first choice i cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [_add_then] [false true 0] • first choice i cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] [_add_then] false • choice i cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1] • i cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • _add_R0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1 cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • [_add_rec_pred] [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1 cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_rec_pred] • [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1 cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_rec_pred] [THEN0] • [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] _add_R1 cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_rec_pred] [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] • _add_R1 cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_rec_pred] [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] • [THEN1] cons concat [ELSE] ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_rec_pred] [THEN0] [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] [THEN1] • cons concat [ELSE] ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_rec_pred] [THEN0] [[[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] • concat [ELSE] ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_rec_pred] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] • [ELSE] ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [_add_rec_pred] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] • ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [ELSE] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [[] [2147483647 2147483647 2147483647] true 0] [_add_rec_pred] • infra first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • _add_rec_pred [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • [bool] ii & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [bool] • ii & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] • bool [] bool & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true true • [] bool & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true true [] • bool & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true true false • & [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true true false • and [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true false • [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true false [[THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [ELSE] [] [2147483647 2147483647 2147483647] true 0] • swaack first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [ELSE] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] [false true 0] • first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [ELSE] [THEN0 [[_add_p] [_add_then] [_add_R0] [_add_R1] genrec] THEN1] false • choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [ELSE] • i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • ELSE cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • ditch-empty-list add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • [bool] [popd] [pop] ifte add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [bool] • [popd] [pop] ifte add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [bool] [popd] • [pop] ifte add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [bool] [popd] [pop] • ifte add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [pop] [popd] [[] [2147483647 2147483647 2147483647] true 0] [bool] • infra first choice i add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • bool [[popd] [pop] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] false • [[popd] [pop] [] [2147483647 2147483647 2147483647] true 0] swaack first choice i add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] false [[popd] [pop] [] [2147483647 2147483647 2147483647] true 0] • swaack first choice i add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [pop] [popd] [false [2147483647 2147483647 2147483647] true 0] • first choice i add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [pop] [popd] false • choice i add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] [pop] • i add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [] • pop add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] • add-carry-to-digits cons cons cons cons - 0 true [2147483647 2147483647 2147483647] • [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [pop not] • [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [pop not] [popd] • [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] • [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] • genrec cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] • ifte cons cons cons cons -0 true [2147483647 2147483647 2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] [[2147483647 2147483647 2147483647] true 0] [pop not] • infra first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] • pop not [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true • not [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 false • [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 false [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647 2147483647 2147483647] true 0] • swaack first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] [false 0] • first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] false • choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] • i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] • [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [bool not] • [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [bool not] [1 swons popd] • [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] • swoncat ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] • swap concat ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [bool not] [1 swons popd] [0 swap uncons [add-with-carry] dip] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • concat ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [bool not] [1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • ifte cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] [[2147483647 2147483647 2147483647] true 0] [bool not] • infra first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] • bool not [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true true • not [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true false • [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647 2147483647 2147483647] true 0] swaack first choice i cons cons cons cons - 0 true false [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647 2147483647 2147483647] true 0] • swaack first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] [false true 0] • first choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] false • choice i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • i cons cons cons cons - 0 true [2147483647 2147483647 2147483647] • 0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true [2147483647 2147483647 2147483647] 0 • swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true 0 [2147483647 2147483647 2147483647] • uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true 0 2147483647 [2147483647 2147483647] • [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true 0 2147483647 [2147483647 2147483647] [add-with-carry] • dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true 0 2147483647 • add-with-carry [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true 0 2147483647 • _add-with-carry0 _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true 0 2147483647 • [bool_to_int] dipd + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true 0 2147483647 [bool_to_int] • dipd + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true • bool_to_int 0 2147483647 + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true • [0] [1] branch 0 2147483647 + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true [0] • [1] branch 0 2147483647 + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true [0] [1] • branch 0 2147483647 + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 • 1 0 2147483647 + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 1 • 0 2147483647 + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 1 0 • 2147483647 + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 1 0 2147483647 • + + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 1 0 2147483647 • add + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 1 2147483647 • + _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 1 2147483647 • add _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 • _add-with-carry1 [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 • base [mod] [>=] clop [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 • 2147483648 [mod] [>=] clop [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 • [mod] [>=] clop [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] • [>=] clop [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] • clop [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] • cleave popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] • fork popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] • [i] app2 popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] [i] • app2 popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] [i] • [grba swap grba swap] dip [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] [i] [grba swap grba swap] • dip [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] • grba swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [>=] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] • stack popd [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] [[mod] 2147483648 2147483648 0] • popd [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] • [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] [>=] • swap grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0] • grba swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0] • [stack popd] dip swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0] [stack popd] • dip swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [>=] • stack popd [[mod] 2147483648 2147483648 0] swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [>=] [[>=] 2147483648 2147483648 0] • popd [[mod] 2147483648 2147483648 0] swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[>=] 2147483648 2147483648 0] • [[mod] 2147483648 2147483648 0] swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[>=] 2147483648 2147483648 0] [[mod] 2147483648 2147483648 0] • swap [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] [[>=] 2147483648 2147483648 0] • [i] [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] [[>=] 2147483648 2147483648 0] [i] • [infrst] cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] [[>=] 2147483648 2147483648 0] [i] [infrst] • cons ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] [[>=] 2147483648 2147483648 0] [[i] infrst] • ii popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] • [i] infrst [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] [i] • infrst [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0] [i] • infra first [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [mod] • i [2147483648 2147483648 0] swaack first [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 • mod [2147483648 2147483648 0] swaack first [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 • [2147483648 2147483648 0] swaack first [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 [2147483648 2147483648 0] • swaack first [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [0 0] • first [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 0 • [[>=] 2147483648 2147483648 0] [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0] • [i] infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0] [i] • infrst popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0] [i] • infra first popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 [>=] • i [0 2147483648 2147483648 0] swaack first popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 • >= [0 2147483648 2147483648 0] swaack first popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 • ge [0 2147483648 2147483648 0] swaack first popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true • [0 2147483648 2147483648 0] swaack first popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 true [0 2147483648 2147483648 0] • swaack first popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 0 [true 0] • first popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 2147483648 0 true • popdd popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 2147483648 0 true • popdd [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true • [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [2147483647 2147483647] • [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [2147483647 2147483647] [pop not] • [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [2147483647 2147483647] [pop not] [popd] • [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] • [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] • genrec cons cons cons cons - 0 0 true [2147483647 2147483647] [pop not] [popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] • ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] [[2147483647 2147483647] true 0 0] [pop not] • infra first choice i cons cons cons cons - 0 0 true [2147483647 2147483647] • pop not [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647 2147483647] true 0 0] swaack first choice i cons cons cons cons - 0 0 true • not [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647 2147483647] true 0 0] swaack first choice i cons cons cons cons - 0 0 false • [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647 2147483647] true 0 0] swaack first choice i cons cons cons cons - 0 0 false [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647 2147483647] true 0 0] • swaack first choice i cons cons cons cons - 0 0 true [2147483647 2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] [false 0 0] • first choice i cons cons cons cons - 0 0 true [2147483647 2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] false • choice i cons cons cons cons - 0 0 true [2147483647 2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] • i cons cons cons cons - 0 0 true [2147483647 2147483647] • [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [bool not] • [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [bool not] [1 swons popd] • [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] • swoncat ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] • swap concat ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [bool not] [1 swons popd] [0 swap uncons [add-with-carry] dip] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • concat ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [bool not] [1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • ifte cons cons cons cons - 0 0 true [2147483647 2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] [[2147483647 2147483647] true 0 0] [bool not] • infra first choice i cons cons cons cons - 0 0 true [2147483647 2147483647] • bool not [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647 2147483647] true 0 0] swaack first choice i cons cons cons cons - 0 0 true true • not [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647 2147483647] true 0 0] swaack first choice i cons cons cons cons - 0 0 true false • [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647 2147483647] true 0 0] swaack first choice i cons cons cons cons - 0 0 true false [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647 2147483647] true 0 0] • swaack first choice i cons cons cons cons - 0 0 true [2147483647 2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] [false true 0 0] • first choice i cons cons cons cons - 0 0 true [2147483647 2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] false • choice i cons cons cons cons - 0 0 true [2147483647 2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • i cons cons cons cons - 0 0 true [2147483647 2147483647] • 0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [2147483647 2147483647] 0 • swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true 0 [2147483647 2147483647] • uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true 0 2147483647 [2147483647] • [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true 0 2147483647 [2147483647] [add-with-carry] • dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true 0 2147483647 • add-with-carry [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true 0 2147483647 • _add-with-carry0 _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true 0 2147483647 • [bool_to_int] dipd + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true 0 2147483647 [bool_to_int] • dipd + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true • bool_to_int 0 2147483647 + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true • [0] [1] branch 0 2147483647 + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [0] • [1] branch 0 2147483647 + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [0] [1] • branch 0 2147483647 + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 • 1 0 2147483647 + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 1 • 0 2147483647 + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 1 0 • 2147483647 + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 1 0 2147483647 • + + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 1 0 2147483647 • add + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 1 2147483647 • + _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 1 2147483647 • add _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 • _add-with-carry1 [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 • base [mod] [>=] clop [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 • 2147483648 [mod] [>=] clop [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 • [mod] [>=] clop [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] • [>=] clop [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] • clop [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] • cleave popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] • fork popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] • [i] app2 popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] [i] • app2 popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] [i] • [grba swap grba swap] dip [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] [i] [grba swap grba swap] • dip [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] • grba swap grba swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [>=] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] • stack popd [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] [[mod] 2147483648 2147483648 0 0] • popd [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] • [>=] swap grba swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] [>=] • swap grba swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0 0] • grba swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0 0] • [stack popd] dip swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0 0] [stack popd] • dip swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [>=] • stack popd [[mod] 2147483648 2147483648 0 0] swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [>=] [[>=] 2147483648 2147483648 0 0] • popd [[mod] 2147483648 2147483648 0 0] swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[>=] 2147483648 2147483648 0 0] • [[mod] 2147483648 2147483648 0 0] swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[>=] 2147483648 2147483648 0 0] [[mod] 2147483648 2147483648 0 0] • swap [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] [[>=] 2147483648 2147483648 0 0] • [i] [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] [[>=] 2147483648 2147483648 0 0] [i] • [infrst] cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] [[>=] 2147483648 2147483648 0 0] [i] [infrst] • cons ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] [[>=] 2147483648 2147483648 0 0] [[i] infrst] • ii popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] • [i] infrst [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] [i] • infrst [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0] [i] • infra first [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [mod] • i [2147483648 2147483648 0 0] swaack first [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 • mod [2147483648 2147483648 0 0] swaack first [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 • [2147483648 2147483648 0 0] swaack first [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 [2147483648 2147483648 0 0] • swaack first [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [0 0 0] • first [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 0 • [[>=] 2147483648 2147483648 0 0] [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0 0] • [i] infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0 0] [i] • infrst popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0 0] [i] • infra first popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 [>=] • i [0 2147483648 2147483648 0 0] swaack first popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 • >= [0 2147483648 2147483648 0 0] swaack first popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 • ge [0 2147483648 2147483648 0 0] swaack first popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true • [0 2147483648 2147483648 0 0] swaack first popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 true [0 2147483648 2147483648 0 0] • swaack first popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 0 [true 0 0] • first popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 2147483648 0 true • popdd popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 2147483648 0 true • popdd [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true • [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [2147483647] • [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [2147483647] [pop not] • [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [2147483647] [pop not] [popd] • [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] • [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [2147483647] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] • genrec cons cons cons cons - 0 0 0 true [2147483647] [pop not] [popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] • ifte cons cons cons cons - 0 0 0 true [2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] [[2147483647] true 0 0 0] [pop not] • infra first choice i cons cons cons cons - 0 0 0 true [2147483647] • pop not [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647] true 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 true • not [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647] true 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 false • [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647] true 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 false [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [2147483647] true 0 0 0] • swaack first choice i cons cons cons cons - 0 0 0 true [2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] [false 0 0 0] • first choice i cons cons cons cons - 0 0 0 true [2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] false • choice i cons cons cons cons - 0 0 0 true [2147483647] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] • i cons cons cons cons - 0 0 0 true [2147483647] • [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 0 true [2147483647] [bool not] • [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 0 true [2147483647] [bool not] [1 swons popd] • [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 0 true [2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 0 true [2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] • swoncat ifte cons cons cons cons - 0 0 0 true [2147483647] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] • swap concat ifte cons cons cons cons - 0 0 0 true [2147483647] [bool not] [1 swons popd] [0 swap uncons [add-with-carry] dip] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • concat ifte cons cons cons cons - 0 0 0 true [2147483647] [bool not] [1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • ifte cons cons cons cons - 0 0 0 true [2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] [[2147483647] true 0 0 0] [bool not] • infra first choice i cons cons cons cons - 0 0 0 true [2147483647] • bool not [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647] true 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 true true • not [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647] true 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 true false • [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647] true 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 true false [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [2147483647] true 0 0 0] • swaack first choice i cons cons cons cons - 0 0 0 true [2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] [false true 0 0 0] • first choice i cons cons cons cons - 0 0 0 true [2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] false • choice i cons cons cons cons - 0 0 0 true [2147483647] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • i cons cons cons cons - 0 0 0 true [2147483647] • 0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [2147483647] 0 • swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true 0 [2147483647] • uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true 0 2147483647 [] • [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true 0 2147483647 [] [add-with-carry] • dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true 0 2147483647 • add-with-carry [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true 0 2147483647 • _add-with-carry0 _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true 0 2147483647 • [bool_to_int] dipd + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true 0 2147483647 [bool_to_int] • dipd + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true • bool_to_int 0 2147483647 + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true • [0] [1] branch 0 2147483647 + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [0] • [1] branch 0 2147483647 + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [0] [1] • branch 0 2147483647 + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 • 1 0 2147483647 + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 1 • 0 2147483647 + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 1 0 • 2147483647 + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 1 0 2147483647 • + + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 1 0 2147483647 • add + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 1 2147483647 • + _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 1 2147483647 • add _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 • _add-with-carry1 [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 • base [mod] [>=] clop [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 • 2147483648 [mod] [>=] clop [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 • [mod] [>=] clop [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] • [>=] clop [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] • clop [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] • cleave popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] • fork popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] • [i] app2 popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] [i] • app2 popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] [i] • [grba swap grba swap] dip [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] [i] [grba swap grba swap] • dip [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] • grba swap grba swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] • [stack popd] dip swap grba swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [>=] [stack popd] • dip swap grba swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] • stack popd [>=] swap grba swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] [[mod] 2147483648 2147483648 0 0 0] • popd [>=] swap grba swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] • [>=] swap grba swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] [>=] • swap grba swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0 0 0] • grba swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0 0 0] • [stack popd] dip swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [>=] [[mod] 2147483648 2147483648 0 0 0] [stack popd] • dip swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [>=] • stack popd [[mod] 2147483648 2147483648 0 0 0] swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [>=] [[>=] 2147483648 2147483648 0 0 0] • popd [[mod] 2147483648 2147483648 0 0 0] swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[>=] 2147483648 2147483648 0 0 0] • [[mod] 2147483648 2147483648 0 0 0] swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[>=] 2147483648 2147483648 0 0 0] [[mod] 2147483648 2147483648 0 0 0] • swap [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] [[>=] 2147483648 2147483648 0 0 0] • [i] [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] [[>=] 2147483648 2147483648 0 0 0] [i] • [infrst] cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] [[>=] 2147483648 2147483648 0 0 0] [i] [infrst] • cons ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] [[>=] 2147483648 2147483648 0 0 0] [[i] infrst] • ii popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] • [i] infrst [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] [i] • infrst [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [[mod] 2147483648 2147483648 0 0 0] [i] • infra first [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [mod] • i [2147483648 2147483648 0 0 0] swaack first [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 • mod [2147483648 2147483648 0 0 0] swaack first [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 0 • [2147483648 2147483648 0 0 0] swaack first [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 0 [2147483648 2147483648 0 0 0] • swaack first [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [0 0 0 0] • first [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 0 • [[>=] 2147483648 2147483648 0 0 0] [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0 0 0] • [i] infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0 0 0] [i] • infrst popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 0 [[>=] 2147483648 2147483648 0 0 0] [i] • infra first popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 [>=] • i [0 2147483648 2147483648 0 0 0] swaack first popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 • >= [0 2147483648 2147483648 0 0 0] swaack first popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 • ge [0 2147483648 2147483648 0 0 0] swaack first popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true • [0 2147483648 2147483648 0 0 0] swaack first popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 true [0 2147483648 2147483648 0 0 0] • swaack first popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 0 [true 0 0 0] • first popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 2147483648 0 true • popdd popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 2147483648 0 true • popdd [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 0 true • [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 0 true [] • [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 0 true [] [pop not] • [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 0 true [] [pop not] [popd] • [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 0 true [] [pop not] [popd] [[bool not] [1 swons popd]] • [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec cons cons cons cons - 0 0 0 0 true [] [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] • genrec cons cons cons cons - 0 0 0 0 true [] [pop not] [popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] • ifte cons cons cons cons - 0 0 0 0 true [] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] [[] true 0 0 0 0] [pop not] • infra first choice i cons cons cons cons - 0 0 0 0 true [] • pop not [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [] true 0 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 0 true • not [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [] true 0 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 0 false • [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [] true 0 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 0 false [[popd] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [] true 0 0 0 0] • swaack first choice i cons cons cons cons - 0 0 0 0 true [] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] [false 0 0 0 0] • first choice i cons cons cons cons - 0 0 0 0 true [] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] [popd] false • choice i cons cons cons cons - 0 0 0 0 true [] [[bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte] • i cons cons cons cons - 0 0 0 0 true [] • [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 0 0 true [] [bool not] • [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 0 0 true [] [bool not] [1 swons popd] • [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 0 0 true [] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • [0 swap uncons [add-with-carry] dip] swoncat ifte cons cons cons cons - 0 0 0 0 true [] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] • swoncat ifte cons cons cons cons - 0 0 0 0 true [] [bool not] [1 swons popd] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [0 swap uncons [add-with-carry] dip] • swap concat ifte cons cons cons cons - 0 0 0 0 true [] [bool not] [1 swons popd] [0 swap uncons [add-with-carry] dip] [[pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • concat ifte cons cons cons cons - 0 0 0 0 true [] [bool not] [1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] • ifte cons cons cons cons - 0 0 0 0 true [] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] [[] true 0 0 0 0] [bool not] • infra first choice i cons cons cons cons - 0 0 0 0 true [] • bool not [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [] true 0 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 0 true false • not [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [] true 0 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 0 true true • [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [] true 0 0 0 0] swaack first choice i cons cons cons cons - 0 0 0 0 true true [[1 swons popd] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [] true 0 0 0 0] • swaack first choice i cons cons cons cons - 0 0 0 0 true [] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] [true true 0 0 0 0] • first choice i cons cons cons cons - 0 0 0 0 true [] [0 swap uncons [add-with-carry] dip [pop not] [popd] [[bool not] [1 swons popd]] [[0 swap uncons [add-with-carry] dip] swoncat ifte] genrec] [1 swons popd] true • choice i cons cons cons cons - 0 0 0 0 true [] [1 swons popd] • i cons cons cons cons - 0 0 0 0 true [] • 1 swons popd cons cons cons cons - 0 0 0 0 true [] 1 • swons popd cons cons cons cons - 0 0 0 0 true [1] • popd cons cons cons cons - 0 0 0 0 [1] • cons cons cons cons - 0 0 0 [0 1] • cons cons cons - 0 0 [0 0 1] • cons cons - 0 [0 0 0 1] • cons - [0 0 0 0 1] • - -[0 0 0 0 1] <-top - -joy? -[0 0 0 0 1] • +[sub-digits initial-carry sub-digits'] • diff --git a/implementations/bigints.joy b/implementations/bigints.joy index d706a70..29157de 100644 --- a/implementations/bigints.joy +++ b/implementations/bigints.joy @@ -1,34 +1,93 @@ -base 2147483648 -ditch-empty-list [bool] [popd] [pop] ifte -bool_to_int [0] [1] branch -uncons-two [uncons] ii swapd +clear +[base 2147483648] +[ditch-empty-list [bool] [popd] [pop] ifte] +[bool-to-int [0] [1] branch] +[uncons-two [uncons] ii swapd] +[sandwich swap [cons] dip swoncat] -add-with-carry _add-with-carry0 _add-with-carry1 -_add-with-carry0 [bool_to_int] dipd + + -_add-with-carry1 base [mod] [>=] clop +[digitalize [0 <=] [pop []] [base divmod swap] [i cons] genrec] +[to-bigint [!-] [abs digitalize] cleave cons] -add-carry-to-digits [_actd_P] [_actd_THEN] [_actd_R0] [_actd_R1] genrec -_actd_P pop not -_actd_THEN popd -_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte -_actd_R0.else popd 1 false rolldown -_actd_R0.then 0 swap uncons [add-with-carry] dip -_actd_R1 i cons +[prep rest 1 0 rolldown] +[from-bigint' [next-digit] step popd] +[next-digit [increase-power] [accumulate-digit] clop popdd] +[increase-power popop base *] +[accumulate-digit rolldown * +] -add-digits initial-carry add-digits' -initial-carry false rollup -add-digits' [P] [THEN] [R0] [R1] genrec -P [bool] ii & not -THEN [P'] [THEN'] [ELSE] ifte -R0 uncons-two [add-with-carry] dipd -R1 i cons -P' [bool] ii | -THEN' ditch-empty-list add-carry-to-digits -ELSE pop swap [] [1 swons] branch +[sign-int [first] [prep from-bigint'] cleave] +[neg-if-necessary swap [neg] [] branch] +[from-bigint sign-int neg-if-necessary] + +[add-with-carry _add-with-carry0 _add-with-carry1] +[_add-with-carry0 [bool-to-int] dipd + +] +[_add-with-carry1 base [mod] [>=] clop] + +[add-carry-to-digits [pop not] [popd] [_actd_R0] [i cons] genrec] +[_actd_R0 [bool] [_actd_R0.then] [_actd_R0.else] ifte] +[_actd_R0.else popd 1 false rolldown] +[_actd_R0.then 0 swap uncons [add-with-carry] dip] + +[add-digits initial-carry add-digits'] +[initial-carry false rollup] + +[add-digits' [P] [THEN] [R0] [R1] genrec] +[P [bool] ii & not] +[THEN [P'] [THEN'] [ELSE] ifte] +[R0 uncons-two [add-with-carry] dipd] +[R1 i cons] +[P' [bool] ii |] +[THEN' ditch-empty-list add-carry-to-digits] +[ELSE pop swap [] [1 swons] branch] + +[same-sign [first] ii xor not] +[add-like-bigints [uncons] dip rest add-digits cons] +[add-bigints [same-sign] [add-like-bigints] [1 0 /] ifte] + +[build-two-list-combiner _btlc0 _btlc1 [i cons]] +[_btlc0.0 [[ditch-empty-list] swoncat] dip] +[_btlc0.1 [pop] swoncat] +[_btlc0.3 [_btlc0.0 _btlc0.1] dip] +[_btlc0.4 [uncons-two] [dipd] sandwich] +[_btlc0 _btlc0.3 _btlc0.4] +[_btlc1 [[ifte] ccons [P'] swons [P] swap] dip] + +[carry [] [1 swons] branch] + +[compare-pairs [bool not] [pop false] [[first [>=] infrst] [pop true]] [[rest] swoncat ifte] genrec] +[xR1 uncons-two [unit cons swons] dipd] +[xP [bool] ii & not] +[BASE [bool] [popop pop true] [[pop bool] [popop pop false] [popop compare-pairs] ifte] ifte] +[gt-bigint <<{} [xP] [BASE] [xR1] tailrec] +[check-gt [gt-bigint] [swap [not] dipd] [] ifte] + +[sub-carry pop] + +[sub-carry-from-digits popd] +[_sub-with-carry0 rolldown bool-to-int [-] ii] +[_sub-with-carry1 [base + base mod] [0 <] cleave] +[sub-with-carry _sub-with-carry0 _sub-with-carry1] + +[sub-like-bigints [uncons] dip rest check-gt sub-digits cons] +[sub-digits initial-carry sub-digits'] + +enstacken [inscribe] step + +[add-carry-to-digits] +[swap carry] +[add-with-carry] +build-two-list-combiner +[genrec] ccons ccons +[add-digits'] swoncat +inscribe + +[sub-carry-from-digits] +[swap sub-carry] +[sub-with-carry] +build-two-list-combiner +[genrec] ccons ccons +[sub-digits'] swoncat +inscribe -add-bigints -[[first] ii =] # are they the same sign? -[[uncons] dip rest add-digits cons] # add the digits and set the sign. -[neg-bigint sub-bigints] # adding unlikes is actually subtraction. -ifte + +[true 456] [true 123] sub-like-bigints