// smullyan & fitting, SET THEORY AND THE CONTINUUM PROBLEM x:"{{{{1,2}}},10,20,{{{3,4},{{5,6},{{7}}}}}}" / list from set h:{(1+x~*x),:/x} g:{*.,/@[@[x;&x="}";:;"]"];&x="{";:[;"h["]]} y:g x / set from list f:{$[x~*x;$x;"{",(1_,/",",'f'x),"}"]} q:f y / recursive element (transitive) t:{?x,,/$[x~*x;();`I=@x;,x;t'x]} a:t y / recurisve subset (swelled) c:{(,!0){,/(|!#y),''y#\:1+x}/y+\\(x-y-:1)#1} s:{?(,!0),x,,/$[x~*x;();s'x@,/(#x)c/:1+!-1+#x]} b:s y \ y ,,1 2 10 20 ,(3 4;(5 6;,,7)) q~x 1 a ,,1 2 10 20 ,(3 4;(5 6;,,7)) ,1 2 1 2 1 2 (3 4;(5 6;,,7)) 3 4 (5 6;,,7) 3 4 5 6 ,,7 5 6 ,7 7 b !0 ,,1 2 10 20 ,(3 4;(5 6;,,7))