-
Notifications
You must be signed in to change notification settings - Fork 84
/
candle_kernel_permsScript.sml
1616 lines (1395 loc) · 44 KB
/
candle_kernel_permsScript.sml
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
(*
Prove perms theorems for kernel functions
*)
open preamble helperLib;
open semanticPrimitivesTheory semanticPrimitivesPropsTheory sptreeTheory
evaluateTheory namespacePropsTheory evaluatePropsTheory
candle_kernel_valsTheory candle_kernelProgTheory;
open candle_prover_invTheory;
open permsTheory ml_hol_kernel_funsProgTheory ml_progLib ast_extrasTheory;
val _ = new_theory "candle_kernel_perms";
val _ = set_grammar_ancestry ["candle_kernel_vals", "perms", "misc"];
val eval_nsLookup_tac =
rewrite_tac [ml_progTheory.nsLookup_merge_env]
\\ CONV_TAC(DEPTH_CONV ml_progLib.nsLookup_conv)
(* Functions translated with 'translate' should be proved for any ps *)
Theorem perms_ok_word8_fromint_v[simp]:
perms_ok ps word8_fromint_v
Proof
rw[perms_ok_def, Word8ProgTheory.word8_fromint_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_fst_v[simp]:
perms_ok ps fst_v
Proof
rw[perms_ok_def, std_preludeTheory.fst_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_snd_v[simp]:
perms_ok ps snd_v
Proof
rw[perms_ok_def, std_preludeTheory.snd_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_exists_v[simp]:
perms_ok ps ListProg$exists_v
Proof
rw[perms_ok_def, ListProgTheory.exists_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_length_aux_v[simp]:
perms_ok ps ListProg$length_aux_v
Proof
rw[perms_ok_def, ListProgTheory.length_aux_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_length_v[simp]:
perms_ok ps ListProg$length_v
Proof
rw[perms_ok_def, ListProgTheory.length_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ EVAL_TAC \\ rw[]
QED
Theorem perms_ok_map_1_v[simp]:
perms_ok ps ListProg$map_1_v
Proof
rw[perms_ok_def, ListProgTheory.map_1_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_member_v[simp]:
perms_ok ps ListProg$member_v
Proof
rw[perms_ok_def, ListProgTheory.member_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_filter_v[simp]:
perms_ok ps ListProg$filter_v
Proof
rw[perms_ok_def, ListProgTheory.filter_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_every_v[simp]:
perms_ok ps ListProg$every_v
Proof
rw[perms_ok_def, ListProgTheory.every_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_qsort_part_v[simp]:
perms_ok ps ListProg$qsort_part_v
Proof
rw[perms_ok_def, ListProgTheory.qsort_part_v_def, astTheory.pat_bindings_def,
perms_ok_env_def]
QED
Theorem perms_ok_qsort_acc_v[simp]:
perms_ok ps ListProg$qsort_acc_v
Proof
rw[perms_ok_def, ListProgTheory.qsort_acc_v_def, astTheory.pat_bindings_def,perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_qsort_v[simp]:
perms_ok ps ListProg$qsort_v
Proof
rw[perms_ok_def, ListProgTheory.qsort_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_strcat_v[simp]:
perms_ok ps strcat_v
Proof
rw[perms_ok_def, StringProgTheory.strcat_v_def, perms_ok_env_def]
QED
Theorem perms_ok_string_lt_v[simp]:
perms_ok ps string_lt_v
Proof
rw[perms_ok_def, string_lt_v_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_string_le_v[simp]:
perms_ok ps string_le_v
Proof
rw[perms_ok_def, string_le_v_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_mmap_1_v[simp]:
perms_ok ps ml_hol_kernel_funsProg$map_1_v
Proof
rw[perms_ok_def, map_1_v_def, perms_ok_env_def, astTheory.pat_bindings_def]
QED
Theorem perms_ok_check_tm_v[simp]:
perms_ok ps check_tm_v
Proof
rw[perms_ok_def, check_tm_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_check_thm_v[simp]:
perms_ok ps check_thm_v
Proof
rw[perms_ok_def, check_thm_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_check_tm_tm_v[simp]:
perms_ok ps check_tm_tm_v
Proof
rw[perms_ok_def, check_tm_tm_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_check_ty_ty_v[simp]:
perms_ok ps check_ty_ty_v
Proof
rw[perms_ok_def, check_ty_ty_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_vfree_in_v[simp]:
perms_ok ps vfree_in_v
Proof
rw[perms_ok_def, vfree_in_v_def, astTheory.pat_bindings_def,perms_ok_env_def]
QED
Theorem perms_ok_call_vfree_in_v[simp]:
perms_ok ps call_vfree_in_v
Proof
rw[perms_ok_def, call_vfree_in_v_def, astTheory.pat_bindings_def,perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_variant_v[simp]:
perms_ok ps variant_v
Proof
rw[perms_ok_def, variant_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_call_variant_v[simp]:
∀ps. perms_ok ps call_variant_v
Proof
rw[perms_ok_def, call_variant_v_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_concl_v[simp]:
∀ps. perms_ok ps concl_v
Proof
rw[perms_ok_def, concl_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_assoc_v[simp]:
perms_ok ps assoc_v
Proof
rw[perms_ok_def, assoc_v_def, perms_ok_env_def, astTheory.pat_bindings_def]
QED
Theorem perms_ok_alphavars_v[simp]:
perms_ok ps alphavars_v
Proof
rw[perms_ok_def, alphavars_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_raconv_v[simp]:
perms_ok ps raconv_v
Proof
rw[perms_ok_def, raconv_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_aconv_v[simp]:
perms_ok ps aconv_v
Proof
rw[perms_ok_def, aconv_v_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_try_v[simp]:
perms_ok ps try_v
Proof
rw[perms_ok_def, try_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_o_1_v[simp]:
perms_ok ps o_1_v
Proof
rw[perms_ok_def, std_preludeTheory.o_1_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_dest_vartype_v[simp]:
perms_ok ps dest_vartype_v
Proof
rw[perms_ok_def, dest_vartype_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_dest_type_v[simp]:
perms_ok ps dest_type_v
Proof
rw[perms_ok_def, dest_type_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_is_type_v[simp]:
perms_ok ps is_type_v
Proof
rw[perms_ok_def, is_type_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_is_vartype_v[simp]:
perms_ok ps is_vartype_v
Proof
rw[perms_ok_def, is_vartype_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_check_ty_v[simp]:
perms_ok ps check_ty_v
Proof
rw[perms_ok_def, check_ty_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_rev_assocd_v[simp]:
perms_ok ps rev_assocd_v
Proof
rw[perms_ok_def, rev_assocd_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_type_subst_v[simp]:
perms_ok ps type_subst_v
Proof
rw[perms_ok_def, type_subst_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_call_type_subst_v[simp]:
perms_ok ps call_type_subst_v
Proof
rw[perms_ok_def, call_type_subst_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_itlist_v[simp]:
perms_ok ps itlist_v
Proof
rw[perms_ok_def, itlist_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_insert_1_v[simp]:
perms_ok ps insert_1_v
Proof
rw[perms_ok_def, insert_1_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_union_1_v[simp]:
perms_ok ps union_1_v
Proof
rw[perms_ok_def, union_1_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_subtract_v[simp]:
perms_ok ps subtract_v
Proof
rw[perms_ok_def, subtract_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_forall_v[simp]:
perms_ok ps forall_v
Proof
rw[perms_ok_def, forall_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_tyvars_v[simp]:
∀ps. perms_ok ps tyvars_v
Proof
rw[perms_ok_def, tyvars_v_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_call_tyvars_v[simp]:
∀ps. perms_ok ps call_tyvars_v
Proof
rw[perms_ok_def, call_tyvars_v_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_frees_v[simp]:
perms_ok ps frees_v
Proof
rw[perms_ok_def, frees_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_call_frees_v[simp]:
perms_ok ps call_frees_v
Proof
rw[perms_ok_def, call_frees_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_freesl_v[simp]:
perms_ok ps freesl_v
Proof
rw[perms_ok_def, freesl_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ CONV_TAC(DEPTH_CONV ml_progLib.nsLookup_conv)
\\ rw[]
QED
Theorem perms_ok_freesin_v[simp]:
perms_ok ps freesin_v
Proof
rw[perms_ok_def, freesin_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_call_freesin_v[simp]:
perms_ok ps call_freesin_v
Proof
rw[perms_ok_def, call_freesin_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_type_vars_in_term_v[simp]:
perms_ok ps type_vars_in_term_v
Proof
rw[perms_ok_def, type_vars_in_term_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_call_type_vars_in_term_v[simp]:
perms_ok ps call_type_vars_in_term_v
Proof
rw[perms_ok_def, call_type_vars_in_term_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_dest_var_v[simp]:
perms_ok ps dest_var_v
Proof
rw[perms_ok_def, dest_var_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_dest_const_v[simp]:
perms_ok ps dest_const_v
Proof
rw[perms_ok_def, dest_const_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_dest_comb_v[simp]:
perms_ok ps dest_comb_v
Proof
rw[perms_ok_def, dest_comb_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_dest_abs_v[simp]:
perms_ok ps dest_abs_v
Proof
rw[perms_ok_def, dest_abs_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_dest_thm_v[simp]:
perms_ok ps dest_thm_v
Proof
rw[perms_ok_def, dest_thm_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_hyp_v[simp]:
perms_ok ps hyp_v
Proof
rw[perms_ok_def, hyp_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_rand_v[simp]:
perms_ok ps rand_v
Proof
rw[perms_ok_def, rand_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_rator_v[simp]:
perms_ok ps rator_v
Proof
rw[perms_ok_def, rator_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_dest_eq_v[simp]:
perms_ok ps dest_eq_v
Proof
rw[perms_ok_def, dest_eq_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_is_var_v[simp]:
perms_ok ps is_var_v
Proof
rw[perms_ok_def, is_var_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_is_const_v[simp]:
perms_ok ps is_const_v
Proof
rw[perms_ok_def, is_const_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_is_comb_v[simp]:
perms_ok ps is_comb_v
Proof
rw[perms_ok_def, is_comb_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_is_abs_v[simp]:
perms_ok ps is_abs_v
Proof
rw[perms_ok_def, is_abs_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_vsubst_aux_v[simp]:
perms_ok ps vsubst_aux_v
Proof
rw[perms_ok_def, vsubst_aux_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_inst_aux_v[simp]:
perms_ok ps inst_aux_v
Proof
rw[perms_ok_def, inst_aux_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_inst_v[simp]:
perms_ok ps inst_v
Proof
rw[perms_ok_def, inst_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_mk_vartype_v[simp]:
perms_ok ps mk_vartype_v
Proof
rw[perms_ok_def, mk_vartype_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_mk_var_v[simp]:
perms_ok ps mk_var_v
Proof
rw[perms_ok_def, mk_var_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_mk_abs_v[simp]:
perms_ok ps mk_abs_v
Proof
rw[perms_ok_def, mk_abs_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_compare_aux_v[simp]:
perms_ok ps compare_aux_v
Proof
rw[perms_ok_def, StringProgTheory.compare_aux_v_def, perms_ok_env_def]
QED
Theorem perms_ok_compare_1_v[simp]:
perms_ok ps StringProg$compare_1_v
Proof
rw[perms_ok_def, StringProgTheory.compare_1_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ EVAL_TAC \\ rw[]
QED
Theorem perms_ok_type_cmp_v[simp]:
perms_ok ps type_cmp_v
Proof
rw[perms_ok_def, type_cmp_v_def, astTheory.pat_bindings_def, perms_ok_env_def] \\ fs[] \\ rw[]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_term_cmp_v[simp]:
perms_ok ps term_cmp_v
Proof
rw[perms_ok_def, term_cmp_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_ordav_v[simp]:
perms_ok ps ordav_v
Proof
rw[perms_ok_def, ordav_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_codomain_v[simp]:
perms_ok ps codomain_v
Proof
rw[perms_ok_def, codomain_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_typeof_v[simp]:
perms_ok ps typeof_v
Proof
rw[perms_ok_def, typeof_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_orda_v[simp]:
perms_ok ps orda_v
Proof
rw[perms_ok_def, orda_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_term_union_v[simp]:
perms_ok ps term_union_v
Proof
rw[perms_ok_def, term_union_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_image_v[simp]:
perms_ok ps image_v
Proof
rw[perms_ok_def, image_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_eq_mp_v[simp]:
perms_ok ps eq_mp_v
Proof
rw[perms_ok_def, eq_mp_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_inst_type_v[simp]:
perms_ok ps inst_type_v
Proof
rw[perms_ok_def, inst_type_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_term_remove_v[simp]:
perms_ok ps term_remove_v
Proof
rw[perms_ok_def, term_remove_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_can_v[simp]:
perms_ok ps can_v
Proof
rw[perms_ok_def, can_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_subset_v[simp]:
perms_ok ps subset_v
Proof
rw[perms_ok_def, subset_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_dropwhile_v[simp]:
perms_ok ps dropwhile_v
Proof
rw[perms_ok_def, dropwhile_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_flatten_v[simp]:
perms_ok ps flatten_v
Proof
rw[perms_ok_def, flatten_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_get_size_v[simp]:
perms_ok ps get_size_v
Proof
rw[perms_ok_def, get_size_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_get_next_size_v[simp]:
perms_ok ps get_next_size_v
Proof
rw[perms_ok_def, get_next_size_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_remove_all_v[simp]:
perms_ok ps remove_all_v
Proof
rw[perms_ok_def, remove_all_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_smart_remove_v[simp]:
perms_ok ps smart_remove_v
Proof
rw[perms_ok_def, smart_remove_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_annotate_v[simp]:
perms_ok ps annotate_v
Proof
rw[perms_ok_def, annotate_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_exp_1_v[simp]:
perms_ok ps exp_1_v
Proof
rw[perms_ok_def, std_preludeTheory.exp_1_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
\\ rw[perms_ok_def, std_preludeTheory.exp_aux_v_def,
astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_name_v[simp]:
perms_ok ps name_v
Proof
rw[perms_ok_def, name_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_name2str_v[simp]:
perms_ok ps name2str_v
Proof
rw[perms_ok_def, name2str_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
\\ rw[perms_ok_def, ascii_name_v_def, astTheory.pat_bindings_def, perms_ok_env_def,
ListProgTheory.hd_v_def,num2str_v_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
\\ rw[ListProgTheory.hd_v_def,perms_ok_def,
num2ascii_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_dest_quote_v[simp]:
perms_ok ps dest_quote_v
Proof
rw[perms_ok_def, dest_quote_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_dest_list_v[simp]:
perms_ok ps dest_list_v
Proof
rw[perms_ok_def, dest_list_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_newlines_v[simp]:
perms_ok ps newlines_v
Proof
rw[perms_ok_def, newlines_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_v2pretty_v[simp]:
perms_ok ps v2pretty_v
Proof
rw[perms_ok_def, v2pretty_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_v2str_v[simp]:
perms_ok ps v2str_v
Proof
rw[perms_ok_def, v2str_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_is_comment_v[simp]:
perms_ok ps is_comment_v
Proof
rw[perms_ok_def, is_comment_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_vs2str_v[simp]:
perms_ok ps vs2str_v
Proof
rw[perms_ok_def, vs2str_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_list_v[simp]:
perms_ok ps list_v
Proof
rw[perms_ok_def, list_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_nil_list_v[simp]:
perms_ok ps nil_list_v
Proof
rw[perms_ok_def, nil_list_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_null_v[simp]:
perms_ok ps ListProg$null_v
Proof
rw[perms_ok_def, ListProgTheory.null_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_str_to_v_v[simp]:
perms_ok ps str_to_v_v
Proof
rw[perms_ok_def, str_to_v_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_ty_to_v_v[simp]:
perms_ok ps ty_to_v_v
Proof
rw[perms_ok_def, ty_to_v_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_term_to_v_v[simp]:
perms_ok ps term_to_v_v
Proof
rw[perms_ok_def, term_to_v_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_thm_to_v_v[simp]:
perms_ok ps thm_to_v_v
Proof
rw[perms_ok_def, thm_to_v_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_update_to_v_v[simp]:
perms_ok ps update_to_v_v
Proof
rw[perms_ok_def, update_to_v_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_thm_to_string_v[simp]:
perms_ok ps thm_to_string_v
Proof
rw[perms_ok_def, thm_to_string_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw [] \\ fs []
QED
Theorem perms_ok_funpow_v[simp]:
perms_ok ps funpow_v
Proof
rw[perms_ok_def, std_preludeTheory.funpow_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_app_type_v[simp]:
perms_ok ps app_type_v
Proof
rw[perms_ok_def, app_type_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_num2bit_v[simp]:
perms_ok ps num2bit_v
Proof
rw[perms_ok_def, num2bit_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_cv2term_v[simp]:
perms_ok ps cv2term_v
Proof
rw[perms_ok_def, cv2term_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_safemod_v[simp]:
perms_ok ps safemod_v
Proof
rw[perms_ok_def, safemod_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_safediv_v[simp]:
perms_ok ps safediv_v
Proof
rw[perms_ok_def, safediv_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_alookup_v[simp]:
perms_ok ps ListProg$alookup_v
Proof
rw[perms_ok_def, ListProgTheory.alookup_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_zip_v[simp]:
perms_ok ps ListProg$zip_v
Proof
rw[perms_ok_def, ListProgTheory.zip_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_option_v[simp]:
perms_ok ps option_v
Proof
rw[perms_ok_def, option_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_check_v[simp]:
perms_ok ps check_v
Proof
rw[perms_ok_def, check_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ pop_assum mp_tac \\ eval_nsLookup_tac
\\ rw[]
QED
Theorem perms_ok_get_code_v[simp]:
perms_ok ps get_code_v
Proof
rw[perms_ok_def, get_code_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_env_lookup_v[simp]:
perms_ok ps env_lookup_v
Proof
rw[perms_ok_def, env_lookup_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_exec_v[simp]:
perms_ok ps exec_v
Proof
rw[perms_ok_def, exec_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_cv_t_v[simp]:
perms_ok ps cv_t_v
Proof
mp_tac candle_kernelProgTheory.cv_t_v_thm
\\ qabbrev_tac ‘a = cv_t_v’ \\ EVAL_TAC
\\ rw[perms_ok_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_cv_f_v[simp]:
perms_ok ps cv_f_v
Proof
mp_tac candle_kernelProgTheory.cv_f_v_thm
\\ qabbrev_tac ‘a = cv_f_v’ \\ EVAL_TAC
\\ rw[perms_ok_def, astTheory.pat_bindings_def, perms_ok_env_def]
QED
Theorem perms_ok_to_num_v[simp]:
perms_ok ps to_num_v
Proof
rw[perms_ok_def, to_num_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_monop_fst_v[simp]:
perms_ok ps monop_fst_v
Proof
rw[perms_ok_def, monop_fst_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_monop_snd_v[simp]:
perms_ok ps monop_snd_v
Proof
rw[perms_ok_def, monop_snd_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_monop_ispair_v[simp]:
perms_ok ps monop_ispair_v
Proof
rw[perms_ok_def, monop_ispair_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_monop_v[simp]:
perms_ok ps monop_v
Proof
rw[perms_ok_def, monop_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_binop_add_v[simp]:
perms_ok ps binop_add_v
Proof
rw[perms_ok_def, binop_add_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_binop_sub_v[simp]:
perms_ok ps binop_sub_v
Proof
rw[perms_ok_def, binop_sub_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_binop_mul_v[simp]:
perms_ok ps binop_mul_v
Proof
rw[perms_ok_def, binop_mul_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_binop_div_v[simp]:
perms_ok ps binop_div_v
Proof
rw[perms_ok_def, binop_div_v_def, astTheory.pat_bindings_def, perms_ok_env_def]
\\ gs [] \\ pop_assum mp_tac \\ eval_nsLookup_tac \\ rw[]
QED
Theorem perms_ok_binop_mod_v[simp]:
perms_ok ps binop_mod_v