-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkali24.html
194 lines (148 loc) · 6.78 KB
/
kali24.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html>
<html lang="en-US">
<!-- forked from https://github.com/mbuliga/mbuliga.github.io/blob/master/find-the-quine-step-by-step.js on 10.09.2019,
which is a modification of the js version https://github.com/ishanpm/chemlambda-editor of chemlambda v2, see the issue https://github.com/chorasimilarity/chemlambda-gui/issues/9
last modified: 20.10.2019
//
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>anharmonic lambda</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.image {border-width:2; padding: 10px 10px; border-radius: 12px; border: 2px solid #f55 }
.image:hover {border-width:2; padding: 10px 10px; border-radius: 12px; border: 2px solid #ff5 }
a:active, a:link, a:visited {color: #f55;}
.flex {
display: flex;
flex-wrap: nowrap;
padding: 1px 26px;
}
.flex .box10 {
width: 10%;
margin: 2px;
text-align: left;
}
.flex .box20 {
width: 20%;
margin: 10px;
text-align: left;
}
.flex .box40 {
width: 40%;
margin: 10px;
text-align: left;
}
.flex .box33 {
width: 33%;
margin: 10px;
text-align: left;
}
.flex .box90 {
width: 90%;
margin: 2px;
text-align: left;
}
.flex .box70 {
width: 70%;
margin: 2px;
text-align: left;
}
span {
color: black;
}
span2 {
color: black;
}
span3 {
color: black;
}
.link {
stroke: black;
stroke-width: 2px;
}
.node { stroke: black; stroke-width: 1px;
}
.textClass {
stroke: black;
fill: white;
font-family: "Lucida Grande", "Droid Sans", Arial, Helvetica, sans-serif;
font-weight: normal;
stroke-width: .5;
font-size: 14px;
}
body {
background-color: #ffffff; color: #000000;
}
#svgdiv .svg {
border: 2px solid #888
}
</style>
</head>
<body id="container" style="overflow: scroll;">
<script src="d3.v5.9.4.min.js"></script>
<script src="jquery.min.js"></script>
<div style="padding: 8px 26px;">
<span2> This rewrite system is a working version of anharmonic lambda, or kali (older: kaleidoscope). The goal is to find a version which contains both chemlambda v2 and <a href="https://arxiv.org/abs/1807.02058" target="_blank">em-convex</a>. All rewrites are chosen from emergent algebra considerations. See <a href="rhs.html" target="_blank">this tool to choose DIST rewrites</a>. It is amazing that it can reduce lambda terms. In this version a choice of rewrites avoid the need of "brutal" form of eta reduction, related to the Reidemester 2 moves. Work in progress because as the name tells, a completely symmetrical version should have 24 nodes. This version is better suited to lambda calculus. For a much more wild and interesting version see the <a href="http://imar.ro/~mbuliga/kali24.html" target="_blank">sister page here</a>. (Updated in tandem.) <br> <br>
Credits:</span2> <span> I modified this <a href="https://github.com/ishanpm/chemlambda-editor" target="_blank">js version by ishanpm</a> of my <a href="https://github.com/chorasimilarity/chemlambda-gui/blob/gh-pages/dynamic/README.md" target="_blank">chemlambda v2</a>, see <a href="https://github.com/chorasimilarity/chemlambda-gui/issues/9" target="_blank">issue 9</a>. The duplication examples are inspired from lambda terms proposed in <a href="https://github.com/chorasimilarity/chemlambda-gui/issues/8" target="_blank">issue 8</a>.</span>
</div>
<div style="padding: 8px 26px;">
Last modified: 18.10.2019. Part of <a href="http://imar.ro/~mbuliga/pages.html" target="_blank">(my pages to play and learn)</a>
</div>
<div style="padding: 8px 26px;"><span2>
<select class="image" id="listofmols" onchange="molSelect()">
<option value="bigpred"> predecessor
<option value="SKK">SKK
<option value="omegaSKI"> omega from S,K combinators
<option value="ishan_example_foe">duplication with FOE of \x.((\y.yy)(xx))
<option value="ishan_example">duplication with FO of \x.((\y.yy)(xx))
<option value="ishan_example_fox">duplication with FOX of \x.((\y.yy)(xx))
<option value="ishan_example_2_foe">duplication with FOE of \x.(\f.ff)(\y.xy)
<option value="ishan_example_2">duplication with FO of \x.(\f.ff)(\y.xy)
<option value="ishan_example_2_fox">duplication with FOX of \x.(\f.ff)(\y.xy)
<option value="ishan_example_2_A">duplication of M, then applied to id, for M = \x.(\f.ff)(\y.xy)
<option value="ishan_example_2_pair">first (pair a b) where a and b come from FOE duplication of \x.(\f.ff)(\y.xy)
<option value="first_pair">first (pair a b) with pair = \x.\y.\z. z x y and first = \p.(p (\x.\y.x)), a = 5, b = 0
<option value="y_comb">Y combinator applied to something
<option value="y_comb_id">Y combinator applied to id
<option value="omega">omega combinator
<option value="ackermann_2_2">ackermann_2_2
<option value="ackermann_3_2">ackermann_3_2
<option value="10_quine_bubbles">the 10-nodes quine (sometimes it duplicates)
<option value="shuffle_10_290C1735B6A4DE8">10 nodes sometimes becomes quine from [graph A-L-FI-FOE 540213]
<option value="dodecahedron">dodecahedron
<option value="times_only"> 5 X 5 custom
<option value="times_only_short">5 X 5 = (\m.\n.\f.m(nf)) 5 5
<option value="times_only_long">5 X 5 = (\m.\n.m (PLUS n) 0) 5 5, with PLUS = \m.\n.m SUCC n
</select> (stops at max. number of nodes </span2><span2 id="maxnodenumber">2048</span2><span2>)</span2>
</div>
<div class="flex">
<div class="box90"> <span id="svgdiv"> </span> <br>
<div style="padding: 8px 26px;"><span2>CODE: </span2><span id="molyoulookat"></span></div>
<div style="padding: 8px 26px;">
<div class="flex">
<div class="box33"><span>MOL NOW: </span> <br> <br> <span id="molexport"></span></div>
<div class="box33"><span>MOL AFTER: </span> <br> <br> <span id="molexportafter"></span></div>
<div class="box33"><span2>before: <br></span2> <span id="puttransformcachealt"></span> <br> <span2>chosen: <br></span2><span id="chosentransform"></span>
<br>
<span2>after: <br></span2>
<span id="puttransformcachealtafter"></span>
</div>
</div>
</div>
</div>
<div class="box10">
<button class="image" onclick="setSpeed(0); setStart(0); molSelect()"><span3>load</span3></button><br><br>
<button class="image" onclick="setSpeed(0); setStart(0); reloadCode()"><span3>reload</span3></button><br><br>
<button class="image" onclick="setStart(0); loop2()"><span3>step</span3></button><br><br>
<button class="image" onclick="setSpeed(1); setStart(1); loop()"><span3>start</span3></button> <br><br>
<button class="image" onclick="setSpeed(0); setStart(0)"><span3>stop</span3></button></div>
<div class="box20">
</div>
</div>
<br> <br>
<script src="kaliLib.js"></script>
<script src="kali-try.js"></script>
</body>
</html>