aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/interface/vtp.ml
blob: 760c2286a43a9f257ab292f25e4c1e55e7a08597 (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
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
open Ascent;;

let fNODE s n =
    print_string "n\n";
    print_string ("vernac$" ^ s);
    print_string "\n";
    print_int n;
    print_string "\n";;

let fATOM s1 =
    print_string "a\n";
    print_string ("vernac$" ^ s1);
    print_string "\n";;

let f_atom_string = print_string;;
let f_atom_int = print_int;;
let rec fASSOC = function
| CT_coerce_NONE_to_ASSOC x -> fNONE x
| CT_lefta -> fNODE "lefta" 0
| CT_nona -> fNODE "nona" 0
| CT_righta -> fNODE "righta" 0
and fAST = function
| CT_coerce_ID_OR_INT_to_AST x -> fID_OR_INT x
| CT_coerce_ID_OR_STRING_to_AST x -> fID_OR_STRING x
| CT_astnode(x1, x2) ->
   fID x1;
   fAST_LIST x2;
   fNODE "astnode" 2
| CT_astpath(x1) ->
   fID_LIST x1;
   fNODE "astpath" 1
| CT_astslam(x1, x2) ->
   fID_OPT x1;
   fAST x2;
   fNODE "astslam" 2
and fAST_LIST = function
| CT_ast_list l ->
   (List.iter fAST l);
   fNODE "ast_list" (List.length l)
and fBINARY = function
| CT_binary x -> fATOM "binary";
   (f_atom_int x);
   print_string "\n"and fBINDER = function
| CT_coerce_DEF_to_BINDER x -> fDEF x
| CT_binder(x1, x2) ->
   fID_OPT_NE_LIST x1;
   fFORMULA x2;
   fNODE "binder" 2
and fBINDER_LIST = function
| CT_binder_list l ->
   (List.iter fBINDER l);
   fNODE "binder_list" (List.length l)
and fBINDER_NE_LIST = function
| CT_binder_ne_list(x,l) ->
   fBINDER x;
   (List.iter fBINDER l);
   fNODE "binder_ne_list" (1 + (List.length l))
and fBINDING = function
| CT_binding(x1, x2) ->
   fID_OR_INT x1;
   fFORMULA x2;
   fNODE "binding" 2
and fBINDING_LIST = function
| CT_binding_list l ->
   (List.iter fBINDING l);
   fNODE "binding_list" (List.length l)
and fBOOL = function
| CT_false -> fNODE "false" 0
| CT_true -> fNODE "true" 0
and fCASE = function
| CT_case x -> fATOM "case";
   (f_atom_string x);
   print_string "\n"and fCOERCION_OPT = function
| CT_coerce_NONE_to_COERCION_OPT x -> fNONE x
| CT_coercion_atm -> fNODE "coercion_atm" 0
and fCOFIXTAC = function
| CT_cofixtac(x1, x2) ->
   fID x1;
   fFORMULA x2;
   fNODE "cofixtac" 2
and fCOFIX_REC = function
| CT_cofix_rec(x1, x2, x3) ->
   fID x1;
   fFORMULA x2;
   fFORMULA x3;
   fNODE "cofix_rec" 3
and fCOFIX_REC_LIST = function
| CT_cofix_rec_list(x,l) ->
   fCOFIX_REC x;
   (List.iter fCOFIX_REC l);
   fNODE "cofix_rec_list" (1 + (List.length l))
and fCOFIX_TAC_LIST = function
| CT_cofix_tac_list l ->
   (List.iter fCOFIXTAC l);
   fNODE "cofix_tac_list" (List.length l)
and fCOMMAND = function
| CT_coerce_COMMAND_LIST_to_COMMAND x -> fCOMMAND_LIST x
| CT_coerce_EVAL_CMD_to_COMMAND x -> fEVAL_CMD x
| CT_coerce_IMPEXP_to_COMMAND x -> fIMPEXP x
| CT_coerce_SECTION_BEGIN_to_COMMAND x -> fSECTION_BEGIN x
| CT_coerce_THEOREM_GOAL_to_COMMAND x -> fTHEOREM_GOAL x
| CT_abort(x1) ->
   fID_OPT_OR_ALL x1;
   fNODE "abort" 1
| CT_abstraction(x1, x2, x3) ->
   fID x1;
   fFORMULA x2;
   fINT_LIST x3;
   fNODE "abstraction" 3
| CT_add_natural_feature(x1, x2) ->
   fNATURAL_FEATURE x1;
   fID x2;
   fNODE "add_natural_feature" 2
| CT_addpath(x1) ->
   fSTRING x1;
   fNODE "addpath" 1
| CT_cd(x1) ->
   fSTRING_OPT x1;
   fNODE "cd" 1
| CT_check(x1) ->
   fFORMULA x1;
   fNODE "check" 1
| CT_class(x1) ->
   fID x1;
   fNODE "class" 1
| CT_coercion(x1, x2, x3, x4, x5) ->
   fLOCAL_OPT x1;
   fIDENTITY_OPT x2;
   fID x3;
   fID x4;
   fID x5;
   fNODE "coercion" 5
| CT_cofix_decl(x1) ->
   fCOFIX_REC_LIST x1;
   fNODE "cofix_decl" 1
| CT_compile_module(x1, x2, x3) ->
   fVERBOSE_OPT x1;
   fID x2;
   fSTRING_OPT x3;
   fNODE "compile_module" 3
| CT_definition(x1, x2, x3, x4, x5) ->
   fDEFN x1;
   fID x2;
   fBINDER_LIST x3;
   fDEF_BODY x4;
   fFORMULA_OPT x5;
   fNODE "definition" 5
| CT_delpath(x1) ->
   fSTRING x1;
   fNODE "delpath" 1
| CT_derive_depinversion(x1, x2, x3, x4) ->
   fINV_TYPE x1;
   fID x2;
   fFORMULA x3;
   fSORT_TYPE x4;
   fNODE "derive_depinversion" 4
| CT_derive_inversion(x1, x2, x3, x4) ->
   fINV_TYPE x1;
   fINT_OPT x2;
   fID x3;
   fID x4;
   fNODE "derive_inversion" 4
| CT_derive_inversion_with(x1, x2, x3, x4) ->
   fINV_TYPE x1;
   fID x2;
   fFORMULA x3;
   fSORT_TYPE x4;
   fNODE "derive_inversion_with" 4
| CT_explain_proof(x1) ->
   fINT_LIST x1;
   fNODE "explain_proof" 1
| CT_explain_prooftree(x1) ->
   fINT_LIST x1;
   fNODE "explain_prooftree" 1
| CT_fix_decl(x1) ->
   fFIX_REC_LIST x1;
   fNODE "fix_decl" 1
| CT_focus(x1) ->
   fINT_OPT x1;
   fNODE "focus" 1
| CT_go(x1) ->
   fINT_OR_LOCN x1;
   fNODE "go" 1
| CT_guarded -> fNODE "guarded" 0
| CT_hint(x1, x2, x3) ->
   fID x1;
   fID_LIST x2;
   fHINT_EXPRESSION x3;
   fNODE "hint" 3
| CT_hintrewrite(x1, x2, x3, x4) ->
   fORIENTATION x1;
   fFORMULA_NE_LIST x2;
   fID x3;
   fTACTIC_COM x4;
   fNODE "hintrewrite" 4
| CT_hints(x1, x2, x3) ->
   fID x1;
   fID_NE_LIST x2;
   fID_LIST x3;
   fNODE "hints" 3
| CT_implicits(x1, x2) ->
   fID x1;
   fINT_LIST x2;
   fNODE "implicits" 2
| CT_ind_scheme(x1) ->
   fSCHEME_SPEC_LIST x1;
   fNODE "ind_scheme" 1
| CT_infix(x1, x2, x3, x4) ->
   fASSOC x1;
   fINT x2;
   fSTRING x3;
   fID x4;
   fNODE "infix" 4
| CT_inspect(x1) ->
   fINT x1;
   fNODE "inspect" 1
| CT_kill_node(x1) ->
   fINT x1;
   fNODE "kill_node" 1
| CT_load(x1, x2) ->
   fVERBOSE_OPT x1;
   fID_OR_STRING x2;
   fNODE "load" 2
| CT_locate(x1) ->
   fID x1;
   fNODE "locate" 1
| CT_locate_file(x1) ->
   fSTRING x1;
   fNODE "locate_file" 1
| CT_locate_lib(x1) ->
   fID x1;
   fNODE "locate_lib" 1
| CT_mind_decl(x1, x2) ->
   fCO_IND x1;
   fIND_SPEC_LIST x2;
   fNODE "mind_decl" 2
| CT_ml_add_path(x1) ->
   fSTRING x1;
   fNODE "ml_add_path" 1
| CT_ml_declare_modules(x1) ->
   fSTRING_NE_LIST x1;
   fNODE "ml_declare_modules" 1
| CT_ml_print_modules -> fNODE "ml_print_modules" 0
| CT_ml_print_path -> fNODE "ml_print_path" 0
| CT_module(x1) ->
   fID x1;
   fNODE "module" 1
| CT_omega_flag(x1, x2) ->
   fOMEGA_MODE x1;
   fOMEGA_FEATURE x2;
   fNODE "omega_flag" 2
| CT_opaque(x1) ->
   fID_NE_LIST x1;
   fNODE "opaque" 1
| CT_parameter(x1) ->
   fBINDER x1;
   fNODE "parameter" 1
| CT_print_all -> fNODE "print_all" 0
| CT_print_classes -> fNODE "print_classes" 0
| CT_print_coercions -> fNODE "print_coercions" 0
| CT_print_grammar(x1) ->
   fGRAMMAR x1;
   fNODE "print_grammar" 1
| CT_print_graph -> fNODE "print_graph" 0
| CT_print_hint(x1) ->
   fID_OPT x1;
   fNODE "print_hint" 1
| CT_print_hintdb(x1) ->
   fID x1;
   fNODE "print_hintdb" 1
| CT_print_id(x1) ->
   fID x1;
   fNODE "print_id" 1
| CT_print_loadpath -> fNODE "print_loadpath" 0
| CT_print_modules -> fNODE "print_modules" 0
| CT_print_natural(x1) ->
   fID x1;
   fNODE "print_natural" 1
| CT_print_natural_feature(x1) ->
   fNATURAL_FEATURE x1;
   fNODE "print_natural_feature" 1
| CT_print_opaqueid(x1) ->
   fID x1;
   fNODE "print_opaqueid" 1
| CT_print_path(x1, x2) ->
   fID x1;
   fID x2;
   fNODE "print_path" 2
| CT_print_proof(x1) ->
   fID x1;
   fNODE "print_proof" 1
| CT_print_section(x1) ->
   fID x1;
   fNODE "print_section" 1
| CT_print_states -> fNODE "print_states" 0
| CT_proof(x1) ->
   fFORMULA x1;
   fNODE "proof" 1
| CT_proof_no_op -> fNODE "proof_no_op" 0
| CT_pwd -> fNODE "pwd" 0
| CT_quit -> fNODE "quit" 0
| CT_read_module(x1) ->
   fID x1;
   fNODE "read_module" 1
| CT_rec_ml_add_path(x1) ->
   fSTRING x1;
   fNODE "rec_ml_add_path" 1
| CT_rec_tactic_definition(x1) ->
   fREC_TACTIC_FUN_LIST x1;
   fNODE "rec_tactic_definition" 1
| CT_recaddpath(x1) ->
   fSTRING x1;
   fNODE "recaddpath" 1
| CT_record(x1, x2, x3, x4, x5, x6) ->
   fCOERCION_OPT x1;
   fID x2;
   fBINDER_LIST x3;
   fSORT_TYPE x4;
   fID_OPT x5;
   fRECCONSTR_LIST x6;
   fNODE "record" 6
| CT_remove_natural_feature(x1, x2) ->
   fNATURAL_FEATURE x1;
   fID x2;
   fNODE "remove_natural_feature" 2
| CT_require(x1, x2, x3, x4) ->
   fIMPEXP x1;
   fSPEC_OPT x2;
   fID x3;
   fSTRING_OPT x4;
   fNODE "require" 4
| CT_reset(x1) ->
   fID x1;
   fNODE "reset" 1
| CT_reset_section(x1) ->
   fID x1;
   fNODE "reset_section" 1
| CT_restart -> fNODE "restart" 0
| CT_restore_state(x1) ->
   fID x1;
   fNODE "restore_state" 1
| CT_resume(x1) ->
   fID_OPT x1;
   fNODE "resume" 1
| CT_save(x1, x2) ->
   fTHM_OPT x1;
   fID_OPT x2;
   fNODE "save" 2
| CT_scomments(x1) ->
   fSCOMMENT_CONTENT_LIST x1;
   fNODE "scomments" 1
| CT_search(x1, x2) ->
   fID x1;
   fIN_OR_OUT_MODULES x2;
   fNODE "search" 2
| CT_search_pattern(x1, x2) ->
   fFORMULA x1;
   fIN_OR_OUT_MODULES x2;
   fNODE "search_pattern" 2
| CT_search_rewrite(x1, x2) ->
   fFORMULA x1;
   fIN_OR_OUT_MODULES x2;
   fNODE "search_rewrite" 2
| CT_section_end(x1) ->
   fID x1;
   fNODE "section_end" 1
| CT_section_struct(x1, x2, x3) ->
   fSECTION_BEGIN x1;
   fSECTION_BODY x2;
   fCOMMAND x3;
   fNODE "section_struct" 3
| CT_set_natural(x1) ->
   fID x1;
   fNODE "set_natural" 1
| CT_set_natural_default -> fNODE "set_natural_default" 0
| CT_sethyp(x1) ->
   fINT x1;
   fNODE "sethyp" 1
| CT_setundo(x1) ->
   fINT x1;
   fNODE "setundo" 1
| CT_show_goal(x1) ->
   fINT_OPT x1;
   fNODE "show_goal" 1
| CT_show_implicits -> fNODE "show_implicits" 0
| CT_show_node -> fNODE "show_node" 0
| CT_show_proof -> fNODE "show_proof" 0
| CT_show_proofs -> fNODE "show_proofs" 0
| CT_show_script -> fNODE "show_script" 0
| CT_show_tree -> fNODE "show_tree" 0
| CT_solve(x1, x2) ->
   fINT x1;
   fTACTIC_COM x2;
   fNODE "solve" 2
| CT_suspend -> fNODE "suspend" 0
| CT_syntax_macro(x1, x2, x3) ->
   fID x1;
   fFORMULA x2;
   fINT_OPT x3;
   fNODE "syntax_macro" 3
| CT_tactic_definition(x1, x2, x3) ->
   fID x1;
   fID_LIST x2;
   fTACTIC_COM x3;
   fNODE "tactic_definition" 3
| CT_test_natural_feature(x1, x2) ->
   fNATURAL_FEATURE x1;
   fID x2;
   fNODE "test_natural_feature" 2
| CT_theorem_struct(x1, x2) ->
   fTHEOREM_GOAL x1;
   fPROOF_SCRIPT x2;
   fNODE "theorem_struct" 2
| CT_token(x1) ->
   fSTRING x1;
   fNODE "token" 1
| CT_transparent(x1) ->
   fID_NE_LIST x1;
   fNODE "transparent" 1
| CT_undo(x1) ->
   fINT_OPT x1;
   fNODE "undo" 1
| CT_unfocus -> fNODE "unfocus" 0
| CT_unsethyp -> fNODE "unsethyp" 0
| CT_unsetundo -> fNODE "unsetundo" 0
| CT_user_vernac(x1, x2) ->
   fID x1;
   fVARG_LIST x2;
   fNODE "user_vernac" 2
| CT_variable(x1, x2) ->
   fVAR x1;
   fBINDER_LIST x2;
   fNODE "variable" 2
| CT_write_module(x1, x2) ->
   fID x1;
   fSTRING_OPT x2;
   fNODE "write_module" 2
and fCOMMAND_LIST = function
| CT_command_list(x,l) ->
   fCOMMAND x;
   (List.iter fCOMMAND l);
   fNODE "command_list" (1 + (List.length l))
and fCOMMENT = function
| CT_comment x -> fATOM "comment";
   (f_atom_string x);
   print_string "\n"and fCOMMENT_S = function
| CT_comment_s l ->
   (List.iter fCOMMENT l);
   fNODE "comment_s" (List.length l)
and fCONSTR = function
| CT_constr(x1, x2) ->
   fID x1;
   fFORMULA x2;
   fNODE "constr" 2
and fCONSTR_LIST = function
| CT_constr_list l ->
   (List.iter fCONSTR l);
   fNODE "constr_list" (List.length l)
and fCONTEXT_HYP_LIST = function
| CT_context_hyp_list l ->
   (List.iter fPREMISE_PATTERN l);
   fNODE "context_hyp_list" (List.length l)
and fCONTEXT_PATTERN = function
| CT_coerce_FORMULA_to_CONTEXT_PATTERN x -> fFORMULA x
| CT_context(x1, x2) ->
   fID_OPT x1;
   fFORMULA x2;
   fNODE "context" 2
and fCONTEXT_RULE = function
| CT_context_rule(x1, x2, x3) ->
   fCONTEXT_HYP_LIST x1;
   fCONTEXT_PATTERN x2;
   fTACTIC_COM x3;
   fNODE "context_rule" 3
and fCONVERSION_FLAG = function
| CT_beta -> fNODE "beta" 0
| CT_delta -> fNODE "delta" 0
| CT_evar -> fNODE "evar" 0
| CT_iota -> fNODE "iota" 0
| CT_zeta -> fNODE "zeta" 0
and fCONVERSION_FLAG_LIST = function
| CT_conversion_flag_list l ->
   (List.iter fCONVERSION_FLAG l);
   fNODE "conversion_flag_list" (List.length l)
and fCONV_SET = function
| CT_unf l ->
   (List.iter fID l);
   fNODE "unf" (List.length l)
| CT_unfbut l ->
   (List.iter fID l);
   fNODE "unfbut" (List.length l)
and fCO_IND = function
| CT_co_ind x -> fATOM "co_ind";
   (f_atom_string x);
   print_string "\n"and fDEF = function
| CT_def(x1, x2) ->
   fID_OPT x1;
   fFORMULA x2;
   fNODE "def" 2
and fDEFN = function
| CT_defn x -> fATOM "defn";
   (f_atom_string x);
   print_string "\n"and fDEFN_OR_THM = function
| CT_coerce_DEFN_to_DEFN_OR_THM x -> fDEFN x
| CT_coerce_THM_to_DEFN_OR_THM x -> fTHM x
and fDEF_BODY = function
| CT_coerce_CONTEXT_PATTERN_to_DEF_BODY x -> fCONTEXT_PATTERN x
| CT_coerce_EVAL_CMD_to_DEF_BODY x -> fEVAL_CMD x
and fDEF_BODY_OPT = function
| CT_coerce_DEF_BODY_to_DEF_BODY_OPT x -> fDEF_BODY x
| CT_coerce_FORMULA_OPT_to_DEF_BODY_OPT x -> fFORMULA_OPT x
and fDEP = function
| CT_dep x -> fATOM "dep";
   (f_atom_string x);
   print_string "\n"and fDESTRUCTING = function
| CT_coerce_NONE_to_DESTRUCTING x -> fNONE x
| CT_destructing -> fNODE "destructing" 0
and fEQN = function
| CT_eqn(x1, x2) ->
   fMATCH_PATTERN_NE_LIST x1;
   fFORMULA x2;
   fNODE "eqn" 2
and fEQN_LIST = function
| CT_eqn_list l ->
   (List.iter fEQN l);
   fNODE "eqn_list" (List.length l)
and fEVAL_CMD = function
| CT_eval(x1, x2, x3) ->
   fINT_OPT x1;
   fRED_COM x2;
   fFORMULA x3;
   fNODE "eval" 3
and fFIXTAC = function
| CT_fixtac(x1, x2, x3) ->
   fID x1;
   fINT x2;
   fFORMULA x3;
   fNODE "fixtac" 3
and fFIX_BINDER = function
| CT_coerce_FIX_REC_to_FIX_BINDER x -> fFIX_REC x
| CT_fix_binder(x1, x2, x3, x4) ->
   fID x1;
   fINT x2;
   fFORMULA x3;
   fFORMULA x4;
   fNODE "fix_binder" 4
and fFIX_BINDER_LIST = function
| CT_fix_binder_list(x,l) ->
   fFIX_BINDER x;
   (List.iter fFIX_BINDER l);
   fNODE "fix_binder_list" (1 + (List.length l))
and fFIX_REC = function
| CT_fix_rec(x1, x2, x3, x4) ->
   fID x1;
   fBINDER_NE_LIST x2;
   fFORMULA x3;
   fFORMULA x4;
   fNODE "fix_rec" 4
and fFIX_REC_LIST = function
| CT_fix_rec_list(x,l) ->
   fFIX_REC x;
   (List.iter fFIX_REC l);
   fNODE "fix_rec_list" (1 + (List.length l))
and fFIX_TAC_LIST = function
| CT_fix_tac_list l ->
   (List.iter fFIXTAC l);
   fNODE "fix_tac_list" (List.length l)
and fFORMULA = function
| CT_coerce_BINARY_to_FORMULA x -> fBINARY x
| CT_coerce_ID_to_FORMULA x -> fID x
| CT_coerce_SORT_TYPE_to_FORMULA x -> fSORT_TYPE x
| CT_coerce_TYPED_FORMULA_to_FORMULA x -> fTYPED_FORMULA x
| CT_appc(x1, x2) ->
   fFORMULA x1;
   fFORMULA_NE_LIST x2;
   fNODE "appc" 2
| CT_arrowc(x1, x2) ->
   fFORMULA x1;
   fFORMULA x2;
   fNODE "arrowc" 2
| CT_bang(x1, x2) ->
   fINT_OPT x1;
   fFORMULA x2;
   fNODE "bang" 2
| CT_cases(x1, x2, x3) ->
   fFORMULA_OPT x1;
   fFORMULA_NE_LIST x2;
   fEQN_LIST x3;
   fNODE "cases" 3
| CT_cofixc(x1, x2) ->
   fID x1;
   fCOFIX_REC_LIST x2;
   fNODE "cofixc" 2
| CT_elimc(x1, x2, x3, x4) ->
   fCASE x1;
   fFORMULA_OPT x2;
   fFORMULA x3;
   fFORMULA_LIST x4;
   fNODE "elimc" 4
| CT_existvarc -> fNODE "existvarc" 0
| CT_fixc(x1, x2) ->
   fID x1;
   fFIX_BINDER_LIST x2;
   fNODE "fixc" 2
| CT_if(x1, x2, x3, x4) ->
   fFORMULA_OPT x1;
   fFORMULA x2;
   fFORMULA x3;
   fFORMULA x4;
   fNODE "if" 4
| CT_inductive_let(x1, x2, x3, x4) ->
   fFORMULA_OPT x1;
   fID_OPT_NE_LIST x2;
   fFORMULA x3;
   fFORMULA x4;
   fNODE "inductive_let" 4
| CT_int_encapsulator x -> fATOM "int_encapsulator";
   (f_atom_string x);
   print_string "\n"| CT_lambdac(x1, x2) ->
   fBINDER_NE_LIST x1;
   fFORMULA x2;
   fNODE "lambdac" 2
| CT_letin(x1, x2) ->
   fDEF x1;
   fFORMULA x2;
   fNODE "letin" 2
| CT_notation(x1, x2) ->
   fSTRING x1;
   fFORMULA_LIST x2;
   fNODE "notation" 2
| CT_num_encapsulator(x1, x2) ->
   fNUM_TYPE x1;
   fFORMULA x2;
   fNODE "num_encapsulator" 2
| CT_prodc(x1, x2) ->
   fBINDER_NE_LIST x1;
   fFORMULA x2;
   fNODE "prodc" 2
and fFORMULA_LIST = function
| CT_formula_list l ->
   (List.iter fFORMULA l);
   fNODE "formula_list" (List.length l)
and fFORMULA_NE_LIST = function
| CT_formula_ne_list(x,l) ->
   fFORMULA x;
   (List.iter fFORMULA l);
   fNODE "formula_ne_list" (1 + (List.length l))
and fFORMULA_OPT = function
| CT_coerce_FORMULA_to_FORMULA_OPT x -> fFORMULA x
| CT_coerce_ID_OPT_to_FORMULA_OPT x -> fID_OPT x
and fFORMULA_OR_INT = function
| CT_coerce_FORMULA_to_FORMULA_OR_INT x -> fFORMULA x
| CT_coerce_ID_OR_INT_to_FORMULA_OR_INT x -> fID_OR_INT x
and fGRAMMAR = function
| CT_grammar_none -> fNODE "grammar_none" 0
and fHINT_EXPRESSION = function
| CT_constructors(x1) ->
   fID_LIST x1;
   fNODE "constructors" 1
| CT_extern(x1, x2, x3) ->
   fINT x1;
   fFORMULA x2;
   fTACTIC_COM x3;
   fNODE "extern" 3
| CT_immediate(x1) ->
   fFORMULA x1;
   fNODE "immediate" 1
| CT_resolve(x1) ->
   fFORMULA x1;
   fNODE "resolve" 1
| CT_unfold_hint(x1) ->
   fID x1;
   fNODE "unfold_hint" 1
and fID = function
| CT_ident x -> fATOM "ident";
   (f_atom_string x);
   print_string "\n"| CT_metac(x1) ->
   fINT x1;
   fNODE "metac" 1
| CT_metaid x -> fATOM "metaid";
   (f_atom_string x);
   print_string "\n"and fIDENTITY_OPT = function
| CT_coerce_NONE_to_IDENTITY_OPT x -> fNONE x
| CT_identity -> fNODE "identity" 0
and fID_LIST = function
| CT_id_list l ->
   (List.iter fID l);
   fNODE "id_list" (List.length l)
and fID_LIST_LIST = function
| CT_id_list_list l ->
   (List.iter fID_LIST l);
   fNODE "id_list_list" (List.length l)
and fID_NE_LIST = function
| CT_id_ne_list(x,l) ->
   fID x;
   (List.iter fID l);
   fNODE "id_ne_list" (1 + (List.length l))
and fID_NE_LIST_OR_STAR = function
| CT_coerce_ID_NE_LIST_to_ID_NE_LIST_OR_STAR x -> fID_NE_LIST x
| CT_star -> fNODE "star" 0
and fID_OPT = function
| CT_coerce_ID_to_ID_OPT x -> fID x
| CT_coerce_NONE_to_ID_OPT x -> fNONE x
and fID_OPT_NE_LIST = function
| CT_id_opt_ne_list(x,l) ->
   fID_OPT x;
   (List.iter fID_OPT l);
   fNODE "id_opt_ne_list" (1 + (List.length l))
and fID_OPT_OR_ALL = function
| CT_coerce_ID_OPT_to_ID_OPT_OR_ALL x -> fID_OPT x
| CT_all -> fNODE "all" 0
and fID_OR_INT = function
| CT_coerce_ID_to_ID_OR_INT x -> fID x
| CT_coerce_INT_to_ID_OR_INT x -> fINT x
and fID_OR_INTYPE = function
| CT_coerce_ID_to_ID_OR_INTYPE x -> fID x
| CT_intype(x1) ->
   fID x1;
   fNODE "intype" 1
and fID_OR_INTYPE_LIST = function
| CT_id_or_intype_list l ->
   (List.iter fID_OR_INTYPE l);
   fNODE "id_or_intype_list" (List.length l)
and fID_OR_INT_OPT = function
| CT_coerce_ID_OPT_to_ID_OR_INT_OPT x -> fID_OPT x
| CT_coerce_ID_OR_INT_to_ID_OR_INT_OPT x -> fID_OR_INT x
| CT_coerce_INT_OPT_to_ID_OR_INT_OPT x -> fINT_OPT x
and fID_OR_STRING = function
| CT_coerce_ID_to_ID_OR_STRING x -> fID x
| CT_coerce_STRING_to_ID_OR_STRING x -> fSTRING x
and fID_UNIT = function
| CT_coerce_ID_to_ID_UNIT x -> fID x
| CT_unit -> fNODE "unit" 0
and fID_UNIT_LIST = function
| CT_id_unit_list(x,l) ->
   fID_UNIT x;
   (List.iter fID_UNIT l);
   fNODE "id_unit_list" (1 + (List.length l))
and fIMPEXP = function
| CT_export -> fNODE "export" 0
| CT_import -> fNODE "import" 0
and fIND_SPEC = function
| CT_ind_spec(x1, x2, x3, x4) ->
   fID x1;
   fBINDER_LIST x2;
   fFORMULA x3;
   fCONSTR_LIST x4;
   fNODE "ind_spec" 4
and fIND_SPEC_LIST = function
| CT_ind_spec_list l ->
   (List.iter fIND_SPEC l);
   fNODE "ind_spec_list" (List.length l)
and fINT = function
| CT_int x -> fATOM "int";
   (f_atom_int x);
   print_string "\n"and fINTRO_PATT = function
| CT_coerce_ID_to_INTRO_PATT x -> fID x
| CT_conj_pattern(x1) ->
   fINTRO_PATT_LIST x1;
   fNODE "conj_pattern" 1
| CT_disj_pattern(x1) ->
   fINTRO_PATT_LIST x1;
   fNODE "disj_pattern" 1
and fINTRO_PATT_LIST = function
| CT_intro_patt_list l ->
   (List.iter fINTRO_PATT l);
   fNODE "intro_patt_list" (List.length l)
and fINT_LIST = function
| CT_int_list l ->
   (List.iter fINT l);
   fNODE "int_list" (List.length l)
and fINT_NE_LIST = function
| CT_int_ne_list(x,l) ->
   fINT x;
   (List.iter fINT l);
   fNODE "int_ne_list" (1 + (List.length l))
and fINT_OPT = function
| CT_coerce_INT_to_INT_OPT x -> fINT x
| CT_coerce_NONE_to_INT_OPT x -> fNONE x
and fINT_OR_LOCN = function
| CT_coerce_INT_to_INT_OR_LOCN x -> fINT x
| CT_coerce_LOCN_to_INT_OR_LOCN x -> fLOCN x
and fINV_TYPE = function
| CT_inv_clear -> fNODE "inv_clear" 0
| CT_inv_regular -> fNODE "inv_regular" 0
| CT_inv_simple -> fNODE "inv_simple" 0
and fIN_OR_OUT_MODULES = function
| CT_coerce_NONE_to_IN_OR_OUT_MODULES x -> fNONE x
| CT_in_modules(x1) ->
   fID_NE_LIST x1;
   fNODE "in_modules" 1
| CT_out_modules(x1) ->
   fID_NE_LIST x1;
   fNODE "out_modules" 1
and fLET_CLAUSE = function
| CT_let_clause(x1, x2, x3) ->
   fID x1;
   fTACTIC_OPT x2;
   fLET_VALUE x3;
   fNODE "let_clause" 3
and fLET_CLAUSES = function
| CT_let_clauses(x,l) ->
   fLET_CLAUSE x;
   (List.iter fLET_CLAUSE l);
   fNODE "let_clauses" (1 + (List.length l))
and fLET_VALUE = function
| CT_coerce_DEF_BODY_to_LET_VALUE x -> fDEF_BODY x
| CT_coerce_TACTIC_COM_to_LET_VALUE x -> fTACTIC_COM x
and fLOCAL_OPT = function
| CT_coerce_NONE_to_LOCAL_OPT x -> fNONE x
| CT_local -> fNODE "local" 0
and fLOCN = function
| CT_locn x -> fATOM "locn";
   (f_atom_string x);
   print_string "\n"and fMATCH_PATTERN = function
| CT_coerce_ID_OPT_to_MATCH_PATTERN x -> fID_OPT x
| CT_pattern_app(x1, x2) ->
   fMATCH_PATTERN x1;
   fMATCH_PATTERN_NE_LIST x2;
   fNODE "pattern_app" 2
| CT_pattern_as(x1, x2) ->
   fMATCH_PATTERN x1;
   fID_OPT x2;
   fNODE "pattern_as" 2
and fMATCH_PATTERN_NE_LIST = function
| CT_match_pattern_ne_list(x,l) ->
   fMATCH_PATTERN x;
   (List.iter fMATCH_PATTERN l);
   fNODE "match_pattern_ne_list" (1 + (List.length l))
and fMATCH_TAC_RULE = function
| CT_match_tac_rule(x1, x2) ->
   fCONTEXT_PATTERN x1;
   fLET_VALUE x2;
   fNODE "match_tac_rule" 2
and fMATCH_TAC_RULES = function
| CT_match_tac_rules(x,l) ->
   fMATCH_TAC_RULE x;
   (List.iter fMATCH_TAC_RULE l);
   fNODE "match_tac_rules" (1 + (List.length l))
and fNATURAL_FEATURE = function
| CT_contractible -> fNODE "contractible" 0
| CT_implicit -> fNODE "implicit" 0
| CT_nat_transparent -> fNODE "nat_transparent" 0
and fNONE = function
| CT_none -> fNODE "none" 0
and fNUM_TYPE = function
| CT_num_type x -> fATOM "num_type";
   (f_atom_string x);
   print_string "\n"and fOMEGA_FEATURE = function
| CT_coerce_STRING_to_OMEGA_FEATURE x -> fSTRING x
| CT_flag_action -> fNODE "flag_action" 0
| CT_flag_system -> fNODE "flag_system" 0
| CT_flag_time -> fNODE "flag_time" 0
and fOMEGA_MODE = function
| CT_set -> fNODE "set" 0
| CT_switch -> fNODE "switch" 0
| CT_unset -> fNODE "unset" 0
and fORIENTATION = function
| CT_lr -> fNODE "lr" 0
| CT_rl -> fNODE "rl" 0
and fPATTERN = function
| CT_pattern_occ(x1, x2) ->
   fINT_LIST x1;
   fFORMULA x2;
   fNODE "pattern_occ" 2
and fPATTERN_NE_LIST = function
| CT_pattern_ne_list(x,l) ->
   fPATTERN x;
   (List.iter fPATTERN l);
   fNODE "pattern_ne_list" (1 + (List.length l))
and fPATTERN_OPT = function
| CT_coerce_NONE_to_PATTERN_OPT x -> fNONE x
| CT_coerce_PATTERN_to_PATTERN_OPT x -> fPATTERN x
and fPREMISE = function
| CT_coerce_TYPED_FORMULA_to_PREMISE x -> fTYPED_FORMULA x
| CT_eval_result(x1, x2, x3) ->
   fFORMULA x1;
   fFORMULA x2;
   fFORMULA x3;
   fNODE "eval_result" 3
| CT_premise(x1, x2) ->
   fID x1;
   fFORMULA x2;
   fNODE "premise" 2
and fPREMISES_LIST = function
| CT_premises_list l ->
   (List.iter fPREMISE l);
   fNODE "premises_list" (List.length l)
and fPREMISE_PATTERN = function
| CT_premise_pattern(x1, x2) ->
   fID_OPT x1;
   fCONTEXT_PATTERN x2;
   fNODE "premise_pattern" 2
and fPROOF_SCRIPT = function
| CT_proof_script l ->
   (List.iter fCOMMAND l);
   fNODE "proof_script" (List.length l)
and fRECCONSTR = function
| CT_coerce_CONSTR_to_RECCONSTR x -> fCONSTR x
| CT_constr_coercion(x1, x2) ->
   fID x1;
   fFORMULA x2;
   fNODE "constr_coercion" 2
and fRECCONSTR_LIST = function
| CT_recconstr_list l ->
   (List.iter fRECCONSTR l);
   fNODE "recconstr_list" (List.length l)
and fREC_TACTIC_FUN = function
| CT_rec_tactic_fun(x1, x2, x3) ->
   fID x1;
   fID_UNIT_LIST x2;
   fTACTIC_COM x3;
   fNODE "rec_tactic_fun" 3
and fREC_TACTIC_FUN_LIST = function
| CT_rec_tactic_fun_list(x,l) ->
   fREC_TACTIC_FUN x;
   (List.iter fREC_TACTIC_FUN l);
   fNODE "rec_tactic_fun_list" (1 + (List.length l))
and fRED_COM = function
| CT_cbv(x1, x2) ->
   fCONVERSION_FLAG_LIST x1;
   fCONV_SET x2;
   fNODE "cbv" 2
| CT_fold(x1) ->
   fFORMULA_LIST x1;
   fNODE "fold" 1
| CT_hnf -> fNODE "hnf" 0
| CT_lazy(x1, x2) ->
   fCONVERSION_FLAG_LIST x1;
   fCONV_SET x2;
   fNODE "lazy" 2
| CT_pattern(x1) ->
   fPATTERN_NE_LIST x1;
   fNODE "pattern" 1
| CT_red -> fNODE "red" 0
| CT_simpl(x1) ->
   fPATTERN_OPT x1;
   fNODE "simpl" 1
| CT_unfold(x1) ->
   fUNFOLD_NE_LIST x1;
   fNODE "unfold" 1
and fRULE = function
| CT_rule(x1, x2) ->
   fPREMISES_LIST x1;
   fFORMULA x2;
   fNODE "rule" 2
and fRULE_LIST = function
| CT_rule_list l ->
   (List.iter fRULE l);
   fNODE "rule_list" (List.length l)
and fSCHEME_SPEC = function
| CT_scheme_spec(x1, x2, x3, x4) ->
   fID x1;
   fDEP x2;
   fFORMULA x3;
   fSORT_TYPE x4;
   fNODE "scheme_spec" 4
and fSCHEME_SPEC_LIST = function
| CT_scheme_spec_list(x,l) ->
   fSCHEME_SPEC x;
   (List.iter fSCHEME_SPEC l);
   fNODE "scheme_spec_list" (1 + (List.length l))
and fSCOMMENT_CONTENT = function
| CT_coerce_FORMULA_to_SCOMMENT_CONTENT x -> fFORMULA x
| CT_coerce_ID_OR_STRING_to_SCOMMENT_CONTENT x -> fID_OR_STRING x
and fSCOMMENT_CONTENT_LIST = function
| CT_scomment_content_list l ->
   (List.iter fSCOMMENT_CONTENT l);
   fNODE "scomment_content_list" (List.length l)
and fSECTION_BEGIN = function
| CT_section(x1) ->
   fID x1;
   fNODE "section" 1
and fSECTION_BODY = function
| CT_section_body l ->
   (List.iter fCOMMAND l);
   fNODE "section_body" (List.length l)
and fSIGNED_INT = function
| CT_coerce_INT_to_SIGNED_INT x -> fINT x
| CT_minus(x1) ->
   fINT x1;
   fNODE "minus" 1
and fSIGNED_INT_LIST = function
| CT_signed_int_list l ->
   (List.iter fSIGNED_INT l);
   fNODE "signed_int_list" (List.length l)
and fSORT_TYPE = function
| CT_sortc x -> fATOM "sortc";
   (f_atom_string x);
   print_string "\n"and fSPEC_LIST = function
| CT_coerce_BINDING_LIST_to_SPEC_LIST x -> fBINDING_LIST x
| CT_coerce_FORMULA_LIST_to_SPEC_LIST x -> fFORMULA_LIST x
and fSPEC_OPT = function
| CT_coerce_NONE_to_SPEC_OPT x -> fNONE x
| CT_spec -> fNODE "spec" 0
and fSTRING = function
| CT_string x -> fATOM "string";
   (f_atom_string x);
   print_string "\n"and fSTRING_NE_LIST = function
| CT_string_ne_list(x,l) ->
   fSTRING x;
   (List.iter fSTRING l);
   fNODE "string_ne_list" (1 + (List.length l))
and fSTRING_OPT = function
| CT_coerce_NONE_to_STRING_OPT x -> fNONE x
| CT_coerce_STRING_to_STRING_OPT x -> fSTRING x
and fTACTIC_ARG = function
| CT_coerce_EVAL_CMD_to_TACTIC_ARG x -> fEVAL_CMD x
| CT_coerce_FORMULA_OR_INT_to_TACTIC_ARG x -> fFORMULA_OR_INT x
| CT_coerce_TACTIC_COM_to_TACTIC_ARG x -> fTACTIC_COM x
| CT_coerce_TERM_CHANGE_to_TACTIC_ARG x -> fTERM_CHANGE x
| CT_void -> fNODE "void" 0
and fTACTIC_ARG_LIST = function
| CT_tactic_arg_list(x,l) ->
   fTACTIC_ARG x;
   (List.iter fTACTIC_ARG l);
   fNODE "tactic_arg_list" (1 + (List.length l))
and fTACTIC_COM = function
| CT_abstract(x1, x2) ->
   fID_OPT x1;
   fTACTIC_COM x2;
   fNODE "abstract" 2
| CT_absurd(x1) ->
   fFORMULA x1;
   fNODE "absurd" 1
| CT_any_constructor(x1) ->
   fTACTIC_OPT x1;
   fNODE "any_constructor" 1
| CT_apply(x1, x2) ->
   fFORMULA x1;
   fSPEC_LIST x2;
   fNODE "apply" 2
| CT_assert(x1, x2) ->
   fID_OPT x1;
   fFORMULA x2;
   fNODE "assert" 2
| CT_assumption -> fNODE "assumption" 0
| CT_auto(x1) ->
   fINT_OPT x1;
   fNODE "auto" 1
| CT_auto_with(x1, x2) ->
   fINT_OPT x1;
   fID_NE_LIST_OR_STAR x2;
   fNODE "auto_with" 2
| CT_autorewrite(x1, x2) ->
   fID_NE_LIST x1;
   fTACTIC_OPT x2;
   fNODE "autorewrite" 2
| CT_autotdb(x1) ->
   fINT_OPT x1;
   fNODE "autotdb" 1
| CT_case_type(x1) ->
   fFORMULA x1;
   fNODE "case_type" 1
| CT_casetac(x1, x2) ->
   fFORMULA x1;
   fSPEC_LIST x2;
   fNODE "casetac" 2
| CT_cdhyp(x1) ->
   fID x1;
   fNODE "cdhyp" 1
| CT_change(x1, x2) ->
   fFORMULA x1;
   fID_OR_INTYPE_LIST x2;
   fNODE "change" 2
| CT_change_local(x1, x2, x3) ->
   fPATTERN x1;
   fFORMULA x2;
   fID_OR_INTYPE_LIST x3;
   fNODE "change_local" 3
| CT_clear(x1) ->
   fID_NE_LIST x1;
   fNODE "clear" 1
| CT_clear_body(x1) ->
   fID_NE_LIST x1;
   fNODE "clear_body" 1
| CT_cofixtactic(x1, x2) ->
   fID_OPT x1;
   fCOFIX_TAC_LIST x2;
   fNODE "cofixtactic" 2
| CT_condrewrite_lr(x1, x2, x3, x4) ->
   fTACTIC_COM x1;
   fFORMULA x2;
   fSPEC_LIST x3;
   fID_OPT x4;
   fNODE "condrewrite_lr" 4
| CT_condrewrite_rl(x1, x2, x3, x4) ->
   fTACTIC_COM x1;
   fFORMULA x2;
   fSPEC_LIST x3;
   fID_OPT x4;
   fNODE "condrewrite_rl" 4
| CT_constructor(x1, x2) ->
   fINT x1;
   fSPEC_LIST x2;
   fNODE "constructor" 2
| CT_contradiction -> fNODE "contradiction" 0
| CT_cut(x1) ->
   fFORMULA x1;
   fNODE "cut" 1
| CT_cutrewrite_lr(x1, x2) ->
   fFORMULA x1;
   fID_OPT x2;
   fNODE "cutrewrite_lr" 2
| CT_cutrewrite_rl(x1, x2) ->
   fFORMULA x1;
   fID_OPT x2;
   fNODE "cutrewrite_rl" 2
| CT_dauto(x1, x2) ->
   fINT_OPT x1;
   fINT_OPT x2;
   fNODE "dauto" 2
| CT_dconcl -> fNODE "dconcl" 0
| CT_decompose_list(x1, x2) ->
   fID_NE_LIST x1;
   fFORMULA x2;
   fNODE "decompose_list" 2
| CT_decompose_record(x1) ->
   fFORMULA x1;
   fNODE "decompose_record" 1
| CT_decompose_sum(x1) ->
   fFORMULA x1;
   fNODE "decompose_sum" 1
| CT_depinversion(x1, x2, x3) ->
   fINV_TYPE x1;
   fID_OR_INT x2;
   fFORMULA_OPT x3;
   fNODE "depinversion" 3
| CT_deprewrite_lr(x1) ->
   fID x1;
   fNODE "deprewrite_lr" 1
| CT_deprewrite_rl(x1) ->
   fID x1;
   fNODE "deprewrite_rl" 1
| CT_destruct(x1) ->
   fID_OR_INT x1;
   fNODE "destruct" 1
| CT_dhyp(x1) ->
   fID x1;
   fNODE "dhyp" 1
| CT_discriminate_eq(x1) ->
   fID_OR_INT_OPT x1;
   fNODE "discriminate_eq" 1
| CT_do(x1, x2) ->
   fINT x1;
   fTACTIC_COM x2;
   fNODE "do" 2
| CT_eapply(x1, x2) ->
   fFORMULA x1;
   fSPEC_LIST x2;
   fNODE "eapply" 2
| CT_eauto(x1, x2) ->
   fID_OR_INT_OPT x1;
   fID_OR_INT_OPT x2;
   fNODE "eauto" 2
| CT_eauto_with(x1, x2, x3) ->
   fID_OR_INT_OPT x1;
   fID_OR_INT_OPT x2;
   fID_NE_LIST_OR_STAR x3;
   fNODE "eauto_with" 3
| CT_elim(x1, x2, x3) ->
   fFORMULA x1;
   fSPEC_LIST x2;
   fUSING x3;
   fNODE "elim" 3
| CT_elim_type(x1) ->
   fFORMULA x1;
   fNODE "elim_type" 1
| CT_exact(x1) ->
   fFORMULA x1;
   fNODE "exact" 1
| CT_exists(x1) ->
   fSPEC_LIST x1;
   fNODE "exists" 1
| CT_fail(x1) ->
   fINT x1;
   fNODE "fail" 1
| CT_first(x,l) ->
   fTACTIC_COM x;
   (List.iter fTACTIC_COM l);
   fNODE "first" (1 + (List.length l))
| CT_fixtactic(x1, x2, x3) ->
   fID_OPT x1;
   fINT x2;
   fFIX_TAC_LIST x3;
   fNODE "fixtactic" 3
| CT_generalize(x1) ->
   fFORMULA_NE_LIST x1;
   fNODE "generalize" 1
| CT_generalize_dependent(x1) ->
   fFORMULA x1;
   fNODE "generalize_dependent" 1
| CT_idtac -> fNODE "idtac" 0
| CT_induction(x1) ->
   fID_OR_INT x1;
   fNODE "induction" 1
| CT_info(x1) ->
   fTACTIC_COM x1;
   fNODE "info" 1
| CT_injection_eq(x1) ->
   fID_OR_INT_OPT x1;
   fNODE "injection_eq" 1
| CT_instantiate(x1, x2) ->
   fINT x1;
   fFORMULA x2;
   fNODE "instantiate" 2
| CT_intro(x1) ->
   fID_OPT x1;
   fNODE "intro" 1
| CT_intro_after(x1, x2) ->
   fID_OPT x1;
   fID x2;
   fNODE "intro_after" 2
| CT_intros(x1) ->
   fINTRO_PATT_LIST x1;
   fNODE "intros" 1
| CT_intros_until(x1) ->
   fID_OR_INT x1;
   fNODE "intros_until" 1
| CT_inversion(x1, x2, x3) ->
   fINV_TYPE x1;
   fID_OR_INT x2;
   fID_LIST x3;
   fNODE "inversion" 3
| CT_left(x1) ->
   fSPEC_LIST x1;
   fNODE "left" 1
| CT_let_ltac(x1, x2) ->
   fLET_CLAUSES x1;
   fLET_VALUE x2;
   fNODE "let_ltac" 2
| CT_lettac(x1, x2, x3) ->
   fID x1;
   fFORMULA x2;
   fUNFOLD_LIST x3;
   fNODE "lettac" 3
| CT_match_context(x,l) ->
   fCONTEXT_RULE x;
   (List.iter fCONTEXT_RULE l);
   fNODE "match_context" (1 + (List.length l))
| CT_match_context_reverse(x,l) ->
   fCONTEXT_RULE x;
   (List.iter fCONTEXT_RULE l);
   fNODE "match_context_reverse" (1 + (List.length l))
| CT_match_tac(x1, x2) ->
   fTACTIC_COM x1;
   fMATCH_TAC_RULES x2;
   fNODE "match_tac" 2
| CT_move_after(x1, x2) ->
   fID x1;
   fID x2;
   fNODE "move_after" 2
| CT_new_destruct(x1, x2, x3) ->
   fFORMULA_OR_INT x1;
   fUSING x2;
   fID_LIST_LIST x3;
   fNODE "new_destruct" 3
| CT_new_induction(x1, x2, x3) ->
   fFORMULA_OR_INT x1;
   fUSING x2;
   fID_LIST_LIST x3;
   fNODE "new_induction" 3
| CT_omega -> fNODE "omega" 0
| CT_orelse(x1, x2) ->
   fTACTIC_COM x1;
   fTACTIC_COM x2;
   fNODE "orelse" 2
| CT_parallel(x,l) ->
   fTACTIC_COM x;
   (List.iter fTACTIC_COM l);
   fNODE "parallel" (1 + (List.length l))
| CT_pose(x1, x2) ->
   fID_OPT x1;
   fFORMULA x2;
   fNODE "pose" 2
| CT_progress(x1) ->
   fTACTIC_COM x1;
   fNODE "progress" 1
| CT_prolog(x1, x2) ->
   fFORMULA_LIST x1;
   fINT x2;
   fNODE "prolog" 2
| CT_rec_tactic_in(x1, x2) ->
   fREC_TACTIC_FUN_LIST x1;
   fTACTIC_COM x2;
   fNODE "rec_tactic_in" 2
| CT_reduce(x1, x2) ->
   fRED_COM x1;
   fID_OR_INTYPE_LIST x2;
   fNODE "reduce" 2
| CT_reflexivity -> fNODE "reflexivity" 0
| CT_rename(x1, x2) ->
   fID x1;
   fID x2;
   fNODE "rename" 2
| CT_repeat(x1) ->
   fTACTIC_COM x1;
   fNODE "repeat" 1
| CT_replace_with(x1, x2) ->
   fFORMULA x1;
   fFORMULA x2;
   fNODE "replace_with" 2
| CT_rewrite_lr(x1, x2, x3) ->
   fFORMULA x1;
   fSPEC_LIST x2;
   fID_OPT x3;
   fNODE "rewrite_lr" 3
| CT_rewrite_rl(x1, x2, x3) ->
   fFORMULA x1;
   fSPEC_LIST x2;
   fID_OPT x3;
   fNODE "rewrite_rl" 3
| CT_right(x1) ->
   fSPEC_LIST x1;
   fNODE "right" 1
| CT_ring(x1) ->
   fFORMULA_LIST x1;
   fNODE "ring" 1
| CT_simple_user_tac(x1, x2) ->
   fID x1;
   fTACTIC_ARG_LIST x2;
   fNODE "simple_user_tac" 2
| CT_simplify_eq(x1) ->
   fID_OPT x1;
   fNODE "simplify_eq" 1
| CT_specialize(x1, x2, x3) ->
   fINT_OPT x1;
   fFORMULA x2;
   fSPEC_LIST x3;
   fNODE "specialize" 3
| CT_split(x1) ->
   fSPEC_LIST x1;
   fNODE "split" 1
| CT_superauto(x1, x2, x3, x4) ->
   fINT_OPT x1;
   fID_LIST x2;
   fDESTRUCTING x3;
   fUSINGTDB x4;
   fNODE "superauto" 4
| CT_symmetry -> fNODE "symmetry" 0
| CT_tac_double(x1, x2) ->
   fID_OR_INT x1;
   fID_OR_INT x2;
   fNODE "tac_double" 2
| CT_tacsolve(x,l) ->
   fTACTIC_COM x;
   (List.iter fTACTIC_COM l);
   fNODE "tacsolve" (1 + (List.length l))
| CT_tactic_fun(x1, x2) ->
   fID_UNIT_LIST x1;
   fTACTIC_COM x2;
   fNODE "tactic_fun" 2
| CT_then(x,l) ->
   fTACTIC_COM x;
   (List.iter fTACTIC_COM l);
   fNODE "then" (1 + (List.length l))
| CT_transitivity(x1) ->
   fFORMULA x1;
   fNODE "transitivity" 1
| CT_trivial -> fNODE "trivial" 0
| CT_trivial_with(x1) ->
   fID_NE_LIST_OR_STAR x1;
   fNODE "trivial_with" 1
| CT_truecut(x1, x2) ->
   fID_OPT x1;
   fFORMULA x2;
   fNODE "truecut" 2
| CT_try(x1) ->
   fTACTIC_COM x1;
   fNODE "try" 1
| CT_use(x1) ->
   fFORMULA x1;
   fNODE "use" 1
| CT_use_inversion(x1, x2, x3) ->
   fID_OR_INT x1;
   fFORMULA x2;
   fID_LIST x3;
   fNODE "use_inversion" 3
| CT_user_tac(x1, x2) ->
   fID x1;
   fTARG_LIST x2;
   fNODE "user_tac" 2
and fTACTIC_OPT = function
| CT_coerce_NONE_to_TACTIC_OPT x -> fNONE x
| CT_coerce_TACTIC_COM_to_TACTIC_OPT x -> fTACTIC_COM x
and fTARG = function
| CT_coerce_BINDING_to_TARG x -> fBINDING x
| CT_coerce_COFIXTAC_to_TARG x -> fCOFIXTAC x
| CT_coerce_FIXTAC_to_TARG x -> fFIXTAC x
| CT_coerce_FORMULA_OR_INT_to_TARG x -> fFORMULA_OR_INT x
| CT_coerce_PATTERN_to_TARG x -> fPATTERN x
| CT_coerce_SCOMMENT_CONTENT_to_TARG x -> fSCOMMENT_CONTENT x
| CT_coerce_SIGNED_INT_LIST_to_TARG x -> fSIGNED_INT_LIST x
| CT_coerce_SPEC_LIST_to_TARG x -> fSPEC_LIST x
| CT_coerce_TACTIC_COM_to_TARG x -> fTACTIC_COM x
| CT_coerce_UNFOLD_to_TARG x -> fUNFOLD x
| CT_coerce_UNFOLD_NE_LIST_to_TARG x -> fUNFOLD_NE_LIST x
and fTARG_LIST = function
| CT_targ_list l ->
   (List.iter fTARG l);
   fNODE "targ_list" (List.length l)
and fTERM_CHANGE = function
| CT_check_term(x1) ->
   fFORMULA x1;
   fNODE "check_term" 1
| CT_inst_term(x1, x2) ->
   fID x1;
   fFORMULA x2;
   fNODE "inst_term" 2
and fTEXT = function
| CT_coerce_ID_to_TEXT x -> fID x
| CT_text_formula(x1) ->
   fFORMULA x1;
   fNODE "text_formula" 1
| CT_text_h l ->
   (List.iter fTEXT l);
   fNODE "text_h" (List.length l)
| CT_text_hv l ->
   (List.iter fTEXT l);
   fNODE "text_hv" (List.length l)
| CT_text_op l ->
   (List.iter fTEXT l);
   fNODE "text_op" (List.length l)
| CT_text_path(x1) ->
   fSIGNED_INT_LIST x1;
   fNODE "text_path" 1
| CT_text_v l ->
   (List.iter fTEXT l);
   fNODE "text_v" (List.length l)
and fTHEOREM_GOAL = function
| CT_goal(x1) ->
   fFORMULA x1;
   fNODE "goal" 1
| CT_theorem_goal(x1, x2, x3) ->
   fDEFN_OR_THM x1;
   fID x2;
   fFORMULA x3;
   fNODE "theorem_goal" 3
and fTHM = function
| CT_thm x -> fATOM "thm";
   (f_atom_string x);
   print_string "\n"and fTHM_OPT = function
| CT_coerce_NONE_to_THM_OPT x -> fNONE x
| CT_coerce_THM_to_THM_OPT x -> fTHM x
and fTYPED_FORMULA = function
| CT_typed_formula(x1, x2) ->
   fFORMULA x1;
   fFORMULA x2;
   fNODE "typed_formula" 2
and fUNFOLD = function
| CT_unfold_occ(x1, x2) ->
   fINT_LIST x1;
   fID x2;
   fNODE "unfold_occ" 2
and fUNFOLD_LIST = function
| CT_unfold_list l ->
   (List.iter fUNFOLD l);
   fNODE "unfold_list" (List.length l)
and fUNFOLD_NE_LIST = function
| CT_unfold_ne_list(x,l) ->
   fUNFOLD x;
   (List.iter fUNFOLD l);
   fNODE "unfold_ne_list" (1 + (List.length l))
and fUSING = function
| CT_coerce_NONE_to_USING x -> fNONE x
| CT_using(x1, x2) ->
   fFORMULA x1;
   fSPEC_LIST x2;
   fNODE "using" 2
and fUSINGTDB = function
| CT_coerce_NONE_to_USINGTDB x -> fNONE x
| CT_usingtdb -> fNODE "usingtdb" 0
and fVAR = function
| CT_var x -> fATOM "var";
   (f_atom_string x);
   print_string "\n"and fVARG = function
| CT_coerce_AST_to_VARG x -> fAST x
| CT_coerce_AST_LIST_to_VARG x -> fAST_LIST x
| CT_coerce_BINDER_to_VARG x -> fBINDER x
| CT_coerce_BINDER_LIST_to_VARG x -> fBINDER_LIST x
| CT_coerce_BINDER_NE_LIST_to_VARG x -> fBINDER_NE_LIST x
| CT_coerce_FORMULA_LIST_to_VARG x -> fFORMULA_LIST x
| CT_coerce_FORMULA_OPT_to_VARG x -> fFORMULA_OPT x
| CT_coerce_FORMULA_OR_INT_to_VARG x -> fFORMULA_OR_INT x
| CT_coerce_ID_OPT_OR_ALL_to_VARG x -> fID_OPT_OR_ALL x
| CT_coerce_ID_OR_INT_OPT_to_VARG x -> fID_OR_INT_OPT x
| CT_coerce_INT_LIST_to_VARG x -> fINT_LIST x
| CT_coerce_SCOMMENT_CONTENT_to_VARG x -> fSCOMMENT_CONTENT x
| CT_coerce_STRING_OPT_to_VARG x -> fSTRING_OPT x
| CT_coerce_TACTIC_OPT_to_VARG x -> fTACTIC_OPT x
| CT_coerce_VARG_LIST_to_VARG x -> fVARG_LIST x
and fVARG_LIST = function
| CT_varg_list l ->
   (List.iter fVARG l);
   fNODE "varg_list" (List.length l)
and fVERBOSE_OPT = function
| CT_coerce_NONE_to_VERBOSE_OPT x -> fNONE x
| CT_verbose -> fNODE "verbose" 0
;;