perm filename STRGEN.TEM[DEN,LMM] blob sn#067224 filedate 1973-10-15 generic text, type T, neo UTF8
(S-TOTAL (RPAQQ TOTALVARS ((FNS LISTFILE LISTFILES GSETQ GSET Y/N
PUTPROP LMLISPFOR FORNEXT FORVARNAME FORMAKECOND FORMAKESETQ FORINITIAL
FORPROGVAR FORGONEXT FORPACKWORDS FORTESTANDSET FORNEGATION DWIMUSERFN)
(USERMACROS ?= !← EF PPT) (ADDVARS (PRETTYTYPELST (CHANGEDEDITMACROS
EDITMACROS "edit macros") (CHANGEDVARSLST VARS "variables") (
CHANGEDPROPLST PROP "properties")) (PRETTYMACROS (EDITMACROS X (E
(MAPC (QUOTE X) (FUNCTION (LAMBDA (Y) (PRINT (OR (CONS (QUOTE EDITMACRO)
(CONS (OR (CAR (LISTP Y)) Y) (COND ((LISTP Y) (CDAR (SOME USERMACROS
(FUNCTION (LAMBDA (Z) (AND (CADR Z) (EQ (CAR Z) (CAR Y)))))))) (T
(CDDAR (SOME USERMACROS (FUNCTION (LAMBDA (Z) (AND (NULL (CADR Z))
(EQ (CAR Z) Y)))))))))) (ERROR Y "not an editmacro"))) (PRINT (CONS
(QUOTE EDITMACRO)))))))))) (PROP PRETTYTYPE EDITMACROS) (VARS DWIMUSERFN
HOST) (PROP MACRO FOR ≠QUOTE) (P (/REMPROP (QUOTE FOR) (QUOTE CLISPWORD))
(I.S.TYPE (QUOTE MAXIMUM) (QUOTE (SETQ $$VAL (MAX $$VAL *))) -999999
(QUOTE $$VAL))))) (DEFINEQ (LISTFILE (LAMBDA (FIL LISTFILEHOST 
LISTFILELOGIN) (* Calls FTP as a SUBSYS) (BKSYSBUF (CONCAT "FTP
" (SETQ LISTFILEHOST (OR LISTFILEHOST HOST (SETQ HOST (PROGN (PRIN1
"HOST? ") (READ T))))) "
LOG " (OR LISTFILELOGIN (GETP LISTFILEHOST (QUOTE LOGIN)) (PUT 
LISTFILEHOST (QUOTE LOGIN) (PROGN (PRIN1 LISTFILEHOST T) (PRIN1 " LOGIN? "
T) (READ T)))) "
TE
SE " FIL "

