aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/TSETCAT-.lsp
blob: dcd1eca4e08ce9cc692f5c1d71e86be068444829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
(/VERSIONCHECK 2) 

(DEFUN |TSETCAT-;=;2SB;1| (|ts| |us| $)
  (PROG (#0=#:G1453 #1=#:G1459)
    (RETURN
      (COND
        ((SPADCALL |ts| (|getShellEntry| $ 12))
         (SPADCALL |us| (|getShellEntry| $ 12)))
        ((OR (SPADCALL |us| (|getShellEntry| $ 12))
             (NULL (SPADCALL
                       (PROG2 (LETT #0#
                                    (SPADCALL |ts|
                                     (|getShellEntry| $ 14))
                                    |TSETCAT-;=;2SB;1|)
                              (QCDR #0#)
                         (|check-union| (QEQCAR #0# 0)
                             (|getShellEntry| $ 10) #0#))
                       (PROG2 (LETT #0#
                                    (SPADCALL |us|
                                     (|getShellEntry| $ 14))
                                    |TSETCAT-;=;2SB;1|)
                              (QCDR #0#)
                         (|check-union| (QEQCAR #0# 0)
                             (|getShellEntry| $ 10) #0#))
                       (|getShellEntry| $ 15))))
         'NIL)
        ('T
         (SPADCALL
             (PROG2 (LETT #1# (SPADCALL |ts| (|getShellEntry| $ 17))
                          |TSETCAT-;=;2SB;1|)
                    (QCDR #1#)
               (|check-union| (QEQCAR #1# 0) (|getShellEntry| $ 6) #1#))
             (PROG2 (LETT #1# (SPADCALL |us| (|getShellEntry| $ 17))
                          |TSETCAT-;=;2SB;1|)
                    (QCDR #1#)
               (|check-union| (QEQCAR #1# 0) (|getShellEntry| $ 6) #1#))
             (|getShellEntry| $ 18))))))) 

(DEFUN |TSETCAT-;infRittWu?;2SB;2| (|ts| |us| $)
  (PROG (|p| #0=#:G1466 |q| |v|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |us| (|getShellEntry| $ 12))
              (SPADCALL (SPADCALL |ts| (|getShellEntry| $ 12))
                  (|getShellEntry| $ 20)))
             ((SPADCALL |ts| (|getShellEntry| $ 12)) 'NIL)
             ('T
              (SEQ (LETT |p|
                         (PROG2 (LETT #0#
                                      (SPADCALL |ts|
                                       (|getShellEntry| $ 21))
                                      |TSETCAT-;infRittWu?;2SB;2|)
                                (QCDR #0#)
                           (|check-union| (QEQCAR #0# 0)
                               (|getShellEntry| $ 10) #0#))
                         |TSETCAT-;infRittWu?;2SB;2|)
                   (LETT |q|
                         (PROG2 (LETT #0#
                                      (SPADCALL |us|
                                       (|getShellEntry| $ 21))
                                      |TSETCAT-;infRittWu?;2SB;2|)
                                (QCDR #0#)
                           (|check-union| (QEQCAR #0# 0)
                               (|getShellEntry| $ 10) #0#))
                         |TSETCAT-;infRittWu?;2SB;2|)
                   (EXIT (COND
                           ((SPADCALL |p| |q| (|getShellEntry| $ 22))
                            'T)
                           ((SPADCALL |p| |q| (|getShellEntry| $ 23))
                            'NIL)
                           ('T
                            (SEQ (LETT |v|
                                       (SPADCALL |p|
                                        (|getShellEntry| $ 24))
                                       |TSETCAT-;infRittWu?;2SB;2|)
                                 (EXIT (SPADCALL
                                        (SPADCALL |ts| |v|
                                         (|getShellEntry| $ 25))
                                        (SPADCALL |us| |v|
                                         (|getShellEntry| $ 25))
                                        (|getShellEntry| $ 26)))))))))))))) 

(DEFUN |TSETCAT-;reduced?;PSMB;3| (|p| |ts| |redOp?| $)
  (PROG (|lp|)
    (RETURN
      (SEQ (LETT |lp| (SPADCALL |ts| (|getShellEntry| $ 29))
                 |TSETCAT-;reduced?;PSMB;3|)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((NULL |lp|) 'NIL)
                           ('T
                            (SPADCALL |p| (|SPADfirst| |lp|) |redOp?|))))
                   (GO G191)))
                (SEQ (EXIT (LETT |lp| (CDR |lp|)
                                 |TSETCAT-;reduced?;PSMB;3|)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT (NULL |lp|)))))) 

(DEFUN |TSETCAT-;basicSet;LMU;4| (|ps| |redOp?| $)
  (PROG (|b| |bs| |p| |ts|)
    (RETURN
      (SEQ (LETT |ps| (SPADCALL (ELT $ 32) |ps| (|getShellEntry| $ 34))
                 |TSETCAT-;basicSet;LMU;4|)
           (EXIT (COND
                   ((SPADCALL (ELT $ 35) |ps| (|getShellEntry| $ 36))
                    (CONS 1 "failed"))
                   ('T
                    (SEQ (LETT |ps|
                               (SPADCALL (ELT $ 22) |ps|
                                   (|getShellEntry| $ 37))
                               |TSETCAT-;basicSet;LMU;4|)
                         (LETT |bs| (SPADCALL (|getShellEntry| $ 38))
                               |TSETCAT-;basicSet;LMU;4|)
                         (LETT |ts| NIL |TSETCAT-;basicSet;LMU;4|)
                         (SEQ G190
                              (COND
                                ((NULL (SPADCALL (NULL |ps|)
                                        (|getShellEntry| $ 20)))
                                 (GO G191)))
                              (SEQ (LETT |b| (|SPADfirst| |ps|)
                                    |TSETCAT-;basicSet;LMU;4|)
                                   (LETT |bs|
                                    (SPADCALL |bs| |b|
                                     (|getShellEntry| $ 39))
                                    |TSETCAT-;basicSet;LMU;4|)
                                   (LETT |ps| (CDR |ps|)
                                    |TSETCAT-;basicSet;LMU;4|)
                                   (EXIT
                                    (SEQ G190
                                     (COND
                                       ((NULL
                                         (COND
                                           ((NULL |ps|) 'NIL)
                                           ('T
                                            (SPADCALL
                                             (SPADCALL
                                              (LETT |p|
                                               (|SPADfirst| |ps|)
                                               |TSETCAT-;basicSet;LMU;4|)
                                              |bs| |redOp?|
                                              (|getShellEntry| $ 40))
                                             (|getShellEntry| $ 20)))))
                                        (GO G191)))
                                     (SEQ
                                      (LETT |ts| (CONS |p| |ts|)
                                       |TSETCAT-;basicSet;LMU;4|)
                                      (EXIT
                                       (LETT |ps| (CDR |ps|)
                                        |TSETCAT-;basicSet;LMU;4|)))
                                     NIL (GO G190) G191 (EXIT NIL))))
                              NIL (GO G190) G191 (EXIT NIL))
                         (EXIT (CONS 0 (CONS |bs| |ts|))))))))))) 

(DEFUN |TSETCAT-;basicSet;LMMU;5| (|ps| |pred?| |redOp?| $)
  (PROG (|bps| |b| |bs| |p| |gps| |ts|)
    (RETURN
      (SEQ (LETT |ps| (SPADCALL (ELT $ 32) |ps| (|getShellEntry| $ 34))
                 |TSETCAT-;basicSet;LMMU;5|)
           (EXIT (COND
                   ((SPADCALL (ELT $ 35) |ps| (|getShellEntry| $ 36))
                    (CONS 1 "failed"))
                   ('T
                    (SEQ (LETT |gps| NIL |TSETCAT-;basicSet;LMMU;5|)
                         (LETT |bps| NIL |TSETCAT-;basicSet;LMMU;5|)
                         (SEQ G190
                              (COND
                                ((NULL (SPADCALL (NULL |ps|)
                                        (|getShellEntry| $ 20)))
                                 (GO G191)))
                              (SEQ (LETT |p| (|SPADfirst| |ps|)
                                    |TSETCAT-;basicSet;LMMU;5|)
                                   (LETT |ps| (CDR |ps|)
                                    |TSETCAT-;basicSet;LMMU;5|)
                                   (EXIT
                                    (COND
                                      ((SPADCALL |p| |pred?|)
                                       (LETT |gps| (CONS |p| |gps|)
                                        |TSETCAT-;basicSet;LMMU;5|))
                                      ('T
                                       (LETT |bps| (CONS |p| |bps|)
                                        |TSETCAT-;basicSet;LMMU;5|)))))
                              NIL (GO G190) G191 (EXIT NIL))
                         (LETT |gps|
                               (SPADCALL (ELT $ 22) |gps|
                                   (|getShellEntry| $ 37))
                               |TSETCAT-;basicSet;LMMU;5|)
                         (LETT |bs| (SPADCALL (|getShellEntry| $ 38))
                               |TSETCAT-;basicSet;LMMU;5|)
                         (LETT |ts| NIL |TSETCAT-;basicSet;LMMU;5|)
                         (SEQ G190
                              (COND
                                ((NULL (SPADCALL (NULL |gps|)
                                        (|getShellEntry| $ 20)))
                                 (GO G191)))
                              (SEQ (LETT |b| (|SPADfirst| |gps|)
                                    |TSETCAT-;basicSet;LMMU;5|)
                                   (LETT |bs|
                                    (SPADCALL |bs| |b|
                                     (|getShellEntry| $ 39))
                                    |TSETCAT-;basicSet;LMMU;5|)
                                   (LETT |gps| (CDR |gps|)
                                    |TSETCAT-;basicSet;LMMU;5|)
                                   (EXIT
                                    (SEQ G190
                                     (COND
                                       ((NULL
                                         (COND
                                           ((NULL |gps|) 'NIL)
                                           ('T
                                            (SPADCALL
                                             (SPADCALL
                                              (LETT |p|
                                               (|SPADfirst| |gps|)
                                               |TSETCAT-;basicSet;LMMU;5|)
                                              |bs| |redOp?|
                                              (|getShellEntry| $ 40))
                                             (|getShellEntry| $ 20)))))
                                        (GO G191)))
                                     (SEQ
                                      (LETT |ts| (CONS |p| |ts|)
                                       |TSETCAT-;basicSet;LMMU;5|)
                                      (EXIT
                                       (LETT |gps| (CDR |gps|)
                                        |TSETCAT-;basicSet;LMMU;5|)))
                                     NIL (GO G190) G191 (EXIT NIL))))
                              NIL (GO G190) G191 (EXIT NIL))
                         (LETT |ts|
                               (SPADCALL (ELT $ 22)
                                   (SPADCALL |ts| |bps|
                                    (|getShellEntry| $ 44))
                                   (|getShellEntry| $ 37))
                               |TSETCAT-;basicSet;LMMU;5|)
                         (EXIT (CONS 0 (CONS |bs| |ts|))))))))))) 

(DEFUN |TSETCAT-;initials;SL;6| (|ts| $)
  (PROG (|p| |ip| |lip| |lp|)
    (RETURN
      (SEQ (LETT |lip| NIL |TSETCAT-;initials;SL;6|)
           (EXIT (COND
                   ((SPADCALL |ts| (|getShellEntry| $ 12)) |lip|)
                   ('T
                    (SEQ (LETT |lp|
                               (SPADCALL |ts| (|getShellEntry| $ 29))
                               |TSETCAT-;initials;SL;6|)
                         (SEQ G190
                              (COND
                                ((NULL (SPADCALL (NULL |lp|)
                                        (|getShellEntry| $ 20)))
                                 (GO G191)))
                              (SEQ (LETT |p| (|SPADfirst| |lp|)
                                    |TSETCAT-;initials;SL;6|)
                                   (COND
                                     ((NULL
                                       (SPADCALL
                                        (LETT |ip|
                                         (SPADCALL |p|
                                          (|getShellEntry| $ 46))
                                         |TSETCAT-;initials;SL;6|)
                                        (|getShellEntry| $ 35)))
                                      (LETT |lip|
                                       (CONS
                                        (SPADCALL |ip|
                                         (|getShellEntry| $ 47))
                                        |lip|)
                                       |TSETCAT-;initials;SL;6|)))
                                   (EXIT
                                    (LETT |lp| (CDR |lp|)
                                     |TSETCAT-;initials;SL;6|)))
                              NIL (GO G190) G191 (EXIT NIL))
                         (EXIT (SPADCALL |lip| (|getShellEntry| $ 48))))))))))) 

(DEFUN |TSETCAT-;degree;SNni;7| (|ts| $)
  (PROG (|lp| |d|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |ts| (|getShellEntry| $ 12)) 0)
             ('T
              (SEQ (LETT |lp| (SPADCALL |ts| (|getShellEntry| $ 29))
                         |TSETCAT-;degree;SNni;7|)
                   (LETT |d|
                         (SPADCALL (|SPADfirst| |lp|)
                             (|getShellEntry| $ 51))
                         |TSETCAT-;degree;SNni;7|)
                   (SEQ G190
                        (COND
                          ((NULL (SPADCALL
                                     (NULL
                                      (LETT |lp| (CDR |lp|)
                                       |TSETCAT-;degree;SNni;7|))
                                     (|getShellEntry| $ 20)))
                           (GO G191)))
                        (SEQ (EXIT (LETT |d|
                                    (* |d|
                                     (SPADCALL (|SPADfirst| |lp|)
                                      (|getShellEntry| $ 51)))
                                    |TSETCAT-;degree;SNni;7|)))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT |d|)))))))) 

(DEFUN |TSETCAT-;quasiComponent;SR;8| (|ts| $)
  (CONS (SPADCALL |ts| (|getShellEntry| $ 29))
        (SPADCALL |ts| (|getShellEntry| $ 53)))) 

(DEFUN |TSETCAT-;normalized?;PSB;9| (|p| |ts| $)
  (SPADCALL |p| (SPADCALL |ts| (|getShellEntry| $ 29))
      (|getShellEntry| $ 57))) 

(DEFUN |TSETCAT-;stronglyReduced?;PSB;10| (|p| |ts| $)
  (SPADCALL |p| (SPADCALL |ts| (|getShellEntry| $ 29))
      (|getShellEntry| $ 59))) 

(DEFUN |TSETCAT-;headReduced?;PSB;11| (|p| |ts| $)
  (SPADCALL (SPADCALL |p| (|getShellEntry| $ 61)) |ts|
      (|getShellEntry| $ 62))) 

(DEFUN |TSETCAT-;initiallyReduced?;PSB;12| (|p| |ts| $)
  (PROG (|lp| |red|)
    (RETURN
      (SEQ (LETT |lp| (SPADCALL |ts| (|getShellEntry| $ 29))
                 |TSETCAT-;initiallyReduced?;PSB;12|)
           (LETT |red| 'T |TSETCAT-;initiallyReduced?;PSB;12|)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((OR (NULL |lp|)
                                (SPADCALL |p| (|getShellEntry| $ 35)))
                            'NIL)
                           ('T |red|)))
                   (GO G191)))
                (SEQ (SEQ G190
                          (COND
                            ((NULL (COND
                                     ((NULL |lp|) 'NIL)
                                     ('T
                                      (SPADCALL
                                       (SPADCALL |p|
                                        (|getShellEntry| $ 24))
                                       (SPADCALL (|SPADfirst| |lp|)
                                        (|getShellEntry| $ 24))
                                       (|getShellEntry| $ 64)))))
                             (GO G191)))
                          (SEQ (EXIT (LETT |lp| (CDR |lp|)
                                      |TSETCAT-;initiallyReduced?;PSB;12|)))
                          NIL (GO G190) G191 (EXIT NIL))
                     (EXIT (COND
                             ((NULL (NULL |lp|))
                              (COND
                                ((SPADCALL
                                     (SPADCALL (|SPADfirst| |lp|)
                                      (|getShellEntry| $ 24))
                                     (SPADCALL |p|
                                      (|getShellEntry| $ 24))
                                     (|getShellEntry| $ 65))
                                 (COND
                                   ((SPADCALL |p| (|SPADfirst| |lp|)
                                     (|getShellEntry| $ 66))
                                    (SEQ
                                     (LETT |lp| (CDR |lp|)
                                      |TSETCAT-;initiallyReduced?;PSB;12|)
                                     (EXIT
                                      (LETT |p|
                                       (SPADCALL |p|
                                        (|getShellEntry| $ 46))
                                       |TSETCAT-;initiallyReduced?;PSB;12|))))
                                   ('T
                                    (LETT |red| 'NIL
                                     |TSETCAT-;initiallyReduced?;PSB;12|))))
                                ('T
                                 (LETT |p|
                                       (SPADCALL |p|
                                        (|getShellEntry| $ 46))
                                       |TSETCAT-;initiallyReduced?;PSB;12|)))))))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT |red|))))) 

(DEFUN |TSETCAT-;reduce;PSMMP;13| (|p| |ts| |redOp| |redOp?| $)
  (PROG (|ts0| #0=#:G1541 |reductor| #1=#:G1544)
    (RETURN
      (SEQ (COND
             ((OR (SPADCALL |ts| (|getShellEntry| $ 12))
                  (SPADCALL |p| (|getShellEntry| $ 35)))
              |p|)
             ('T
              (SEQ (LETT |ts0| |ts| |TSETCAT-;reduce;PSMMP;13|)
                   (SEQ G190
                        (COND
                          ((NULL (COND
                                   ((SPADCALL |ts|
                                     (|getShellEntry| $ 12))
                                    'NIL)
                                   ('T
                                    (SPADCALL
                                     (SPADCALL |p|
                                      (|getShellEntry| $ 35))
                                     (|getShellEntry| $ 20)))))
                           (GO G191)))
                        (SEQ (LETT |reductor|
                                   (PROG2
                                    (LETT #0#
                                     (SPADCALL |ts|
                                      (|getShellEntry| $ 14))
                                     |TSETCAT-;reduce;PSMMP;13|)
                                    (QCDR #0#)
                                     (|check-union| (QEQCAR #0# 0)
                                      (|getShellEntry| $ 10) #0#))
                                   |TSETCAT-;reduce;PSMMP;13|)
                             (LETT |ts|
                                   (PROG2
                                    (LETT #1#
                                     (SPADCALL |ts|
                                      (|getShellEntry| $ 17))
                                     |TSETCAT-;reduce;PSMMP;13|)
                                    (QCDR #1#)
                                     (|check-union| (QEQCAR #1# 0)
                                      (|getShellEntry| $ 6) #1#))
                                   |TSETCAT-;reduce;PSMMP;13|)
                             (EXIT (COND
                                     ((NULL
                                       (SPADCALL |p| |reductor|
                                        |redOp?|))
                                      (SEQ
                                       (LETT |p|
                                        (SPADCALL |p| |reductor|
                                         |redOp|)
                                        |TSETCAT-;reduce;PSMMP;13|)
                                       (EXIT
                                        (LETT |ts| |ts0|
                                         |TSETCAT-;reduce;PSMMP;13|)))))))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT |p|)))))))) 

(DEFUN |TSETCAT-;rewriteSetWithReduction;LSMML;14|
       (|lp| |ts| |redOp| |redOp?| $)
  (PROG (|p| |rs|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |ts| (|getShellEntry| $ 70)) |lp|)
             ('T
              (SEQ (LETT |lp|
                         (SPADCALL (ELT $ 32) |lp|
                             (|getShellEntry| $ 34))
                         |TSETCAT-;rewriteSetWithReduction;LSMML;14|)
                   (EXIT (COND
                           ((NULL |lp|) |lp|)
                           ((SPADCALL (ELT $ 35) |lp|
                                (|getShellEntry| $ 36))
                            (LIST (|spadConstant| $ 71)))
                           ('T
                            (SEQ (LETT |rs| NIL
                                       |TSETCAT-;rewriteSetWithReduction;LSMML;14|)
                                 (SEQ G190
                                      (COND
                                        ((NULL
                                          (SPADCALL (NULL |lp|)
                                           (|getShellEntry| $ 20)))
                                         (GO G191)))
                                      (SEQ
                                       (LETT |p| (|SPADfirst| |lp|)
                                        |TSETCAT-;rewriteSetWithReduction;LSMML;14|)
                                       (LETT |lp| (CDR |lp|)
                                        |TSETCAT-;rewriteSetWithReduction;LSMML;14|)
                                       (LETT |p|
                                        (SPADCALL
                                         (SPADCALL |p| |ts| |redOp|
                                          |redOp?|
                                          (|getShellEntry| $ 72))
                                         (|getShellEntry| $ 47))
                                        |TSETCAT-;rewriteSetWithReduction;LSMML;14|)
                                       (EXIT
                                        (COND
                                          ((NULL
                                            (SPADCALL |p|
                                             (|getShellEntry| $ 32)))
                                           (COND
                                             ((SPADCALL |p|
                                               (|getShellEntry| $ 35))
                                              (SEQ
                                               (LETT |lp| NIL
                                                |TSETCAT-;rewriteSetWithReduction;LSMML;14|)
                                               (EXIT
                                                (LETT |rs|
                                                 (LIST
                                                  (|spadConstant| $ 71))
                                                 |TSETCAT-;rewriteSetWithReduction;LSMML;14|))))
                                             ('T
                                              (LETT |rs|
                                               (CONS |p| |rs|)
                                               |TSETCAT-;rewriteSetWithReduction;LSMML;14|)))))))
                                      NIL (GO G190) G191 (EXIT NIL))
                                 (EXIT (SPADCALL |rs|
                                        (|getShellEntry| $ 48)))))))))))))) 

(DEFUN |TSETCAT-;stronglyReduce;PSP;15| (|p| |ts| $)
  (SPADCALL |p| |ts| (ELT $ 74) (ELT $ 66) (|getShellEntry| $ 72))) 

(DEFUN |TSETCAT-;headReduce;PSP;16| (|p| |ts| $)
  (SPADCALL |p| |ts| (ELT $ 76) (ELT $ 77) (|getShellEntry| $ 72))) 

(DEFUN |TSETCAT-;initiallyReduce;PSP;17| (|p| |ts| $)
  (SPADCALL |p| |ts| (ELT $ 79) (ELT $ 80) (|getShellEntry| $ 72))) 

(DEFUN |TSETCAT-;removeZero;PSP;18| (|p| |ts| $)
  (PROG (|v| |tsv-| #0=#:G1567 #1=#:G1576 |q|)
    (RETURN
      (SEQ (EXIT (COND
                   ((OR (SPADCALL |p| (|getShellEntry| $ 35))
                        (SPADCALL |ts| (|getShellEntry| $ 12)))
                    |p|)
                   ('T
                    (SEQ (LETT |v|
                               (SPADCALL |p| (|getShellEntry| $ 24))
                               |TSETCAT-;removeZero;PSP;18|)
                         (LETT |tsv-|
                               (SPADCALL |ts| |v|
                                   (|getShellEntry| $ 82))
                               |TSETCAT-;removeZero;PSP;18|)
                         (COND
                           ((SPADCALL |v| |ts| (|getShellEntry| $ 83))
                            (SEQ (LETT |q|
                                       (SPADCALL |p|
                                        (PROG2
                                         (LETT #0#
                                          (SPADCALL |ts| |v|
                                           (|getShellEntry| $ 84))
                                          |TSETCAT-;removeZero;PSP;18|)
                                         (QCDR #0#)
                                          (|check-union| (QEQCAR #0# 0)
                                           (|getShellEntry| $ 10) #0#))
                                        (|getShellEntry| $ 74))
                                       |TSETCAT-;removeZero;PSP;18|)
                                 (EXIT (COND
                                         ((SPADCALL |q|
                                           (|getShellEntry| $ 32))
                                          (PROGN
                                            (LETT #1# |q|
                                             |TSETCAT-;removeZero;PSP;18|)
                                            (GO #1#)))
                                         ((SPADCALL
                                           (SPADCALL |q| |tsv-|
                                            (|getShellEntry| $ 85))
                                           (|getShellEntry| $ 32))
                                          (PROGN
                                            (LETT #1#
                                             (|spadConstant| $ 86)
                                             |TSETCAT-;removeZero;PSP;18|)
                                            (GO #1#))))))))
                         (EXIT (COND
                                 ((SPADCALL |tsv-|
                                      (|getShellEntry| $ 12))
                                  |p|)
                                 ('T
                                  (SEQ (LETT |q| (|spadConstant| $ 86)
                                        |TSETCAT-;removeZero;PSP;18|)
                                       (SEQ G190
                                        (COND
                                          ((NULL
                                            (SPADCALL
                                             (SPADCALL |p| |v|
                                              (|getShellEntry| $ 87))
                                             (|getShellEntry| $ 89)))
                                           (GO G191)))
                                        (SEQ
                                         (LETT |q|
                                          (SPADCALL
                                           (SPADCALL
                                            (SPADCALL
                                             (SPADCALL |p|
                                              (|getShellEntry| $ 46))
                                             |tsv-|
                                             (|getShellEntry| $ 85))
                                            (SPADCALL |p|
                                             (|getShellEntry| $ 90))
                                            (|getShellEntry| $ 91))
                                           |q| (|getShellEntry| $ 92))
                                          |TSETCAT-;removeZero;PSP;18|)
                                         (EXIT
                                          (LETT |p|
                                           (SPADCALL |p|
                                            (|getShellEntry| $ 93))
                                           |TSETCAT-;removeZero;PSP;18|)))
                                        NIL (GO G190) G191 (EXIT NIL))
                                       (EXIT
                                        (SPADCALL |q|
                                         (SPADCALL |p| |tsv-|
                                          (|getShellEntry| $ 85))
                                         (|getShellEntry| $ 92)))))))))))
           #1# (EXIT #1#))))) 

(DEFUN |TSETCAT-;reduceByQuasiMonic;PSP;19| (|p| |ts| $)
  (COND
    ((OR (SPADCALL |p| (|getShellEntry| $ 35))
         (SPADCALL |ts| (|getShellEntry| $ 12)))
     |p|)
    ('T
     (QVELT (SPADCALL |p| (SPADCALL |ts| (|getShellEntry| $ 95))
                (|getShellEntry| $ 97))
            1)))) 

(DEFUN |TSETCAT-;autoReduced?;SMB;20| (|ts| |redOp?| $)
  (PROG (|p| |lp|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |ts| (|getShellEntry| $ 12)) 'T)
             ('T
              (SEQ (LETT |lp| (SPADCALL |ts| (|getShellEntry| $ 29))
                         |TSETCAT-;autoReduced?;SMB;20|)
                   (LETT |p| (|SPADfirst| |lp|)
                         |TSETCAT-;autoReduced?;SMB;20|)
                   (LETT |lp| (CDR |lp|)
                         |TSETCAT-;autoReduced?;SMB;20|)
                   (SEQ G190
                        (COND
                          ((NULL (COND
                                   ((NULL |lp|) 'NIL)
                                   ('T (SPADCALL |p| |lp| |redOp?|))))
                           (GO G191)))
                        (SEQ (LETT |p| (|SPADfirst| |lp|)
                                   |TSETCAT-;autoReduced?;SMB;20|)
                             (EXIT (LETT |lp| (CDR |lp|)
                                    |TSETCAT-;autoReduced?;SMB;20|)))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT (NULL |lp|))))))))) 

(DEFUN |TSETCAT-;stronglyReduced?;SB;21| (|ts| $)
  (SPADCALL |ts| (ELT $ 59) (|getShellEntry| $ 101))) 

(DEFUN |TSETCAT-;normalized?;SB;22| (|ts| $)
  (SPADCALL |ts| (ELT $ 57) (|getShellEntry| $ 101))) 

(DEFUN |TSETCAT-;headReduced?;SB;23| (|ts| $)
  (SPADCALL |ts| (ELT $ 104) (|getShellEntry| $ 101))) 

(DEFUN |TSETCAT-;initiallyReduced?;SB;24| (|ts| $)
  (SPADCALL |ts| (ELT $ 106) (|getShellEntry| $ 101))) 

(DEFUN |TSETCAT-;mvar;SV;25| (|ts| $)
  (PROG (#0=#:G1595)
    (RETURN
      (COND
        ((SPADCALL |ts| (|getShellEntry| $ 12))
         (|error| "Error from TSETCAT in mvar : #1 is empty"))
        ('T
         (SPADCALL
             (PROG2 (LETT #0# (SPADCALL |ts| (|getShellEntry| $ 14))
                          |TSETCAT-;mvar;SV;25|)
                    (QCDR #0#)
               (|check-union| (QEQCAR #0# 0) (|getShellEntry| $ 10)
                   #0#))
             (|getShellEntry| $ 24))))))) 

(DEFUN |TSETCAT-;first;SU;26| (|ts| $)
  (PROG (|lp|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |ts| (|getShellEntry| $ 12)) (CONS 1 "failed"))
             ('T
              (SEQ (LETT |lp|
                         (SPADCALL (ELT $ 23)
                             (SPADCALL |ts| (|getShellEntry| $ 29))
                             (|getShellEntry| $ 37))
                         |TSETCAT-;first;SU;26|)
                   (EXIT (CONS 0 (|SPADfirst| |lp|)))))))))) 

(DEFUN |TSETCAT-;last;SU;27| (|ts| $)
  (PROG (|lp|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |ts| (|getShellEntry| $ 12)) (CONS 1 "failed"))
             ('T
              (SEQ (LETT |lp|
                         (SPADCALL (ELT $ 22)
                             (SPADCALL |ts| (|getShellEntry| $ 29))
                             (|getShellEntry| $ 37))
                         |TSETCAT-;last;SU;27|)
                   (EXIT (CONS 0 (|SPADfirst| |lp|)))))))))) 

(DEFUN |TSETCAT-;rest;SU;28| (|ts| $)
  (PROG (|lp|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |ts| (|getShellEntry| $ 12)) (CONS 1 "failed"))
             ('T
              (SEQ (LETT |lp|
                         (SPADCALL (ELT $ 23)
                             (SPADCALL |ts| (|getShellEntry| $ 29))
                             (|getShellEntry| $ 37))
                         |TSETCAT-;rest;SU;28|)
                   (EXIT (CONS 0
                               (SPADCALL (CDR |lp|)
                                   (|getShellEntry| $ 111))))))))))) 

(DEFUN |TSETCAT-;coerce;SL;29| (|ts| $)
  (SPADCALL (ELT $ 23) (SPADCALL |ts| (|getShellEntry| $ 29))
            (|getShellEntry| $ 37))) 

(DEFUN |TSETCAT-;algebraicVariables;SL;30| (|ts| $)
  (PROG (#0=#:G1620 |p| #1=#:G1621)
    (RETURN
      (SEQ (PROGN
             (LETT #0# NIL |TSETCAT-;algebraicVariables;SL;30|)
             (SEQ (LETT |p| NIL |TSETCAT-;algebraicVariables;SL;30|)
                  (LETT #1# (SPADCALL |ts| (|getShellEntry| $ 29))
                        |TSETCAT-;algebraicVariables;SL;30|)
                  G190
                  (COND
                    ((OR (ATOM #1#)
                         (PROGN
                           (LETT |p| (CAR #1#)
                                 |TSETCAT-;algebraicVariables;SL;30|)
                           NIL))
                     (GO G191)))
                  (SEQ (EXIT (LETT #0#
                                   (CONS
                                    (SPADCALL |p|
                                     (|getShellEntry| $ 24))
                                    #0#)
                                   |TSETCAT-;algebraicVariables;SL;30|)))
                  (LETT #1# (CDR #1#)
                        |TSETCAT-;algebraicVariables;SL;30|)
                  (GO G190) G191 (EXIT (NREVERSE0 #0#)))))))) 

(DEFUN |TSETCAT-;algebraic?;VSB;31| (|v| |ts| $)
  (SPADCALL |v| (SPADCALL |ts| (|getShellEntry| $ 116))
      (|getShellEntry| $ 117))) 

(DEFUN |TSETCAT-;select;SVU;32| (|ts| |v| $)
  (PROG (|lp|)
    (RETURN
      (SEQ (LETT |lp|
                 (SPADCALL (ELT $ 23)
                     (SPADCALL |ts| (|getShellEntry| $ 29))
                     (|getShellEntry| $ 37))
                 |TSETCAT-;select;SVU;32|)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((NULL |lp|) 'NIL)
                           ('T
                            (SPADCALL
                                (SPADCALL |v|
                                    (SPADCALL (|SPADfirst| |lp|)
                                     (|getShellEntry| $ 24))
                                    (|getShellEntry| $ 65))
                                (|getShellEntry| $ 20)))))
                   (GO G191)))
                (SEQ (EXIT (LETT |lp| (CDR |lp|)
                                 |TSETCAT-;select;SVU;32|)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT (COND
                   ((NULL |lp|) (CONS 1 "failed"))
                   ('T (CONS 0 (|SPADfirst| |lp|))))))))) 

(DEFUN |TSETCAT-;collectQuasiMonic;2S;33| (|ts| $)
  (PROG (|newlp| |lp|)
    (RETURN
      (SEQ (LETT |lp| (SPADCALL |ts| (|getShellEntry| $ 29))
                 |TSETCAT-;collectQuasiMonic;2S;33|)
           (LETT |newlp| NIL |TSETCAT-;collectQuasiMonic;2S;33|)
           (SEQ G190
                (COND
                  ((NULL (SPADCALL (NULL |lp|) (|getShellEntry| $ 20)))
                   (GO G191)))
                (SEQ (COND
                       ((SPADCALL
                            (SPADCALL (|SPADfirst| |lp|)
                                (|getShellEntry| $ 46))
                            (|getShellEntry| $ 35))
                        (LETT |newlp| (CONS (|SPADfirst| |lp|) |newlp|)
                              |TSETCAT-;collectQuasiMonic;2S;33|)))
                     (EXIT (LETT |lp| (CDR |lp|)
                                 |TSETCAT-;collectQuasiMonic;2S;33|)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT (SPADCALL |newlp| (|getShellEntry| $ 111))))))) 

(DEFUN |TSETCAT-;collectUnder;SVS;34| (|ts| |v| $)
  (PROG (|lp|)
    (RETURN
      (SEQ (LETT |lp|
                 (SPADCALL (ELT $ 23)
                     (SPADCALL |ts| (|getShellEntry| $ 29))
                     (|getShellEntry| $ 37))
                 |TSETCAT-;collectUnder;SVS;34|)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((NULL |lp|) 'NIL)
                           ('T
                            (SPADCALL
                                (SPADCALL
                                    (SPADCALL (|SPADfirst| |lp|)
                                     (|getShellEntry| $ 24))
                                    |v| (|getShellEntry| $ 64))
                                (|getShellEntry| $ 20)))))
                   (GO G191)))
                (SEQ (EXIT (LETT |lp| (CDR |lp|)
                                 |TSETCAT-;collectUnder;SVS;34|)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT (SPADCALL |lp| (|getShellEntry| $ 111))))))) 

(DEFUN |TSETCAT-;collectUpper;SVS;35| (|ts| |v| $)
  (PROG (|lp2| |lp1|)
    (RETURN
      (SEQ (LETT |lp1|
                 (SPADCALL (ELT $ 23)
                     (SPADCALL |ts| (|getShellEntry| $ 29))
                     (|getShellEntry| $ 37))
                 |TSETCAT-;collectUpper;SVS;35|)
           (LETT |lp2| NIL |TSETCAT-;collectUpper;SVS;35|)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((NULL |lp1|) 'NIL)
                           ('T
                            (SPADCALL |v|
                                (SPADCALL (|SPADfirst| |lp1|)
                                    (|getShellEntry| $ 24))
                                (|getShellEntry| $ 64)))))
                   (GO G191)))
                (SEQ (LETT |lp2| (CONS (|SPADfirst| |lp1|) |lp2|)
                           |TSETCAT-;collectUpper;SVS;35|)
                     (EXIT (LETT |lp1| (CDR |lp1|)
                                 |TSETCAT-;collectUpper;SVS;35|)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT (SPADCALL (REVERSE |lp2|) (|getShellEntry| $ 111))))))) 

(DEFUN |TSETCAT-;construct;LS;36| (|lp| $)
  (PROG (|rif|)
    (RETURN
      (SEQ (LETT |rif| (SPADCALL |lp| (|getShellEntry| $ 123))
                 |TSETCAT-;construct;LS;36|)
           (EXIT (COND
                   ((QEQCAR |rif| 0) (QCDR |rif|))
                   ('T
                    (|error| "in construct : LP -> $ from TSETCAT : bad arg")))))))) 

(DEFUN |TSETCAT-;retractIfCan;LU;37| (|lp| $)
  (PROG (|rif|)
    (RETURN
      (SEQ (COND
             ((NULL |lp|) (CONS 0 (SPADCALL (|getShellEntry| $ 38))))
             ('T
              (SEQ (LETT |lp|
                         (SPADCALL (ELT $ 23) |lp|
                             (|getShellEntry| $ 37))
                         |TSETCAT-;retractIfCan;LU;37|)
                   (LETT |rif|
                         (SPADCALL (CDR |lp|) (|getShellEntry| $ 123))
                         |TSETCAT-;retractIfCan;LU;37|)
                   (EXIT (COND
                           ((QEQCAR |rif| 0)
                            (SPADCALL (QCDR |rif|) (|SPADfirst| |lp|)
                                (|getShellEntry| $ 125)))
                           ('T
                            (|error| "in retractIfCan : LP -> ... from TSETCAT : bad arg"))))))))))) 

(DEFUN |TSETCAT-;extend;SPS;38| (|ts| |p| $)
  (PROG (|eif|)
    (RETURN
      (SEQ (LETT |eif| (SPADCALL |ts| |p| (|getShellEntry| $ 125))
                 |TSETCAT-;extend;SPS;38|)
           (EXIT (COND
                   ((QEQCAR |eif| 0) (QCDR |eif|))
                   ('T
                    (|error| "in extend : ($,P) -> $ from TSETCAT : bad ars")))))))) 

(DEFUN |TSETCAT-;coHeight;SNni;39| (|ts| $)
  (PROG (|n| |m| #0=#:G1661)
    (RETURN
      (SEQ (LETT |n| (SPADCALL (|getShellEntry| $ 128))
                 |TSETCAT-;coHeight;SNni;39|)
           (LETT |m| (LENGTH (SPADCALL |ts| (|getShellEntry| $ 29)))
                 |TSETCAT-;coHeight;SNni;39|)
           (EXIT (PROG2 (LETT #0#
                              (SPADCALL |n| |m|
                                  (|getShellEntry| $ 129))
                              |TSETCAT-;coHeight;SNni;39|)
                        (QCDR #0#)
                   (|check-union| (QEQCAR #0# 0) (|NonNegativeInteger|)
                       #0#))))))) 

(DEFUN |TriangularSetCategory&| (|#1| |#2| |#3| |#4| |#5|)
  (PROG (|dv$1| |dv$2| |dv$3| |dv$4| |dv$5| |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$1| (|devaluate| |#1|)
              . #0=(|TriangularSetCategory&|))
        (LETT |dv$2| (|devaluate| |#2|) . #0#)
        (LETT |dv$3| (|devaluate| |#3|) . #0#)
        (LETT |dv$4| (|devaluate| |#4|) . #0#)
        (LETT |dv$5| (|devaluate| |#5|) . #0#)
        (LETT |dv$|
              (LIST '|TriangularSetCategory&| |dv$1| |dv$2| |dv$3|
                    |dv$4| |dv$5|) . #0#)
        (LETT $ (|newShell| 132) . #0#)
        (|setShellEntry| $ 0 |dv$|)
        (|setShellEntry| $ 3
            (LETT |pv$|
                  (|buildPredVector| 0 0
                      (LIST (|HasCategory| |#4| '(|Finite|)))) . #0#))
        (|stuffDomainSlots| $)
        (|setShellEntry| $ 6 |#1|)
        (|setShellEntry| $ 7 |#2|)
        (|setShellEntry| $ 8 |#3|)
        (|setShellEntry| $ 9 |#4|)
        (|setShellEntry| $ 10 |#5|)
        (COND
          ((|testBitVector| |pv$| 1)
           (|setShellEntry| $ 130
               (CONS (|dispatchFunction| |TSETCAT-;coHeight;SNni;39|)
                     $))))
        $)))) 

(MAKEPROP '|TriangularSetCategory&| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (|local| |#3|) (|local| |#4|) (|local| |#5|) (|Boolean|)
             (0 . |empty?|) (|Union| 10 '"failed") (5 . |first|)
             (10 . =) (|Union| $ '"failed") (16 . |rest|) (21 . =)
             |TSETCAT-;=;2SB;1| (27 . |not|) (32 . |last|)
             (37 . |infRittWu?|) (43 . |supRittWu?|) (49 . |mvar|)
             (54 . |collectUpper|) (60 . |infRittWu?|)
             |TSETCAT-;infRittWu?;2SB;2| (|List| 10) (66 . |members|)
             (|Mapping| 11 10 10) |TSETCAT-;reduced?;PSMB;3|
             (71 . |zero?|) (|Mapping| 11 10) (76 . |remove|)
             (82 . |ground?|) (87 . |any?|) (93 . |sort|)
             (99 . |empty|) (103 . |extend|) (109 . |reduced?|)
             (|Record| (|:| |bas| $) (|:| |top| 28))
             (|Union| 41 '"failed") |TSETCAT-;basicSet;LMU;4|
             (116 . |concat|) |TSETCAT-;basicSet;LMMU;5| (122 . |init|)
             (127 . |primPartElseUnitCanonical|)
             (132 . |removeDuplicates|) |TSETCAT-;initials;SL;6|
             (|NonNegativeInteger|) (137 . |mdeg|)
             |TSETCAT-;degree;SNni;7| (142 . |initials|)
             (|Record| (|:| |close| 28) (|:| |open| 28))
             |TSETCAT-;quasiComponent;SR;8| (|List| $)
             (147 . |normalized?|) |TSETCAT-;normalized?;PSB;9|
             (153 . |reduced?|) |TSETCAT-;stronglyReduced?;PSB;10|
             (159 . |head|) (164 . |stronglyReduced?|)
             |TSETCAT-;headReduced?;PSB;11| (170 . <) (176 . =)
             (182 . |reduced?|) |TSETCAT-;initiallyReduced?;PSB;12|
             (|Mapping| 10 10 10) |TSETCAT-;reduce;PSMMP;13|
             (188 . |trivialIdeal?|) (193 . |One|) (197 . |reduce|)
             |TSETCAT-;rewriteSetWithReduction;LSMML;14|
             (205 . |lazyPrem|) |TSETCAT-;stronglyReduce;PSP;15|
             (211 . |headReduce|) (217 . |headReduced?|)
             |TSETCAT-;headReduce;PSP;16| (223 . |initiallyReduce|)
             (229 . |initiallyReduced?|)
             |TSETCAT-;initiallyReduce;PSP;17| (235 . |collectUnder|)
             (241 . |algebraic?|) (247 . |select|) (253 . |removeZero|)
             (259 . |Zero|) (263 . |degree|) (|Integer|)
             (269 . |positive?|) (274 . |mainMonomial|) (279 . *)
             (285 . +) (291 . |tail|) |TSETCAT-;removeZero;PSP;18|
             (296 . |collectQuasiMonic|)
             (|Record| (|:| |rnum| 7) (|:| |polnum| 10) (|:| |den| 7))
             (301 . |remainder|) |TSETCAT-;reduceByQuasiMonic;PSP;19|
             (|Mapping| 11 10 28) |TSETCAT-;autoReduced?;SMB;20|
             (307 . |autoReduced?|) |TSETCAT-;stronglyReduced?;SB;21|
             |TSETCAT-;normalized?;SB;22| (313 . |headReduced?|)
             |TSETCAT-;headReduced?;SB;23| (319 . |initiallyReduced?|)
             |TSETCAT-;initiallyReduced?;SB;24| |TSETCAT-;mvar;SV;25|
             |TSETCAT-;first;SU;26| |TSETCAT-;last;SU;27|
             (325 . |construct|) |TSETCAT-;rest;SU;28|
             |TSETCAT-;coerce;SL;29| (|List| 9)
             |TSETCAT-;algebraicVariables;SL;30|
             (330 . |algebraicVariables|) (335 . |member?|)
             |TSETCAT-;algebraic?;VSB;31| |TSETCAT-;select;SVU;32|
             |TSETCAT-;collectQuasiMonic;2S;33|
             |TSETCAT-;collectUnder;SVS;34|
             |TSETCAT-;collectUpper;SVS;35| (341 . |retractIfCan|)
             |TSETCAT-;construct;LS;36| (346 . |extendIfCan|)
             |TSETCAT-;retractIfCan;LU;37| |TSETCAT-;extend;SPS;38|
             (352 . |size|) (356 . |subtractIfCan|) (362 . |coHeight|)
             (|OutputForm|))
          '#(|stronglyReduced?| 367 |stronglyReduce| 378 |select| 384
             |rewriteSetWithReduction| 390 |retractIfCan| 398 |rest|
             403 |removeZero| 408 |reduced?| 414 |reduceByQuasiMonic|
             421 |reduce| 427 |quasiComponent| 435 |normalized?| 440
             |mvar| 451 |last| 456 |initials| 461 |initiallyReduced?|
             466 |initiallyReduce| 477 |infRittWu?| 483 |headReduced?|
             489 |headReduce| 500 |first| 506 |extend| 511 |degree| 517
             |construct| 522 |collectUpper| 527 |collectUnder| 533
             |collectQuasiMonic| 539 |coerce| 544 |coHeight| 549
             |basicSet| 554 |autoReduced?| 567 |algebraicVariables| 573
             |algebraic?| 578 = 584)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 130
                                '(1 6 11 0 12 1 6 13 0 14 2 10 11 0 0
                                  15 1 6 16 0 17 2 6 11 0 0 18 1 11 0 0
                                  20 1 6 13 0 21 2 10 11 0 0 22 2 10 11
                                  0 0 23 1 10 9 0 24 2 6 0 0 9 25 2 6
                                  11 0 0 26 1 6 28 0 29 1 10 11 0 32 2
                                  28 0 33 0 34 1 10 11 0 35 2 28 11 33
                                  0 36 2 28 0 30 0 37 0 6 0 38 2 6 0 0
                                  10 39 3 6 11 10 0 30 40 2 28 0 0 0 44
                                  1 10 0 0 46 1 10 0 0 47 1 28 0 0 48 1
                                  10 50 0 51 1 6 28 0 53 2 10 11 0 56
                                  57 2 10 11 0 56 59 1 10 0 0 61 2 6 11
                                  10 0 62 2 9 11 0 0 64 2 9 11 0 0 65 2
                                  10 11 0 0 66 1 6 11 0 70 0 10 0 71 4
                                  6 10 10 0 68 30 72 2 10 0 0 0 74 2 10
                                  0 0 0 76 2 10 11 0 0 77 2 10 0 0 0 79
                                  2 10 11 0 0 80 2 6 0 0 9 82 2 6 11 9
                                  0 83 2 6 13 0 9 84 2 6 10 10 0 85 0
                                  10 0 86 2 10 50 0 9 87 1 88 11 0 89 1
                                  10 0 0 90 2 10 0 0 0 91 2 10 0 0 0 92
                                  1 10 0 0 93 1 6 0 0 95 2 6 96 10 0 97
                                  2 6 11 0 99 101 2 10 11 0 56 104 2 10
                                  11 0 56 106 1 6 0 28 111 1 6 114 0
                                  116 2 114 11 9 0 117 1 6 16 28 123 2
                                  6 16 0 10 125 0 9 50 128 2 50 16 0 0
                                  129 1 0 50 0 130 1 0 11 0 102 2 0 11
                                  10 0 60 2 0 10 10 0 75 2 0 13 0 9 119
                                  4 0 28 28 0 68 30 73 1 0 16 28 126 1
                                  0 16 0 112 2 0 10 10 0 94 3 0 11 10 0
                                  30 31 2 0 10 10 0 98 4 0 10 10 0 68
                                  30 69 1 0 54 0 55 1 0 11 0 103 2 0 11
                                  10 0 58 1 0 9 0 108 1 0 13 0 110 1 0
                                  28 0 49 1 0 11 0 107 2 0 11 10 0 67 2
                                  0 10 10 0 81 2 0 11 0 0 27 1 0 11 0
                                  105 2 0 11 10 0 63 2 0 10 10 0 78 1 0
                                  13 0 109 2 0 0 0 10 127 1 0 50 0 52 1
                                  0 0 28 124 2 0 0 0 9 122 2 0 0 0 9
                                  121 1 0 0 0 120 1 0 28 0 113 1 0 50 0
                                  130 3 0 42 28 33 30 45 2 0 42 28 30
                                  43 2 0 11 0 99 100 1 0 114 0 115 2 0
                                  11 9 0 118 2 0 11 0 0 19)))))
          '|lookupComplete|)) 

(SETQ |$CategoryFrame|
      (|put| '|TriangularSetCategory&| '|isFunctor|
             '(((|coHeight| ((|NonNegativeInteger|) $)) T (ELT $ 130))
               ((|extend| ($ $ |#5|)) T (ELT $ 127))
               ((|select| ((|Union| |#5| "failed") $ |#4|)) T
                (ELT $ 119))
               ((|algebraic?| ((|Boolean|) |#4| $)) T (ELT $ 118))
               ((|algebraicVariables| ((|List| |#4|) $)) T (ELT $ 115))
               ((|rest| ((|Union| $ "failed") $)) T (ELT $ 112))
               ((|last| ((|Union| |#5| "failed") $)) T (ELT $ 110))
               ((|first| ((|Union| |#5| "failed") $)) T (ELT $ 109))
               ((|reduceByQuasiMonic| (|#5| |#5| $)) T (ELT $ 98))
               ((|collectQuasiMonic| ($ $)) T (ELT $ 120))
               ((|removeZero| (|#5| |#5| $)) T (ELT $ 94))
               ((|initiallyReduce| (|#5| |#5| $)) T (ELT $ 81))
               ((|headReduce| (|#5| |#5| $)) T (ELT $ 78))
               ((|stronglyReduce| (|#5| |#5| $)) T (ELT $ 75))
               ((|rewriteSetWithReduction|
                    ((|List| |#5|) (|List| |#5|) $
                     (|Mapping| |#5| |#5| |#5|)
                     (|Mapping| (|Boolean|) |#5| |#5|)))
                T (ELT $ 73))
               ((|reduce|
                    (|#5| |#5| $ (|Mapping| |#5| |#5| |#5|)
                          (|Mapping| (|Boolean|) |#5| |#5|)))
                T (ELT $ 69))
               ((|initiallyReduced?| ((|Boolean|) $)) T (ELT $ 107))
               ((|headReduced?| ((|Boolean|) $)) T (ELT $ 105))
               ((|stronglyReduced?| ((|Boolean|) $)) T (ELT $ 102))
               ((|autoReduced?|
                    ((|Boolean|) $
                     (|Mapping| (|Boolean|) |#5| (|List| |#5|))))
                T (ELT $ 100))
               ((|initiallyReduced?| ((|Boolean|) |#5| $)) T
                (ELT $ 67))
               ((|headReduced?| ((|Boolean|) |#5| $)) T (ELT $ 63))
               ((|stronglyReduced?| ((|Boolean|) |#5| $)) T (ELT $ 60))
               ((|reduced?|
                    ((|Boolean|) |#5| $
                     (|Mapping| (|Boolean|) |#5| |#5|)))
                T (ELT $ 31))
               ((|normalized?| ((|Boolean|) $)) T (ELT $ 103))
               ((|normalized?| ((|Boolean|) |#5| $)) T (ELT $ 58))
               ((|quasiComponent|
                    ((|Record| (|:| |close| (|List| |#5|))
                         (|:| |open| (|List| |#5|)))
                     $))
                T (ELT $ 55))
               ((|degree| ((|NonNegativeInteger|) $)) T (ELT $ 52))
               ((|initials| ((|List| |#5|) $)) T (ELT $ 49))
               ((|basicSet|
                    ((|Union| (|Record| (|:| |bas| $)
                                  (|:| |top| (|List| |#5|)))
                              "failed")
                     (|List| |#5|) (|Mapping| (|Boolean|) |#5|)
                     (|Mapping| (|Boolean|) |#5| |#5|)))
                T (ELT $ 45))
               ((|basicSet|
                    ((|Union| (|Record| (|:| |bas| $)
                                  (|:| |top| (|List| |#5|)))
                              "failed")
                     (|List| |#5|) (|Mapping| (|Boolean|) |#5| |#5|)))
                T (ELT $ 43))
               ((|infRittWu?| ((|Boolean|) $ $)) T (ELT $ 27))
               ((|collectUpper| ($ $ |#4|)) T (ELT $ 122))
               ((|collectUnder| ($ $ |#4|)) T (ELT $ 121))
               ((|mvar| (|#4| $)) T (ELT $ 108))
               ((|retractIfCan| ((|Union| $ "failed") (|List| |#5|))) T
                (ELT $ 126))
               ((|coerce| ((|List| |#5|) $)) T (ELT $ 113))
               ((|construct| ($ (|List| |#5|))) T (ELT $ 124))
               ((|reduce| (|#5| (|Mapping| |#5| |#5| |#5|) $)) T
                (ELT $ NIL))
               ((|reduce| (|#5| (|Mapping| |#5| |#5| |#5|) $ |#5|)) T
                (ELT $ NIL))
               ((|select| ($ (|Mapping| (|Boolean|) |#5|) $)) T
                (ELT $ NIL))
               ((|reduce|
                    (|#5| (|Mapping| |#5| |#5| |#5|) $ |#5| |#5|))
                T (ELT $ NIL))
               ((|coerce| ((|OutputForm|) $)) T (ELT $ NIL))
               ((= ((|Boolean|) $ $)) T (ELT $ 19)))
             (|addModemap| '|TriangularSetCategory&|
                 '(|TriangularSetCategory&| |#1| |#2| |#3| |#4| |#5|)
                 '((CATEGORY |domain|
                       (SIGNATURE |coHeight|
                           ((|NonNegativeInteger|) |#1|))
                       (SIGNATURE |extend| (|#1| |#1| |#5|))
                       (SIGNATURE |select|
                           ((|Union| |#5| "failed") |#1| |#4|))
                       (SIGNATURE |algebraic?| ((|Boolean|) |#4| |#1|))
                       (SIGNATURE |algebraicVariables|
                           ((|List| |#4|) |#1|))
                       (SIGNATURE |rest|
                           ((|Union| |#1| "failed") |#1|))
                       (SIGNATURE |last|
                           ((|Union| |#5| "failed") |#1|))
                       (SIGNATURE |first|
                           ((|Union| |#5| "failed") |#1|))
                       (SIGNATURE |reduceByQuasiMonic|
                           (|#5| |#5| |#1|))
                       (SIGNATURE |collectQuasiMonic| (|#1| |#1|))
                       (SIGNATURE |removeZero| (|#5| |#5| |#1|))
                       (SIGNATURE |initiallyReduce| (|#5| |#5| |#1|))
                       (SIGNATURE |headReduce| (|#5| |#5| |#1|))
                       (SIGNATURE |stronglyReduce| (|#5| |#5| |#1|))
                       (SIGNATURE |rewriteSetWithReduction|
                           ((|List| |#5|) (|List| |#5|) |#1|
                            (|Mapping| |#5| |#5| |#5|)
                            (|Mapping| (|Boolean|) |#5| |#5|)))
                       (SIGNATURE |reduce|
                           (|#5| |#5| |#1| (|Mapping| |#5| |#5| |#5|)
                                 (|Mapping| (|Boolean|) |#5| |#5|)))
                       (SIGNATURE |initiallyReduced?|
                           ((|Boolean|) |#1|))
                       (SIGNATURE |headReduced?| ((|Boolean|) |#1|))
                       (SIGNATURE |stronglyReduced?|
                           ((|Boolean|) |#1|))
                       (SIGNATURE |autoReduced?|
                           ((|Boolean|) |#1|
                            (|Mapping| (|Boolean|) |#5| (|List| |#5|))))
                       (SIGNATURE |initiallyReduced?|
                           ((|Boolean|) |#5| |#1|))
                       (SIGNATURE |headReduced?|
                           ((|Boolean|) |#5| |#1|))
                       (SIGNATURE |stronglyReduced?|
                           ((|Boolean|) |#5| |#1|))
                       (SIGNATURE |reduced?|
                           ((|Boolean|) |#5| |#1|
                            (|Mapping| (|Boolean|) |#5| |#5|)))
                       (SIGNATURE |normalized?| ((|Boolean|) |#1|))
                       (SIGNATURE |normalized?|
                           ((|Boolean|) |#5| |#1|))
                       (SIGNATURE |quasiComponent|
                           ((|Record| (|:| |close| (|List| |#5|))
                                (|:| |open| (|List| |#5|)))
                            |#1|))
                       (SIGNATURE |degree|
                           ((|NonNegativeInteger|) |#1|))
                       (SIGNATURE |initials| ((|List| |#5|) |#1|))
                       (SIGNATURE |basicSet|
                           ((|Union| (|Record| (|:| |bas| |#1|)
                                      (|:| |top| (|List| |#5|)))
                                     "failed")
                            (|List| |#5|) (|Mapping| (|Boolean|) |#5|)
                            (|Mapping| (|Boolean|) |#5| |#5|)))
                       (SIGNATURE |basicSet|
                           ((|Union| (|Record| (|:| |bas| |#1|)
                                      (|:| |top| (|List| |#5|)))
                                     "failed")
                            (|List| |#5|)
                            (|Mapping| (|Boolean|) |#5| |#5|)))
                       (SIGNATURE |infRittWu?| ((|Boolean|) |#1| |#1|))
                       (SIGNATURE |collectUpper| (|#1| |#1| |#4|))
                       (SIGNATURE |collectUnder| (|#1| |#1| |#4|))
                       (SIGNATURE |mvar| (|#4| |#1|))
                       (SIGNATURE |retractIfCan|
                           ((|Union| |#1| "failed") (|List| |#5|)))
                       (SIGNATURE |coerce| ((|List| |#5|) |#1|))
                       (SIGNATURE |construct| (|#1| (|List| |#5|)))
                       (SIGNATURE |reduce|
                           (|#5| (|Mapping| |#5| |#5| |#5|) |#1|))
                       (SIGNATURE |reduce|
                           (|#5| (|Mapping| |#5| |#5| |#5|) |#1| |#5|))
                       (SIGNATURE |select|
                           (|#1| (|Mapping| (|Boolean|) |#5|) |#1|))
                       (SIGNATURE |reduce|
                           (|#5| (|Mapping| |#5| |#5| |#5|) |#1| |#5|
                                 |#5|))
                       (SIGNATURE |coerce| ((|OutputForm|) |#1|))
                       (SIGNATURE = ((|Boolean|) |#1| |#1|)))
                   (|TriangularSetCategory| |#2| |#3| |#4| |#5|)
                   (|IntegralDomain|) (|OrderedAbelianMonoidSup|)
                   (|OrderedSet|)
                   (|RecursivePolynomialCategory| |#2| |#3| |#4|))
                 T '|TriangularSetCategory&|
                 (|put| '|TriangularSetCategory&| '|mode|
                        '(|Mapping|
                             (CATEGORY |domain|
                                 (SIGNATURE |coHeight|
                                     ((|NonNegativeInteger|) |#1|))
                                 (SIGNATURE |extend| (|#1| |#1| |#5|))
                                 (SIGNATURE |select|
                                     ((|Union| |#5| "failed") |#1|
                                      |#4|))
                                 (SIGNATURE |algebraic?|
                                     ((|Boolean|) |#4| |#1|))
                                 (SIGNATURE |algebraicVariables|
                                     ((|List| |#4|) |#1|))
                                 (SIGNATURE |rest|
                                     ((|Union| |#1| "failed") |#1|))
                                 (SIGNATURE |last|
                                     ((|Union| |#5| "failed") |#1|))
                                 (SIGNATURE |first|
                                     ((|Union| |#5| "failed") |#1|))
                                 (SIGNATURE |reduceByQuasiMonic|
                                     (|#5| |#5| |#1|))
                                 (SIGNATURE |collectQuasiMonic|
                                     (|#1| |#1|))
                                 (SIGNATURE |removeZero|
                                     (|#5| |#5| |#1|))
                                 (SIGNATURE |initiallyReduce|
                                     (|#5| |#5| |#1|))
                                 (SIGNATURE |headReduce|
                                     (|#5| |#5| |#1|))
                                 (SIGNATURE |stronglyReduce|
                                     (|#5| |#5| |#1|))
                                 (SIGNATURE |rewriteSetWithReduction|
                                     ((|List| |#5|) (|List| |#5|) |#1|
                                      (|Mapping| |#5| |#5| |#5|)
                                      (|Mapping| (|Boolean|) |#5| |#5|)))
                                 (SIGNATURE |reduce|
                                     (|#5| |#5| |#1|
                                      (|Mapping| |#5| |#5| |#5|)
                                      (|Mapping| (|Boolean|) |#5| |#5|)))
                                 (SIGNATURE |initiallyReduced?|
                                     ((|Boolean|) |#1|))
                                 (SIGNATURE |headReduced?|
                                     ((|Boolean|) |#1|))
                                 (SIGNATURE |stronglyReduced?|
                                     ((|Boolean|) |#1|))
                                 (SIGNATURE |autoReduced?|
                                     ((|Boolean|) |#1|
                                      (|Mapping| (|Boolean|) |#5|
                                       (|List| |#5|))))
                                 (SIGNATURE |initiallyReduced?|
                                     ((|Boolean|) |#5| |#1|))
                                 (SIGNATURE |headReduced?|
                                     ((|Boolean|) |#5| |#1|))
                                 (SIGNATURE |stronglyReduced?|
                                     ((|Boolean|) |#5| |#1|))
                                 (SIGNATURE |reduced?|
                                     ((|Boolean|) |#5| |#1|
                                      (|Mapping| (|Boolean|) |#5| |#5|)))
                                 (SIGNATURE |normalized?|
                                     ((|Boolean|) |#1|))
                                 (SIGNATURE |normalized?|
                                     ((|Boolean|) |#5| |#1|))
                                 (SIGNATURE |quasiComponent|
                                     ((|Record|
                                       (|:| |close| (|List| |#5|))
                                       (|:| |open| (|List| |#5|)))
                                      |#1|))
                                 (SIGNATURE |degree|
                                     ((|NonNegativeInteger|) |#1|))
                                 (SIGNATURE |initials|
                                     ((|List| |#5|) |#1|))
                                 (SIGNATURE |basicSet|
                                     ((|Union|
                                       (|Record| (|:| |bas| |#1|)
                                        (|:| |top| (|List| |#5|)))
                                       "failed")
                                      (|List| |#5|)
                                      (|Mapping| (|Boolean|) |#5|)
                                      (|Mapping| (|Boolean|) |#5| |#5|)))
                                 (SIGNATURE |basicSet|
                                     ((|Union|
                                       (|Record| (|:| |bas| |#1|)
                                        (|:| |top| (|List| |#5|)))
                                       "failed")
                                      (|List| |#5|)
                                      (|Mapping| (|Boolean|) |#5| |#5|)))
                                 (SIGNATURE |infRittWu?|
                                     ((|Boolean|) |#1| |#1|))
                                 (SIGNATURE |collectUpper|
                                     (|#1| |#1| |#4|))
                                 (SIGNATURE |collectUnder|
                                     (|#1| |#1| |#4|))
                                 (SIGNATURE |mvar| (|#4| |#1|))
                                 (SIGNATURE |retractIfCan|
                                     ((|Union| |#1| "failed")
                                      (|List| |#5|)))
                                 (SIGNATURE |coerce|
                                     ((|List| |#5|) |#1|))
                                 (SIGNATURE |construct|
                                     (|#1| (|List| |#5|)))
                                 (SIGNATURE |reduce|
                                     (|#5| (|Mapping| |#5| |#5| |#5|)
                                      |#1|))
                                 (SIGNATURE |reduce|
                                     (|#5| (|Mapping| |#5| |#5| |#5|)
                                      |#1| |#5|))
                                 (SIGNATURE |select|
                                     (|#1| (|Mapping| (|Boolean|) |#5|)
                                      |#1|))
                                 (SIGNATURE |reduce|
                                     (|#5| (|Mapping| |#5| |#5| |#5|)
                                      |#1| |#5| |#5|))
                                 (SIGNATURE |coerce|
                                     ((|OutputForm|) |#1|))
                                 (SIGNATURE = ((|Boolean|) |#1| |#1|)))
                             (|TriangularSetCategory| |#2| |#3| |#4|
                                 |#5|)
                             (|IntegralDomain|)
                             (|OrderedAbelianMonoidSup|) (|OrderedSet|)
                             (|RecursivePolynomialCategory| |#2| |#3|
                                 |#4|))
                        |$CategoryFrame|))))