≠DIS
QUI
QUI
")) (KFORK (SUBSYS)) FIL)) (LISTFILES (LAMBDA (FILLST) (* TO REDEFINE
LISTFILES TO FTP FILES ELSEWHERE) (MAPC FILLST (FUNCTION (LAMBDA (FIL)
(LISTFILE (OR (INFILEP FIL) (ERROR "NO SUCH FILE TO LIST" FIL))) (
/DSUBST NIL FIL NOTLISTEDFILES)))) (SETQ NOTLISTEDFILES (/DREMOVE
NIL NOTLISTEDFILES)) FILLST)) (GSETQ (NLAMBDA (GSETVAR Y) (* Guaranteed
to cause VARS to be marked as "CHANGED") (GSET GSETVAR (EVAL Y))))
(GSET (LAMBDA (X Y) (* Guaranteed to cause VARS to be marked as "CHANGED")
(NEWFILE? X T) (/SET X Y))) (Y/N (NLAMBDA (DEFAULT MESS) (* Prompts
for one of DEFAULT, returning the char typed, and completing the typein.
DEFAULT is an alist of (firstchar . restchars)) (PROG ((CNT (ITIMES
DWIMWAIT 2)) R BUFS) (COND (MESS (AND (READP T) (PRIN1 "π" T)) (PRIN1
MESS T))) (COND ((ATOM DEFAULT) (SETQ DEFAULT (SELECTQ DEFAULT (Y
(QUOTE ((Y . ES) (N . O)))) (QUOTE ((N . O) (Y . ES))))))) (AND MESS
(READP T) (DOBE)) (SETQ BUFS (CLBUFS)) LP (COND ((MINUSP (SETQ CNT
(SUB1 CNT))) (PRIN1 "...") (PRIN1 (SETQ R (CAAR DEFAULT))) (GO GOTIT))
((NOT (READP T)) (DISMISS 500) (GO LP))) RETRY (SETQ R (RESETFORM
(CONTROL T) (READC T))) GOTIT (COND ((SETQ R (ASSOC R DEFAULT)) (PRIN1
(CDR R) T) (TERPRI T)) (T (PRIN1 "π") (GO RETRY))) (BKBUFS BUFS)
(RETURN (CAR R))))) (PUTPROP (LAMBDA (NAM PROP VAL) (* This isn't
really optimal, as the best implementation would say WHICH PROP needed
dumping) (/RPLACA (QUOTE CHANGEDPROPLST) (CONS NAM CHANGEDPROPLST))
(/PUT NAM PROP VAL))) (LMLISPFOR (LAMBDA (L) (PROG (N FV PV EPILOGUE
PROLOGUE DOFORM DOTYPE VAR RANGE LST VARNEXT NEXT NEXTS N2 N3 INIT
TESTSET) (SETQ CLISPCHANGE T) (SETQ N 1) FORLOOP (AND (EQ (CAR L)
(QUOTE NEW)) (FORPROGVAR (CAR (SETQ L (CDR L))))) (SETQ VAR (CAR L))
(FORNEXT (SETQ VARNEXT (FORVARNAME "NEXT"))) (SETQ L (CDR L)) (SETQ
N1 (SETQ N2 (SETQ N3 NIL))) RANGELOOP (AND (SELECTQ (CAR L) (FROM
(SETQ N1 (CADR L)) (SETQ L (CDDR L)) (GO RANGELOOP)) (TO (SETQ N2
(CADR L)) (SETQ L (CDDR L)) (GO RANGELOOP)) (BY (SETQ N3 (CADR L))
(SETQ L (CDDR L)) (GO RANGELOOP)) (IN (FORTESTANDSET (FORMAKECOND
(FORNEGATION (FORINITIAL (FORPROGVAR (SETQ LST (FORVARNAME "LIST")))
(CADR L))) (FORGONEXT))) (FORTESTANDSET (FORMAKESETQ VAR (LIST (QUOTE
CAR) LST))) (FORNEXT (FORMAKESETQ LST (LIST (QUOTE CDR) LST))) T)
(ON (FORTESTANDSET (FORMAKECOND (FORNEGATION VAR) (FORGONEXT))) (FORNEXT
(FORMAKESETQ (FORINITIAL VAR (CADR L)) (LIST (QUOTE CDR) VAR))) T)
(:= (COND (FORFIXFLG (/RPLNODE L (CONS (QUOTE FROM) (NCONC (AND (CAADR
L) (LIST (CAADR L))) (AND (CADR (CADR L)) (OR (NOT (NUMBERP (CADR
(CADR L)))) (NOT (IGREATERP (CADR (CADR L)) 999))) (LIST (QUOTE TO)
(CADR (CADR L)))) (AND (CADDR (CADR L)) (LIST (QUOTE BY) (CADDR (CADR
L))))))) (GO RANGELOOP))) (SETQ N1 (CAR (CADR L))) (SETQ N2 (CADR
(CADR L))) (SETQ N3 (CADDR (CADR L))) NIL) (IS (FORTESTANDSET (
FORMAKESETQ VAR (CADR L))) T) (PROGN (OR N1 N2 N3 (ERROR 
"MISSING OPERATOR IN FOR")) NIL)) (OR N1 N2 N3) (ERROR 
"TOO MANY OPERATORS IN FOR")) (COND ((OR N1 N2 N3) (FORINITIAL VAR
(OR N1 1)) (AND (LISTP N2) (SETQ N2 (FORINITIAL (FORPROGVAR (FORVARNAME
"MAX")) N2))) (SETQ N3 (COND (N3 (COND ((ATOM N3) N3) (T (FORINITIAL
(FORPROGVAR (FORVARNAME "INC")) N3)))) ((AND (NUMBERP N1) (NUMBERP
N2) (GREATERP N1 N2)) -1) (T 1))) (AND N2 (FORTESTANDSET (FORMAKECOND
(COND ((NOT (NUMBERP N3)) (LIST (QUOTE COND) (LIST (LIST (QUOTE MINUSP)
N3) (LIST (QUOTE ILESSP) VAR N2)) (LIST T (LIST (QUOTE OR (LIST (QUOTE
ZEROP) N3) (LIST (QUOTE GREATERP) VAR N2)))))) ((MINUSP N3) (LIST
(QUOTE ILESSP) VAR N2)) (T (LIST (QUOTE IGREATERP) VAR N2))) (FORGONEXT))))
(FORNEXT (FORMAKESETQ VAR (LIST (QUOTE IPLUS) VAR N3))))) (SETQ L
(CDDR L)) ASLOOP (SELECTQ (CAR L) (AS (SETQ L (CDR L)) (SETQ NEXTS
(APPEND NEXTS NEXT)) (SETQ NEXT) (GO FORLOOP)) ((IF WHEN) (FORTESTANDSET
(FORMAKECOND (FORNEGATION (CADR L)) (LIST (QUOTE GO) VARNEXT))) (SETQ
L (CDDR L))) (UNTIL (FORNEXT (FORMAKECOND (CADR L) (FORGONEXT))) (SETQ
L (CDDR L))) (WHILE (FORTESTANDSET (FORMAKECOND (FORNEGATION (CADR
L)) (FORGONEXT))) (SETQ L (CDDR L))) (GO FORTEST)) (GO ASLOOP) FORTEST
(SETQ PROLOGUE (APPEND TESTSET (LIST (FORPACKWORDS "LOOP" N)) INIT
PROLOGUE)) (SETQ EPILOGUE (CONS (FORPACKWORDS "NEXT" N) (APPEND (REVERSE
NEXT) (REVERSE NEXTS) (CONS (LIST (QUOTE GO) (FORPACKWORDS "LOOP"
N)) EPILOGUE)))) (SETQ TESTSET (SETQ INIT (SETQ NEXT (SETQ NEXTS))))
(COND ((EQ (CAR L) (QUOTE FOR)) (SETQ L (CDR L)) (SETQ N (ADD1 N))
(GO FORLOOP))) (SETQ DOTYPE (CAR L)) (SETQ DOVAL (CAR (LAST L))) (
FORPROGVAR (QUOTE FOR-VALUE)) (SETQ FV (SELECTQ DOTYPE ((APPEND LIST
NCONC) (QUOTE (CAR FOR-VALUE))) (QUOTE FOR-VALUE))) (SETQ DOFORM (
SELECTQ DOTYPE ((AND OR) (FORMAKECOND (LIST (SELECTQ DOTYPE (AND (
FORINITIAL (QUOTE FOR-VALUE) T) (QUOTE NOT)) (QUOTE PROGN)) (FORMAKESETQ
(QUOTE FOR-VALUE) DOVAL)) (QUOTE (RETURN FOR-VALUE)))) ((PROGN PROG2)
(FORMAKESETQ (QUOTE FOR-VALUE) DOVAL)) (DO DOVAL) (FORMAKESETQ (QUOTE
FOR-VALUE) (CONS (OR (CDR (ASSOC DOTYPE (QUOTE ((JOIN . NCONC) (COLLECT
. NCONC1) (LIST . TCONC) (NCONC . LCONC) (XLIST . CONS) (APPEND .
LCONC) (SUM . IPLUS) (PRODUCT . ITIMES) (MAXIMUM . MAX) (MINIMUM .
MIN))))) DOTYPE) (SELECTQ DOTYPE ((LIST NCONC COLLECT JOIN) (LIST
(QUOTE FOR-VALUE) DOVAL)) (APPEND (LIST (QUOTE FOR-VALUE) (LIST (QUOTE
APPEND) DOVAL))) (LIST DOVAL (QUOTE FOR-VALUE))))))) (COND ((EQ (CAR
(SETQ L (CDR L))) (QUOTE FIRST)) (FORINITIAL (QUOTE FOR-VALUE) (SELECTQ
DOTYPE ((LIST APPEND NCONC) (LIST (QUOTE LCONC) NIL (CADR L))) (CADR
L))) (SETQ L (CDDR L))) ((MEMB DOTYPE (QUOTE (PLUS IPLUS TIMES ITIMES
MAX MIN SUM MAXIMUM MINIMUM PRODUCT))) (FORINITIAL (QUOTE FOR-VALUE)
(CDR (ASSOC DOTYPE (QUOTE ((SUM . 0) (PLUS . 0) (MAXIMUM . -99999)
(MINIMUM . 999999) (PRODUCT . 0) (MAX . -99999) (MIN . 99999) (IPLUS
. 0) (TIMES . 1) (ITIMES . 1)))))))) (RETURN (CONS (QUOTE PROG) (CONS
PV (APPEND INIT (REVERSE PROLOGUE) (REVERSE (CDR (REVERSE L))) (LIST
DOFORM) EPILOGUE (LIST (QUOTE RETURN) (LIST (QUOTE RETURN) FV)))))))))
(FORNEXT (LAMBDA (ITEM) (SETQ NEXT (CONS ITEM NEXT)) ITEM)) (FORVARNAME
(LAMBDA (STR) (PACK (LIST STR "*" VAR)))) (FORMAKECOND (LAMBDA (PRD
DO) (LIST (QUOTE COND) (LIST PRD DO)))) (FORMAKESETQ (LAMBDA (VAR
VAL) (AND (NOT (EQ VAR VAL)) (LIST (QUOTE SETQ) VAR VAL)))) (FORINITIAL
(LAMBDA (VAR VAL) (SETQ INIT (CONS (FORMAKESETQ VAR VAL) INIT)) VAR))
(FORPROGVAR (LAMBDA (VAR) (SETQ PV (CONS VAR PV)) VAR)) (FORGONEXT
(LAMBDA NIL (LIST (QUOTE GO) (COND ((EQP N 1) (QUOTE RETURN)) (T (PACK
(LIST "NEXT*" (SUB1 N)))))))) (FORPACKWORDS (LAMBDA (STR VAL) (PACK
(LIST STR "*" N)))) (FORTESTANDSET (LAMBDA (ITEM) (SETQ TESTSET (CONS
ITEM TESTSET)) ITEM)) (FORNEGATION (LAMBDA (EXP) (SELECTQ (CAR EXP)
((NOT NULL) (CADR EXP)) (LIST (QUOTE NOT) EXP)))) (DWIMUSERFN (LAMBDA
NIL (AND (NOT FAULTAPPLYFLG) (LISTP FAULTX) (LITATOM (CAR FAULTX))
(NOT (FGETD (CAR FAULTX))) (PROG ((MACVAL (GETP (CAR FAULTX) (QUOTE
MACRO)))) (AND MACVAL (NOT (EDITFINDP MACVAL (QUOTE ASSEMBLE))) (
CLISPTRAN FAULTX (COND ((FMEMB (CAR MACVAL) (QUOTE (LAMBDA NLAMBDA)))
(CONS MACVAL (CDR FAULTX))) ((AND (CAR MACVAL) (ATOM (CAR MACVAL)))
(EVALA (CADR MACVAL) (LIST (CONS (CAR MACVAL) (CDR FAULTX))))) (T
(SUBPAIR (CAR MACVAL) (CDR FAULTX) (CADR MACVAL))))) (RETURN FAULTX)))))))
(ADDTOVAR USERMACROS ((?= NIL (ORR ((E (PROG (X Y) (FOR X IN (ARGLIST
(## 1)) AS Y IN (## 2 UP) DO (PRIN1 X T) (PRIN1 " = " T) (PRINT Y
T))))) ((E (QUOTE ?=?))))) (!← NIL !0) (EF NIL (ORR ((E (APPLY* (QUOTE
EDITF) (COND ((LISTP (## UP 1)) (## UP 1 1)) (T (## UP 1)))))) ((E
(QUOTE EF?))))) (PPT NIL (E (RESETVAR PRETTYTRANFLG T (## PP)) T))))
(ADDTOVAR PRETTYTYPELST (CHANGEDEDITMACROS EDITMACROS "edit macros")
(CHANGEDVARSLST VARS "variables") (CHANGEDPROPLST PROP "properties"))
(ADDTOVAR PRETTYMACROS (EDITMACROS X (E (MAPC (QUOTE X) (FUNCTION
(LAMBDA (Y) (PRINT (OR (CONS (QUOTE EDITMACRO) (CONS (OR (CAR (LISTP
Y)) Y) (COND ((LISTP Y) (CDAR (SOME USERMACROS (FUNCTION (LAMBDA (Z)
(AND (CADR Z) (EQ (CAR Z) (CAR Y)))))))) (T (CDDAR (SOME USERMACROS
(FUNCTION (LAMBDA (Z) (AND (NULL (CADR Z)) (EQ (CAR Z) Y))))))))))
(ERROR Y "not an editmacro"))) (PRINT (CONS (QUOTE EDITMACRO)))))))))
(DEFLIST (QUOTE ((EDITMACROS (LAMBDA (X Y) (AND (EQ (CAR X) Y) (CDR
X)))))) (QUOTE PRETTYTYPE)) (RPAQQ DWIMUSERFN T) (RPAQ HOST) (DEFLIST
(QUOTE ((FOR (FOREXP (LMLISPFOR FOREXP))) (≠QUOTE (QUOTEDEXPRESSION
(@1 (CAR QUOTEDEXPRESSION)))))) (QUOTE MACRO)) (/REMPROP (QUOTE FOR)
(QUOTE CLISPWORD)) (I.S.TYPE (QUOTE MAXIMUM) (QUOTE (SETQ $$VAL (MAX
$$VAL *))) -999999 (QUOTE $$VAL)))
(S-CL (RPAQQ CLVARS ((FNS CLDIFF CLCOUNT CLPARTS CLPARTITIONSN 
CLPARTITIONS CLCREATE CLINSERT CLEQUALPARTS CLBYVALENCE CLPARTITIONSL
CLEXPAND))) (DEFINEQ (CLDIFF (LAMBDA (CL1 CL2) (MAPCONC CL1 (FUNCTION
(LAMBDA (PR N) (AND (IGREATERP (SETQ N (IDIFFERENCE (CDR PR) (OR (CDR
(SASSOC (CAR PR) CL2)) 0))) 0) (LIST (CONS (CAR PR) N)))))))) (CLCOUNT
(LAMBDA (CL) (sum (CDR PR) for PR in CL))) (CLPARTS (LAMBDA (CL PARTSIZE)
(if PARTSIZE=0 then <NIL> elseif CL::1=NIL then <<<CL:1:1 ! PARTSIZE>>>
else (PROG ((SIZE (PARTSIZE- (CLCOUNT CL::1))) (MAXSIZE (MIN PARTSIZE
CL:1::1))) (FOR NEW X FROM (MAX SIZE 1) TO MAXSIZE FOR NEW PART IN
(CLPARTS (CDR CL) (IDIFFERENCE PARTSIZE X)) COLLECT FIRST (AND (NOT
(ILESSP 0 SIZE)) (CLPARTS (CDR CL) PARTSIZE)) (CONS (CONS (CAAR CL)
X) PART)))))) (CLPARTITIONSN (LAMBDA (CL N MINPARTSIZE MAXPARTSIZE)
(MAPCONC (NUMPARTITIONS (CLCOUNT CL) N MINPARTSIZE MAXPARTSIZE) (
FUNCTION (LAMBDA (PARTSIZES) (CLPARTITIONS CL PARTSIZES)))))) (
CLPARTITIONS (LAMBDA (CL PARTSIZES) (if PARTSIZES::1=NIL then <<CL>>
elseif PARTSIZES:1=0 then (FOR NEW X IN (CLPARTITIONS CL (CDR PARTSIZES))
COLLECT (CONS NIL X)) elseif PARTSIZES:1 = PARTSIZES:2 then (PROG
(N THISPART) (N←1) (THISPART←PARTSIZES:1←PARTSIZES) (while 
PARTSIZES←PARTSIZES::1 and PARTSIZES:1=THISPART do N←N+1) (if 
PARTSIZES=NIL then (RETURN (CLEQUALPARTS CL N THISPART))) (RETURN
(FOR NEW BIGPART IN (CLPARTS CL N*THISPART) AS NEW RESTPARTSLIST ←
(CLPARTITIONS (CLDIFF CL BIGPART) PARTSIZES) FOR NEW LITTLEPARTS IN
(CLEQUALPARTS BIGPART N THISPART) FOR NEW RESTPARTS IN RESTPARTSLIST
XLIST (APPEND LITTLEPARTS RESTPARTS)))) else (FOR NEW PART IN (CLPARTS
CL PARTSIZES:1) FOR NEW PARTS IN (CLPARTITIONS (CLDIFF CL PART) (CDR
PARTSIZES)) XLIST (CONS PART PARTS))))) (CLCREATE (LAMBDA (L) (PROG
(CL) (MAPC L (FUNCTION (LAMBDA (X) (SETQ CL (CLINSERT X CL))))) (RETURN
CL)))) (CLINSERT (LAMBDA (ITEM CL) (if CL=NIL then <<ITEM ! 1>> elseif
ITEM EQUALS CL:1:1 then (CL:1::1← (CL:1::1+1)) CL elseif (ORDERED
ITEM CL:1:1) then <<ITEM ! 1> ! CL> else (CL::1← (CLINSERT ITEM CL::1)))))
(CLEQUALPARTS (LAMBDA (CL NPARTS PARTSIZE) (if NPARTS=0 then ' (NIL)
elseif CL::1=NIL then (CL← (if PARTSIZE}=0 then <<CL:1:1 ! PARTSIZE>>
else NIL)) (LIST (to NPARTS collect CL)) else (FOR NEW X IN (
NUMPARTITIONS (CDAR CL) NPARTS 0 PARTSIZE) FOR NEW Y IN (CLPARTITIONS
(CDR CL) (collect (IDIFFERENCE PARTSIZE XX) for XX in X)) COLLECT
(collect (COND ((ZEROP XX) YY) (T (CONS (CONS (CAAR CL) XX) YY)))
for XX in X as YY in Y))))) (CLBYVALENCE (LAMBDA (CL) (SETQ CL (GROUPBY
(FUNCTION (LAMBDA (PR) (VALENCE (CAR PR)))) CL)) (FOR NEW I FROM 2
TO (maximum (CAR X) for X in CL) LIST (ASSOC I CL)))) (CLPARTITIONSL
(LAMBDA (CL LL) (if LL=NIL then <NIL> else (FOR NEW FP IN (CLPARTS
CL (SUMOF (CAR LL))) AS NEW RPL IS (CLPARTITIONSL (CLDIFF CL FP) (CDR
LL)) FOR NEW TP IN (CLPARTLP1 FP (CAR LL) 1) FOR NEW RP IN RPL XLIST
(CONS TP RP))))) (CLEXPAND (LAMBDA (CL) (FOR NEW X IN CL FOR NEW I
FROM 1 TO (CDR X) LIST (CAR X))))))
(S-CYCLIC (RPAQQ CYCLICVARS ((FNS VALENCE FVPARTITION1 FVPART1 MINLOOPS
MAXLOOPS SUPERATOMPARTITIONS MAXUNSATL COMPUTEFV ROWS BIVALENTPARTITIONS
TRIMZEROS TD LOOPPARTITIONS1 JLIST LPROWS CLPARTLP1 STRUCTURESWITHATOMS
NUMPARTITIONS NUMPARTITIONS' FVPARTITIONS EVENP LOOPPARTITIONS) (RECORDS
SUPERATOMPARTITION FVPARTITION LOOPPARTITION) (PROP VALENCE C H O
N CH CH2 CH3 W OH CHOH COH Y #))) (DEFINEQ (VALENCE (LAMBDA (X) (OR
(if X=NIL then 2 elseif NUMBERP X then X elseif ATOM X then GETP X
'VALENCE else FREEVALENCESIZE X) (HELP "WHAT IS VALENCE OF" X))))
(FVPARTITION1 (LAMBDA (N VL S) (COND ((NULL VL) (LIST NIL)) (T (FOR
NEW I FROM (MAX 0 (IDIFFERENCE N (sum (ITIMES SP X) for X in (CDR
VL) as SP from (ADD1 S)))) TO (MIN N (ITIMES (CAR VL) S)) AS NEW 
PARTREST IS (FVPARTITION1 (IDIFFERENCE N I) (CDR VL) (ADD1 S)) FOR
NEW FIRSTPART IN (FVPART1 I (CAR VL) S) FOR NEW RESTPART IN PARTREST
XLIST (CONS FIRSTPART RESTPART)))))) (FVPART1 (LAMBDA (N MAXSUM MAXOCCUR)
(if MAXOCCUR=0 then <NIL> else (FOR NEW I FROM (MAX 0 (IDIFFERENCE
N (ITIMES MAXSUM (SUB1 MAXOCCUR)))) TO (MIN MAXSUM N/MAXOCCUR) FOR
NEW REST IN (FVPART1 (IDIFFERENCE N (ITIMES I MAXOCCUR)) (IDIFFERENCE
MAXSUM I) (SUB1 MAXOCCUR)) XLIST (CONS I REST))))) (MINLOOPS (LAMBDA
(VALENCELIST) (MAX 0 (PROG (MXV TD) (SETQ TD (SETQ MXV 0)) (FOR NEW
X IN (CDR VALENCELIST) AS NEW VALENCE FROM 3 WHEN (NOT (ZEROP X))
DO (IF (IGREATERP VALENCE MXV) THEN (SETQ MXV VALENCE)) (SETQ TD (IPLUS
(ITIMES X VALENCE) TD))) (RETURN (IDIFFERENCE MXV (IQUOTIENT TD 2)))))))
(MAXLOOPS (LAMBDA (VALENCELIST) (MIN (CAR VALENCELIST) (FOR NEW X
IN (CDR (CDR VALENCELST)) AS NEW K FROM 4 IPLUS (ITIMES X (SUB1 (
IQUOTIENT K 2))))))) (SUPERATOMPARTITIONS (LAMBDA (CL U) (PROG (CL1
SZ MXUI VI) (SETQ CL1 (MAPCONC CL (FUNCTION (LAMBDA (PR) (AND (EQ
(VALENCE (CAR PR)) 1) (LIST PR)))))) (CL← (CLDIFF CL CL1)) (SZ← (CLCOUNT
CL)) (FOR NEW PARTSIZE FROM 2 TO SZ FOR NEW VHAT IN (CLPARTS CL PARTSIZE)
AS NEW REMATS ← (APPEND CL1 (CLDIFF CL VHAT)) FOR NEW #PARTS FROM
1 TO (IQUOTIENT PARTSIZE 2) FOR NEW PARTITION IN (CLPARTITIONSN VHAT
#PARTS 2) AS NEW VI IS (CLCREATE PARTITION) AS NEW MXUI IS (MAXUNSATL
VI (COND ((AND (NULL REMATS) (NULL (CDR PARTITION))) U))) FOR NEW
UI IN (NUMPARTITIONS' U 1 MXUI (collect CDR in VI)) XLIST (create
SUPERATOMPARTITION REMAININGATOMS ← REMATS SUPERATOMPARTS ← (CLCREATE
(collect (CONS Y X) for X in (CLEXPAND VI) as Y in UI))))))) (MAXUNSATL
(LAMBDA (PC U) (* Note U is either NIL (normal) or it is equal to
the unsaturation in the case where remats is NIL and there is only
one part here) (MAPCAR PC (FUNCTION (LAMBDA (PARTNUM) (PROG (N TD
M) (SETQ N (SETQ TD (SETQ M 0))) (for PR in (CAR PARTNUM) do (SETQ
N (IPLUS N (CDR PR))) (SETQ TD (IPLUS TD (ITIMES (CDR PR) (VALENCE
(CAR PR))))) (SETQ M (MAX M (VALENCE (CAR PR))))) (SETQ N (IDIFFERENCE
(IPLUS 2 TD) (ITIMES 2 N))) (RETURN (IQUOTIENT (IPLUS N (MIN (COND
((AND U (EQ (ITIMES U 2) N)) 0) (T -1)) (IDIFFERENCE TD (ITIMES 2
M)))) 2)))))))) (COMPUTEFV (LAMBDA (U CL) (PROG (TD N) (TD←N←0) (MAPC
CL (FUNCTION (LAMBDA (PR) (SETQ TD (IPLUS (ITIMES (VALENCE (CAR PR))
(CDR PR)) TD)) (SETQ N (IPLUS (CDR PR) N))))) (RETURN (IDIFFERENCE
(IPLUS 2 TD) (ITIMES 2 (IPLUS N U))))))) (ROWS (LAMBDA (LL) (if LL=NIL
then ' (NIL) else < (collect CAR in LL) ! (ROWS (collect CDR in LL::1))
>))) (BIVALENTPARTITIONS (LAMBDA (VL) (NUMPARTITIONS VL:1 (sum (ITIMES
I X) for I from 3 as X in (CDR VL)) /2 0 VL:1))) (TRIMZEROS (LAMBDA
(L) (* RETURNS NIL IF L IS ALL ZEROS , AND THE TAIL OF L WHICH IS
NOT ALL ZEROS OTHERWISE) (PROG (TEM) (if L and (TEM← (TRIMZEROS L::1)
or L:1}=0) then <L:1 ! TEM>)))) (TD (LAMBDA (VL J) (sum (ITIMES K
(CAR VL)) on old VL as K from J))) (LOOPPARTITIONS1 (LAMBDA (P VL
J) (if VL=NIL then <NIL> else (FOR NEW PJ FROM (MAX 0 (IDIFFERENCE
P (MAXREST VL J))) TO (MIN P (J/2-1) *VL:1) AS NEW RESTL ← (
LOOPPARTITIONS1 (IDIFFERENCE P PJ) (CDR VL) (ADD1 J)) FOR NEW THISPART
IN (FVPART1 PJ (CAR VL) (SUB1 (IQUOTIENT J 2))) FOR NEW RESTPART IN
RESTL XLIST (CONS THISPART RESTPART))))) (JLIST (LAMBDA (LL N) (if
LL=NIL then NIL elseif LL::1=NIL then < (CAR (NTH LL:1 N)) > else
< (CAR (NTH LL:1 N)) ! (JLIST LL::2 N+1) >))) (LPROWS (LAMBDA (LPP
VL) (SETQ LPP (CONS NIL LPP)) (for S from 4 as V in (CONS (CAR VL)
(for V2 in (CDR VL) as PL in LPP collect (IDIFFERENCE V2 (SUMOF PL))))
collect (CONS V (JLIST (SETQ LPP (CDR LPP)) (SUB1 (IQUOTIENT S 2)))))))
(CLPARTLP1 (LAMBDA (CL ROW N) (COND ((NULL ROW) (LIST NIL)) ((ZEROP
(CAR ROW)) (CLPARTLP1 CL (CDR ROW) (ADD1 N))) (T (FOR NEW EP IN (CLPARTS
CL (ITIMES N (CAR ROW))) AS NEW RPL ← (CLPARTLP1 (CLDIFF CL EP) ROW::1
N+1) FOR NEW EEP IN (CLEQUALPARTS EP ROW:1 N) FOR NEW RP IN RPL XLIST
(APPEND (CLCREATE EEP) RP)))))) (STRUCTURESWITHATOMS (LAMBDA (CLL
STRUC) (FOR NEW L IN (LLABELNODES STRUC (LCDRLIST CLL)) COLLECT (
INSERTMARKERS (COPYSTRUC (FETCH LSTRUC OF L)) CLL (FETCH LABELED OF
L))))) (NUMPARTITIONS (LAMBDA (N NUMPARTS MINPART MAXPART) (COND ((EQ
NUMPARTS 1) (COND ((OR (IGREATERP MINPART N) (AND MAXPART (ILESSP
MAXPART N))) NIL) (T (LIST (LIST N))))) (T (FOR NEW I FROM (MAX MINPART
(IDIFFERENCE N (ITIMES (SUB1 NUMPARTS) MAXPART))) TO (if MAXPART then
(MIN MAXPART N/NUMPARTS) else N/NUMPARTS) FOR NEW RESTPART IN (
NUMPARTITIONS (IDIFFERENCE N I) (SUB1 NUMPARTS) I MAXPART) XLIST (CONS
I RESTPART)))))) (NUMPARTITIONS' (LAMBDA (U MN MAXIMA OCCURLIST) (COND
((NULL (CDR OCCURLIST)) (NUMPARTITIONS U (CAR OCCURLIST) MN (CAR MAXIMA)))
(T (FOR NEW FIRSTPART FROM (MAX MN (IDIFFERENCE (IDIFFERENCE (CIELING
U) (ITIMES (SUB1 (CAR OCCURLIST)) (CAR MAXIMA))) (sum (ITIMES X Y)
for X in (CDR MAXIMA) as Y in (CDR OCCURLIST)))) TO (MIN (CAR MAXIMA)
(IQUOTIENT (IDIFFERENCE U (SUMOF (CDR OCCURLIST))) (CAR OCCURLIST)))
FOR NEW RESTPART IN (COND ((EQ (CAR OCCURLIST) 1) (NUMPARTITIONS'
(IDIFFERENCE U FIRSTPART) 1 (CDR MAXIMA) (CDR OCCURLIST))) (T (
NUMPARTITIONS' (IDIFFERENCE U FIRSTPART) FIRSTPART MAXIMA (CONS (SUB1
(CAR OCCURLIST)) (CDR OCCURLIST))))) XLIST (CONS FIRSTPART RESTPART))))))
(FVPARTITIONS (LAMBDA (FV VL) (FOR NEW FVP IN (FVPARTITION1 FV (CDR
VL) 1) AS NEW FVR IS (ROWS FVP) COLLECT (create FVPARTITION FVR←FVR
NEWVL ← (collect (IDIFFERENCE (IPLUS V (SUMOF ROW)) (SUMOF COL)) for
ROW in FVR as COL in (CONS NIL FVP) as V in VL))))) (EVENP (LAMBDA
(X) (ZEROP (IREMAINDER X 2)))) (LOOPPARTITIONS (LAMBDA (P VL) (FOR
NEW LPP IN (LOOPPARTITIONS1 P (CDDR VL) 4) AS NEW ROWS IS (LPROWS
LPP VL) AS NEW NEWVL IS (CONS (SUMOF (CDAR ROWS)) (MAPCAR (CDR ROWS)
(FUNCTION SUMOF))) XLIST (FOR NEW K FROM 0 TO (MIN (IDIFFERENCE (CAR
VL) P) (IQUOTIENT (TD (CDR NEWVL) 3) 2)) FOR NEW BP IN (NUMPARTITIONS
(CAR VL) (IPLUS P K) 1 NIL) AS NEW CLBP IS (CLCREATE BP) FOR NEW EL
IN (CLPARTS CLBP K) FOR NEW LPL IN (CLPARTITIONSL (CLDIFF CLBP EL)
(CDRLIST ROWS)) XLIST (create LOOPPARTITION LOOPVL ← NEWVL EDGELABELS
← EL LOOPLABELS ← LPL)))))) (RECORD SUPERATOMPARTITION (SUPERATOMPARTS
. REMAININGATOMS)) (RECORD FVPARTITION (NEWVL . FVR)) (RECORD 
LOOPPARTITION (LOOPVL EDGELABELS . LOOPLABELS)) (DEFLIST (QUOTE ((C
4) (H 1) (O 2) (N 3) (CH 3) (CH2 2) (CH3 1) (W 2) (OH 1) (CHOH 2)
(COH 3) (Y 3) (# 2))) (QUOTE VALENCE)))
(S-DICT (RPAQQ DICTVARS ((FNS ENTER LOOKUP MAKTAB WRITESOME PUSHCAR
WRITEALL WRITEDICT WRITESOME1) (VARS DICTIONARYLST))) (DEFINEQ (ENTER
(LAMBDA (PTR DICT VAL) (* ENTER value into dictionary - VAL is the
value, PTR is the return from LOOKUP (which should be (LIST ARGS))
and DICT is the dictionary in which PTR is contained (needed to get
the file name, and the number in core verses the max in core allowed))
(FRPLACA (CDR DICT) (ADD1 (CADR DICT))) (* Bump the incore counter)
(FRPLACD PTR (CONS NIL VAL)) (WRITESOME DICT))) (LOOKUP (LAMBDA (VARS
DICT) (* LOOKUP VARS on the dictionary DICT) (AND DICT (PROG ((FND
(SASSOC VARS (CDDDR DICT))) FIL) (* Use saccoc to find entry, if any)
(COND ((NOT FND) (* If no entry, just insert empty entry in the 
dictionary and return) (SETQ FND (LIST VARS)) (FRPLACD (CDDR DICT)
(CONS FND (CDDDR DICT))) (RETURN FND))) (PUSHCAR (CDDR DICT) (NLEFT
(CDDR DICT) 1 (FMEMB FND (CDDDR DICT)))) (* MOVE the found entry to
the front of the dictionary) (COND ((NOT (CDR FND)) (* If no file
pointer, then this was an empty entry (only possible for an aborted
computation)) (RETURN FND)) ((NOT (CDDR FND)) (COND ((NOT (CADR FND))
(* No value, no ptr, but a ptr place -- this is a funny situation
again, but might happen if abort occurs) (FPLACD FND NIL) (RETURN
FND))) (* Read in from file, bump incore counter, and check if too
many incore, writing outsome; then return the value) (SFPTR (SETQ
FIL (OR (OPENP (CAR DICT)) (IOFILE (CAR DICT)))) (CADR FND)) (FRPLACD
(CDR FND) (READ FIL)) (FRPLACA (CDR DICT) (ADD1 (CADR DICT))) (WRITESOME
DICT) (RETURN FND)) (T (* It's already in core) (RETURN FND)))))))
(MAKTAB (LAMBDA (FN MAXCORE) (* Fix up FN so that it uses a dictionary
called FIL (which is also the file name that it uses) - If FIL is
NIL, use the FN name - MAXCORE is the maximum number of dictionary
entries that can reside in core) (PROG ((VARS (ARGLIST FN)) (FIL (PACK
(LIST (NAMEFIELD FN) (QUOTE ".DICT"))))) (COND ((MEMB FN DICTIONARYLST)
(ERROR FN "ALREADY HAS A DICTIONARY"))) (COND ((CDR VARS) (SETQ VARS
(CONS (QUOTE LIST) VARS))) (T (SETQ VARS (CAR VARS)))) (* VARS will
be the expression that is to be looked up - Usually (LIST <ARGLIST
FN>) but if there is only one ARG to FN, will use it alone) (ADVISE
FN (QUOTE BIND) (LIST (LIST (QUOTE TEM) (LIST (QUOTE LOOKUP) VARS
FN)))) (* The function will look like - (tem← (LOOKUP <ARGS> <DICT>))
(if (CDR TEM) then (RETURN (CDDR TEM)) else <compute function> (ENTER
TEM FN !VALUE))) (ADVISE FN (QUOTE BEFORE) (QUOTE (COND ((CDR TEM)
(RETURN (CDDR TEM)))))) (ADVISE FN (QUOTE AFTER) (LIST (QUOTE COND)
(LIST (QUOTE (NOT (CDR TEM))) (LIST (QUOTE ENTER) (QUOTE TEM) FN (QUOTE
!VALUE))))) (* Open FN file, and set up incore dictionary) (RPAQ 
DICTIONARYLST (CONS FN DICTIONARYLST)) (/SET FN (COND ((INFILEP (PACK
(LIST FN ".INDEX"))) (READFILE (PACK (LIST FN ".INDEX")))) (T (LIST
(IOFILE (OR (INFILEP FIL) (OUTFILEP FIL))) 0 (OR MAXCORE 10))))))))
(WRITESOME (LAMBDA (DICT CNT) (* If the number of incore entries exceeds
the max incore entries, look for the first incore entry that is followed
by one not in core - Delete the incore value (writing it out if it's
not already on file) , and decrement the incore counter) (AND (NOT
(ILESSP (CADR DICT) (OR CNT (CADDR DICT)))) (WRITESOME1 (CDDDR DICT))
(FRPLACA (CDR DICT) (SUB1 (CADR DICT)))))) (PUSHCAR (LAMBDA (L1 L2)
(* PUSH (CADR L2) after (CAR L1) - L2 is a tail of L1 - Sort of 
complicated) (OR (EQ L1 L2) (PROG (TEM) (SETQ TEM (CDR L1)) (FRPLACD
L1 (CDR L2)) (FRPLACD L2 (CDDR L2)) (FRPLACD (CDR L1) TEM))))) (WRITEALL
(LAMBDA (DICT) (PROG NIL LP (COND ((NOT (WRITESOME DICT 0)) (RETURN))
(T NIL)) (GO LP)))) (WRITEDICT (LAMBDA (FN) (COND ((NULL FN) (MAPC
DICTIONARYLST (FUNCTION WRITEDICT))) ((MEMB FN DICTIONARYLST) (WRITEALL
(CAR FN)) (WRITEFILE (CAR FN) (PACK (LIST FN ".INDEX"))))))) (WRITESOME1
(LAMBDA (DICTL) (* Tries to write out the last possible DICT element
- Should be the one referenced least recently) (COND ((NULL DICTL)
(* End of list, back up) NIL) ((WRITESOME1 (CDR DICTL)) (* First try
on CDR, if sucessful, return) T) ((CDDR (CAR DICTL)) (* This is the
last entry that has a value in it) (COND ((NULL (CADAR DICTL)) (*
If it hasn't been written out on a file, the ptr field will be NIL)
(PROG (POS (FIL (CAR DICT))) (* Get the file name from DICT) (SFPTR
(SETQ FIL (OR (OPENP FIL (QUOTE OUTPUT)) (IOFILE FIL))) -1) (* Set
file pointer to end of file) (SETQ POS (SFPTR FIL)) (* And save the
pointer so that it can be entered into the DICT) (PRINT (CDDR (CAR
DICTL)) FIL) (* Write out value on the file) (FRPLACA (CDAR DICTL)
POS) (* Insert file pointer in dictionary)))) (FRPLACD (CDR (CAR DICTL))
NIL)))))) (RPAQ DICTIONARYLST))
(S-DRAW (RPAQQ DRAWVARS ((FNS DRAW PRINN DRAWS GENLET) (VARS STRUCNUM)))
(DEFINEQ (DRAW (LAMBDA (STRUC RAD) (PROG (O CTAB) (OUTFILE (SETQ O
(OUTFILEP (QUOTE FOR01.DAT;T)))) (COND ((STRUCTURE? STRUC) (DRAWS
STRUC)) ((STRUCTURE? (CAR STRUC)) (MAPC STRUC (FUNCTION DRAWS))) ((EQ
RAD T) (PRINRAD STRUC)) ((EQ RAD (QUOTE L)) (MAPC STRUC (FUNCTION
PRINRAD))) ((EQ RAD (QUOTE AL)) (MAPC STRUC (FUNCTION (LAMBDA (S)
(COND ((STRUCTURE? (CDR S)) (DRAWS (CDR S) (LIST (QUOTE STRUCTURE)
(QUOTE #) (CAR S)))) (T (PRINRAD (CDR S) (LIST (CONS "STRUCTURE #"
(CAR S)))))))))) (T (CLOSEF O) (ERROR!))) (CLOSEF O) (KFORK (SUBSYS
(QUOTE DRAW)))))) (PRINN (LAMBDA (N L) (SPACES (IDIFFERENCE L (NCHARS
N))) (PRIN1 N))) (DRAWS (LAMBDA (STRUC ID) (PROG (CTAB) (SETQ XLATETAB
NIL) (SETQ CTAB (FETCH CTABLE OF STRUC)) (PRINN (LENGTH CTAB) 5) (TERPRI)
(MAPC CTAB (FUNCTION (LAMBDA (CTE) (PRINENTRY (FETCH NODENUM OF CTE)
(FETCH ATOMTYPE OF (FETCH MARKERS OF CTE)) (FETCH NBRS OF CTE)))))
(PRIN1 " ") (PRINT (OR ID (FETCH UGRAPH OF STRUC))) (IF XLATETAB THEN
(FOR NEW PR IN XLATETAB DO (SPACES 1) (PRIN1 (CAR PR)) (PRIN1 " = ")
(PRINT (CDR PR)))) (PRINT (QUOTE END*))))) (GENLET (LAMBDA (AT) (OR
(FOR NEW PR IN XLATETAB OR (AND (EQUAL AT (CDR PR)) (CAR PR))) (CAAR
(SETQ XLATETAB (CONS (CONS (FIND LET IN (QUOTE (X Y Z W # & ← ≠ !
, ? V U T R Q P M L K J I G F E D B A N O C H)) SUCHTHAT (ASSOC LET
XLATETAB)) AT) XLATETAB))))))) (RPAQ STRUCNUM 0))
(S-EXAMPLE (RPAQQ EXAMPLEVARS ((FNS EXAMPLE SELECT SELECTL SELECTLL
EDGES EXAMPLELLABELNODES EXAMPLELABELFV EXAMPLELABELEDGES 1ATRAND
SPLIT) (VARS EXAMPLEFIXED) (USERMACROS RX X DE))) (DEFINEQ (EXAMPLE
(LAMBDA (X) (if STRUCTURE? X then X elseif STRUCLIST? X then (EXAMPLE
(1ATRAND X::2)) elseif NOFORMIN X then X elseif EXAMPLEFIXED then
(PROG (Y) (EDITE X ' (RX)) (Y← (GENAPPLY X FIXEDFNLIST)) (if X }EQUAL
Y then Y← (EXAMPLE Y)) (RETURN Y)) else (UNDONLSETQ (PROG (Y (
EXAMPLEFIXED T)) (/SET '#UNDOSAVES 10000) (ADVISE (OR (GETP (FORM
X) :1 'DESCENDANTS) (UNION (FORM X) :1 ' (SUPERATOMPARTITIONS MOLECULES
SUPERATOMS RINGS RINGSKELETONS NOFVRINGS DAISIES NUMPARTITIONS 
BIVALENTPARTITIONS KLOOPEDRINGS PERMRADS GENMOL))) 'AFTER ' (RETURN
(LIST (1ATRAND !VALUE)))) (ADVISE 'LABELEDGES 'BEFORE ' (RETURN (
EXAMPLELABELEDGES STRUC LABELS))) (ADVISE 'LABELFV 'BEFORE ' (RETURN
(EXAMPLELABELFV STRUC LABELS))) (ADVISE 'LLABELNODES 'BEFORE ' (RETURN
(EXAMPLELLABELNODES STRUC LLABELS))) (X← <'DONE ! (COPY (EXAMPLE X))
>) (ERROR!))) (if X:1='DONE then X::1 else (ERROR!))))) (SELECT (LAMBDA
(L N) (NLEFT L N))) (SELECTL (LAMBDA (FETCH OBJ OF LNUM) (PROG (X)
(RETURN (if LNUM=NIL then NIL else < (CAR (X← (SPLIT OBJ LNUM:1)))
! (SELECTL X::1 LNUM::1) >))))) (SELECTLL (LAMBDA (LOBJ LLNUM) (if
LOBJ=NIL or LLNUM=NIL then NIL else < (SELECTL LOBJ:1 LLNUM:1) ! (
SELECTLL LOBJ::1 LLNUM::1) >))) (EDGES (LAMBDA (STRUC) (FOR NEW CT
IN (FETCH CTABLE OF STRUC) FOR NEW N IN (FETCH NBRS OF CT) WHEN (NOT
(IGREATERP (FETCH NODENUM OF CT) N)) XLIST (CONS (FETCH NODENUM OF
CT) N)))) (EXAMPLELLABELNODES (LAMBDA (STRUC LLABELS) < (create LABELING
LSTRUC ← (create REUSING using STRUC GROUP ← NIL) LABELED ← (SELECTLL
(LISTBYVALENCE STRUC) LLABELS)) >)) (EXAMPLELABELFV (LAMBDA (STRUC
LABELS) < (create LABELING LABELED ← (SELECTL (COLLECTFV STRUC) LABELS)
LABELS LSTRUC ← (create STRUCTURE using STRUC GROUP ← NIL)) >)) (
EXAMPLELABELEDGES (LAMBDA (STRUC LABELS) < (create LABELING LABELED
← (SELECTL (EDGES STRUC) LABELS) LSTRUC ← (create STRUCTURE using
STRUC GROUP ← NIL)) >)) (1ATRAND (LAMBDA (L) (CAR (NTH L (RAND 1 (LENGTH
L)))))) (SPLIT (LAMBDA (L N) (* Returns a pair of lists, (l1 . l2)
WHERE l1 is a list of elements of L, of length N, and l2 is the 
REMAINDER) (if L=NIL then <NIL> elseif N=0 then <NIL ! L> elseif N=
(LENGTH L) then <L> elseif (RAND 1 (LENGTH L)) LE N then ((LAMBDA
(Z) Z:1← <L:1 ! Z:1>) (SPLIT L::1 N-1)) else ((LAMBDA (Z) Z::1← <L:1
! Z::1>) (SPLIT L::1 N)))))) (RPAQQ EXAMPLEFIXED NIL) (ADDTOVAR 
USERMACROS ((RX (M RX MARK (LCL (LPQ F STRUCFORM UP (I 1 (EXAMPLE
(## 1))))) ←←)) (X (M X RX UP (I 1 (EXAMPLE (## 1))) 1)) (DE (M DE
(E (DRAW (EXAMPLE (##)) T) T))))))
(S-EXPAND (RPAQQ EXPANDVARS ((FNS GENAPPLY FIXFN UNFIXFN ISFORM 
GENEXPANSION MAKELIST GETVAL MAKEMAKEFORM TURNON TURNOFF NOFORMIN
STRUCINCL STRUCINLIST WHERE PRINNUMLIS STATE ORR STRUCLIST? GETFILENAM)
(RECORDS STRUCLIST) (VARS FIXEDFNLIST) (USERMACROS UPFORM EXPAND !EXPAND
ISFORM NEXTFORM NEXFORM GROUP !!EXPAND FORMNOFORM DRAWS DRAW Q SLEVEL
MAC @ # ARGS ≠ D SWHICH FN W DO WW COMMANDS SAVERESULT FORGET)))
(DEFINEQ (GENAPPLY (LAMBDA (FORM GOLIST) (PROG (ALIST (FORM (FETCH
FORM OF FORM))) (SETQ ALIST (collect (LIST (GETP V (QUOTE EXPANDFLAG)))
for V in (CONS (CAR FORM) GOLIST))) (FORM← <FORM:1 ! (collect (KWOTE
X) for X in (CDR FORM)) >) LP (RETURN (SELECTQ (GETVAL (CAR FORM))
(STRUC (EVALA FORM ALIST)) (LSTRUC (MAKELIST (EVALA FORM ALIST)))
(HELP)))))) (FIXFN (LAMBDA (FN VALTYPE STRUCCHECK CONDITIONS) (COND
((NOT (GETD FN)) (ERROR FN "NOT A FUNCTION"))) (PROG ((VALTYPE (GETVAL
FN VALTYPE)) (FNFLAG (OR (GETP FN (QUOTE EXPANDFLAG)) (/PUT FN (QUOTE
EXPANDFLAG) (PACK (LIST FN (GENSYM)))))) (FIXED (GETP FN (QUOTE FIXED)))
CHECKVAR CONDITION (WT (TIMES 2 DWIMWAIT))) (COND (FIXED (PRIN1 FN)
(PRIN1 " ALREADY FIXED.
EDIT INSTEAD:") (PRINT FIXED) (EDITE FIXED) (RETURN FN))) (SET FNFLAG
T) (SETQ FIXED (LIST FNFLAG)) (COND ((NUMBERP (SETQ CHECKVAR (OR 
STRUCCHECK (PROGN (PRIN1 FN) (PRIN1 " CHECK FOR STRUCFORM IN ") (PRIN1
(ARGLIST FN)) (PRIN1 "?") (APPLY (QUOTE Y/N) (LIST (CONS (QUOTE (N
. O)) (FOR NEW Z IN (ARGLIST FN) AS I FROM 1 COLLECT (CONS I (CONCAT
" " Z)))))))))) (SETQ FIXED (CONS (LIST (QUOTE STRUCFORM?) (CAR (NTH
(ARGLIST FN) CHECKVAR))) FIXED)))) (COND (CONDITIONS (SETQ FIXED (REMOVE
NIL (APPEND CONDITIONS FIXED)))) (T (PROG NIL (PRIN1 
"ADD EXTRA CONDITION?") WTLP (COND ((MINUSP (SETQ WT (SUB1 WT))) (PRIN1
"...NIL
") (RETURN NIL)) ((READP T)) (T (DISMISS 500) (GO WTLP))) LP (COND
((SETQ CONDITION (READ T)) (SETQ FIXED (CONS CONDITION FIXED)) (PRIN1
"CONDITION? ") (GO LP)))))) NOEXTRA (/PUT FN (QUOTE FIXED) (SETQ FIXED
(LIST (QUOTE COND) (LIST (COND ((CDR FIXED) (CONS (QUOTE OR) FIXED))
(T (CAR FIXED))) (LIST (QUOTE RETURN) (SELECTQ VALTYPE (LSTRUC (LIST
(QUOTE LIST) (MAKEMAKEFORM FN))) (MAKEMAKEFORM FN))))))) (ADVISE FN
(QUOTE BEFORE) FIXED) (SETQ FIXEDFNLIST (CONS FN FIXEDFNLIST))) FN))
(UNFIXFN (LAMBDA (FN) (/RPLACD (GETP FN (QUOTE FIXED))) (/REMPROP
FN (QUOTE VALTYPE)) (/REMPROP FN (QUOTE EXPANDFLAG)))) (ISFORM (LAMBDA
(AT) (STRUCFORM? EXPRESSION))) (GENEXPANSION (LAMBDA (FORM 0FORM UPFORM)
(if (NUMBERP 0FORM::1) then (MAKELIST (collect (LSUBST (CLCREATE L)
0FORM UPFORM) for L in (GROUPRADS (LIST (CONS (CDDR FORM) (CDR 0FORM))))))
else if (STRUCLIST? UPFORM) then (LSUBST (FETCH LISTED-THINGS OF FORM)
FORM UPFORM) else (MAKELIST (collect (SUBST L FORM UPFORM) for L in
(CDDR FORM)))))) (MAKELIST (LAMBDA (MAKELISTVAR) ((LAMBDA (L) (IF
(CDR L) THEN (CREATE STRUCLIST LISTED-THINGS ← L) ELSE (CAR L))) (
MAPCONC MAKELISTVAR (FUNCTION (LAMBDA (Y) (IF (STRUCLIST? Y) THEN
(APPEND (FETCH LISTED-THINGS OF Y)) ELSE (LIST Y)))))))) (GETVAL (LAMBDA
(FN VALTYPE) (OR (AND (NOT VALTYPE) (GETP FN (QUOTE VALTYPE))) (/PUT
FN (QUOTE VALTYPE) (SELECTQ (OR VALTYPE (PROGN (PRIN1 FN) (PRIN1 
" VALUE TYPE (LIST/SINGLE)?") (Y/N ((L . IST) (S . INGLE))))) (L (QUOTE
LSTRUC)) (QUOTE STRUC)))))) (MAKEMAKEFORM (LAMBDA (FN) (CONS (QUOTE
LIST) (CONS (QUOTE (QUOTE STRUCFORM)) (CONS (KWOTE FN) (ARGLIST FN))))))
(TURNON (LAMBDA (FN) (COND ((NOT FN) (SETQ FN FIXEDFNLIST))) (COND
((ATOM FN) (COND ((NOT (GETP FN (QUOTE FIXED))) (FIXFN FN))) (/SET
(GETP FN (QUOTE EXPANDFLAG))) FN) (T (MAPCAR FN (FUNCTION TURNON))))))
(TURNOFF (LAMBDA (FN) (COND ((NOT FN) (SETQ FN FIXEDFNLIST))) (COND
((ATOM FN) (COND ((NOT (GETP FN (QUOTE FIXED))) (FIXFN FN))) (/SET
(GETP FN (QUOTE EXPANDFLAG)) T) FN) (T (MAPCAR FN (FUNCTION TURNOFF))))))
(NOFORMIN (LAMBDA (X) (OR (NLISTP X) (AND (NOT (STRUCFORM? X)) (EVERY
(CDR X) (FUNCTION NOFORMIN)))))) (STRUCINCL (LAMBDA (CL) (SOME CL
(FUNCTION (LAMBDA (X) (STRUCFORM? (CAR X))))))) (STRUCINLIST (LAMBDA
(LIST) (SOME LIST (FUNCTION (LAMBDA (ITEM) (STRUCFORM? ITEM))))))
(WHERE (LAMBDA (EXPRESSION) (PRIN1 "LEVEL ") (PRIN1 LEVEL) (COND ((LISTP
WHICH) (PRIN1 (COND ((EQ (SUB1 LEVEL) (CDR WHICH)) ", #") (T " WITHIN #")))
(PRIN1 (CAR WHICH)) (PRIN1 " AT LEVEL ") (PRIN1 (CDR WHICH)))) (COND
((STRUCLIST? EXPRESSION) (PROG (FORMS LISTS OTHER STRUCS) (FOR NEW
X IN (FETCH LISTED-THINGS OF EXPRESSION) AS NEW I FROM 1 DO (IF (
STRUCLIST? X) THEN (SETQ LISTS (CONS I LISTS)) ELSEIF (STRUCFORM?
X) THEN (SETQ FORMS (CONS I FORMS)) ELSEIF (STRUCTURE? X) THEN (SETQ
STRUCS (CONS I STRUCS)) ELSE (SETQ OTHER (CONS I OTHER)))) (IF FORMS
THEN (PRIN1 ", FORMS:") (PRINNUMLIS FORMS)) (IF LISTS THEN (PRIN1
", SUBLISTS:") (PRINNUMLIS LISTS)) (IF STRUCS THEN (PRIN1 ", STRUCTURES:")
(PRINNUMLIS STRUCS)) (IF OTHER THEN (PRIN1 ", RADS?:") (PRINNUMLIS
OTHER)) (TERPRI))) ((STRUCFORM? EXPRESSION) (PRIN1 ", ") (PRIN1 (CAR
(FORM EXPRESSION))) (PRIN1 " EXPRESSION
")) ((STRUCTURE? EXPRESSION) (PRIN1 ", STRUCTURE.
")) (T (PRIN1 ", RADICAL.
"))))) (PRINNUMLIS (LAMBDA (X) (SETQ X (REVERSE X)) (PROG (LST) (PRIN1
(SETQ LST (CAR X))) (FOR X ON (CDR X) AS NEW FLG IS NIL DO (FOR X
ON X WHILE (EQ (CAR X) (SETQ LST (ADD1 LST))) DO (SETQ FLG (CAR X)))
(COND (FLG (PRIN1 "-") (PRIN1 FLG))) (COND (X (PRIN1 ",") (PRIN1 (SETQ
LST (CAR X))))))))) (STATE (LAMBDA (FN) (COND ((NOT FN) (SETQ FN 
FIXEDFNLIST))) (COND ((LISTP FN) (MAPCAR FN (FUNCTION STATE))) (T
(CONS FN (CONS (QUOTE IS) (SELECTQ (EVALV (GETP FN (QUOTE EXPANDFLAG)))
(T (QUOTE (OFF))) (NIL (QUOTE (ON))) (NOBIND (QUOTE (NOT FIXED)))
(QUOTE (IN SOME WIERD STATE))))))))) (ORR (NLAMBDA X (EVAL (LIST (QUOTE
PROG) (QUOTE ((HELPFLAG))) (LIST (QUOTE RETURN) (LIST (QUOTE CAR)
(CONS (QUOTE OR) (MAPCAR X (FUNCTION (LAMBDA (Z) (LIST (QUOTE NLSETQ)
Z))))))))))) (STRUCLIST? (LAMBDA (X) (AND (STRUCFORM? X) (EQ (LISTID
X) (QUOTE LIST))))) (GETFILENAM (LAMBDA (IO) (SELECTQ IO ((I INPUT)
(INFILEP (PROGN (PRIN1 "INPUT FILE? " T) (READ T)))) (OUTFILEP (PROGN
(PRIN1 "OUTPUT FILE? " T) (READ T))))))) (RECORD STRUCLIST (SFID LISTID
. LISTED-THINGS) DEFAULT SFID← (QUOTE STRUCFORM) LISTID← (QUOTE LIST))
(RPAQ FIXEDFNLIST) (ADDTOVAR USERMACROS ((UPFORM NIL 0 (← STRUCFORM))
(EXPAND NIL (ORR ((IF (STRUCLIST? (##)) ((BIND (E (SETQ #1 (GENEXPANSION
(##) (## !0) (## UPFORM))) T) UPFORM (BI 1 -1) (I 1 #1) (BO 1))) ((IF
(STRUCFORM? (##)) ((BIND (S #1) UP MARK ↑ (I E (PROG1 NIL (/DSUBST
(GENAPPLY (## ← 1)) (## ← 1) (##))) T) ←← 1 (E (COND ((EQUAL (##)
#1) (PRIN1 "NOTHING DONE.
"))) T))))))) ((E (QUOTE CAN'T))))) (!EXPAND NIL (ORR ((IF (STRUCLIST?
(##)) ((BIND (E (SETQ #1 (GENEXPANSION (##) (## !0) (## UPFORM)))
T) UPFORM (BI 1 -1) (I 1 #1) (BO 1))) ((IF (STRUCFORM? (##)) (UP MARK
↑ (I E (PROG1 NIL (/DSUBST (GENAPPLY (## ← 1) FIXEDFNLIST) (## ← 1)
(##))) T) ←← 1))))) ((E (QUOTE CAN'T))))) (ISFORM NIL (IF (STRUCFORM
(##)))) (NEXTFORM NIL (ORR (F STRUCFORM) (UPFORM))) (NEXFORM NIL (ORR
(ISFORM) (NEXTFORM))) ((GROUP) (X Y) (COMS (SUBPAIR (QUOTE (Z W))
(LIST (IPLUS X 2) (IPLUS Y 2)) (QUOTE (EMBED (Z THRU W) IN STRUCFORM
LIST))))) (!!EXPAND NIL (LCL (LPQ ↑ FORMNOFORM !EXPAND))) (FORMNOFORM
NIL (LC STRUCFORM (IF (NOFORMIN (CDR (##)))))) ((DRAWS) X (E (DRAW
(## . X)))) ((DRAW) X (E (DRAW (## . X) T))) (Q NIL (MBD QUOTE)) (SLEVEL
NIL MARK (E (SETQ LEVEL 0) T) (LPQ UPFORM (E (SETQ LEVEL (ADD1 LEVEL))
T)) ←←) ((MAC) Z (COMS ((LAMBDA (X) (PROGN (*FILEADD (QUOTE (EDITMACRO))
X) (/PUT X (QUOTE EDITMACRO) (QUOTE (M . Z))))) (COND ((ATOM (CAR
(QUOTE Z))) (CAR (QUOTE Z))) (T (CAAR (QUOTE Z))))))) (@ NIL UP 1
SWHICH SLEVEL (E (WHERE (##)) T)) ((#) (X) (IF (NUMBERP (QUOTE X))
((COMS (IPLUS X 2))) (E (QUOTE ?)))) (ARGS NIL (E (CDR (##)))) (≠
NIL FORMNOFORM) (D NIL (LCL NEXTFORM)) (SWHICH NIL MARK (ORR ((E (SETQ
WHICH) T) (LC UP (E (SETQ WHICH (LENGTH (##))) T) 0 (IF (STRUCLIST?
(##)) (NIL) ((E (ERROR!) T)))) (E (SETQ WHICH (IPLUS -1 (LENGTH (##))
(IMINUS WHICH))) T) (E (PROG (LEVEL) (## SLEVEL) (SETQ WHICH (CONS
WHICH LEVEL))) T)) (NIL)) ←←) ((FN) (X) F (STRUCFORM X --)))) (ADDTOVAR
USERMACROS ((W (M W (IF (STRUCFORM? (##)) ((BIND (E (SETQ #1 (GETFILENAM
(QUOTE OUTPUT))) T) (E (WRITEFILE (LIST (##)) #1)) (S #2) UP MARK
↑ (E (DSUBST (≠QUOTE (STRUCFORM READFILE ≠ #1)) #2 (##)) T) ←← 1)))))
(DO NIL UP MARK 1 (LCL !!EXPAND) ←← 1 (IF (AND (NOT (STRUCLIST? (##))
(STRUCFORM? (##)))) (!EXPAND) (NIL)) @) (WW NIL MARK (LPQ UPFORM)
(IF (STRUCLIST? (##)) (W) ((MBD STRUCFORM LIST) W)) ←←) (COMMANDS
NIL (E (MAPCAR USERMACROS (FUNCTION CAR)))) (SAVERESULT NIL NIL (E
(SETQ RESULT (##)) T) (E (QUOTE RESULT-SAVED))) (FORGET NIL (E (SETQ
UNDOLST (SETQ MARKLST (SETQ UNDOLST1 (SETQ UNFIND (SETQ LASTAIL (SETQ
LASTP1 (SETQ LASTP2))))))) T)))))
(S-EXPLAIN (RPAQQ EXPLAINVARS ((FNS START RP EXPLAINATIONMOLECULES
PRINCL EXPLAIN EXPLAINGENMOL EXPLAINRINGS FINDSUBLISTS COLLNUMLIST
EXPLAINSTRUCWAT EXPLAINRINGSKEL EXPLAINATTACFVS EXPLAINNOFV EDITRACEFN
EXPLAINNOLOOP EXPLAINCAT EXPLAINATTBIV BONDING EXPLAINKLOOP EXPLAINVL
EXPLAINBVL CHANGE UNCHANGE) (VARS EXPLAINALL) (PROP EXPLAINATION 
MOLECULES GENMOL RINGS STRUCTURESWITHATOMS RINGSKELETONS ATTACHFVS
NOFVRINGS NOLOOPEDRINGS CATALOG ATTACHBIVALENTS KLOOPEDRINGS 
ATTACHBIVS&LOOPS) (USERMACROS - DL EXPLAINALL U EXPLAIN))) (DEFINEQ
(START (LAMBDA (FUNCTIONNAME) (IF FUNCTIONNAME THEN (TURNOFF 
FUNCTIONNAME) (EDITE (LIST (APPEND (LIST (QUOTE STRUCFORM) FUNCTIONNAME)
FUNCTIONNAME (FOR NEW X IN (ARGLIST FUNCTIONNAME) LIST (RP X)))))
ELSE (TURNOFF (QUOTE MOLECULES)) (EDITE (MOLECULES (RP "CL") (RP "U"))))))
(RP (LAMBDA (STR) (PRIN1 STR T) (PRIN1 " ? " T) (READ T))) (
EXPLAINATIONMOLECULES (LAMBDA (CL U) (CONS (QUOTE MOLECULES) (CONS
(QUOTE WITH) (CONS U (CONS (QUOTE UNSATURATIONS) (PRINCL CL)))))))
(PRINCL (LAMBDA (CL) (SETQ CL (SORT CL T)) (CDR (MAPCONC CL (FUNCTION
(LAMBDA (X) (PROG ((DP (CDR X)) (CP (COND ((ATOM (CAR X)) (CAR X))
((NOT (CDAR X)) (CAAR X)) ((AND (ATOM (CAAR X)) (GETP (CAAR X) (QUOTE
VALENCE))) (CONCAT (CAAR X) (PRINCL2 (CDAR X)))) (T (EXPLAIN (CAR
X)))))) (RETURN (CONS (QUOTE ,) (LIST (CONCAT DP " " (COND ((IGREATERP
DP 1) (CONCAT CP (QUOTE 'S))) (T CP))))))))))))) (EXPLAIN (LAMBDA
(FORM) (COND ((STRUCLIST? FORM) (CONS (QUOTE LIST) (CONS (QUOTE WITH)
(COND ((NOT EXPLAINALL) (FINDSUBLISTS FORM)) (T (FOR NEW X IN (CDDR
FORM) AS NEW I FROM 1 APPEND (LIST "
#" I (EXPLAIN X)))))))) ((STRUCFORM? FORM) (COND ((GETP (CADR FORM)
(QUOTE EXPLAINATION)) (APPLY (GETP (CADR FORM) (QUOTE EXPLAINATION))
(CDDR FORM))) (T (HELP "NO EXPLAINATION AVAILABLE" (CADR FORM)))))
((STRUCTURE? FORM) (COND ((EQ (FETCH LASTNODE# OF FORM) 2) (LIST (FETCH
ATOMTYPE OF (FETCH MARKERS OF (CAR (FETCH CTABLE OF FORM)))) (BONDING
(FOR NEW X IN (FETCH NBRS OF (CAR (FETCH CTABLE OF FORM))) WHEN (NOT
(EQ X (QUOTE FV))) SUM 1)) (FETCH ATOMTYPE OF (FETCH MARKERS OF (CADR
(FETCH CTABLE OF FORM)))))) (T (LIST (QUOTE STRUCTURE) (QUOTE #) (CAAR
(SETQ DRAWLIST (CONS (CONS (SETQ STRUCNUM (ADD1 STRUCNUM)) FORM) 
DRAWLIST))) (QUOTE DRAWN) (QUOTE BELOW))))) (T (LIST (QUOTE STRUCTURE)
(QUOTE #) (CAAR (SETQ DRAWLIST (CONS (CONS (SETQ STRUCNUM (ADD1 STRUCNUM))
FORM) DRAWLIST))) (QUOTE DRAWN) (QUOTE BELOW)))))) (EXPLAINGENMOL
(LAMBDA (CL) (APPEND (QUOTE (ALL TREE LIKE STRUCTURES CONSTRUCTED
OUT OF)) (PRINCL CL)))) (EXPLAINRINGS (LAMBDA (U CL) (COND ((EQP (
CLCOUNT CL) 2) (SETQ CL (CLEXPAND CL)) (LIST (CAR CL) (BONDING (ADD1
U)) (CADR CL))) (T (APPEND (LIST "PURE RING SYSTEMS WITH" U 
"UNSATURATIONS,") (PRINCL CL)))))) (FINDSUBLISTS (LAMBDA (EXPRESSION)
(PROG (FORMS LISTS OTHER STRUCS) (FOR NEW X IN (FETCH LISTED-THINGS
OF EXPRESSION) AS NEW I FROM 1 DO (IF (STRUCLIST? X) THEN (SETQ LISTS
(CONS I LISTS)) ELSEIF (STRUCFORM? X) THEN (SETQ FORMS (CONS I FORMS))
ELSEIF (STRUCTURE? X) THEN (SETQ STRUCS (CONS I STRUCS)) ELSE (SETQ
OTHER (CONS I OTHER)))) (RETURN (CDR (APPEND (IF FORMS THEN (CONS
"," (CONS "FORMS:" (COLLNUMLIST FORMS)))) (IF LISTS THEN (CONS ","
(CONS "SUBLISTS:" (COLLNUMLIST LISTS)))) (IF STRUCS THEN (CONS ","
(CONS "STRUCTURES:" (COLLNUMLIST STRUCS)))) (IF OTHER THEN (CONS ","
(CONS "RADS?:" (COLLNUMLIST OTHER)))))))))) (COLLNUMLIST (LAMBDA (X)
(SETQ X (REVERSE X)) (PROG (LST RES) (SETQ RES (LIST (SETQ LST (CAR
X)))) (FOR X ON (CDR X) AS NEW FLG IS NIL DO (FOR X ON X WHILE (EQ
(CAR X) (SETQ LST (ADD1 LST))) DO (SETQ FLG (CAR X))) (COND (FLG (NCONC1
RES "-") (NCONC1 RES FLG))) (COND (X (NCONC1 RES ",") (NCONC1 RES
(SETQ LST (CAR X)))))) (RETURN (LIST (APPLY (QUOTE CONCAT) RES))))))
(EXPLAINSTRUCWAT (LAMBDA (CLL STRUC) (APPEND (QUOTE (RINGS WITH))
(PRINCL (! APPEND CLL)) (QUOTE (PLACED ON)) (EXPLAIN STRUC)))) (
EXPLAINRINGSKEL (LAMBDA (FV VL) (APPEND (QUOTE (RINGS WITH)) (LIST
FV) (QUOTE (FREE VALENCES)) (FOR NEW X IN VL AS NEW I FROM 2 WHEN
(NOT (ZEROP X)) APPEND (LIST (QUOTE ,) X (QUOTE NODES) (QUOTE OF)
(QUOTE VALENCE) I))))) (EXPLAINATTACFVS (LAMBDA (FVL STRUC) (CONS
(EXPLAIN STRUC) (CONS ", WITH" (CDR (FOR NEW FVR IN FVL AS NEW VALNODE
FROM 2 FOR NEW FVI IN FVR AS NEW NUMFV FROM 1 WHEN (NOT (ZEROP FVI))
JOIN (LIST "," FVI "OF THE" (CONCAT VALNODE "-VALENT NODES GETTING")
NUMFV "FREE VALENCES"))))))) (EXPLAINNOFV (LAMBDA (FV) (CONS "RINGS WITH"
(EXPLAINVL FV)))) (EDITRACEFN (LAMBDA (C) (PRINT C))) (EXPLAINNOLOOP
(LAMBDA (VL) (CONS "NON-LOOPED" (EXPLAINNOFV VL)))) (EXPLAINCAT (LAMBDA
(TVL) (CONS "CATALOG ENTRIES WITH" (CDR (FOR NEW X IN TVL AS NEW I
FROM 3 WHEN (NOT (ZEROP X)) JOIN (LIST "," X "NODES OF VALENCE" I))))))
(EXPLAINATTBIV (LAMBDA (BVP STRUC) (CONS "RINGS WITH" (APPEND (CDR
(FOR NEW PR IN BVP WHEN (NOT (ZEROP (CAR PR))) JOIN (LIST "," (CAR
PR) "BIVALENTS PLACED ON" (CDR PR) (COND ((EQP (CDR PR) 1) "EDGE")
(T "EDGES"))))) (LIST "OF" (EXPLAIN STRUC)))))) (BONDING (LAMBDA (U)
(SELECTQ U (1 "-") (2 "=") (3 "-TRIPLE BOND-") (CONCAT "-" U "-"))))
(EXPLAINKLOOP (LAMBDA (K VL) (APPEND (LIST "RINGS WITH EXACTLY" K
"LOOPS,") (EXPLAINVL VL)))) (EXPLAINVL (LAMBDA (VL) (CDR (FOR NEW
X IN VL AS NEW I FROM 2 WHEN (NOT (ZEROP X)) JOIN (LIST "," X 
"NODES OF VALENCE" I))))) (EXPLAINBVL (LAMBDA (BVP LPP STRUC) (CONS
"RINGS WITH" (APPEND (FOR NEW VLPP IN LPP AS NEW NV FROM 2 FOR NEW
PR IN VLPP JOIN (APPEND (LIST "," (CDR PR) "OF THE" NV 
"VALENT NODES GETTING LOOPS") (COND ((EQ (CLCOUNT (CAR PR)) 1) (LIST
"WITH" (CAAAR PR) "BIVALENTS")) (T (FOR NEW PR1 IN (CAR PR) JOIN (LIST
"," (CAR PR1) "BIVALENTS ON " (CDR PR1) "LOOPS")))))) (CONS "," (CDR
(EXPLAINATTBIV BVP STRUC))))))) (CHANGE (LAMBDA NIL (ADVISE (QUOTE
(RINGS IN SUPERATOMS)) (QUOTE BEFORE) (QUOTE (RETURN (≠RINGS U CL))))))
(UNCHANGE (LAMBDA NIL (UNADVISE (RINGS IN SUPERATOMS))))) (RPAQQ 
EXPLAINALL NIL) (DEFLIST (QUOTE ((MOLECULES EXPLAINATIONMOLECULES)
(GENMOL EXPLAINGENMOL) (RINGS EXPLAINRINGS) (STRUCTURESWITHATOMS 
EXPLAINSTRUCWAT) (RINGSKELETONS EXPLAINRINGSKEL) (ATTACHFVS 
EXPLAINATTACFVS) (NOFVRINGS EXPLAINNOFV) (NOLOOPEDRINGS EXPLAINNOLOOP)
(CATALOG EXPLAINCAT) (ATTACHBIVALENTS EXPLAINATTBIV) (KLOOPEDRINGS
EXPLAINKLOOP) (ATTACHBIVS&LOOPS EXPLAINBVL))) (QUOTE EXPLAINATION))
(ADDTOVAR USERMACROS ((- NIL (ORR (NX) (!NX))) (DL NIL (IF (STRUCTURE?
(##)) ((E (DRAW (##)) T)) ((IF (STRUCLIST? (##)) ((E (DRAW (CDDR (##))
(QUOTE L)) T)) ((IF (STRUCFORM? (##)) ((E (QUOTE CAN'T))) ((E (DRAW
(##) T) T)))))))) (EXPLAINALL NIL (E (PROG ((EXPLAINALL T)) (## EXPLAIN))
T)) (U NIL UPFORM) (EXPLAIN NIL (ORR ((E (PROGN (SETQ DRAWLIST NIL)
(SETQ STRUCNUM 0) (PRIN1 (EXPLAIN (##)) T) (TERPRI) (AND DRAWLIST
(DRAW (REVERSE DRAWLIST) (QUOTE AL)))) T)) (NIL))))))
(S-GENLISP (RPAQQ GENLISPVARS ((FNS GROUPRADS GROUPRADS1 CIELING GROUPBY
CARLIST CDRLIST LCARLIST LCDRLIST DELETE DIFF ORDPAIR MAXREST MAX
MIN ORDERED SUMOF LMASSOC))) (DEFINEQ (GROUPRADS (LAMBDA (RADCLIST)
(IF (NULL RADCLIST) THEN (LIST NIL) ELSE (GROUPRADS1 (CAAR RADCLIST)
(CDAR RADCLIST) (GROUPRADS (CDR RADCLIST)))))) (GROUPRADS1 (LAMBDA
(RADLIST N RADSLIST) (IF (ZEROP N) THEN RADSLIST ELSE (FOR RADLIST
ON RADLIST FOR NEW RADS IN (GROUPRADS1 RADLIST (SUB1 N) RADSLIST)
LIST (CONS (CAR RADLIST) RADS))))) (CIELING (LAMBDA (X) (FIX (PLUS
X .99)))) (GROUPBY (LAMBDA (FN L) (IF (NULL L) THEN NIL ELSE (PROG
(FNX GROUPCDR X) (SETQ GROUPCDR (GROUPBY FN (CDR L))) (IF (NULL (SETQ
X (LMASSOC (SETQ FNX (APPLY* FN (CAR L))) GROUPCDR NIL))) THEN (RETURN
(CONS (LIST FNX (CAR L)) GROUPCDR)) ELSE (NCONC1 X (CAR L)) (RETURN
GROUPCDR)))))) (CARLIST (LAMBDA (L) (FOR NEW X IN L LIST (CAR X))))
(CDRLIST (LAMBDA (L) (FOR NEW X IN L LIST (CDR X)))) (LCARLIST (LAMBDA
(L) (FOR NEW X IN L LIST (CARLIST X)))) (LCDRLIST (LAMBDA (L) (FOR
NEW X IN L LIST (CDRLIST X)))) (DELETE (LAMBDA (I L) (COND ((NULL
L) NIL) ((EQUAL (CAR L) I) (CDR L)) (T (CONS (CAR L) (DELETE I (CDR
L))))))) (DIFF (LAMBDA (L1 L2) (FOR NEW X IN L1 WHEN (NOT (MEMBER
X L2)) LIST X))) (ORDPAIR (LAMBDA (X1 X2) (IF (ORDERED X1 X2) THEN
(CONS X1 X2) ELSE (CONS X2 X1)))) (MAXREST (LAMBDA (VL J) (FOR NEW
X IN (CDR VL) AS NEW K FROM (ADD1 J) SUM (ITIMES X (M2/2 K))))) (MAX
(LAMBDA (X Y) (COND ((IGREATERP X Y) X) (T Y)))) (MIN (LAMBDA (X Y)
(COND ((IGREATERP X Y) Y) (T X)))) (ORDERED (LAMBDA (X Y) (COND ((NLISTP
X) (ALPHORDER X Y)) ((NLISTP Y) NIL) ((EQUAL (CAR X) (CAR Y)) (ORDERED
(CDR X) (CDR Y))) (T (ORDERED (CAR X) (CAR Y)))))) (SUMOF (LAMBDA
(L) (FOR NEW X IN L SUM X))) (LMASSOC (LAMBDA (X Y Z) (SETQ X (SASSOC
X Y)) (COND ((NOT X) Z) (T (CDR X)))))))
(S-GROUP (RPAQQ GROUPVARS ((FNS FIXUPGROUP FINDNEWGROUP FINDNEWGROUP1
FINDPERMS POSSIMS CONNECTIVITY GROUPCOUNT FOUND? FINDGROUPEDGES IMAGE
FINDGROUPNODES))) (DEFINEQ (FIXUPGROUP (LAMBDA (STRUC) (REPLACE GROUP
OF STRUC WITH (FINDNEWGROUP STRUC (CLASSIFYNODES (PROG (X) (SETQ X
(NODES STRUC)) (FOR NEW NL IN (CAR (FETCH GROUP OF STRUC)) DO (SETQ
X (DIFF X NL))) (RETURN X)) STRUC))))) (FINDNEWGROUP (LAMBDA (STRUC
NEWORBITS) (PROG (NEWOBJ) (SETQ NEWOBJ (FOR NEW ORB IN NEWORBITS XLIST
FIRST (CAR (FETCH GROUP OF STRUC)) (REVERSE ORB))) (RETURN (CONS NEWOBJ
(FOR NEW P IN (FINDNEWGROUP1 STRUC NEWORBITS) WHEN (NOT (EQUAL NEWOBJ
(CDR P))) XLIST (CDR P))))))) (FINDNEWGROUP1 (LAMBDA (STRUC NEWORBITS)
(FOR NEW P IN (FETCH GROUP OF STRUC) NCONC (FINDPERMS (CAR NEWORBITS)
NEWORBITS (CONS NIL P) (CONS NIL (CAR (FETCH GROUP OF STRUC))) STRUC))))
(FINDPERMS (LAMBDA (NODES CLASSES IMS MAPPED STRUC) (IF (NULL CLASSES)
THEN (LIST IMS) ELSEIF (NULL NODES) THEN (FINDPERMS (CADR CLASSES)
(CDR CLASSES) (CONS NIL IMS) (CONS NIL MAPPED) STRUC) ELSE (FOR NEW
Y IN (POSSIMS (CAR NODES) (CAR CLASSES) IMS MAPPED STRUC) NCONC (
FINDPERMS (CDR NODES) CLASSES (CONS (CONS Y (CAR IMS)) (CDR IMS))
(CONS (CONS (CAR NODES) (CAR MAPPED)) (CDR MAPPED)) STRUC))))) (POSSIMS
(LAMBDA (X CLASS IMS MAPPED STRUC) (FOR NEW Y IN CLASS WHEN (NOT (MEMB
Y (CAR IMS))) WHEN (FOR NEW ML IN MAPPED AS NEW IL IN IMS FOR NEW
M IN ML AS NEW I IN IL AND (EQ (CONNECTIVITY Y I STRUC) (CONNECTIVITY
X M STRUC))) XLIST Y))) (CONNECTIVITY (LAMBDA (X Y STRUC) (FOR NEW
Z IN (FETCH NBRS OF (FINDCTE X STRUC)) WHEN (EQ Z Y) SUM 1))) (
GROUPCOUNT (LAMBDA (L) (PROG NIL (SETQ L (GROUPBY (QUOTE CDR) (CLCREATE
L))) (RETURN (FOR NEW I TO (FOR NEW X IN L MAXIMUM (CAR X)) COLLECT
(CARLIST (LMASSOC I L NIL))))))) (FOUND? (LAMBDA (NODE GROUP) (FOR
NEW NL IN (CAR GROUP) AS NEW N FROM 1 DO (IF (MEMB NODE NL) THEN (RETURN
(CONS N NL)))))) (FINDGROUPEDGES (LAMBDA (EDGES STRUC) (PROG (G) (IF
(NOT (FOR NEW EDGE IN EDGES AND (AND (FOUND? (FETCH NODE1 OF EDGE)
(FETCH GROUP OF STRUC)) (FOUND? (FETCH NODE2 OF EDGE) (FETCH GROUP
OF STRUC))))) THEN (FIXUPGROUP STRUC) ELSE NIL) (SETQ G (FETCH GROUP
OF STRUC)) (RETURN (CREATE NPL OKPERMS ← (LIST (CAR G)) REMPERMS ←
(FOR NEW P IN (CDR G) XLIST (CREATE CHECKPERM ORIGPERM ← P OBJ ← EDGES
POBJ ← (FOR NEW EDGE IN EDGES LIST (ORDPAIR (IMAGE (FETCH NODE1 OF
EDGE) (CAR G) P) (IMAGE (FETCH NODE2 OF EDGE) (CAR G) P))))))))))
(IMAGE (LAMBDA (NODE MAPPED IMAGES) (FOR NEW ML IN MAPPED AS NEW IL
IN IMAGES FOR NEW M IN ML AS NEW I IN IL WHEN (EQP NODE M) DO (RETURN
I)))) (FINDGROUPNODES (LAMBDA (FETCH OBJECTS OF STRUC) (PROG (N FOUND)
L1 (SETQ FOUND (FOUND? (CAR OBJECTS) (FETCH GROUP OF STRUC))) (IF
(NOT FOUND) THEN (FIXUPGROUP STRUC) ELSE (RETURN (CREATE NPL OKPERMS
← (LIST (CAR (FETCH GROUP OF STRUC))) REMPERMS ← (FOR NEW P IN (CDR
(FETCH GROUP OF STRUC)) XLIST (CREATE CHECKPERM ORIGPERM ← P OBJ ←
(CDR FOUND) POBJ ← (CAR (NTH P (CAR FOUND)))))))) (GO L1))))))
(S-INIT (RPAQQ INITVARS ((FNS MAKECAT TRIVGRAPH CHORDLENGTH TST TST2
TST3) (VARS POLYGONALCATALOG NONPOLYTRIVS GAUCHECATALOG POLYGONALCODES
GAUCHECODES PLANAR? GAUCHE? NONPOLY?))) (DEFINEQ (MAKECAT (LAMBDA
(TVC) (FOR NEW X IN TVC AS NEW J IS (CAR X) LIST (FOR NEW Y IN (CDR
X) LIST (TRIVGRAPH J Y))))) (TRIVGRAPH (LAMBDA (J L) (PROG (S X Y
LL N) (SETQ LL L) (SETQ S (SINGLERING J)) (SETQ X (FOR NEW I FROM
1 TO J LIST I)) (FOR X ON X AS L ON L DO (SETQ N (PLUS (CHORDLENGTH
(CAR L)) (CAR X))) (CONNECT (FINDCTE (CAR X) S) (FINDCTE N S) S) (SETQ
X (DELETE N X))) (RETURN (CREATE STRUCTURE USING S UGRAPH ← (CONS
J LL)))))) (CHORDLENGTH (LAMBDA (X) (CDR (SASSOC X (QUOTE ((A . 1)
(B . 2) (C . 3) (D . 4) (E . 5) (F . 6) (G . 7) (H . 8) (I . 9)))
NIL)))) (TST (LAMBDA NIL (PROGN (/SET (QUOTE T21) (CREATE STRUCTURE
NODES ← (QUOTE (1 2 3)) LASTNODE# ← 3 UGRAPH ← (QUOTE T21) CTABLE
← (LIST (CREATE CTENTRY NODENUM ← 1 NBRS ← (QUOTE (2 2 3 3))) (CREATE
CTENTRY NODENUM ← 2 NBRS ← (QUOTE (1 1 3))) (CREATE CTENTRY NODENUM
← 3 NBRS ← (QUOTE (1 1 2)))))) (ADVISE (QUOTE CATALOG) (QUOTE BEFORE)
(QUOTE (COND ((EQUAL L (QUOTE (2 1))) (RETURN (LIST T21)))))) (/SET
(QUOTE T22) (FOR NEW X IN (CATALOG3 (QUOTE (4))) FOR NEW Y IN (LABEL1
(CREATE NODETYPE NODENUMS ← (QUOTE (1 2 3 4))) 2 X) AS NEW Z IS (
COPYSTRUC (FETCH LSTRUC OF Y)) XLIST (CONNECT (FINDCTE (CAR (FETCH
NODENUMS OF (FETCH LABELED OF Y))) Z) (FINDCTE (CADR (FETCH NODENUMS
OF (FETCH LABELED OF Y))) Z)) Z)) (ADVISE (QUOTE CATALOG) (QUOTE BEFORE)
(QUOTE (COND ((EQUAL L (QUOTE (2 2))) (RETURN T22)))))))) (TST2 (LAMBDA
NIL (/SET (QUOTE T41) (LIST (CREATE STRUCTURE LASTNODE# ← 5 UGRAPH
← (QUOTE T41KITE) CTABLE ← (LIST (CREATE CTENTRY NODENUM ← 1 NBRS
← (QUOTE (2 3 4 5))) (CREATE CTENTRY NODENUM ← 2 NBRS ← (QUOTE (1
3 5))) (CREATE CTENTRY NODENUM ← 3 NBRS ← (QUOTE (1 2 4))) (CREATE
CTENTRY NODENUM ← 4 NBRS ← (QUOTE (1 3 5))) (CREATE CTENTRY NODENUM
← 5 NBRS ← (QUOTE (1 2 4))))) (CREATE STRUCTURE LASTNODE# ← 5 UGRAPH
← (QUOTE T41SCOOP) CTABLE ← (LIST (CREATE CTENTRY NODENUM ← 1 NBRS
← (QUOTE (2 2 4 5))) (CREATE CTENTRY NODENUM ← 2 NBRS ← (QUOTE (1
1 3))) (CREATE CTENTRY NODENUM ← 3 NBRS ← (QUOTE (2 4 5))) (CREATE
CTENTRY NODENUM ← 4 NBRS ← (QUOTE (1 3 5))) (CREATE CTENTRY NODENUM
← 5 NBRS ← (QUOTE (1 3 4))))) (CREATE STRUCTURE LASTNODE# ← 5 UGRAPH
← (QUOTE T41FAN) CTABLE ← (LIST (CREATE CTENTRY NODENUM ← 1 NBRS ←
(QUOTE (2 4 5 5))) (CREATE CTENTRY NODENUM ← 2 NBRS ← (QUOTE (1 3
3))) (CREATE CTENTRY NODENUM ← 3 NBRS ← (QUOTE (2 2 4))) (CREATE CTENTRY
NODENUM ← 4 NBRS ← (QUOTE (1 3 5))) (CREATE CTENTRY NODENUM ← 5 NBRS
← (QUOTE (1 1 4))))) (CREATE STRUCTURE LASTNODE# ← 5 UGRAPH ← (QUOTE
T41RING) CTABLE ← (LIST (CREATE CTENTRY NODENUM ← 1 NBRS ← (QUOTE
(2 2 5 5))) (CREATE CTENTRY NODENUM ← 2 NBRS ← (QUOTE (1 1 3))) (CREATE
CTENTRY NODENUM ← 3 NBRS ← (QUOTE (2 4 4))) (CREATE CTENTRY NODENUM
← 4 NBRS ← (QUOTE (3 3 5))) (CREATE CTENTRY NODENUM ← 5 NBRS ← (QUOTE
(1 1 4))))) (CREATE STRUCTURE LASTNODE# ← 5 UGRAPH ← (QUOTE T41HOURGLASS)
CTABLE ← (LIST (CREATE CTENTRY NODENUM ← 1 NBRS ← (QUOTE (2 3 4 5)))
(CREATE CTENTRY NODENUM ← 2 NBRS ← (QUOTE (1 3 3))) (CREATE CTENTRY
NODENUM ← 3 NBRS ← (QUOTE (1 2 2))) (CREATE CTENTRY NODENUM ← 4 NBRS
← (QUOTE (1 5 5))) (CREATE CTENTRY NODENUM ← 5 NBRS ← (QUOTE (1 4
4))))))) (ADVISE (QUOTE CATALOG) (QUOTE BEFORE) (QUOTE (COND ((EQUAL
L (QUOTE (4 1))) (RETURN T41))))))) (TST3 (LAMBDA NIL (/SET (QUOTE
T03) (CREATE STRUCTURE NODES ← (QUOTE (1 2 3)) LASTNODE# ← 3 UGRAPH
← (QUOTE T03) CTABLE ← (LIST (CREATE CTENTRY NODENUM ← 1 NBRS ← (QUOTE
(2 2 3 3))) (CREATE CTENTRY NODENUM ← 2 NBRS ← (QUOTE (1 1 3 3)))
(CREATE CTENTRY NODENUM ← 3 NBRS ← (QUOTE (1 1 2 2)))))) (ADVISE (QUOTE
CATALOG) (QUOTE BEFORE) (QUOTE (COND ((EQUAL L (QUOTE (0 3))) (RETURN
(LIST T03))))))))) (RPAQQ POLYGONALCATALOG (((STRUCTURE ((CTENTRY
2 (NIL) 1 1 1) (CTENTRY 1 (NIL) 2 2 2)) (2 A) 2 NIL)) ((STRUCTURE
((CTENTRY 1 (NIL) 3 4 2) (CTENTRY 2 (NIL) 4 3 1) (CTENTRY 3 (NIL)
1 4 2) (CTENTRY 4 (NIL) 2 1 3)) (4 B B) 4 ((4 3 2 1)) ((3 4 2 1))
((4 2 3 1)) ((2 4 3 1)) ((3 2 4 1)) ((2 3 4 1)) ((4 3 1 2)) ((3 4
1 2)) ((4 1 3 2)) ((1 4 3 2)) ((3 1 4 2)) ((1 3 4 2)) ((4 2 1 3))
((2 4 1 3)) ((4 1 2 3)) ((1 4 2 3)) ((2 1 4 3)) ((1 2 4 3)) ((3 2
1 4)) ((2 3 1 4)) ((3 1 2 4)) ((1 3 2 4)) ((2 1 3 4)) ((1 2 3 4)))
(STRUCTURE ((CTENTRY 1 (NIL) 2 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
3 (NIL) 4 4 2) (CTENTRY 4 (NIL) 3 1 3)) (4 A A) 4 ((4 3 2 1)) ((4
3 2 1)) ((3 4 1 2)) ((2 1 4 3)) ((1 2 3 4)))) ((STRUCTURE ((CTENTRY
6 (NIL) 4 1 5) (CTENTRY 5 (NIL) 2 6 4) (CTENTRY 4 (NIL) 6 5 3) (CTENTRY
3 (NIL) 1 4 2) (CTENTRY 2 (NIL) 5 3 1) (CTENTRY 1 (NIL) 3 6 2)) (6
B C B) 6 NIL) (STRUCTURE ((CTENTRY 6 (NIL) 5 1 5) (CTENTRY 5 (NIL)
6 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY 2
(NIL) 1 3 1) (CTENTRY 1 (NIL) 2 6 2)) (6 A A A) 6 ((6 5 4 3 2 1))
((3 4 5 6 1 2)) ((2 1 6 5 4 3)) ((5 6 1 2 3 4)) ((4 3 2 1 6 5)) ((1
2 3 4 5 6))) (STRUCTURE ((CTENTRY 6 (NIL) 4 1 5) (CTENTRY 5 (NIL)
3 6 4) (CTENTRY 4 (NIL) 6 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY 2
(NIL) 1 3 1) (CTENTRY 1 (NIL) 2 6 2)) (6 A B B) 6 ((6 5 4 3 2 1))
((6 4 5 3 2 1)) ((3 5 4 6 1 2)) ((3 4 5 6 1 2))) (STRUCTURE ((CTENTRY
6 (NIL) 3 1 5) (CTENTRY 5 (NIL) 4 6 4) (CTENTRY 4 (NIL) 5 5 3) (CTENTRY
3 (NIL) 6 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 6 2)) (6
A C A) 6 NIL)) ((STRUCTURE ((CTENTRY 8 (NIL) 6 1 7) (CTENTRY 7 (NIL)
4 8 6) (CTENTRY 6 (NIL) 8 7 5) (CTENTRY 5 (NIL) 2 6 4) (CTENTRY 4
(NIL) 7 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY 2 (NIL) 5 3 1) (CTENTRY
1 (NIL) 3 8 2)) (8 B C C B) 8 ((8 7 6 5 4 3 2 1)) ((8 6 7 4 5 2 3
1)) ((1 3 2 5 4 7 6 8)) ((1 2 3 4 5 6 7 8))) (STRUCTURE ((CTENTRY
8 (NIL) 5 1 7) (CTENTRY 7 (NIL) 2 8 6) (CTENTRY 6 (NIL) 3 7 5) (CTENTRY
5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 1 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY
2 (NIL) 7 3 1) (CTENTRY 1 (NIL) 4 8 2)) (8 C E C C) 8 ((8 7 6 5 4
3 2 1)) ((4 3 6 5 8 7 2 1)) ((8 5 6 7 2 3 4 1)) ((2 3 6 7 8 5 4 1))
((2 7 6 3 4 5 8 1)) ((4 5 6 3 2 7 8 1)) ((7 8 5 6 3 4 1 2)) ((3 4
5 6 7 8 1 2)) ((7 6 5 8 1 4 3 2)) ((1 4 5 8 7 6 3 2)) ((1 8 5 4 3
6 7 2)) ((3 6 5 4 1 8 7 2)) ((6 7 8 5 4 1 2 3)) ((4 1 8 5 6 7 2 3))
((6 5 8 7 2 1 4 3)) ((2 1 8 7 6 5 4 3)) ((2 7 8 1 4 5 6 3)) ((4 5
8 1 2 7 6 3)) ((5 8 7 6 3 2 1 4)) ((3 2 7 6 5 8 1 4)) ((5 6 7 8 1
2 3 4)) ((1 2 7 8 5 6 3 4)) ((1 8 7 2 3 6 5 4)) ((3 6 7 2 1 8 5 4))
((6 3 2 7 8 1 4 5)) ((8 1 2 7 6 3 4 5)) ((8 7 2 1 4 3 6 5)) ((4 3
2 1 8 7 6 5)) ((6 7 2 3 4 1 8 5)) ((4 1 2 3 6 7 8 5)) ((5 4 1 8 7
2 3 6)) ((7 2 1 8 5 4 3 6)) ((7 8 1 2 3 4 5 6)) ((3 4 1 2 7 8 5 6))
((5 8 1 4 3 2 7 6)) ((3 2 1 4 5 8 7 6)) ((6 3 4 5 8 1 2 7)) ((8 1
4 5 6 3 2 7)) ((8 5 4 1 2 3 6 7)) ((2 3 4 1 8 5 6 7)) ((6 5 4 3 2
1 8 7)) ((2 1 4 3 6 5 8 7)) ((5 4 3 6 7 2 1 8)) ((7 2 3 6 5 4 1 8))
((7 6 3 2 1 4 5 8)) ((1 4 3 2 7 6 5 8)) ((5 6 3 4 1 2 7 8)) ((1 2
3 4 5 6 7 8))) (STRUCTURE ((CTENTRY 8 (NIL) 7 1 7) (CTENTRY 7 (NIL)
8 8 6) (CTENTRY 6 (NIL) 5 7 5) (CTENTRY 5 (NIL) 6 6 4) (CTENTRY 4
(NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 8 2)) (8 A A A A) 8 ((8 7 6 5 4 3 2 1)) ((3 4 5 6 7 8 1
2)) ((2 1 8 7 6 5 4 3)) ((5 6 7 8 1 2 3 4)) ((4 3 2 1 8 7 6 5)) ((7
8 1 2 3 4 5 6)) ((6 5 4 3 2 1 8 7)) ((1 2 3 4 5 6 7 8))) (STRUCTURE
((CTENTRY 8 (NIL) 6 1 7) (CTENTRY 7 (NIL) 5 8 6) (CTENTRY 6 (NIL)
8 7 5) (CTENTRY 5 (NIL) 7 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3
(NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 8 2)) (8 A
A B B) 8 ((8 7 6 5 4 3 2 1)) ((8 6 7 5 4 3 2 1)) ((5 7 6 8 1 2 3 4))
((5 6 7 8 1 2 3 4))) (STRUCTURE ((CTENTRY 8 (NIL) 5 1 7) (CTENTRY
7 (NIL) 6 8 6) (CTENTRY 6 (NIL) 7 7 5) (CTENTRY 5 (NIL) 8 6 4) (CTENTRY
4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 8 2)) (8 A A C A) 8 ((8 7 6 5 4 3 2 1)) ((5 6 7 8 1 2 3
4))) (STRUCTURE ((CTENTRY 8 (NIL) 6 1 7) (CTENTRY 7 (NIL) 4 8 6) (
CTENTRY 6 (NIL) 8 7 5) (CTENTRY 5 (NIL) 3 6 4) (CTENTRY 4 (NIL) 7
5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL)
2 8 2)) (8 A B C B) 8 ((8 7 6 5 4 3 2 1)) ((8 6 7 4 5 3 2 1)) ((3
5 4 7 6 8 1 2)) ((3 4 5 6 7 8 1 2))) (STRUCTURE ((CTENTRY 8 (NIL)
4 1 7) (CTENTRY 7 (NIL) 6 8 6) (CTENTRY 6 (NIL) 7 7 5) (CTENTRY 5
(NIL) 3 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 8 2)) (8 A B D A) 8 ((8 7 6 5 4
3 2 1)) ((8 1 2 3 4 5 6 7))) (STRUCTURE ((CTENTRY 8 (NIL) 4 1 7) (
CTENTRY 7 (NIL) 5 8 6) (CTENTRY 6 (NIL) 3 7 5) (CTENTRY 5 (NIL) 7
6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY 2 (NIL)
1 3 1) (CTENTRY 1 (NIL) 2 8 2)) (8 A C D B) 8 ((8 7 6 5 4 3 2 1))
((3 6 7 5 4 8 1 2))) (STRUCTURE ((CTENTRY 8 (NIL) 4 1 7) (CTENTRY
7 (NIL) 3 8 6) (CTENTRY 6 (NIL) 5 7 5) (CTENTRY 5 (NIL) 6 6 4) (CTENTRY
4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 7 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 8 2)) (8 A D D A) 8 ((8 7 6 5 4 3 2 1)) ((8 4 5 6 7 3 2
1)) ((3 7 6 5 4 8 1 2)) ((3 4 5 6 7 8 1 2)) ((4 8 1 2 3 7 6 5)) ((4
3 2 1 8 7 6 5)) ((7 8 1 2 3 4 5 6)) ((7 3 2 1 8 4 5 6))) (STRUCTURE
((CTENTRY 8 (NIL) 3 1 7) (CTENTRY 7 (NIL) 5 8 6) (CTENTRY 6 (NIL)
4 7 5) (CTENTRY 5 (NIL) 7 6 4) (CTENTRY 4 (NIL) 6 5 3) (CTENTRY 3
(NIL) 8 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 8 2)) (8 A
E B B) 8 ((8 7 6 5 4 3 2 1)) ((8 7 5 6 4 3 2 1)) ((3 4 6 5 7 8 1 2))
((3 4 5 6 7 8 1 2))) (STRUCTURE ((CTENTRY 8 (NIL) 3 1 7) (CTENTRY
7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 5 7 5) (CTENTRY 5 (NIL) 6 6 4) (CTENTRY
4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 8 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 8 2)) (8 A E C A) 8 ((8 7 6 5 4 3 2 1)) ((3 4 5 6 7 8 1
2)) ((4 3 2 1 8 7 6 5)) ((7 8 1 2 3 4 5 6))) (STRUCTURE ((CTENTRY
8 (NIL) 6 1 7) (CTENTRY 7 (NIL) 5 8 6) (CTENTRY 6 (NIL) 8 7 5) (CTENTRY
5 (NIL) 7 6 4) (CTENTRY 4 (NIL) 2 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY
2 (NIL) 4 3 1) (CTENTRY 1 (NIL) 3 8 2)) (8 B B B B) 8 ((8 7 6 5 4
3 2 1)) ((8 6 7 5 4 3 2 1)) ((8 7 6 5 4 2 3 1)) ((8 6 7 5 4 2 3 1))
((5 7 6 8 1 3 2 4)) ((5 6 7 8 1 3 2 4)) ((5 7 6 8 1 2 3 4)) ((5 6
7 8 1 2 3 4)) ((4 3 2 1 8 7 6 5)) ((4 2 3 1 8 7 6 5)) ((4 3 2 1 8
6 7 5)) ((4 2 3 1 8 6 7 5)) ((1 3 2 4 5 7 6 8)) ((1 2 3 4 5 7 6 8))
((1 3 2 4 5 6 7 8)) ((1 2 3 4 5 6 7 8)))) ((STRUCTURE ((CTENTRY 10
(NIL) 8 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY 8 (NIL) 10 9 7) (CTENTRY
7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY 5 (NIL) 2 6 4) (CTENTRY
4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY 2 (NIL) 5 3 1) (CTENTRY
1 (NIL) 3 10 2)) (10 B C C C B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 8
9 6 7 4 5 2 3 1)) ((1 3 2 5 4 7 6 9 8 10)) ((1 2 3 4 5 6 7 8 9 10)))
(STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 7 10 8) (CTENTRY
8 (NIL) 4 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY
5 (NIL) 2 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY
2 (NIL) 5 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B C D D B) 10 ((10 9
8 7 6 5 4 3 2 1)) ((4 3 1 2 5 6 10 9 7 8))) (STRUCTURE ((CTENTRY 10
(NIL) 8 1 9) (CTENTRY 9 (NIL) 4 10 8) (CTENTRY 8 (NIL) 10 9 7) (CTENTRY
7 (NIL) 5 8 6) (CTENTRY 6 (NIL) 2 7 5) (CTENTRY 5 (NIL) 7 6 4) (CTENTRY
4 (NIL) 9 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY 2 (NIL) 6 3 1) (CTENTRY
1 (NIL) 3 10 2)) (10 B D E B B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((6 5
7 8 10 9 4 3 1 2)) ((2 3 1 10 8 9 4 5 7 6)) ((8 9 10 1 2 3 4 5 6 7))
((7 5 6 2 1 3 4 9 10 8)) ((1 3 2 6 7 5 4 9 8 10))) (STRUCTURE ((CTENTRY
10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 4 10 8) (CTENTRY 8 (NIL) 5 9 7) (
CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 2 7 5) (CTENTRY 5 (NIL) 8
6 4) (CTENTRY 4 (NIL) 9 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY 2 (NIL)
6 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B D E C C) 10 ((10 9 8 7 6 5
4 3 2 1)) ((10 7 8 9 4 5 6 2 3 1)) ((6 5 8 7 10 9 4 3 1 2)) ((6 7
8 5 4 9 10 1 3 2)) ((4 5 8 9 10 7 6 2 1 3)) ((4 9 8 5 6 7 10 1 2 3)))
(STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY
8 (NIL) 2 9 7) (CTENTRY 7 (NIL) 3 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY
5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 1 5 3) (CTENTRY 3 (NIL) 7 4 2) (CTENTRY
2 (NIL) 8 3 1) (CTENTRY 1 (NIL) 4 10 2)) (10 C F D E C) 10 ((10 9
8 7 6 5 4 3 2 1)) ((2 8 9 6 7 3 4 5 10 1)) ((8 9 10 5 6 7 3 4 1 2))
((1 10 9 6 5 4 3 7 8 2)) ((7 6 5 10 9 8 2 1 4 3)) ((4 5 6 9 10 1 2
8 7 3)) ((5 6 7 8 9 10 1 2 3 4)) ((3 7 6 9 8 2 1 10 5 4)) ((6 7 3
2 8 9 10 1 4 5)) ((4 3 7 8 2 1 10 9 6 5)) ((7 3 4 1 2 8 9 10 5 6))
((5 4 3 2 1 10 9 8 7 6)) ((6 5 4 1 10 9 8 2 3 7)) ((3 4 5 10 1 2 8
9 6 7)) ((9 10 1 4 5 6 7 3 2 8)) ((2 1 10 5 4 3 7 6 9 8)) ((10 1 2
3 4 5 6 7 8 9)) ((8 2 1 4 3 7 6 5 10 9)) ((9 8 2 3 7 6 5 4 1 10))
((1 2 8 7 3 4 5 6 9 10))) (STRUCTURE ((CTENTRY 10 (NIL) 9 1 9) (CTENTRY
9 (NIL) 10 10 8) (CTENTRY 8 (NIL) 7 9 7) (CTENTRY 7 (NIL) 8 8 6) (
CTENTRY 6 (NIL) 5 7 5) (CTENTRY 5 (NIL) 6 6 4) (CTENTRY 4 (NIL) 3
5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL)
2 10 2)) (10 A A A A A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((3 4 5 6 7 8
9 10 1 2)) ((2 1 10 9 8 7 6 5 4 3)) ((5 6 7 8 9 10 1 2 3 4)) ((4 3
2 1 10 9 8 7 6 5)) ((7 8 9 10 1 2 3 4 5 6)) ((6 5 4 3 2 1 10 9 8 7))
((9 10 1 2 3 4 5 6 7 8)) ((8 7 6 5 4 3 2 1 10 9)) ((1 2 3 4 5 6 7
8 9 10))) (STRUCTURE ((CTENTRY 10 (NIL) 8 1 9) (CTENTRY 9 (NIL) 7
10 8) (CTENTRY 8 (NIL) 10 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6
(NIL) 5 7 5) (CTENTRY 5 (NIL) 6 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY
3 (NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A A A B B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 8 9 7 6 5 4 3 2 1)) ((7
9 8 10 1 2 3 4 5 6)) ((7 8 9 10 1 2 3 4 5 6))) (STRUCTURE ((CTENTRY
10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 8 10 8) (CTENTRY 8 (NIL) 9 9 7) (
CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 5 7 5) (CTENTRY 5 (NIL) 6
6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY 2 (NIL)
1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A A A C A) 10 ((10 9 8 7 6 5
4 3 2 1)) ((7 8 9 10 1 2 3 4 5 6))) (STRUCTURE ((CTENTRY 10 (NIL)
8 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY 8 (NIL) 10 9 7) (CTENTRY
7 (NIL) 5 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY 5 (NIL) 7 6 4) (CTENTRY
4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 10 2)) (10 A A B C B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 8
9 6 7 5 4 3 2 1)) ((5 7 6 9 8 10 1 2 3 4)) ((5 6 7 8 9 10 1 2 3 4)))
(STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 8 10 8) (CTENTRY
8 (NIL) 9 9 7) (CTENTRY 7 (NIL) 5 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY
5 (NIL) 7 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A A B D A) 10 ((10 9
8 7 6 5 4 3 2 1))) (STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9
(NIL) 7 10 8) (CTENTRY 8 (NIL) 5 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY
6 (NIL) 10 7 5) (CTENTRY 5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY
3 (NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A A C D B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((5 8 9 7 6 10 1 2 3 4))) (
STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 5 10 8) (CTENTRY
8 (NIL) 7 9 7) (CTENTRY 7 (NIL) 8 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY
5 (NIL) 9 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A A D D A) 10 ((10 9
8 7 6 5 4 3 2 1)) ((10 6 7 8 9 5 4 3 2 1)) ((5 9 8 7 6 10 1 2 3 4))
((5 6 7 8 9 10 1 2 3 4))) (STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY
9 (NIL) 8 10 8) (CTENTRY 8 (NIL) 9 9 7) (CTENTRY 7 (NIL) 6 8 6) (CTENTRY
6 (NIL) 7 7 5) (CTENTRY 5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY
3 (NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A A E A A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((5 6 7 8 9 10 1 2 3 4)) ((5
4 3 2 1 10 9 8 7 6)) ((10 1 2 3 4 5 6 7 8 9))) (STRUCTURE ((CTENTRY
10 (NIL) 5 1 9) (CTENTRY 9 (NIL) 7 10 8) (CTENTRY 8 (NIL) 6 9 7) (
CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6 (NIL) 8 7 5) (CTENTRY 5 (NIL) 10
6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY 2 (NIL)
1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A A E B B) 10 ((10 9 8 7 6 5
4 3 2 1)) ((10 9 7 8 6 5 4 3 2 1)) ((5 6 8 7 9 10 1 2 3 4)) ((5 6
7 8 9 10 1 2 3 4))) (STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY
9 (NIL) 6 10 8) (CTENTRY 8 (NIL) 7 9 7) (CTENTRY 7 (NIL) 8 8 6) (CTENTRY
6 (NIL) 9 7 5) (CTENTRY 5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY
3 (NIL) 4 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A A E C A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((5 6 7 8 9 10 1 2 3 4))) (
STRUCTURE ((CTENTRY 10 (NIL) 8 1 9) (CTENTRY 9 (NIL) 7 10 8) (CTENTRY
8 (NIL) 10 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6 (NIL) 4 7 5) (CTENTRY
5 (NIL) 3 6 4) (CTENTRY 4 (NIL) 6 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A B B B B) 10 ((10 9
8 7 6 5 4 3 2 1)) ((10 8 9 7 6 5 4 3 2 1)) ((10 9 8 7 6 4 5 3 2 1))
((10 8 9 7 6 4 5 3 2 1)) ((3 5 4 6 7 9 8 10 1 2)) ((3 4 5 6 7 9 8
10 1 2)) ((3 5 4 6 7 8 9 10 1 2)) ((3 4 5 6 7 8 9 10 1 2))) (STRUCTURE
((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 8 10 8) (CTENTRY 8 (NIL)
9 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 4 7 5) (CTENTRY 5
(NIL) 3 6 4) (CTENTRY 4 (NIL) 6 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A B B C A) 10 ((10 9
8 7 6 5 4 3 2 1)) ((10 9 8 7 6 4 5 3 2 1))) (STRUCTURE ((CTENTRY 10
(NIL) 8 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY 8 (NIL) 10 9 7) (CTENTRY
7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY 5 (NIL) 3 6 4) (CTENTRY
4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 10 2)) (10 A B C C B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 8
9 6 7 4 5 3 2 1)) ((3 5 4 7 6 9 8 10 1 2)) ((3 4 5 6 7 8 9 10 1 2)))
(STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 8 10 8) (CTENTRY
8 (NIL) 9 9 7) (CTENTRY 7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY
5 (NIL) 3 6 4) (CTENTRY 4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A B C D A) 10 ((10 9
8 7 6 5 4 3 2 1))) (STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9
(NIL) 7 10 8) (CTENTRY 8 (NIL) 4 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY
6 (NIL) 10 7 5) (CTENTRY 5 (NIL) 3 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY
3 (NIL) 5 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A B D D B) 10 ((10 9 8 7 6 5 4 3 2 1))) (STRUCTURE ((CTENTRY 10 (NIL)
8 1 9) (CTENTRY 9 (NIL) 4 10 8) (CTENTRY 8 (NIL) 10 9 7) (CTENTRY
7 (NIL) 6 8 6) (CTENTRY 6 (NIL) 7 7 5) (CTENTRY 5 (NIL) 3 6 4) (CTENTRY
4 (NIL) 9 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 10 2)) (10 A B E A B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((3 4
5 6 7 8 9 10 1 2)) ((5 4 3 2 1 10 9 8 7 6)) ((8 9 10 1 2 3 4 5 6 7)))
(STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 4 10 8) (CTENTRY
8 (NIL) 7 9 7) (CTENTRY 7 (NIL) 8 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY
5 (NIL) 3 6 4) (CTENTRY 4 (NIL) 9 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A B E D A) 10 ((10 9
8 7 6 5 4 3 2 1)) ((10 6 7 8 9 4 5 3 2 1))) (STRUCTURE ((CTENTRY 10
(NIL) 4 1 9) (CTENTRY 9 (NIL) 7 10 8) (CTENTRY 8 (NIL) 6 9 7) (CTENTRY
7 (NIL) 9 8 6) (CTENTRY 6 (NIL) 8 7 5) (CTENTRY 5 (NIL) 3 6 4) (CTENTRY
4 (NIL) 10 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 10 2)) (10 A B F B B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 9
7 8 6 5 4 3 2 1))) (STRUCTURE ((CTENTRY 10 (NIL) 4 1 9) (CTENTRY 9
(NIL) 6 10 8) (CTENTRY 8 (NIL) 7 9 7) (CTENTRY 7 (NIL) 8 8 6) (CTENTRY
6 (NIL) 9 7 5) (CTENTRY 5 (NIL) 3 6 4) (CTENTRY 4 (NIL) 10 5 3) (CTENTRY
3 (NIL) 5 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A B F C A) 10 ((10 9 8 7 6 5 4 3 2 1))) (STRUCTURE ((CTENTRY 10 (NIL)
7 1 9) (CTENTRY 9 (NIL) 8 10 8) (CTENTRY 8 (NIL) 9 9 7) (CTENTRY 7
(NIL) 10 8 6) (CTENTRY 6 (NIL) 3 7 5) (CTENTRY 5 (NIL) 4 6 4) (CTENTRY
4 (NIL) 5 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 10 2)) (10 A C A C A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((3 4
5 6 7 8 9 10 1 2))) (STRUCTURE ((CTENTRY 10 (NIL) 7 1 9) (CTENTRY
9 (NIL) 4 10 8) (CTENTRY 8 (NIL) 5 9 7) (CTENTRY 7 (NIL) 10 8 6) (
CTENTRY 6 (NIL) 3 7 5) (CTENTRY 5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 9
5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL)
2 10 2)) (10 A C E C C) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 7 8 9 4 5
6 3 2 1)) ((3 6 5 4 9 8 7 10 1 2)) ((3 4 5 6 7 8 9 10 1 2))) (STRUCTURE
((CTENTRY 10 (NIL) 4 1 9) (CTENTRY 9 (NIL) 7 10 8) (CTENTRY 8 (NIL)
5 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6 (NIL) 3 7 5) (CTENTRY 5
(NIL) 8 6 4) (CTENTRY 4 (NIL) 10 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A C F C B) 10 ((10 9
8 7 6 5 4 3 2 1))) (STRUCTURE ((CTENTRY 10 (NIL) 4 1 9) (CTENTRY 9
(NIL) 5 10 8) (CTENTRY 8 (NIL) 7 9 7) (CTENTRY 7 (NIL) 8 8 6) (CTENTRY
6 (NIL) 3 7 5) (CTENTRY 5 (NIL) 9 6 4) (CTENTRY 4 (NIL) 10 5 3) (CTENTRY
3 (NIL) 6 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A C F D A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((3 6 7 8 9 5 4 10 1 2)) ((6
3 2 1 10 4 5 9 8 7)) ((9 10 1 2 3 4 5 6 7 8))) (STRUCTURE ((CTENTRY
10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 8 10 8) (CTENTRY 8 (NIL) 9 9 7) (
CTENTRY 7 (NIL) 3 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY 5 (NIL) 4
6 4) (CTENTRY 4 (NIL) 5 5 3) (CTENTRY 3 (NIL) 7 4 2) (CTENTRY 2 (NIL)
1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A D A D A) 10 ((10 9 8 7 6 5
4 3 2 1)) ((3 4 5 6 7 8 9 10 1 2))) (STRUCTURE ((CTENTRY 10 (NIL)
5 1 9) (CTENTRY 9 (NIL) 8 10 8) (CTENTRY 8 (NIL) 9 9 7) (CTENTRY 7
(NIL) 3 8 6) (CTENTRY 6 (NIL) 4 7 5) (CTENTRY 5 (NIL) 10 6 4) (CTENTRY
4 (NIL) 6 5 3) (CTENTRY 3 (NIL) 7 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 10 2)) (10 A D B E A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 1
2 3 4 5 6 7 8 9))) (STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY 9
(NIL) 7 10 8) (CTENTRY 8 (NIL) 3 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY
6 (NIL) 4 7 5) (CTENTRY 5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 6 5 3) (CTENTRY
3 (NIL) 8 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A E B E B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 5 4 6 7 9 8 3 2 1)) ((3
8 9 7 6 4 5 10 1 2)) ((3 4 5 6 7 8 9 10 1 2))) (STRUCTURE ((CTENTRY
10 (NIL) 5 1 9) (CTENTRY 9 (NIL) 3 10 8) (CTENTRY 8 (NIL) 6 9 7) (
CTENTRY 7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 8 7 5) (CTENTRY 5 (NIL) 10
6 4) (CTENTRY 4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 9 4 2) (CTENTRY 2 (NIL)
1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A F C E B) 10 ((10 9 8 7 6 5
4 3 2 1)) ((3 9 8 6 7 4 5 10 1 2))) (STRUCTURE ((CTENTRY 10 (NIL)
5 1 9) (CTENTRY 9 (NIL) 3 10 8) (CTENTRY 8 (NIL) 4 9 7) (CTENTRY 7
(NIL) 6 8 6) (CTENTRY 6 (NIL) 7 7 5) (CTENTRY 5 (NIL) 10 6 4) (CTENTRY
4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 9 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 10 2)) (10 A F D E A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((5 4
3 2 1 10 9 8 7 6))) (STRUCTURE ((CTENTRY 10 (NIL) 4 1 9) (CTENTRY
9 (NIL) 3 10 8) (CTENTRY 8 (NIL) 6 9 7) (CTENTRY 7 (NIL) 5 8 6) (CTENTRY
6 (NIL) 8 7 5) (CTENTRY 5 (NIL) 7 6 4) (CTENTRY 4 (NIL) 10 5 3) (CTENTRY
3 (NIL) 9 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10
A F F B B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 9 8 6 7 5 4 3 2 1)) ((10
4 5 7 6 8 9 3 2 1)) ((10 4 5 6 7 8 9 3 2 1)) ((3 9 8 7 6 5 4 10 1
2)) ((3 9 8 6 7 5 4 10 1 2)) ((3 4 5 7 6 8 9 10 1 2)) ((3 4 5 6 7
8 9 10 1 2))) (STRUCTURE ((CTENTRY 10 (NIL) 3 1 9) (CTENTRY 9 (NIL)
7 10 8) (CTENTRY 8 (NIL) 5 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6
(NIL) 4 7 5) (CTENTRY 5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 6 5 3) (CTENTRY
3 (NIL) 10 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2))
(10 A G B C B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 9 7 8 5 6 4 3 2 1))
((3 4 6 5 8 7 9 10 1 2)) ((3 4 5 6 7 8 9 10 1 2))) (STRUCTURE ((CTENTRY
10 (NIL) 3 1 9) (CTENTRY 9 (NIL) 5 10 8) (CTENTRY 8 (NIL) 6 9 7) (
CTENTRY 7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 8 7 5) (CTENTRY 5 (NIL) 9
6 4) (CTENTRY 4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 10 4 2) (CTENTRY 2 (NIL)
1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A G C D B) 10 ((10 9 8 7 6 5
4 3 2 1)) ((3 4 7 8 6 5 9 10 1 2))) (STRUCTURE ((CTENTRY 10 (NIL)
3 1 9) (CTENTRY 9 (NIL) 5 10 8) (CTENTRY 8 (NIL) 4 9 7) (CTENTRY 7
(NIL) 6 8 6) (CTENTRY 6 (NIL) 7 7 5) (CTENTRY 5 (NIL) 9 6 4) (CTENTRY
4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 10 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY
1 (NIL) 2 10 2)) (10 A G D D A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 9
5 6 7 8 4 3 2 1)) ((3 4 8 7 6 5 9 10 1 2)) ((3 4 5 6 7 8 9 10 1 2)))
(STRUCTURE ((CTENTRY 10 (NIL) 3 1 9) (CTENTRY 9 (NIL) 4 10 8) (CTENTRY
8 (NIL) 6 9 7) (CTENTRY 7 (NIL) 5 8 6) (CTENTRY 6 (NIL) 8 7 5) (CTENTRY
5 (NIL) 7 6 4) (CTENTRY 4 (NIL) 9 5 3) (CTENTRY 3 (NIL) 10 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A G E B B) 10 ((10 9
8 7 6 5 4 3 2 1)) ((10 9 8 6 7 5 4 3 2 1)) ((3 4 5 7 6 8 9 10 1 2))
((3 4 5 6 7 8 9 10 1 2))) (STRUCTURE ((CTENTRY 10 (NIL) 3 1 9) (CTENTRY
9 (NIL) 4 10 8) (CTENTRY 8 (NIL) 5 9 7) (CTENTRY 7 (NIL) 6 8 6) (CTENTRY
6 (NIL) 7 7 5) (CTENTRY 5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 9 5 3) (CTENTRY
3 (NIL) 10 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2))
(10 A G E C A) 10 ((10 9 8 7 6 5 4 3 2 1)) ((3 4 5 6 7 8 9 10 1 2))
((5 4 3 2 1 10 9 8 7 6)) ((8 9 10 1 2 3 4 5 6 7))) (STRUCTURE ((CTENTRY
10 (NIL) 8 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY 8 (NIL) 10 9 7)
(CTENTRY 7 (NIL) 5 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY 5 (NIL) 7
6 4) (CTENTRY 4 (NIL) 2 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY 2 (NIL)
4 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B B B C B) 10 ((10 9 8 7 6 5
4 3 2 1)) ((10 8 9 6 7 5 4 3 2 1)) ((10 9 8 7 6 5 4 2 3 1)) ((10 8
9 6 7 5 4 2 3 1)) ((5 7 6 9 8 10 1 3 2 4)) ((5 6 7 8 9 10 1 3 2 4))
((5 7 6 9 8 10 1 2 3 4)) ((5 6 7 8 9 10 1 2 3 4))) (STRUCTURE ((CTENTRY
10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 7 10 8) (CTENTRY 8 (NIL) 5 9 7) (
CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY 5 (NIL) 8
6 4) (CTENTRY 4 (NIL) 2 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY 2 (NIL)
4 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B B C D B) 10 ((10 9 8 7 6 5
4 3 2 1)) ((10 9 8 7 6 5 4 2 3 1)) ((5 8 9 7 6 10 1 3 2 4)) ((5 8
9 7 6 10 1 2 3 4))) (STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY
9 (NIL) 7 10 8) (CTENTRY 8 (NIL) 6 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY
6 (NIL) 8 7 5) (CTENTRY 5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 2 5 3) (CTENTRY
3 (NIL) 1 4 2) (CTENTRY 2 (NIL) 4 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10
B B E B B) 10 ((10 9 8 7 6 5 4 3 2 1)) ((10 9 7 8 6 5 4 3 2 1)) ((10
9 8 7 6 5 4 2 3 1)) ((10 9 7 8 6 5 4 2 3 1)) ((5 6 8 7 9 10 1 3 2
4)) ((5 6 7 8 9 10 1 3 2 4)) ((5 6 8 7 9 10 1 2 3 4)) ((5 6 7 8 9
10 1 2 3 4)) ((5 4 3 2 1 10 9 8 7 6)) ((5 4 2 3 1 10 9 8 7 6)) ((5
4 3 2 1 10 9 7 8 6)) ((5 4 2 3 1 10 9 7 8 6)) ((10 1 3 2 4 5 6 8 7
9)) ((10 1 2 3 4 5 6 8 7 9)) ((10 1 3 2 4 5 6 7 8 9)) ((10 1 2 3 4
5 6 7 8 9)))))) (RPAQQ NONPOLYTRIVS (NIL NIL NIL ((STRUCTURE ((CTENTRY
8 (NIL) 4 7 7) (CTENTRY 7 (NIL) 1 8 8) (CTENTRY 6 (NIL) 1 5 5) (CTENTRY
5 (NIL) 6 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 2 4 2) (CTENTRY
2 (NIL) 3 3 1) (CTENTRY 1 (NIL) 7 6 2)) NONPOLY8 8 NIL)) ((STRUCTURE
((CTENTRY 10 (NIL) 4 9 9) (CTENTRY 9 (NIL) 1 10 10) (CTENTRY 8 (NIL)
1 7 7) (CTENTRY 7 (NIL) 8 8 6) (CTENTRY 6 (NIL) 5 7 5) (CTENTRY 5
(NIL) 6 6 4) (CTENTRY 4 (NIL) 10 5 3) (CTENTRY 3 (NIL) 2 4 2) (CTENTRY
2 (NIL) 3 3 1) (CTENTRY 1 (NIL) 9 8 2)) NONPOLY10A 10 NIL) (STRUCTURE
((CTENTRY 10 (NIL) 4 9 9) (CTENTRY 9 (NIL) 1 10 10) (CTENTRY 8 (NIL)
6 1 7) (CTENTRY 7 (NIL) 5 8 6) (CTENTRY 6 (NIL) 8 7 5) (CTENTRY 5
(NIL) 7 6 4) (CTENTRY 4 (NIL) 10 5 3) (CTENTRY 3 (NIL) 2 4 2) (CTENTRY
2 (NIL) 3 3 1) (CTENTRY 1 (NIL) 9 8 2)) NONPOLY10B 10 NIL) (STRUCTURE
((CTENTRY 10 (NIL) 4 9 9) (CTENTRY 9 (NIL) 1 10 10) (CTENTRY 8 (NIL)
5 1 7) (CTENTRY 7 (NIL) 6 8 6) (CTENTRY 6 (NIL) 7 7 5) (CTENTRY 5
(NIL) 8 6 4) (CTENTRY 4 (NIL) 10 5 3) (CTENTRY 3 (NIL) 2 4 2) (CTENTRY
2 (NIL) 3 3 1) (CTENTRY 1 (NIL) 9 8 2)) NONPOLY10C 10 NIL) (STRUCTURE
((CTENTRY 10 (NIL) 8 9 9) (CTENTRY 9 (NIL) 2 10 10) (CTENTRY 8 (NIL)
10 1 7) (CTENTRY 7 (NIL) 6 8 6) (CTENTRY 6 (NIL) 7 7 5) (CTENTRY 5
(NIL) 1 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY
2 (NIL) 9 3 1) (CTENTRY 1 (NIL) 5 8 2)) NONPOLY10D 10 NIL) (STRUCTURE
((CTENTRY 10 (NIL) 5 9 9) (CTENTRY 9 (NIL) 1 10 10) (CTENTRY 8 (NIL)
2 1 7) (CTENTRY 7 (NIL) 6 8 6) (CTENTRY 6 (NIL) 7 7 5) (CTENTRY 5
(NIL) 10 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY
2 (NIL) 8 3 1) (CTENTRY 1 (NIL) 9 8 2)) NONPOLY10E 10 NIL)))) (RPAQQ
GAUCHECATALOG (NIL NIL ((STRUCTURE ((CTENTRY 6 (NIL) 3 1 5) (CTENTRY
5 (NIL) 2 6 4) (CTENTRY 4 (NIL) 1 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY
2 (NIL) 5 3 1) (CTENTRY 1 (NIL) 4 6 2)) (6 C C C) 6 NIL)) ((STRUCTURE
((CTENTRY 8 (NIL) 5 1 7) (CTENTRY 7 (NIL) 4 8 6) (CTENTRY 6 (NIL)
3 7 5) (CTENTRY 5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 7 5 3) (CTENTRY 3
(NIL) 6 4 2) (CTENTRY 2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 8 2)) (8 A
C C C) 8 NIL) (STRUCTURE ((CTENTRY 8 (NIL) 5 1 7) (CTENTRY 7 (NIL)
4 8 6) (CTENTRY 6 (NIL) 2 7 5) (CTENTRY 5 (NIL) 8 6 4) (CTENTRY 4
(NIL) 7 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY 2 (NIL) 6 3 1) (CTENTRY
1 (NIL) 3 8 2)) (8 B D C C) 8 NIL) (STRUCTURE ((CTENTRY 8 (NIL) 5
1 7) (CTENTRY 7 (NIL) 3 8 6) (CTENTRY 6 (NIL) 2 7 5) (CTENTRY 5 (NIL)
8 6 4) (CTENTRY 4 (NIL) 1 5 3) (CTENTRY 3 (NIL) 7 4 2) (CTENTRY 2
(NIL) 6 3 1) (CTENTRY 1 (NIL) 4 8 2)) (8 C D D C) 8 NIL)) ((STRUCTURE
((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY 8 (NIL)
5 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY 5
(NIL) 8 6 4) (CTENTRY 4 (NIL) 3 5 3) (CTENTRY 3 (NIL) 4 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A A C C C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY
8 (NIL) 4 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY
5 (NIL) 3 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 5 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A B D C C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY 9 (NIL) 8 10 8) (CTENTRY
8 (NIL) 9 9 7) (CTENTRY 7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 3 7 5) (CTENTRY
5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A C C E A) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 5 10 8) (CTENTRY
8 (NIL) 4 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 3 7 5) (CTENTRY
5 (NIL) 9 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A C D D C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY 9 (NIL) 7 10 8) (CTENTRY
8 (NIL) 4 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6 (NIL) 3 7 5) (CTENTRY
5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A C D E B) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY 9 (NIL) 4 10 8) (CTENTRY
8 (NIL) 7 9 7) (CTENTRY 7 (NIL) 8 8 6) (CTENTRY 6 (NIL) 3 7 5) (CTENTRY
5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 9 5 3) (CTENTRY 3 (NIL) 6 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A C E E A) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 4 10 8) (CTENTRY
8 (NIL) 5 9 7) (CTENTRY 7 (NIL) 3 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY
5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 9 5 3) (CTENTRY 3 (NIL) 7 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A D E C D) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 4 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY
8 (NIL) 5 9 7) (CTENTRY 7 (NIL) 3 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY
5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 10 5 3) (CTENTRY 3 (NIL) 7 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A D F C C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 3 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY
8 (NIL) 5 9 7) (CTENTRY 7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY
5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 10 4 2) (CTENTRY
2 (NIL) 1 3 1) (CTENTRY 1 (NIL) 2 10 2)) (10 A G C C C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY
8 (NIL) 5 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY
5 (NIL) 8 6 4) (CTENTRY 4 (NIL) 2 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY
2 (NIL) 4 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B B C C C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY
8 (NIL) 4 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY
5 (NIL) 2 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY
2 (NIL) 5 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B C D C C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 8 1 9) (CTENTRY 9 (NIL) 5 10 8) (CTENTRY
8 (NIL) 10 9 7) (CTENTRY 7 (NIL) 4 8 6) (CTENTRY 6 (NIL) 2 7 5) (CTENTRY
5 (NIL) 9 6 4) (CTENTRY 4 (NIL) 7 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY
2 (NIL) 6 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B D C D B) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 5 10 8) (CTENTRY
8 (NIL) 4 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 2 7 5) (CTENTRY
5 (NIL) 9 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY
2 (NIL) 6 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B D D D C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY 9 (NIL) 7 10 8) (CTENTRY
8 (NIL) 4 9 7) (CTENTRY 7 (NIL) 9 8 6) (CTENTRY 6 (NIL) 2 7 5) (CTENTRY
5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 8 5 3) (CTENTRY 3 (NIL) 1 4 2) (CTENTRY
2 (NIL) 6 3 1) (CTENTRY 1 (NIL) 3 10 2)) (10 B D D E B) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY
8 (NIL) 3 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY
5 (NIL) 2 6 4) (CTENTRY 4 (NIL) 1 5 3) (CTENTRY 3 (NIL) 8 4 2) (CTENTRY
2 (NIL) 5 3 1) (CTENTRY 1 (NIL) 4 10 2)) (10 C C E C C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 7 1 9) (CTENTRY 9 (NIL) 5 10 8) (CTENTRY
8 (NIL) 3 9 7) (CTENTRY 7 (NIL) 10 8 6) (CTENTRY 6 (NIL) 2 7 5) (CTENTRY
5 (NIL) 9 6 4) (CTENTRY 4 (NIL) 1 5 3) (CTENTRY 3 (NIL) 8 4 2) (CTENTRY
2 (NIL) 6 3 1) (CTENTRY 1 (NIL) 4 10 2)) (10 C D E D C) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 6 1 9) (CTENTRY 9 (NIL) 5 10 8) (CTENTRY
8 (NIL) 3 9 7) (CTENTRY 7 (NIL) 2 8 6) (CTENTRY 6 (NIL) 10 7 5) (CTENTRY
5 (NIL) 9 6 4) (CTENTRY 4 (NIL) 1 5 3) (CTENTRY 3 (NIL) 8 4 2) (CTENTRY
2 (NIL) 7 3 1) (CTENTRY 1 (NIL) 4 10 2)) (10 C E E D D) 10 NIL) (
STRUCTURE ((CTENTRY 10 (NIL) 5 1 9) (CTENTRY 9 (NIL) 6 10 8) (CTENTRY
8 (NIL) 3 9 7) (CTENTRY 7 (NIL) 2 8 6) (CTENTRY 6 (NIL) 9 7 5) (CTENTRY
5 (NIL) 10 6 4) (CTENTRY 4 (NIL) 1 5 3) (CTENTRY 3 (NIL) 8 4 2) (CTENTRY
2 (NIL) 7 3 1) (CTENTRY 1 (NIL) 4 10 2)) (10 C E E E C) 10 NIL))))
(RPAQQ POLYGONALCODES ((2 (A)) (4 (B B) (A A)) (6 (B C B) (A A A)
(A B B) (A C A)) (8 (B C C B) (C E C C) (A A A A) (A A B B) (A A C
A) (A B C B) (A B D A) (A C D B) (A D D A) (A E B B) (A E C A) (B
B B B)) (10 (B C C C B) (B C D D B) (B D E B B) (B D E C C) (C F D
E C) (A A A A A) (A A A B B) (A A A C A) (A A B C B) (A A B D A) (A
A C D B) (A A D D A) (A A E A A) (A A E B B) (A A E C A) (A B B B
B) (A B B C A) (A B C C B) (A B C D A) (A B D D B) (A B E A B) (A
B E D A) (A B F B B) (A B F C A) (A C A C A) (A C E C C) (A C F C
B) (A C F D A) (A D A D A) (A D B E A) (A E B E B) (A F C E B) (A
F D E A) (A F F B B) (A G B C B) (A G C D B) (A G D D A) (A G E B
B) (A G E C A) (B B B C B) (B B C D B) (B B E B B)))) (RPAQQ GAUCHECODES
((6 (C C C)) (8 (A C C C) (B D C C) (C D D C)) (10 (A A C C C) (A
B D C C) (A C C E A) (A C D D C) (A C D E B) (A C E E A) (A D E C
D) (A D F C C) (A G C C C) (B B C C C) (B C D C C) (B D C D B) (B
D D D C) (B D D E B) (C C E C C) (C D E D C) (C E E D D) (C E E E
C)))) (RPAQQ PLANAR? NOBIND) (RPAQQ GAUCHE? T) (RPAQQ NONPOLY? T))
(S-IO (RPAQQ IOVARS ((FNS PRINRAD NUMNODES PRINRAD1 PRINCTAB PRINRAD0
PRINENTRY PRINRADOFF) (VARS GFILE))) (DEFINEQ (PRINRAD (LAMBDA (L
XLATETAB) (PROG (N) (SETQ N (NUMNODES L)) (PRINN N 5) (TERPRI) (PRINRAD1
NIL (FOR NEW I TO N LIST I) L) (PRINRADOFF)))) (NUMNODES (LAMBDA (RAD)
(IPLUS (FOR NEW R IN (FETCH ATTACHEDRADS OF RAD) SUM (ITIMES (CDR
R) (NUMNODES (CAR R)))) (IF (NULL (FETCH CENTER OF RAD)) THEN 0 ELSEIF
(ATOM (FETCH CENTER OF RAD)) THEN 1 ELSEIF (NOT (STRUCTURE? (FETCH
RADSTRUC OF (FETCH CENTER OF RAD)))) THEN 1 ELSE (LENGTH (NODES (FETCH
RADSTRUC OF (FETCH CENTER OF RAD)))))))) (PRINRAD1 (LAMBDA (EFF AA
RAD) (PROG (CENT ATTACHED J X TTABLE) (SETQ CENT (FETCH CENTER OF
RAD)) (SETQ ATTACHED (CLEXPAND (FETCH ATTACHEDRADS OF RAD))) (RETURN
(IF (NOT CENT) THEN (PRINRAD1 (CADR AA) (CONS (CAR AA) (PRINRAD1 (CAR
AA) (CDR AA) (CAR ATTACHED))) (CADR ATTACHED)) ELSEIF (OR (ATOM CENT)
(NOT (STRUCTURE? (FETCH RADSTRUC OF CENT)))) THEN (SETQ X (CDR AA))
(FOR NEW R IN ATTACHED DO (SETQ J (CONS (CAR X) J)) (SETQ X (PRINRAD1
(CAR AA) X R))) (PRINENTRY (CAR AA) CENT (IF EFF THEN (CONS EFF J)
ELSE J)) X ELSE (SETQ X (IF (NOT EFF) THEN AA ELSE (SETQ TTABLE (LIST
(LIST (FETCH AFFLINK OF CENT) (CAR AA) EFF))) (CDR AA))) (FOR NEW
N IN (NODES (FETCH RADSTRUC OF CENT)) WHEN (NOT (EQUAL N (FETCH AFFLINK
OF CENT))) DO (SETQ TTABLE (CONS (LIST N (CAR X)) TTABLE)) (SETQ X
(CDR X))) (FOR NEW NLIST IN (FETCH CUFFLINKS OF CENT) FOR NEW C IN
NLIST AS NEW CT IS (LMASSOC C TTABLE NIL) DO (NCONC1 CT (CAR X)) (SETQ
X (PRINRAD1 (CAR CT) X (CAR ATTACHED))) (SETQ ATTACHED (CDR ATTACHED)))
(PRINCTAB (FETCH CTABLE OF (FETCH RADSTRUC OF CENT)) TTABLE) X)))))
(PRINCTAB (LAMBDA (CTAB TTABLE) (FOR NEW CT IN CTAB AS NEW CPRIME
IS (LMASSOC (FETCH NODENUM OF CT) TTABLE NIL) DO (PRINENTRY (CAR CPRIME)
(FETCH ATOMTYPE OF (FETCH MARKERS OF CT)) (APPEND (CDR CPRIME) (FOR
NEW Y IN (FETCH NBRS OF CT) WHEN (NOT (EQ Y (QUOTE FV))) XLIST (CAR
(LMASSOC Y TTABLE NIL)))))))) (PRINRAD0 (LAMBDA (L) (PRINN L 3)))
(PRINENTRY (LAMBDA (N AT CON) (PRINN N 3) (PRIN1 " ") (PRIN1 (COND
((EQP 1 (NCHARS AT)) AT) ((NOT AT) (FOR NEW X IN CON WHEN (EQ X (QUOTE
FV)) SUM 1)) (T (GENLET AT)))) (TAB 8) (MAPC CON (FUNCTION (LAMBDA
(X) (OR (EQ X (QUOTE FV)) (PRINN X 3))))) (TERPRI))) (PRINRADOFF (LAMBDA
(L) (TERPRI) (IF XLATETAB THEN (FOR NEW PR IN XLATETAB DO (SPACES
1) (PRIN1 (CAR PR)) (PRIN1 " = ") (PRINT (CDR PR)))) (PRIN1 
"--------------------
") (PRINT (QUOTE END*))))) (RPAQQ GFILE T))
(S-KLOOP (RPAQQ KLOOPVARS ((FNS KLOOPEDRINGS LOOPPARTITIONS REMMB
FIXLPP RINGSKELETONS))) (DEFINEQ (REMMB (LAMBDA (L) (FOR NEW S IN
L WHEN (FOR NEW CT IN (FETCH CTABLE OF S) FOR NEW N ON (FETCH NBRS
OF CT) AND (NOT (MEMB (CAR N) (CDR N)))) XLIST S))) (FIXLPP (LAMBDA
NIL (COND ((NOT (CAR (NLSETQ LPFIXED))) (SETQ LPFIXED T) (SETQ NO1LPFLG
NIL) (ADVISE (QUOTE (CLPARTS IN LOOPPARTITIONS)) (QUOTE BIND) (QUOTE
((#1 (ASSOC 1 CL))))) (ADVISE (QUOTE (CLPARTS IN LOOPPARTITIONS))
(QUOTE BEFORE) (QUOTE (COND ((AND #1 NO1LPFLG) (RETURN (MAPCAR (CLPARTS
(REMOVE #1 CL)) (FUNCTION (LAMBDA (X) (CONS #1 X)))))))))) (T (QUOTE
ALREADY-DONE)))))))
(S-LABELER (RPAQQ LABELERVARS ((FNS CHECKL COMB COMBCHECK CHECK LLABEL
LABELM LABEL1 LABEL1L COMB1 SIZE COMBINE CLASSES CLASSES2 CLASSIFY3
CLASSIFYNODES CLASSIFYEDGES NODEMARK EDGEMARK LABEL1C MAKEMULT MAKENODES
MAKEEDGES LABELMULT LABEL0A LABELN LABELE UNCLASS LUNCLASS LLUNCLASS
LABELEDGES LABELFV LLABELNODES MAKEUNCLASSED) (RECORDS CHECKPERM NPL
CHECKVAL LABELING) (P (TYPERECORD NODETYPE NODENUMS) (TYPERECORD 
MULTTYPE (MULT . UNMULTED)) (TYPERECORD EDGETYPE NODEPRS) (TYPERECORD
COMBINATION (OBJ1 . OBJ2)) (TYPERECORD UNCLASSED OBJECTS) (TYPERECORD
OTHERTYPE OTHOBJECTS)))) (DEFINEQ (CHECKL (LAMBDA (S SB NPL) (COND
((SETQ NPL (CHECK S SB NPL 0)) (COND ((FETCH REMPERMS OF (FETCH NPLLEFT
OF NPL)) (HELP "CHECKL ERROR" (LIST S SB NPL))) (T (LIST (CREATE 
LABELING LABELED ← S UNLABELED ← SB LSTRUC ← (REVERSE (FETCH OKPERMS
OF (FETCH NPLLEFT OF NPL)))))))) (T NIL)))) (COMB (LAMBDA (OBJ S SB
NPL LABELS) (IF (ZEROP LABELS) THEN (CHECKL S (APPEND SB OBJ) NPL)
ELSEIF (EQP LABELS (LENGTH OBJ)) THEN (CHECKL (APPEND OBJ S) SB NPL)
ELSEIF (IGREATERP LABELS (LENGTH OBJ)) THEN NIL ELSE (APPEND (COMBCHECK
(CDR OBJ) (CONS (CAR OBJ) S) SB NPL (SUB1 LABELS)) (COMBCHECK (CDR
OBJ) S (CONS (CAR OBJ) SB) NPL LABELS))))) (COMBCHECK (LAMBDA (OBJ
S SB NPL LABELS) (IF (SETQ NPL (CHECK S SB NPL LABELS)) THEN (COMB
(DIFF OBJ (FETCH LABELEDSOFAR OF NPL)) (FETCH LABELEDSOFAR OF NPL)
SB (FETCH NPLLEFT OF NPL) (FETCH LABELSLEFT OF NPL)) ELSE NIL))) (CHECK
(LAMBDA (S SB NPL LABELS) (PROG (NEWNPL OBJ POBJ OK) (SETQ OK (FETCH
OKPERMS OF NPL)) (SETQ NPL (FETCH REMPERMS OF NPL)) L1 (IF (NULL NPL)
THEN (RETURN (CREATE CHECKVAL LABELEDSOFAR ← S NPLLEFT ← (CREATE NPL
OKPERMS ← OK REMPERMS ← NEWNPL) LABELSLEFT ← LABELS))) (SETQ OBJ (FETCH
OBJ OF (CAR NPL))) (SETQ POBJ (FETCH POBJ OF (CAR NPL))) L3 (IF (NULL
OBJ) THEN (GO L8) ELSEIF (MEMBER (CAR OBJ) S) THEN (GO L4) ELSEIF
(MEMBER (CAR OBJ) SB) THEN (GO L5)) L6 (SETQ NEWNPL (CONS (CREATE
CHECKPERM USING (CAR NPL) OBJ ← OBJ POBJ ← POBJ) NEWNPL)) L2 (SETQ
NPL (CDR NPL)) (GO L1) L9 (SETQ NEWNPL NIL) L8 (SETQ OK (CONS (FETCH
ORIGPERM OF (CAR NPL)) OK)) (GO L2) L4 (IF (MEMBER (CAR POBJ) S) THEN
(GO L7) ELSEIF (MEMBER (CAR POBJ) SB) THEN (RETURN NIL) ELSEIF (MINUSP
(SETQ LABELS (SUB1 LABELS))) THEN (RETURN NIL)) (SETQ S (CONS (CAR
POBJ) S)) (SETQ NPL (APPEND NEWNPL NPL)) (IF (NULL (CDR OBJ)) THEN
(GO L9)) (SETQ NEWNPL (LIST (CREATE CHECKPERM USING (CAR NPL) OBJ
← (CDR OBJ) POBJ ← (CDR POBJ)))) (GO L2) L7 (SETQ OBJ (CDR OBJ)) (SETQ
POBJ (CDR POBJ)) (GO L3) L5 (IF (MEMBER (CAR POBJ) S) THEN (GO L2)
ELSEIF (MEMBER (CAR POBJ) SB) THEN (GO L7)) (GO L6)))) (LLABEL (LAMBDA
(OBJECTS LABELS STRUC) (IF (NULL LABELS) THEN (LIST (CREATE LABELING
LSTRUC ← STRUC)) ELSE (FOR NEW L1 IN (LABELM (CAR OBJECTS) (CAR LABELS)
STRUC) FOR NEW L2 IN (LLABEL (CDR OBJECTS) (CDR LABELS) (FETCH LSTRUC
OF L1)) XLIST (CREATE LABELING USING L2 LABELED ← (CONS (FETCH LABELED
OF L1) @)))))) (LABELM (LAMBDA (OBJECTS LABELS STRUC) (SETQ STRUC
(CREATE STRUCTURE USING STRUC CTABLE ← (SORT @ (FUNCTION (LAMBDA (X
Y) (ILESSP (FETCH NODENUM OF X) (FETCH NODENUM OF Y))))))) (IF (NULL
LABELS) THEN (LIST (CREATE LABELING UNLABELED ← OBJECTS LSTRUC ← STRUC))
ELSE (FOR NEW L1 IN (LABEL1 OBJECTS (CAR LABELS) STRUC) FOR NEW L2
IN (LABELM (FETCH UNLABELED OF L1) (CDR LABELS) (FETCH LSTRUC OF L1))
XLIST (CREATE LABELING USING L2 LABELED ← (CONS (FETCH LABELED OF
L1) @)))))) (LABEL1 (LAMBDA (OBJECTS LABELS STRUC) (PROG (SZ SZC)
(RETURN (IF (ZEROP LABELS) THEN (LIST (CREATE LABELING UNLABELED ←
OBJECTS LSTRUC ← STRUC)) ELSEIF (EQP LABELS (SETQ SZ (SIZE OBJECTS)))
THEN (LIST (CREATE LABELING LABELED ← OBJECTS LSTRUC ← STRUC)) ELSEIF
(GREATERP LABELS SZ) THEN NIL ELSEIF (NULL (CDR (SETQ OBJECTS (CLASSES
OBJECTS STRUC)))) THEN (LABEL1C (CAR OBJECTS) LABELS STRUC) ELSE (
LABEL1L OBJECTS LABELS STRUC)))))) (LABEL1L (LAMBDA (OBJL LABELS STRUC)
(IF (NULL OBJL) THEN (IF (ZEROP LABELS) THEN (LIST (CREATE LABELING
LSTRUC ← STRUC)) ELSE NIL) ELSEIF (ZEROP LABELS) THEN (LIST (CREATE
LABELING LSTRUC ← STRUC UNLABELED ← (PROG (R) (FOR NEW O IN OBJL DO
(SETQ R (COMBINE O R))) (RETURN R)))) ELSE (PROG (SZ SZC) (SETQ SZ
(IPLUS (SETQ SZC (SIZE (CAR OBJL))) (FOR NEW O IN (CDR OBJL) SUM (SIZE
O)))) (RETURN (FOR NEW I FROM (MAX 0 (IDIFFERENCE LABELS (IDIFFERENCE
SZ SZC))) TO (MIN LABELS SZC) FOR NEW L1 IN (LABEL1C (CAR OBJL) I
STRUC) FOR NEW L2 IN (LABEL1L (CDR OBJL) (IDIFFERENCE LABELS I) (FETCH
LSTRUC OF L1)) XLIST (CREATE LABELING USING L2 LABELED ← (COMBINE
(FETCH LABELED OF L1) @) UNLABELED ← (COMBINE (FETCH UNLABELED OF
L1) @)))))))) (COMB1 (LAMBDA (OBJ LAB UNL PERMS LABELS) (IF (ZEROP
LABELS) THEN (LIST (CREATE LABELING LABELED ← LAB UNLABELED ← UNL
LSTRUC ← PERMS)) ELSEIF (EQUAL LABELS (LENGTH OBJ)) THEN (LIST (CREATE
LABELING LABELED ← (APPEND OBJ LAB) UNLABELED ← UNL LSTRUC ← PERMS))
ELSE (NCONC (COMB1 (CDR OBJ) (CONS (CAR OBJ) LAB) UNL PERMS (SUB1
LABELS)) (COMB1 (CDR OBJ) LAB (CONS (CAR OBJ) UNL) PERMS LABELS)))))
(SIZE (LAMBDA (OBJECTS) (IF (MULTTYPE? OBJECTS) THEN (ITIMES (FETCH
MULT OF OBJECTS) (SIZE (FETCH UNMULTED OF OBJECTS))) ELSEIF (
COMBINATION? OBJECTS) THEN (IPLUS (SIZE (FETCH OBJ1 OF OBJECTS)) (SIZE
(FETCH OBJ2 OF OBJECTS))) ELSEIF (OR (NODETYPE? OBJECTS) (EDGETYPE?
OBJECTS) (UNCLASSED? OBJECTS)) THEN (LENGTH (CDR OBJECTS)) ELSE (HELP
OBJECTS "BAD ARG IN SIZE") 0))) (COMBINE (LAMBDA (O1 O2) (IF (NOT
O1) THEN O2 ELSEIF (NOT O2) THEN O1 ELSE (CREATE COMBINATION OBJ1
← O1 OBJ2 ← O2)))) (CLASSES (LAMBDA (OBJECTS STRUC) (COND ((COMBINATION?
OBJECTS) (NCONC (CLASSES (FETCH OBJ1 OF OBJECTS) STRUC) (CLASSES (FETCH
OBJ2 OF OBJECTS) STRUC))) ((UNCLASSED? OBJECTS) (CLASSES2 (FETCH OBJECTS
OF OBJECTS) STRUC)) (T (LIST OBJECTS))))) (CLASSES2 (LAMBDA (OBJECTS
STRUC) (PROG NIL (SETQ OBJECTS (GROUPCOUNT OBJECTS)) (RETURN (FOR
NEW O IN (CDR OBJECTS) AS NEW M FROM 2 FOR NEW O2 IN (CLASSIFY3 O
STRUC) XLIST FIRST (CLASSIFY3 (CAR OBJECTS) STRUC) (MAKEMULT M O2))))))
(CLASSIFY3 (LAMBDA (OBJECTS STRUC) (PROG (N E OTH) (FOR NEW X IN OBJECTS
DO (IF (NUMBERP X) THEN (SETQ N (CONS X N)) ELSEIF (AND (NUMBERP (CAR
X)) (NUMBERP (CDR X))) THEN (SETQ E (CONS X E)) ELSE (SETQ OTH (CONS
X OTH)))) (RETURN (NCONC (MAPCAR (CLASSIFYNODES (REVERSE N) STRUC)
(FUNCTION MAKENODES)) (NCONC (MAPCAR (CLASSIFYEDGES (REVERSE E) STRUC)
(FUNCTION MAKEEDGES)) (IF OTH THEN (LIST (OTHERTYPE OTHOBJECTS = OTH))
ELSE NIL))))))) (CLASSIFYNODES (LAMBDA (NODES SSTRUC) (CDRLIST (GROUPBY
(FUNCTION NODEMARK) NODES)))) (CLASSIFYEDGES (LAMBDA (EDGES SSTRUC)
(CDRLIST (GROUPBY (FUNCTION EDGEMARK) EDGES)))) (NODEMARK (LAMBDA
(NODE) (PROGN (SETQ NODE (FINDCTE NODE SSTRUC)) (CONS (NODEVALENCE
NODE) (FETCH MARKERS OF NODE))))) (EDGEMARK (LAMBDA (EDGE) (ORDPAIR
(NODEMARK (FETCH NODE1 OF EDGE)) (NODEMARK (FETCH NODE2 OF EDGE)))))
(LABEL1C (LAMBDA (OBJECTS LABELS STRUC) (IF (ZEROP LABELS) THEN (LIST
(CREATE LABELING UNLABELED ← OBJECTS LSTRUC ← STRUC)) ELSEIF (EQUAL
LABELS (SIZE OBJECTS)) THEN (LIST (CREATE LABELING LABELED ← OBJECTS
LSTRUC ← STRUC)) ELSEIF (NODETYPE? OBJECTS) THEN (LABELN (FETCH NODENUMS
OF OBJECTS) LABELS STRUC) ELSEIF (EDGETYPE? OBJECTS) THEN (LABELE
(FETCH NODEPRS OF OBJECTS) LABELS STRUC) ELSEIF (MULTTYPE? OBJECTS)
THEN (LABELMULT (FETCH MULT OF OBJECTS) (FETCH UNMULTED OF OBJECTS)
LABELS STRUC) ELSE (LABELUNDEFINEDSTRUC OBJECTS LABELS STRUC)))) (
MAKEMULT (LAMBDA (M OBJ) (IF (ZEROP M) THEN NIL ELSEIF (EQP M 1) THEN
OBJ ELSE (CREATE MULTTYPE MULT ← M UNMULTED ← OBJ)))) (MAKENODES (LAMBDA
(NODES) (IF (NOT NODES) THEN NIL ELSE (CREATE NODETYPE NODENUMS ←
NODES)))) (MAKEEDGES (LAMBDA (EDGES) (IF (NOT EDGES) THEN NIL ELSE
(CREATE EDGETYPE NODEPRS ← EDGES)))) (LABELMULT (LAMBDA (MULTS UNMULTED
LABELS STRUC) (FOR NEW P IN (NUMPARTITIONS LABELS (SIZE UNMULTED)
0 MULTS) AS NEW CLP IS (CLCREATE P) FOR NEW L IN (LABELM UNMULTED
(CDRLIST CLP) STRUC) XLIST (CREATE LABELING USING L LABELED ← (FOR
NEW X IN @ AS NEW PR IN CLP COMBINE FIRST NIL (MAKEMULT (CAR PR) X))
UNLABELED ← (FOR NEW X IN (FETCH LABELED OF L) AS NEW PR IN CLP COMBINE
FIRST NIL (MAKEMULT (IDIFFERENCE MULTS (CAR PR)) X)))))) (LABEL0A
(LAMBDA (OBJECTS STRUC NPL LABELS MAKEFN) (FOR NEW L IN (IF (NOT (FETCH
REMPERMS OF NPL)) THEN (COMB1 OBJECTS NIL NIL (FETCH OKPERMS OF NPL)
LABELS) ELSE (COMB OBJECTS NIL (DIFF (FETCH OBJ OF (CAR (FETCH REMPERMS
OF NPL))) OBJECTS) NPL LABELS)) XLIST (CREATE LABELING USING L LABELED
← (APPLY* MAKEFN @) UNLABELED ← (APPLY* MAKEFN (DIFF OBJECTS (FETCH
LABELED OF L))) LSTRUC ← (CREATE STRUCTURE USING STRUC GROUP ← (FETCH
LSTRUC OF L)))))) (LABELN (LAMBDA (NODENUMS LABELS STRUC) (LABEL0A
NODENUMS STRUC (FINDGROUPNODES NODENUMS STRUC) LABELS (FUNCTION 
MAKENODES)))) (LABELE (LAMBDA (EDGES LABELS STRUC) (LABEL0A EDGES
STRUC (FINDGROUPEDGES EDGES STRUC) LABELS (FUNCTION MAKEEDGES))))
(UNCLASS (LAMBDA (OBJECTS) (IF (NOT OBJECTS) THEN NIL ELSEIF (UNCLASSED?
OBJECTS) THEN (FETCH OBJECTS OF OBJECTS) ELSEIF (NODETYPE? OBJECTS)
THEN (FETCH NODENUMS OF OBJECTS) ELSEIF (EDGETYPE? OBJECTS) THEN (FETCH
NODEPRS OF OBJECTS) ELSEIF (MULTTYPE? OBJECTS) THEN (FOR NEW M TO
(FETCH MULT OF OBJECTS) APPEND (UNCLASS (FETCH UNMULTED OF OBJECTS)))
ELSEIF (COMBINATION? OBJECTS) THEN (APPEND (UNCLASS (FETCH OBJ1 OF
OBJECTS)) (UNCLASS (FETCH OBJ2 OF OBJECTS))) ELSE (HELP 
"BAD ARG TO UNCLASS" OBJECTS) NIL))) (LUNCLASS (LAMBDA (LOBJ) (MAPCAR
LOBJ (FUNCTION UNCLASS)))) (LLUNCLASS (LAMBDA (LLOBJ) (MAPCAR LLOBJ
(FUNCTION LUNCLASS)))) (LABELEDGES (LAMBDA (STRUC LABELS) (FOR NEW
L IN (LABELM (CREATE UNCLASSED OBJECTS ← (FOR NEW CT IN (FETCH CTABLE
OF STRUC) FOR NEW N IN (FETCH NBRS OF CT) WHEN (NOT (IGREATERP (FETCH
NODENUM OF CT) N)) XLIST (CONS (FETCH NODENUM OF CT) N))) LABELS STRUC)
XLIST (CREATE LABELING USING L LABELED ← (LUNCLASS @))))) (LABELFV
(LAMBDA (STRUC LABELS) (FOR NEW L IN (LABELM (CREATE UNCLASSED OBJECTS
← (COLLECTFV STRUC)) LABELS STRUC) XLIST (CREATE LABELING USING L
LABELED ← (LUNCLASS @))))) (LLABELNODES (LAMBDA (STRUC LLABELS) (FOR
NEW L IN (LLABEL (MAPCAR (LISTBYVALENCE STRUC) (FUNCTION MAKEUNCLASSED))
LLABELS STRUC) XLIST (CREATE LABELING USING L LABELED ← (LLUNCLASS
@))))) (MAKEUNCLASSED (LAMBDA (X) (IF (NOT X) THEN NIL ELSE (CREATE
UNCLASSED OBJECTS ← X))))) (RECORD CHECKPERM (OBJ POBJ . ORIGPERM))
(RECORD NPL (REMPERMS . OKPERMS)) (RECORD CHECKVAL (LABELEDSOFAR 
LABELSLEFT . NPLLEFT)) (RECORD LABELING (LABELED UNLABELED . LSTRUC))
(TYPERECORD NODETYPE NODENUMS) (TYPERECORD MULTTYPE (MULT . UNMULTED))
(TYPERECORD EDGETYPE NODEPRS) (TYPERECORD COMBINATION (OBJ1 . OBJ2))
(TYPERECORD UNCLASSED OBJECTS) (TYPERECORD OTHERTYPE OTHOBJECTS))
(S-NEWGEN (RPAQQ NEWGENVARS ((FNS NOFV-RINGS' RINGS' FVPARTITIONS'
VALENCE' CLBYVALENCE' PARTFVS ≠RINGS PARTFV1))) (DEFINEQ (NOFV-RINGS'
(LAMBDA (CLL) (FOR NEW STRUC IN (NOFVRINGS (MAPCAR CLL (FUNCTION CLCOUNT)))
NCONC (STRUCTURESWITHATOMS CLL STRUC)))) (RINGS' (LAMBDA (FVCL CLL)
(COND (FVCL (FOR NEW FVP' IN (FVPARTITIONS' CLL FVCL) FOR NEW S IN
(NOFV-RINGS' FVP') XLIST S)) (T (NOFV-RINGS' CLL))))) (FVPARTITIONS'
(LAMBDA (CLL FVCL) (FOR NEW FVP IN (FVPARTITION1 (CLCOUNT FVCL) (MAPCAR
(CDR CLL) (FUNCTION CLCOUNT)) 1) FOR NEW FVP' IN (PARTFVS (CONS NIL
(MAPCAR FVP (FUNCTION REVERSE))) FVCL CLL) XLIST (CLBYVALENCE' FVP'))))
(VALENCE' (LAMBDA (X) (IDIFFERENCE (VALENCE (CAR X)) (CLCOUNT (CDR
X))))) (CLBYVALENCE' (LAMBDA (CL) (SETQ CL (GROUPBY (FUNCTION (LAMBDA
(PR) (VALENCE' (CAR PR)))) CL)) (FOR NEW I FROM 2 TO (maximum CAR
in CL) LIST (LMASSOC I CL NIL)))) (PARTFVS (LAMBDA (FVPART FVCL CLL)
(OR (AND FVPART CLL (FOR NEW FV1 IN (CLPARTS FVCL (TD (CAR FVPART)
1)) FOR NEW P1 IN (PARTFV1 (CONS (IDIFFERENCE (CLCOUNT (CAR CLL))
(SUMOF (CAR FVPART))) (CAR FVPART)) FV1 (CAR CLL) 0) FOR NEW RL IN
(PARTFVS (CDR FVPART) (CLDIFF FVCL FV1) (CDR CLL)) XLIST (APPEND P1
RL))) (QUOTE (NIL))))) (≠RINGS (LAMBDA (U CL) (RINGS' (LIST (CONS
(QUOTE FV) (COMPUTEFV U CL))) (CLBYVALENCE CL)))) (PARTFV1 (LAMBDA
(FVL FVCL CL NFV) (OR (AND FVCL FVL CL (FOR NEW R1 IN (CLPARTS FVCL
(ITIMES NFV (CAR FVL))) FOR NEW R2 IN (CLPARTS CL (CAR FVL)) FOR NEW
R4 IN (CLEQUALPARTS R1 (CAR FVL) NFV) AS NEW R5 IS (CLCREATE R4) FOR
NEW R6 IN (CLPARTITIONS R2 (CDRLIST R5)) FOR NEW RESTPART IN (PARTFV1
(CDR FVL) (CLDIFF FVCL R1) (CLDIFF CL R2) (ADD1 NFV)) XLIST (FOR NEW
FVPART IN R5 AS NEW ATPART IN R6 FOR NEW ATPAIR IN ATPART XLIST FIRST
RESTPART (CONS (CONS (CAR ATPAIR) (CAR FVPART)) (CDR ATPAIR))))) (LIST
(MAPCAR CL (FUNCTION (LAMBDA (PR) (CONS (LIST (CAR PR)) (CDR PR)))))))))))
(S-STRUCTURE (RPAQQ STRUCTUREVARS ((FNS FREEVALENCESIZE NODES COLLECTFV
CATALOG STRUCWITH2NODES CATALOG3 DAISY SINGLERING BIVCHAIN CONNECT
COPYSTRUC DISCONNECT FINDCTE FIRSTOFNODES LASTOFNODES LISTBYVALENCE
PUTFVN PUTFVS PUTNEWNODE PUTNEWNODEINCT NODEVALENCE VALENCETYPE 
INSERTMARKERS ATTACHFVS ATTACHBIVALENTS ATTACHBIVS&LOOPS PUTLOOPS
PUTBIVN PUTBIVS PUTBIVE) (P (TYPERECORD STRUCTURE (CTABLE UGRAPH 
LASTNODE# . GROUP) DEFAULT GROUP← (LIST NIL))) (RECORDS RADICAL 
MAKECENTER MARKER-REC) (P (TYPERECORD CTENTRY (NODENUM MARKERS . NBRS)
DEFAULT MARKERS← (CREATE MARKER-REC))) (RECORDS EDGE) (P (TYPERECORD
STRUCFORM FORM)))) (DEFINEQ (FREEVALENCESIZE (LAMBDA (S) (COND ((
STRUCTURE? S) (FOR NEW X IN (FETCH CTABLE OF S) FOR NEW Y IN (FETCH
NBRS OF X) WHEN (EQ Y (QUOTE FV)) SUM 1)) ((AND (STRUCFORM? S) (EQ
(CAR (FORM S)) (QUOTE ATTACHFVS))) (FOR NEW FVL IN (CADR (FETCH FORM
OF S)) FOR NEW X IN FVL AS NEW I FROM 1 SUM (ITIMES I X))) ((STRUCFORM?
S) (COND ((EQ (CAR (FORM S)) (QUOTE RINGS)) (COMPUTEFV (CADR (FORM
S)) (CADDR (FORM S)))) (T (HELP)))) (T (HELP "VALENCE" S))))) (NODES
(LAMBDA (STRUC) (MAPCAR (FETCH CTABLE OF STRUC) (FUNCTION (LAMBDA
(X) (FETCH NODENUM OF X)))))) (COLLECTFV (LAMBDA (S) (FOR NEW CT IN
(FETCH CTABLE OF S) FOR NEW X IN (FETCH NBRS OF CT) WHEN (EQ X (QUOTE
FV)) XLIST FIRST (AND (LISTP (FETCH ATOMTYPE OF (FETCH MARKERS OF
CT))) (FOR NEW PR IN (CDR (FETCH ATOMTYPE OF (FETCH MARKERS OF CT)))
WHEN (EQ (CAR PR) (QUOTE FV)) FOR NEW I := (1 (CDR PR)) XLIST (FETCH
NODENUM OF CT))) (FETCH NODENUM OF CT)))) (CATALOG (LAMBDA (L) (IF
(AND (EQP (SUMOF (SETQ L (TRIMZEROS L))) 2) (EQP (CAR (LAST L)) 2))
THEN (LIST (STRUCWITH2NODES (IPLUS 2 (LENGTH L)))) ELSE (CATALOG3
L)))) (STRUCWITH2NODES (LAMBDA (N AT1 AT2) (CREATE STRUCTURE UGRAPH
← (CONS (QUOTE MBONDS) N) CTABLE ← (LIST (CREATE CTENTRY NODENUM ←
1 NBRS ← (FOR NEW I FROM 1 TO N XLIST FIRST (AND AT1 (FOR NEW Z FROM
(ADD1 N) TO (VALENCE AT1) XLIST (QUOTE FV))) 2) MARKERS ← (CREATE
MARKER-REC ATOMTYPE ← AT1)) (CREATE CTENTRY NODENUM ← 2 NBRS ← (FOR
NEW I FROM 1 TO N XLIST FIRST (AND AT2 (FOR NEW Z FROM (ADD1 N) TO
(VALENCE AT2) XLIST (QUOTE FV))) 1) MARKERS ← (CREATE MARKER-REC 
ATOMTYPE ← AT2))) LASTNODE# ← 2))) (CATALOG3 (LAMBDA (TVL) (PROG (C
TVL2) (COND ((NOT (ZEROP (SUMOF (CDR TVL)))) NIL) (T (SETQ TVL2 (
QUOTIENT (CAR TVL) 2)) (SETQ C (APPEND (APPEND (COND (POLYGONAL? (CAR
(NTH POLYGONALCATALOG TVL2))) (T NIL)) (COND (NONPOLY? (CAR (NTH 
NONPOLYTRIVS TVL2))) (T NIL))) (COND (GAUCHE? (CAR (NTH GAUCHECATALOG
TVL2))) (T NIL)))))) (RETURN (IF C THEN C ELSE (LIST (STRUCFORM FORM
= (LIST (QUOTE CATALOG) TVL)))))))) (DAISY (LAMBDA (PART) (PROG (S
C) (SETQ LASTNODE 1) (SETQ S (CREATE STRUCTURE UGRAPH ← (CONS ' DAISY
PART) CTABLE ← (LIST (CREATE CTENTRY NODENUM ← LASTNODE)) LASTNODE#
← LASTNODE)) (SETQ C LASTNODE) (FOR NEW PAIR IN PART FOR NEW I FROM
1 TO (CDR PAIR) DO (SETQ S (PUTBIVN S C (CAR PAIR)))) (RETURN (LIST
S))))) (SINGLERING (LAMBDA (N) (PROG (S) (SETQ LASTNODE 0) (SETQ S
(BIVCHAIN N)) (CONNECT (FINDCTE (FIRSTOFNODES S) S) (FINDCTE (
LASTOFNODES S) S)) (RETURN (CREATE STRUCTURE USING S UGRAPH ← (CONS
(QUOTE SINGLERING) N)))))) (BIVCHAIN (LAMBDA (N) (PROG (X) (FOR NEW
I FROM 1 TO N DO (SETQ X (PUTNEWNODE X))) (RETURN (OR X (HELP 
"EMPTY BIVCHAIN")))))) (CONNECT (LAMBDA (X Y) (PROG NIL (REPLACE NBRS
OF X WITH (CONS (FETCH NODENUM OF Y) (FETCH NBRS OF X))) (COND ((NOT
(EQ X Y)) (REPLACE NBRS OF Y WITH (CONS (FETCH NODENUM OF X) (FETCH
NBRS OF Y)))))))) (COPYSTRUC (LAMBDA (S) (PROGN (SETQ LASTNODE (FETCH
LASTNODE# OF S)) (COPY S)))) (DISCONNECT (LAMBDA (X Y) (PROG NIL (
REPLACE NBRS OF X WITH (DELETE (FETCH NODENUM OF Y) (FETCH NBRS OF
X))) (REPLACE NBRS OF Y WITH (DELETE (FETCH NODENUM OF X) (FETCH NBRS
OF Y)))))) (FINDCTE (LAMBDA (N LST) (COND ((NUMBERP N) (COND ((
STRUCTURE? LST) (SETQ LST (FETCH CTABLE OF LST))) (T NIL)) (FOR NEW
L IN LST WHEN (EQUAL (FETCH NODENUM OF L) N) DO (RETURN L))) ((NUMBERP
LST) (FINDCTE LST N)) (T (ERROR (QUOTE (BAD ARGUMENTS TO FINDCTE)))))))
(FIRSTOFNODES (LAMBDA (X) (CAR (NODES X)))) (LASTOFNODES (LAMBDA (X)
(CAR (LAST (NODES X))))) (LISTBYVALENCE (LAMBDA (S) (PROG (M V) (SETQ
M (LENGTH (NODES S))) (RETURN (FOR NEW I FROM 2 WHILE (IGREATERP M
0) LIST (SETQ V (VALENCETYPE S I)) (SETQ M (IDIFFERENCE M (LENGTH
V))) V))))) (PUTFVN (LAMBDA (S N J) (PROG NIL (SETQ N (FINDCTE N (FETCH
CTABLE OF S))) (REPLACE NBRS OF N WITH (NCONC (FETCH NBRS OF N) (FOR
NEW I FROM 1 TO J XLIST (QUOTE FV)))) (RETURN S)))) (PUTFVS (LAMBDA
(S FVP) (FOR NEW NI IN FVP FOR NEW NIJ IN NI AS NEW J FROM 1 FOR NEW
NODE IN NIJ DO (SETQ S (PUTFVN S NODE J))) S)) (PUTNEWNODE (LAMBDA
(STRUC) (IF STRUC THEN (PROGN (SETQ LASTNODE (ADD1 (FETCH LASTNODE#
OF STRUC))) (CREATE STRUCTURE USING STRUC CTABLE ← (PUTNEWNODEINCT
(CREATE CTENTRY NODENUM ← LASTNODE) (FETCH CTABLE OF STRUC)) LASTNODE#
← LASTNODE)) ELSE (PROGN (SETQ LASTNODE (ADD1 LASTNODE)) (CREATE 
STRUCTURE CTABLE ← (LIST (CREATE CTENTRY NODENUM ← LASTNODE)) LASTNODE#
← LASTNODE))))) (PUTNEWNODEINCT (LAMBDA (X Y) (PROG (Z) (SETQ Z (CAR
Y)) (FETCH REPLACE OF NBRS OF Z WITH (CONS (FETCH NODENUM OF X) (FETCH
NBRS OF Z))) (REPLACE NBRS OF X WITH (CONS (FETCH NODENUM OF Z) (FETCH
NBRS OF X))) (RETURN (CONS X Y))))) (NODEVALENCE (LAMBDA (NODE) (IF
(NULL NODE) THEN (ERROR ' (NULL NODE GIVEN TO NODEVALENCE)) ELSEIF
(CTENTRY? NODE) THEN (LENGTH (FETCH NBRS OF NODE)) ELSE (NODEVALENCE
(FINDCTE (CAR NODE) (CDR NODE)))))) (VALENCETYPE (LAMBDA (S I) (FOR
NEW NODE IN (FETCH CTABLE OF S) WHEN (EQ I (NODEVALENCE NODE)) XLIST
(FETCH NODENUM OF NODE)))) (INSERTMARKERS (LAMBDA (STRUC CLL L) (PROG
NIL (FOR NEW CL IN CLL AS NEW NLL IN L FOR NEW PAIR IN CL AS NEW NL
IN NLL FOR NEW N IN NL DO (REPLACE ATOMTYPE OF (FETCH MARKERS OF (
FINDCTE N STRUC)) WITH (CAR PAIR))) (RETURN STRUC)))) (ATTACHFVS (LAMBDA
(FVP STRUC) (FOR NEW L IN (LLABELNODES STRUC FVP) XLIST (PUTFVS (
COPYSTRUC (FETCH LSTRUC OF L)) (FETCH LABELED OF L))))) (ATTACHBIVALENTS
(LAMBDA (PART STRUC) (FOR NEW L IN (LABELEDGES STRUC (CDRLIST PART))
XLIST (PUTBIVS (COPYSTRUC (FETCH LSTRUC OF L)) (CARLIST PART) (FETCH
LABELED OF L))))) (ATTACHBIVS&LOOPS (LAMBDA (EL LL STRUC) (IF (NOT
EL) THEN (FOR NEW L2 IN (LLABELNODES STRUC (LCDRLIST LL)) XLIST (
PUTLOOPS (COPYSTRUC (FETCH LSTRUC OF L2)) (LCARLIST LL) (FETCH LABELED
OF L2))) ELSE (FOR NEW L1 IN (LABELEDGES STRUC (CDRLIST EL)) FOR NEW
L2 IN (LLABELNODES (FETCH LSTRUC OF L1) (LCDRLIST LL)) XLIST (PUTLOOPS
(PUTBIVS (COPYSTRUC (FETCH LSTRUC OF L2)) (CARLIST EL) (FETCH LABELED
OF L1)) (LCARLIST LL) (FETCH LABELED OF L2)))))) (PUTLOOPS (LAMBDA
(STRUC LPS LNODES) (FOR NEW LOBJ IN LNODES AS NEW LLABS IN LPS FOR
NEW OBJ IN LOBJ AS NEW LAB IN LLABS FOR NEW LPPR IN LAB FOR NEW I
FROM 1 TO (CDR LPPR) FOR NEW NODE IN OBJ DO (SETQ STRUC (PUTBIVN STRUC
NODE (CAR LPPR)))) STRUC)) (PUTBIVN (LAMBDA (STRUC NODE NBIVS) (IF
(ZEROP NBIVS) THEN STRUC ELSE (PROG (B) (SETQ B (BIVCHAIN NBIVS))
(CONNECT (CAR (FETCH CTABLE OF B)) (SETQ NODE (FINDCTE NODE (FETCH
CTABLE OF STRUC)))) (CONNECT (CAR (LAST (FETCH CTABLE OF B))) NODE)
(NCONC (FETCH CTABLE OF STRUC) (FETCH CTABLE OF B)) (REPLACE LASTNODE#
OF STRUC WITH (FETCH LASTNODE# OF B)) (RETURN STRUC))))) (PUTBIVS
(LAMBDA (S L LST) (FOR NEW X IN LST AS NEW N IN L FOR NEW E IN X DO
(PUTBIVE S E N)) S)) (PUTBIVE (LAMBDA (S E N) (IF (ZEROP N) THEN S
ELSE (PROG (B N1 N2) (SETQ B (BIVCHAIN N)) (CONNECT (CAR (FETCH CTABLE
OF B)) (SETQ N1 (FINDCTE (CAR E) (FETCH CTABLE OF S)))) (CONNECT (CAR
(LAST (FETCH CTABLE OF B))) (SETQ N2 (FINDCTE (CDR E) (FETCH CTABLE
OF S)))) (DISCONNECT N1 N2) (NCONC (FETCH CTABLE OF S) (FETCH CTABLE
OF B)) (REPLACE LASTNODE# OF S WITH (FETCH LASTNODE# OF B)) (RETURN
S)))))) (TYPERECORD STRUCTURE (CTABLE UGRAPH LASTNODE# . GROUP) DEFAULT
GROUP← (LIST NIL)) (RECORD RADICAL (CENTER . ATTACHEDRADS)) (RECORD
MAKECENTER (AFFLINK RADSTRUC . CUFFLINKS)) (RECORD MARKER-REC (ATOMTYPE
. OTHERMARKERS)) (TYPERECORD CTENTRY (NODENUM MARKERS . NBRS) DEFAULT
MARKERS← (CREATE MARKER-REC)) (RECORD EDGE (NODE1 . NODE2)) (TYPERECORD
STRUCFORM FORM))
(S-TOPLEVEL (RPAQQ TOPLEVELVARS ((FNS MOLECULES SUPERATOMS RINGS 
RINGSKELETONS NOFVRINGS DAISIES NOLOOPEDRINGS SINGLERINGS TRY? 
KLOOPEDRINGS))) (DEFINEQ (MOLECULES (LAMBDA (CL U) (IF (ZEROP U) THEN
(GENMOL CL) ELSE (FOR NEW SAP IN (SUPERATOMPARTITIONS CL U) FOR NEW
S IN (SUPERATOMS (FETCH SUPERATOMPARTS OF SAP)) NCONC (GENMOL (APPEND
(CLCREATE S) (FETCH REMAININGATOMS OF SAP))))))) (SUPERATOMS (LAMBDA
(UCL-COMP) (GROUPRADS (FOR NEW UCLN IN UCL-COMP LIST (CONS (RINGS
(CAAR UCLN) (CDAR UCLN)) (CDR UCLN)))))) (RINGS (LAMBDA (U CL) (COND
((EQP 2 (CLCOUNT CL)) (SETQ CL (CLEXPAND CL)) (LIST (STRUCWITH2NODES
(ADD1 U) (CAR CL) (CADR CL)))) (T (PROG (FV) (SETQ FV (COMPUTEFV U
CL)) (SETQ CL (CLBYVALENCE CL)) (RETURN (FOR NEW SKELETON IN (
RINGSKELETONS FV (MAPCAR CL (FUNCTION CLCOUNT))) NCONC (
STRUCTURESWITHATOMS CL SKELETON)))))))) (RINGSKELETONS (LAMBDA (FV
VL) (COND ((ZEROP FV) (NOFVRINGS VL)) (T (FOR NEW FVSECTION IN (GROUPBY
(FUNCTION (LAMBDA (X) (FETCH NEWVL OF X))) (FVPARTITIONS FV VL)) AS
NEW STRUCLIST IS (NOFVRINGS (CAR FVSECTION)) FOR NEW FVPART IN (CDR
FVSECTION) FOR NEW STRUC IN STRUCLIST NCONC (ATTACHFVS (FETCH FVR
OF FVPART) STRUC)))))) (NOFVRINGS (LAMBDA (VL) (PROG (MNLPS MXLPS
SUMREST) (SETQ SUMREST (SUMOF (CDR VL))) (IF (ZEROP SUMREST) THEN
(RETURN (SINGLERINGS (CAR VL))) ELSEIF (EQP SUMREST 1) THEN (RETURN
(DAISIES VL))) (SETQ MNLPS (MINLOOPS VL)) (SETQ MXLPS (MAXLOOPS VL))
(RETURN (FOR NEW P FROM MNLPS TO MXLPS NCONC (KLOOPEDRINGS P VL))))))
(DAISIES (LAMBDA (VL) (FOR NEW P IN (NUMPARTITIONS (CAR VL) (IQUOTIENT
(FOR NEW X IN (CDR VL) AS NEW I FROM 3 UNTIL (NOT (ZEROP X)) PROGN
I) 2) 1 NIL) NCONC (DAISY (CLCREATE P))))) (NOLOOPEDRINGS (LAMBDA
(VL) (IF (ZEROP (CAR VL)) THEN (CATALOG (CDR VL)) ELSE (PROG (BP)
(SETQ BP (BIVALENTPARTITIONS VL)) (RETURN (FOR NEW S IN (CATALOG (CDR
VL)) FOR NEW P IN BP NCONC (ATTACHBIVALENTS (CLCREATE P) S)))))))
(SINGLERINGS (LAMBDA (N) (LIST (SINGLERING N)))) (TRY? (LAMBDA (S)
T)) (KLOOPEDRINGS (LAMBDA (P VL) (IF (ZEROP P) THEN (NOLOOPEDRINGS
VL) ELSE (FOR NEW LPSECTION IN (LOOPPARTITIONS P VL) AS NEW STRUCLIST
IS (NOFVRINGS (FETCH LOOPVL OF (CAR LPSECTION))) WHEN STRUCLIST NCONC
(FOR NEW LOOPPART IN LPSECTION FOR NEW STRUC IN STRUCLIST NCONC (
ATTACHBIVS&LOOPS (FETCH EDGELABELS OF LOOPPART) (FETCH LOOPLABELS
OF LOOPPART) STRUC))))))))
(S-TREE (RPAQQ TREEVARS ((FNS GENRADLIST GENRADS GENRADD GENRAD GENMOL
PERMRADS PERMRADL))) (DEFINEQ (GENRADLIST (LAMBDA (CLCL) (GROUPRADS
(MAPCAR CLCL (FUNCTION (LAMBDA (X) (CONS (GENRAD (CAR X)) (CDR X))))))))
(GENRADS (LAMBDA (CL N) (IF (NULL CL) THEN (LIST NIL) ELSE (FOR NEW
PARTITION IN (CLPARTITIONSN CL N 1 (CLCOUNT CL)) NCONC (GENRADLIST
(CLCREATE PARTITION)))))) (GENRADD (LAMBDA (CENTER NEWCL) (FOR NEW
DEGREE FROM 1 TO (MIN (CLCOUNT NEWCL) (SUB1 (VALENCE CENTER))) FOR
NEW RADCL IN (GENRADS NEWCL DEGREE) NCONC (PERMRADL CENTER RADCL T))))
(GENRAD (LAMBDA (CL) (IF (AND (NULL (CDR CL)) (EQUAL (CDAR CL) 1))
THEN (PERMRADL (CAAR CL) NIL T) ELSE (FOR NEW OLDCL ON CL AS NEW CENTER
IS (CAAR OLDCL) AS NEW NEWCL IS (CLDIFF CL (LIST (CONS CENTER 1)))
NCONC (GENRADD CENTER NEWCL))))) (GENMOL (LAMBDA (CL) (PROG (MINDEG
RESULT NATOMS) (IF (EQP 1 (SETQ NATOMS (CLCOUNT CL))) THEN (RETURN
(PERMRADL (CAAR CL) NIL NIL)) ELSEIF (EVENP NATOMS) THEN (FOR NEW
PART IN (CLEQUALPARTS CL 2 (IQUOTIENT NATOMS 2)) FOR NEW RADS IN (
GENRADLIST (CLCREATE PART)) DO (SETQ RESULT (APPEND (PERMRADL NIL
RADS NIL) RESULT))) (SETQ MINDEG 3) ELSE (SETQ MINDEG 2)) (SETQ NATOMS
(SUB1 NATOMS)) (FOR NEW PAIR IN CL AS NEW CENTER IS (CAR PAIR) AS
NEW NEWCL IS (CLDIFF CL (LIST (CONS CENTER 1))) FOR NEW DEG FROM MINDEG
TO (MIN (VALENCE CENTER) NATOMS) FOR NEW P IN (CLPARTITIONSN NEWCL
DEG 1 (IQUOTIENT NATOMS 2)) FOR NEW RADS IN (GENRADLIST (CLCREATE
P)) DO (SETQ RESULT (NCONC (PERMRADL CENTER RADS NIL) RESULT))) (RETURN
RESULT)))) (PERMRADS (LAMBDA (CENT CLRADS FLAG) (IF (ATOM CENT) THEN
(LIST (CREATE RADICAL CENTER ← CENT ATTACHEDRADS ← CLRADS)) ELSEIF
(NOT (STRUCTURE? CENT)) THEN (LIST (CREATE RADICAL CENTER ← (CREATE
MAKECENTER RADSTRUC ← CENT) ATTACHEDRADS ← CLRADS)) ELSE (FOR NEW
ST IN (LABELFV CENT ((LAMBDA (X) (IF FLAG THEN (CONS 1 X) ELSE X))
(CDRLIST CLRADS))) XLIST (CREATE RADICAL CENTER ← (CREATE MAKECENTER
AFFLINK ← (IF FLAG THEN (CAAR (FETCH LABELED OF ST)) ELSE NIL) RADSTRUC
← (FETCH LSTRUC OF ST) CUFFLINKS ← (IF FLAG THEN (CDR (FETCH LABELED
OF ST)) ELSE (FETCH LABELED OF ST))) ATTACHEDRADS ← CLRADS))))) (
PERMRADL (LAMBDA (CENT LRADS FLAG) (PERMRADS CENT (CLCREATE LRADS)
FLAG)))))