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
|
(in-package "ACL2")
; hifat-equiv.lisp Mihir Mehta
; Some definitions and theorems for the equivalence relation hifat-equiv.
(include-book "../hifat")
(defund
hifat-subsetp
(m1-file-alist1 m1-file-alist2)
(declare
(xargs
:guard (and (m1-file-alist-p m1-file-alist1)
(m1-file-alist-p m1-file-alist2))
:hints (("goal" :in-theory (enable m1-file->contents
m1-directory-file-p)))))
(b*
(((when (atom m1-file-alist1)) t)
((unless (mbt (and (consp (car m1-file-alist1))
(stringp (car (car m1-file-alist1))))))
(and (member-equal (car m1-file-alist1)
m1-file-alist2)
(hifat-subsetp (cdr m1-file-alist1)
m1-file-alist2)))
(name (caar m1-file-alist1))
(file1 (cdar m1-file-alist1))
((unless (consp (assoc-equal name m1-file-alist2)))
nil)
(file2 (cdr (assoc-equal name m1-file-alist2))))
(if (not (m1-directory-file-p file1))
(and (not (m1-directory-file-p file2))
(hifat-subsetp (cdr m1-file-alist1)
m1-file-alist2)
(equal (m1-file->contents file1)
(m1-file->contents file2)))
(and (m1-directory-file-p file2)
(hifat-subsetp (cdr m1-file-alist1)
m1-file-alist2)
(hifat-subsetp (m1-file->contents file1)
(m1-file->contents file2))))))
(defthm hifat-subsetp-of-remove1-assoc-1
(implies (and (m1-file-alist-p m1-file-alist1)
(atom (assoc-equal key m1-file-alist1)))
(equal (hifat-subsetp m1-file-alist1
(remove1-assoc key m1-file-alist2))
(hifat-subsetp m1-file-alist1 m1-file-alist2)))
:hints (("Goal" :in-theory (enable
hifat-subsetp))))
(defthm
hifat-no-dups-p-of-remove1-assoc-equal
(implies
(hifat-no-dups-p m1-file-alist)
(hifat-no-dups-p (remove1-assoc-equal key m1-file-alist)))
:hints (("Goal" :in-theory (enable hifat-no-dups-p))))
(defthm hifat-subsetp-preserves-assoc
(implies (and (hifat-subsetp x y)
(stringp file)
(consp (assoc-equal file x)))
(consp (assoc-equal file y)))
:hints (("Goal" :in-theory (enable
hifat-subsetp))))
;; This can't be made local.
(defthm
hifat-subsetp-transitive-lemma-1
(implies
(and (m1-file-alist-p y)
(consp (assoc-equal key y))
(hifat-subsetp y z))
(iff (m1-directory-file-p (cdr (assoc-equal key z)))
(m1-directory-file-p (cdr (assoc-equal key y)))))
:hints (("Goal" :in-theory (enable
hifat-subsetp)))
:rule-classes
((:rewrite
:corollary
(implies
(and (hifat-subsetp y z)
(m1-file-alist-p y)
(consp (assoc-equal key y))
(m1-directory-file-p (cdr (assoc-equal key y))))
(m1-directory-file-p (cdr (assoc-equal key z)))))))
(local
(defthm
hifat-subsetp-transitive-lemma-2
(implies
(and (m1-file-alist-p y)
(consp (assoc-equal key y))
(not (m1-directory-file-p (cdr (assoc-equal key y))))
(hifat-subsetp y z))
(equal (m1-file->contents (cdr (assoc-equal key y)))
(m1-file->contents (cdr (assoc-equal key z)))))
:hints (("Goal" :in-theory (enable
hifat-subsetp)))))
(defthm
hifat-subsetp-transitive-lemma-3
(implies (and (m1-file-alist-p y)
(m1-directory-file-p (cdr (assoc-equal key y)))
(hifat-subsetp y z))
(hifat-subsetp (m1-file->contents (cdr (assoc-equal key y)))
(m1-file->contents (cdr (assoc-equal key z)))))
:hints (("Goal" :in-theory (enable
hifat-subsetp))))
(encapsulate
() ;; start lemmas for hifat-subsetp-transitive
(local
(defthm
hifat-subsetp-transitive-lemma-4
(implies
(and (not (m1-directory-file-p (cdr (assoc-equal (car (car x)) y))))
(consp (assoc-equal (car (car x)) y))
(hifat-subsetp y z)
(m1-file-alist-p y))
(not (m1-directory-file-p (cdr (assoc-equal (car (car x)) z)))))
:hints (("goal" :in-theory (disable hifat-subsetp-transitive-lemma-1)
:use (:instance hifat-subsetp-transitive-lemma-1
(key (car (car x))))))))
(local
(defthm
hifat-subsetp-transitive-lemma-5
(implies (and (m1-directory-file-p (cdr (assoc-equal (car (car x)) y)))
(hifat-subsetp y z)
(m1-file-alist-p y))
(m1-directory-file-p (cdr (assoc-equal (car (car x)) z))))
:hints (("goal" :in-theory (disable hifat-subsetp-transitive-lemma-1)
:use (:instance hifat-subsetp-transitive-lemma-1
(key (car (car x))))))))
(local
(defthm
hifat-subsetp-transitive-lemma-6
(implies (and (not (stringp (car (car x))))
(m1-file-alist-p y))
(not
(member-equal (car x) y)))
:hints (("goal" :in-theory (enable m1-file-alist-p)))))
(defthm hifat-subsetp-transitive
(implies (and (hifat-subsetp x y)
(hifat-subsetp y z)
(m1-file-alist-p y))
(hifat-subsetp x z))
:hints (("Goal" :in-theory (enable
hifat-subsetp)))))
(defthm
hifat-subsetp-when-atom
(implies (atom m1-file-alist2)
(equal (hifat-subsetp m1-file-alist1 m1-file-alist2)
(atom m1-file-alist1)))
:hints (("Goal" :in-theory (enable
hifat-subsetp))))
(local
(defthm hifat-subsetp-reflexive-lemma-1
(implies (and (m1-file-alist-p x)
(hifat-no-dups-p (append x y)))
(equal (assoc-equal (car (car y)) (append x y))
(car y)))
:hints (("Goal" :in-theory (enable hifat-no-dups-p)) )))
(local
(defthm hifat-subsetp-reflexive-lemma-2
(implies (not (hifat-no-dups-p y))
(not (hifat-no-dups-p (append x y))))
:hints (("Goal" :in-theory (enable hifat-no-dups-p)) )))
;; This can't be made local.
(defthm hifat-subsetp-reflexive-lemma-3
(implies (and (m1-file-alist-p y)
(hifat-no-dups-p y)
(m1-directory-file-p (cdr (car y))))
(hifat-no-dups-p (m1-file->contents (cdr (car y)))))
:hints (("Goal" :in-theory (enable hifat-no-dups-p)) ))
(encapsulate
()
(local
(defun
induction-scheme (x y)
(declare
(xargs
:hints
(("goal" :in-theory (enable m1-file->contents
m1-file-contents-fix)))))
(if
(atom y)
x
(append
(induction-scheme nil (m1-file->contents (cdr (car y))))
(induction-scheme (append x (list (car y)))
(cdr y))))))
(defthm hifat-subsetp-reflexive-lemma-4
(implies (and (m1-file-alist-p x)
(m1-file-alist-p y)
(hifat-no-dups-p (append x y)))
(hifat-subsetp y (append x y)))
:hints (("goal" :induct (induction-scheme x y)
:in-theory (enable hifat-no-dups-p hifat-subsetp)))))
(defthm
hifat-subsetp-reflexive-lemma-5
(implies
(m1-file-p file)
(equal (m1-directory-file-p
(m1-file d-e (m1-file->contents file)))
(m1-directory-file-p file)))
:hints (("goal" :in-theory (enable m1-directory-file-p))))
(defthm
hifat-subsetp-reflexive
(implies (and (m1-file-alist-p y)
(hifat-no-dups-p y))
(hifat-subsetp y y))
:hints
(("goal"
:in-theory
(disable hifat-subsetp-reflexive-lemma-4)
:use (:instance hifat-subsetp-reflexive-lemma-4
(x nil)))))
(defund hifat-equiv (fs1 fs2)
(declare (xargs :guard (and (m1-file-alist-p fs1)
(hifat-no-dups-p fs1)
(m1-file-alist-p fs2)
(hifat-no-dups-p fs2))))
(let ((fs1 (hifat-file-alist-fix fs1))
(fs2 (hifat-file-alist-fix fs2)))
(and (hifat-subsetp fs1 fs2)
(hifat-subsetp fs2 fs1))))
;; A bug was here: after we changed the definition of hifat-equiv, we placed
;; this defequiv form somewhat later in the file, with the result that two
;; rules which should have rewritten in an hifat-equiv context instead began
;; to rewrite in an equal context. Moving this defequiv form up here fixed the
;; issue.
(defequiv hifat-equiv
:hints (("goal" :in-theory (enable hifat-equiv))))
(defthm consp-of-assoc-when-hifat-equiv-lemma-1
(implies (and (not (consp (assoc-equal name m1-file-alist2)))
(m1-file-alist-p m1-file-alist1)
(hifat-subsetp m1-file-alist1 m1-file-alist2))
(not (consp (assoc-equal name m1-file-alist1))))
:hints (("goal" :in-theory (enable hifat-subsetp m1-file-alist-p))))
(defthm
consp-of-assoc-when-hifat-equiv
(implies (hifat-equiv x y)
(equal (consp (assoc-equal (fat32-filename-fix name)
(hifat-file-alist-fix x)))
(consp (assoc-equal (fat32-filename-fix name)
(hifat-file-alist-fix y)))))
:hints (("goal" :do-not-induct t
:in-theory (e/d (hifat-equiv)
(hifat-subsetp-preserves-assoc))
:use ((:instance hifat-subsetp-preserves-assoc
(x (hifat-file-alist-fix x))
(y (hifat-file-alist-fix y))
(file (fat32-filename-p name)))
(:instance hifat-subsetp-preserves-assoc
(x (hifat-file-alist-fix y))
(y (hifat-file-alist-fix x))
(file (fat32-filename-p name))))
:cases ((consp (assoc-equal (fat32-filename-fix name)
(hifat-file-alist-fix x))))))
:rule-classes
:congruence)
(defthm
hifat-equiv-of-cons-lemma-1
(implies
(and (m1-file-alist-p fs)
(hifat-no-dups-p fs)
(m1-regular-file-p (cdar fs)))
(hifat-equiv (cons (cons (caar fs)
(m1-file d-e (m1-file->contents (cdar fs))))
(cdr fs))
fs))
:hints
(("goal"
:expand
(hifat-equiv (cons (cons (caar fs)
(m1-file d-e (m1-file->contents (cdar fs))))
(cdr fs))
fs)
:in-theory (e/d (hifat-no-dups-p hifat-subsetp)
(hifat-subsetp-reflexive-lemma-4 m1-directory-file-p-of-m1-file))
:use
((:instance hifat-subsetp-reflexive-lemma-4
(x (list (cons (car (car fs))
(m1-file d-e
(m1-file->contents (cdr (car fs)))))))
(y (cdr fs)))
(:instance hifat-subsetp-reflexive-lemma-4
(x (list (car fs)))
(y (cdr fs)))))))
(defthm
hifat-equiv-of-cons-lemma-2
(implies (and (fat32-filename-p (car head))
(m1-regular-file-p (cdr head))
(equal contents (m1-file->contents (cdr head)))
(m1-file-alist-p tail)
(hifat-no-dups-p (cons head tail)))
(hifat-equiv (cons (cons (car head)
(m1-file d-e contents))
tail)
(cons head tail)))
:hints
(("goal"
:in-theory
(disable hifat-equiv-of-cons-lemma-1)
:use (:instance hifat-equiv-of-cons-lemma-1
(fs (cons head tail))))))
(defthm
hifat-equiv-of-cons-lemma-3
(implies (and (m1-directory-file-p (cdr head))
(m1-file-alist-p (cons head tail))
(hifat-no-dups-p (cons head tail))
(hifat-no-dups-p contents)
(hifat-equiv (m1-file->contents (cdr head))
contents)
(m1-file-alist-p contents))
(hifat-equiv (cons (cons (car head)
(m1-file d-e contents))
tail)
(cons head tail)))
:hints
(("goal"
:expand ((hifat-equiv (cons (cons (car head)
(m1-file d-e contents))
tail)
(cons head tail))
(hifat-equiv (m1-file->contents (cdr head))
contents))
:in-theory
(e/d (hifat-no-dups-p hifat-subsetp)
(hifat-subsetp-reflexive-lemma-4 m1-directory-file-p-of-m1-file))
:use ((:instance hifat-subsetp-reflexive-lemma-4
(x (list head))
(y tail))
(:instance hifat-subsetp-reflexive-lemma-4
(x (list (cons (car head)
(m1-file d-e contents))))
(y tail))
(:instance m1-directory-file-p-of-m1-file
(contents contents)
(d-e d-e))))))
(defthmd hifat-equiv-of-cons-lemma-4
(implies (and (hifat-no-dups-p (cons head tail1))
(hifat-subsetp tail2 tail1))
(hifat-subsetp tail2 (cons head tail1)))
:hints (("Goal" :in-theory (enable hifat-no-dups-p hifat-subsetp)) ))
(local (in-theory (enable hifat-equiv-of-cons-lemma-4)))
;; This rule had a problem earlier - no loop-stopper could be defined on it,
;; because it was an hifat-equiv rule, not an equal rule. Without a
;; loop-stopper, we were going round and round in a big induction proof. By
;; explicitly stipulating equality as the equivalence relation, we get around
;; this.
;;
;; OK, another problem this rule had earlier - it was a rewrite rule instead of
;; a congruence, and therefore supremely unwieldy!
(defthm
hifat-equiv-of-cons
(implies (hifat-equiv tail1 tail2)
(hifat-equiv (cons head tail1)
(cons head tail2)))
:hints
(("goal"
:in-theory
(e/d (hifat-equiv hifat-no-dups-p
hifat-file-alist-fix hifat-subsetp))
:expand (hifat-file-alist-fix (cons head tail1))))
:rule-classes :congruence)
(defthm hifat-equiv-implies-set-equiv-strip-cars-1-lemma-1
(implies (and (member-equal a x) (null (car a)))
(member-equal nil (strip-cars x))))
(defthm hifat-equiv-implies-set-equiv-strip-cars-1-lemma-2
(implies (hifat-subsetp fs1 fs2)
(subsetp-equal (strip-cars fs1)
(strip-cars fs2)))
:hints (("goal" :in-theory (enable hifat-subsetp))))
(defthm
hifat-equiv-implies-set-equiv-strip-cars-1
(implies (hifat-equiv fs1 fs2)
(set-equiv (fat32-filename-list-fix (strip-cars fs1))
(fat32-filename-list-fix (strip-cars fs2))))
:hints
(("goal"
:do-not-induct t
:in-theory (e/d (hifat-equiv set-equiv)
(hifat-equiv-implies-set-equiv-strip-cars-1-lemma-2
subsetp-when-subsetp))
:use ((:instance hifat-equiv-implies-set-equiv-strip-cars-1-lemma-2
(fs1 (hifat-file-alist-fix fs1))
(fs2 (hifat-file-alist-fix fs2)))
(:instance hifat-equiv-implies-set-equiv-strip-cars-1-lemma-2
(fs2 (hifat-file-alist-fix fs1))
(fs1 (hifat-file-alist-fix fs2))))))
:rule-classes :congruence)
(defthm
put-assoc-under-hifat-equiv-1
(implies (and (hifat-equiv (m1-file->contents file1)
(m1-file->contents file2))
(syntaxp (not (term-order file1 file2)))
(m1-directory-file-p (m1-file-fix file1))
(m1-directory-file-p (m1-file-fix file2)))
(hifat-equiv (put-assoc-equal name file1 fs)
(put-assoc-equal name file2 fs)))
:hints
(("goal"
:induct (mv (put-assoc-equal name file1 fs)
(put-assoc-equal name file2 fs))
:in-theory
(e/d (hifat-no-dups-p hifat-equiv hifat-file-alist-fix hifat-subsetp)
(hifat-subsetp-reflexive-lemma-4
(:rewrite hifat-file-alist-fix-when-hifat-no-dups-p))))
("subgoal *1/2"
:use
(:instance
hifat-subsetp-reflexive-lemma-4
(x
(list
(cons (fat32-filename-fix (car (car fs)))
(m1-file (m1-file->d-e file1)
(hifat-file-alist-fix (m1-file->contents file1))))))
(y (hifat-file-alist-fix (cdr fs)))))))
(defthm
put-assoc-under-hifat-equiv-3
(implies (and (equal (m1-file->contents file1)
(m1-file->contents file2))
(syntaxp (not (term-order file1 file2)))
(m1-regular-file-p (m1-file-fix file1))
(m1-regular-file-p (m1-file-fix file2)))
(hifat-equiv (put-assoc-equal name file1 fs)
(put-assoc-equal name file2 fs)))
:hints
(("goal"
:induct (mv (put-assoc-equal name file1 fs)
(put-assoc-equal name file2 fs))
:in-theory
(e/d (hifat-no-dups-p hifat-equiv hifat-file-alist-fix hifat-subsetp)
(hifat-subsetp-reflexive-lemma-4
(:rewrite hifat-file-alist-fix-when-hifat-no-dups-p))))
("subgoal *1/2"
:use
(:instance
hifat-subsetp-reflexive-lemma-4
(x
(list
(cons (fat32-filename-fix (car (car fs)))
(m1-file (m1-file->d-e file1)
(hifat-file-alist-fix (m1-file->contents file1))))))
(y (hifat-file-alist-fix (cdr fs)))))))
(defthm hifat-equiv-of-hifat-file-alist-fix-1
(equal (hifat-equiv (hifat-file-alist-fix fs1)
fs2)
(hifat-equiv fs1 fs2))
:hints (("goal" :in-theory (enable hifat-equiv)
:do-not-induct t)))
(defthm hifat-equiv-of-hifat-file-alist-fix-2
(equal (hifat-equiv fs1
(hifat-file-alist-fix fs2))
(hifat-equiv fs1 fs2))
:hints (("goal" :in-theory (enable hifat-equiv)
:do-not-induct t)))
(defthm
hifat-subsetp-of-put-assoc-1
(implies
(and (m1-file-alist-p x)
(hifat-no-dups-p x)
(stringp name))
(equal
(hifat-subsetp (put-assoc-equal name val x)
y)
(and
(hifat-subsetp (remove-assoc-equal name x)
y)
(consp (assoc-equal name y))
(or
(and (not (m1-directory-file-p (cdr (assoc-equal name y))))
(not (m1-directory-file-p val))
(equal (m1-file->contents val)
(m1-file->contents (cdr (assoc-equal name y)))))
(and (m1-directory-file-p (cdr (assoc-equal name y)))
(m1-directory-file-p val)
(hifat-subsetp (m1-file->contents val)
(m1-file->contents (cdr (assoc-equal name y)))))))))
:hints (("goal" :in-theory (enable hifat-subsetp hifat-no-dups-p)
:induct (mv (put-assoc-equal name val x)
(remove-assoc-equal name x)))))
(defthm hifat-subsetp-of-put-assoc-2
(implies (and (m1-file-alist-p x)
(hifat-subsetp x (remove-assoc-equal name y)))
(hifat-subsetp x (put-assoc-equal name val y)))
:hints (("goal" :in-theory (enable hifat-subsetp))))
(defthm hifat-subsetp-of-remove-assoc-1
(implies (and (m1-file-alist-p x)
(atom (assoc-equal name x))
(hifat-subsetp x y))
(hifat-subsetp x (remove-assoc-equal name y)))
:hints (("goal" :in-theory (enable hifat-subsetp))))
(defthm hifat-subsetp-of-remove-assoc-2
(implies (hifat-subsetp x y)
(hifat-subsetp (remove-assoc-equal name x)
y))
:hints (("goal" :in-theory (enable hifat-subsetp))))
(defthm
hifat-place-file-when-hifat-equiv-lemma-3
(implies (and (hifat-equiv (m1-file->contents file1)
(m1-file->contents file2))
(syntaxp (not (term-order file1 file2)))
(m1-directory-file-p (m1-file-fix file1))
(m1-directory-file-p (m1-file-fix file2)))
(hifat-equiv (put-assoc-equal (fat32-filename-fix (car path))
(m1-file-fix file1)
(hifat-file-alist-fix fs))
(put-assoc-equal (fat32-filename-fix (car path))
(m1-file-fix file2)
(hifat-file-alist-fix fs))))
:instructions (:promote (:dive 1)
(:rewrite put-assoc-under-hifat-equiv-1
((file2 (m1-file-fix file2))))
:top
:bash :bash
:bash :bash))
(defthm
hifat-place-file-when-hifat-equiv-lemma-1
(implies
(and
(hifat-equiv
(mv-nth
0
(hifat-place-file
(m1-file->contents (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(cdr path)
file1))
(mv-nth
0
(hifat-place-file
(m1-file->contents (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(cdr path)
file2)))
(syntaxp (not (term-order file1 file2))))
(hifat-equiv
(put-assoc-equal
(fat32-filename-fix (car path))
(m1-file
(m1-file->d-e (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(mv-nth
0
(hifat-place-file
(m1-file->contents (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(cdr path)
file1)))
(hifat-file-alist-fix fs))
(put-assoc-equal
(fat32-filename-fix (car path))
(m1-file
(m1-file->d-e (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(mv-nth
0
(hifat-place-file
(m1-file->contents (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(cdr path)
file2)))
(hifat-file-alist-fix fs))))
:hints
(("goal"
:in-theory (disable (:rewrite put-assoc-under-hifat-equiv-1))
:use
(:instance
(:rewrite put-assoc-under-hifat-equiv-1)
(fs (hifat-file-alist-fix fs))
(file1
(m1-file
(m1-file->d-e (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(mv-nth
0
(hifat-place-file
(m1-file->contents (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(cdr path)
file1))))
(file2
(m1-file
(m1-file->d-e (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(mv-nth
0
(hifat-place-file
(m1-file->contents (cdr (assoc-equal (fat32-filename-fix (car path))
(hifat-file-alist-fix fs))))
(cdr path)
file2))))
(name (fat32-filename-fix (car path)))))))
(defthm hifat-place-file-correctness-lemma-3
(implies (and (fat32-filename-p name)
(not (m1-regular-file-p (cdr (assoc-equal name x))))
(m1-file-alist-p x)
(hifat-subsetp y x))
(not (m1-regular-file-p (cdr (assoc-equal name y)))))
:hints (("goal" :in-theory (enable hifat-subsetp))))
(defthm hifat-find-file-correctness-lemma-1
(and (equal (hifat-equiv (hifat-file-alist-fix fs1)
fs2)
(hifat-equiv fs1 fs2))
(equal (hifat-equiv fs1 (hifat-file-alist-fix fs2))
(hifat-equiv fs1 fs2)))
:hints (("goal" :in-theory (enable hifat-equiv))))
(defthm
abs-pwrite-correctness-lemma-29
(implies
(and (fat32-filename-p name)
(m1-directory-file-p (cdr (assoc-equal name y)))
(hifat-subsetp y x))
(m1-directory-file-p (cdr (assoc-equal name x))))
:hints (("goal" :in-theory (enable hifat-subsetp))))
(defthm hifat-place-file-when-hifat-equiv-1
(implies (and (hifat-equiv (m1-file->contents file1)
(m1-file->contents file2))
(syntaxp (not (term-order file1 file2)))
(m1-directory-file-p (m1-file-fix file1))
(m1-directory-file-p (m1-file-fix file2)))
(and
(hifat-equiv (mv-nth 0 (hifat-place-file fs path file1))
(mv-nth 0 (hifat-place-file fs path file2)))
(equal (mv-nth 1 (hifat-place-file fs path file1))
(mv-nth 1 (hifat-place-file fs path file2)))))
:hints (("goal" :in-theory (e/d (hifat-place-file)
(m1-directory-file-p-of-m1-file-fix))
:induct
(mv (mv-nth 0 (hifat-place-file fs path file1))
(mv-nth 0 (hifat-place-file fs path file2)))))
:rule-classes
(:rewrite
(:rewrite
:corollary
(implies (and (hifat-equiv (m1-file->contents file1)
(m1-file->contents file2))
(m1-directory-file-p (m1-file-fix file1))
(m1-directory-file-p (m1-file-fix file2)))
(and
(equal
(hifat-equiv (mv-nth 0 (hifat-place-file fs path file1))
(mv-nth 0 (hifat-place-file fs path file2)))
t)
(equal
(equal (mv-nth 1 (hifat-place-file fs path file1))
(mv-nth 1 (hifat-place-file fs path file2)))
t))))))
(defund m1-file-hifat-file-alist-fix (d-e fs)
(m1-file d-e (hifat-file-alist-fix fs)))
;; The most natural form of this theorem is prone to infinite looping, so...
(defthm
m1-file-hifat-file-alist-fix-congruence-lemma-1
(implies (and (hifat-equiv fs1 fs2)
(m1-file-alist-p fs1)
(m1-file-alist-p fs2))
(equal
(hifat-equiv (cons (cons name (m1-file d-e fs1))
y)
(cons (cons name (m1-file d-e fs2))
y))
t))
:hints (("goal" :in-theory (enable hifat-equiv
hifat-subsetp hifat-file-alist-fix
hifat-no-dups-p m1-file-contents-fix
m1-file-contents-p))))
(defthm
m1-file-hifat-file-alist-fix-congruence
(implies
(hifat-equiv fs1 fs2)
(hifat-equiv (cons (cons name
(m1-file-hifat-file-alist-fix d-e fs1))
y)
(cons (cons name
(m1-file-hifat-file-alist-fix d-e fs2))
y)))
:rule-classes :congruence
:hints (("goal" :in-theory (enable m1-file-hifat-file-alist-fix))))
(defthm m1-file-hifat-file-alist-fix-normalisation
(implies (equal (hifat-file-alist-fix fs) fs)
(equal (m1-file d-e fs)
(m1-file-hifat-file-alist-fix d-e fs)))
:hints (("goal" :in-theory (enable m1-file-hifat-file-alist-fix))))
(theory-invariant (incompatible (:definition m1-file-hifat-file-alist-fix)
(:rewrite m1-file-hifat-file-alist-fix-normalisation)))
(defthm
m1-file->contents-of-m1-file-hifat-file-alist-fix
(equal (m1-file->contents (m1-file-hifat-file-alist-fix d-e fs))
(hifat-file-alist-fix fs))
:hints
(("goal" :in-theory (e/d (m1-file-hifat-file-alist-fix)
(m1-file-hifat-file-alist-fix-normalisation)))))
(defthm
m1-file-p-of-m1-file-hifat-file-alist-fix
(m1-file-p (m1-file-hifat-file-alist-fix d-e fs))
:hints
(("goal" :in-theory (e/d (m1-file-hifat-file-alist-fix)
(m1-file-hifat-file-alist-fix-normalisation)))))
(defthm
m1-directory-file-p-of-m1-file-hifat-file-alist-fix
(m1-directory-file-p (m1-file-hifat-file-alist-fix d-e fs))
:hints
(("goal" :in-theory (e/d (m1-file-hifat-file-alist-fix)
(m1-file-hifat-file-alist-fix-normalisation))
:do-not-induct t)))
(defthm
m1-file->d-e-of-m1-file-hifat-file-alist-fix
(equal (m1-file->d-e (m1-file-hifat-file-alist-fix d-e fs))
(d-e-fix d-e))
:hints
(("goal" :in-theory (e/d (m1-file-hifat-file-alist-fix)
(m1-file-hifat-file-alist-fix-normalisation)))))
(defthm not-m1-regular-file-p-of-m1-file-hifat-file-alist-fix
(not (m1-regular-file-p (m1-file-hifat-file-alist-fix d-e fs)))
:hints (("goal" :in-theory (e/d))))
(defthm
abs-mkdir-correctness-lemma-36
(implies (and (equal (hifat-file-alist-fix fs) fs)
(d-e-p d-e))
(equal (list (cons 'd-e d-e)
(cons 'contents fs))
(m1-file-hifat-file-alist-fix d-e fs)))
:hints
(("goal"
:in-theory (e/d (m1-file-hifat-file-alist-fix m1-file->d-e
m1-file->contents m1-file-p)
(m1-file-hifat-file-alist-fix-normalisation)))))
(defthm
abs-pwrite-correctness-lemma-13
(implies (equal (hifat-file-alist-fix (m1-file->contents x))
(m1-file->contents x))
(equal (m1-file-hifat-file-alist-fix (m1-file->d-e x)
(m1-file->contents x))
(m1-file-fix x)))
:hints
(("goal" :in-theory (e/d (m1-file-hifat-file-alist-fix)
(m1-file-hifat-file-alist-fix-normalisation)))))
;; These are congruences, obviously we're going to keep them.
(defthm
abs-pwrite-correctness-lemma-11
(implies
(hifat-equiv contents1 contents2)
(and
(hifat-equiv
(mv-nth 0
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents1)))
(mv-nth 0
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents2))))
(equal
(mv-nth 1
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents1)))
(mv-nth
1
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents2))))))
:hints
(("goal"
:in-theory (e/d (hifat-place-file)
((:rewrite hifat-place-file-when-hifat-equiv-1 . 2)))
:induct
(mv
(mv-nth 0
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents1)))
(mv-nth
0
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents2))))))
:rule-classes
((:congruence
:corollary
(implies
(hifat-equiv contents1 contents2)
(hifat-equiv
(mv-nth 0
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents1)))
(mv-nth
0
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents2))))))
(:congruence
:corollary
(implies
(hifat-equiv contents1 contents2)
(equal
(mv-nth 1
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents1)))
(mv-nth
1
(hifat-place-file fs path
(m1-file-hifat-file-alist-fix d-e contents2))))))))
(defthm
hifat-to-lofat-inversion-lemma-6
(implies
(and (m1-directory-file-p (cdr head))
(m1-file-alist-p (cons head tail))
(hifat-no-dups-p (cons head tail))
(hifat-no-dups-p contents)
(hifat-equiv (m1-file->contents (cdr head))
contents)
(m1-file-alist-p contents))
(hifat-equiv (cons (cons (car head)
(m1-file-hifat-file-alist-fix d-e contents))
tail)
(cons head tail)))
:hints
(("goal"
:in-theory
(e/d
(m1-file-hifat-file-alist-fix)
(hifat-equiv-of-cons-lemma-3 m1-file-hifat-file-alist-fix-normalisation))
:use hifat-equiv-of-cons-lemma-3)))
(defthm
hifat-place-file-when-hifat-equiv-3
(implies
(and (equal (m1-file->contents file1)
(m1-file->contents file2))
(syntaxp (not (term-order file1 file2)))
(m1-regular-file-p (m1-file-fix file1))
(m1-regular-file-p (m1-file-fix file2)))
(hifat-equiv (mv-nth 0 (hifat-place-file fs path file1))
(mv-nth 0 (hifat-place-file fs path file2))))
:hints
(("goal"
:in-theory (enable hifat-place-file)
:restrict
((put-assoc-under-hifat-equiv-3 ((file2 file2))))))
:rule-classes
(:rewrite
(:rewrite
:corollary
(implies
(and (equal (m1-file->contents file1)
(m1-file->contents file2))
(m1-regular-file-p (m1-file-fix file1))
(m1-regular-file-p (m1-file-fix file2)))
(equal
(hifat-equiv (mv-nth 0 (hifat-place-file fs path file1))
(mv-nth 0 (hifat-place-file fs path file2)))
t)))))
(defthm
hifat-find-file-correctness-lemma-6
(implies
(and (m1-file-alist-p m1-file-alist1)
(hifat-subsetp m1-file-alist1 m1-file-alist2)
(m1-regular-file-p (cdr (assoc-equal name m1-file-alist1)))
(syntaxp (not (term-order m1-file-alist1 m1-file-alist2))))
(equal (m1-file->contents (cdr (assoc-equal name m1-file-alist1)))
(m1-file->contents (cdr (assoc-equal name m1-file-alist2)))))
:hints (("goal" :in-theory (enable m1-file-alist-p
hifat-no-dups-p hifat-subsetp))))
(defthmd
hifat-find-file-correctness-lemma-8
(implies
(and (m1-file-alist-p m1-file-alist1)
(hifat-no-dups-p m1-file-alist1)
(m1-file-alist-p m1-file-alist2)
(hifat-no-dups-p m1-file-alist2)
(hifat-subsetp m1-file-alist1 m1-file-alist2))
(mv-let
(file error-code)
(hifat-find-file m1-file-alist1 path)
(declare (ignore error-code))
(implies
(m1-regular-file-p file)
(equal
(m1-file->contents
(mv-nth
0
(hifat-find-file m1-file-alist2 path)))
(m1-file->contents file)))))
:hints
(("goal"
:induct
(mv
(mv-nth 1
(hifat-find-file m1-file-alist1 path))
(mv-nth 1
(hifat-find-file m1-file-alist2 path)))
:in-theory
(e/d
(m1-file-alist-p hifat-find-file)
(hifat-find-file-correctness-lemma-6)))
("subgoal *1/3"
:use
(:instance hifat-find-file-correctness-lemma-6
(name (fat32-filename-fix (car path)))))
("subgoal *1/1"
:use
(:instance hifat-find-file-correctness-lemma-6
(name (fat32-filename-fix (car path)))))))
(defthm
hifat-equiv-implies-equal-m1-regular-file-p-mv-nth-0-hifat-find-file-2
(implies
(hifat-equiv m1-file-alist2 m1-file-alist1)
(mv-let
(file error-code)
(hifat-find-file m1-file-alist1 path)
(declare (ignore error-code))
(equal
(m1-regular-file-p
(mv-nth 0
(hifat-find-file m1-file-alist2 path)))
(m1-regular-file-p file))))
:rule-classes :congruence
:hints (("goal" :do-not-induct t
:in-theory
(e/d
(m1-file-alist-p hifat-equiv)
())
:use
((:instance
hifat-find-file-correctness-lemma-8
(m1-file-alist1 (hifat-file-alist-fix m1-file-alist1))
(m1-file-alist2 (hifat-file-alist-fix m1-file-alist2)))
(:instance
hifat-find-file-correctness-lemma-8
(m1-file-alist1 (hifat-file-alist-fix m1-file-alist2))
(m1-file-alist2 (hifat-file-alist-fix m1-file-alist1))))
:expand
((m1-regular-file-p
(mv-nth 0
(hifat-find-file m1-file-alist1 path)))
(m1-regular-file-p
(mv-nth 0
(hifat-find-file m1-file-alist2 path)))))))
(defthmd
hifat-find-file-correctness-lemma-9
(implies
(and (m1-file-alist-p m1-file-alist1)
(hifat-no-dups-p m1-file-alist1)
(m1-file-alist-p m1-file-alist2)
(hifat-no-dups-p m1-file-alist2)
(hifat-subsetp m1-file-alist1 m1-file-alist2))
(and
(implies
(equal (mv-nth 1
(hifat-find-file m1-file-alist1 path))
0)
(equal (mv-nth 1
(hifat-find-file m1-file-alist2 path))
0))
(implies
(equal (mv-nth 1
(hifat-find-file m1-file-alist2 path))
*enoent*)
(equal (mv-nth 1
(hifat-find-file m1-file-alist1 path))
*enoent*))
(implies
(equal (mv-nth 1
(hifat-find-file m1-file-alist1 path))
*enotdir*)
(equal (mv-nth 1
(hifat-find-file m1-file-alist2 path))
*enotdir*))))
:hints
(("goal"
:induct
(mv (mv-nth 1
(hifat-find-file m1-file-alist1 path))
(mv-nth 1
(hifat-find-file m1-file-alist2 path)))
:in-theory (enable m1-file-alist-p
hifat-find-file))
("subgoal *1/2"
:in-theory
(e/d (m1-file-alist-p hifat-find-file)
(hifat-subsetp-transitive-lemma-1))
:use (:instance hifat-subsetp-transitive-lemma-1
(y m1-file-alist1)
(z m1-file-alist2)
(key (fat32-filename-fix (car path)))))))
(defthmd
hifat-find-file-correctness-lemma-10
(or
(equal
(mv-nth 1
(hifat-find-file m1-file-alist path))
0)
(equal
(mv-nth 1
(hifat-find-file m1-file-alist path))
*enotdir*)
(equal
(mv-nth 1
(hifat-find-file m1-file-alist path))
*enoent*))
:hints
(("goal"
:in-theory (enable hifat-find-file)
:induct (hifat-find-file m1-file-alist path))))
(defthm
hifat-equiv-implies-equal-mv-nth-1-hifat-find-file-2
(implies
(hifat-equiv m1-file-alist2 m1-file-alist1)
(mv-let
(file error-code)
(hifat-find-file m1-file-alist1 path)
(declare (ignore file))
(equal
(mv-nth 1
(hifat-find-file m1-file-alist2 path))
error-code)))
:rule-classes :congruence
:hints
(("goal"
:in-theory (enable hifat-equiv)
:use
((:instance
hifat-find-file-correctness-lemma-9
(m1-file-alist1 (hifat-file-alist-fix m1-file-alist1))
(m1-file-alist2 (hifat-file-alist-fix m1-file-alist2)))
(:instance
hifat-find-file-correctness-lemma-9
(m1-file-alist1 (hifat-file-alist-fix m1-file-alist2))
(m1-file-alist2 (hifat-file-alist-fix m1-file-alist1)))
(:instance
hifat-find-file-correctness-lemma-10
(m1-file-alist (hifat-file-alist-fix m1-file-alist1)))))))
(defthm
hifat-find-file-correctness-3
(implies
(and (hifat-equiv m1-file-alist1 m1-file-alist2)
(syntaxp (not (term-order m1-file-alist1 m1-file-alist2))))
(mv-let
(file error-code)
(hifat-find-file m1-file-alist1 path)
(declare (ignore error-code))
(implies
(m1-regular-file-p file)
(equal
(m1-file->contents file)
(m1-file->contents (mv-nth 0
(hifat-find-file m1-file-alist2 path)))))))
:hints
(("goal"
:do-not-induct t
:in-theory (e/d (m1-file-alist-p hifat-equiv))
:use
((:instance hifat-find-file-correctness-lemma-8
(m1-file-alist1 (hifat-file-alist-fix m1-file-alist1))
(m1-file-alist2 (hifat-file-alist-fix m1-file-alist2)))
(:instance hifat-find-file-correctness-lemma-8
(m1-file-alist1 (hifat-file-alist-fix m1-file-alist2))
(m1-file-alist2 (hifat-file-alist-fix m1-file-alist1)))))))
(defthmd
hifat-place-file-correctness-lemma-1
(implies (and (m1-file-alist-p x)
(m1-file-alist-p y)
(hifat-no-dups-p x)
(hifat-no-dups-p y)
(hifat-subsetp x y)
(hifat-subsetp y x)
(hifat-no-dups-p (m1-file->contents file)))
(and (hifat-subsetp (mv-nth 0 (hifat-place-file y path file))
(mv-nth 0 (hifat-place-file x path file)))
(equal (mv-nth 1 (hifat-place-file y path file))
(mv-nth 1 (hifat-place-file x path file)))))
:hints
(("goal"
:in-theory
(e/d (hifat-place-file hifat-subsetp
(:rewrite hifat-find-file-correctness-lemma-6))
((:rewrite hifat-subsetp-transitive-lemma-2))))))
(defthm
hifat-place-file-correctness-4
(implies
(and (hifat-equiv m1-file-alist2 m1-file-alist1)
(syntaxp (not (term-order m1-file-alist1 m1-file-alist2)))
(hifat-no-dups-p (m1-file->contents file)))
(and
(equal (mv-nth 1
(hifat-place-file m1-file-alist1 path file))
(mv-nth 1
(hifat-place-file m1-file-alist2 path file)))
(hifat-equiv (mv-nth 0
(hifat-place-file m1-file-alist1 path file))
(mv-nth 0
(hifat-place-file m1-file-alist2 path file)))))
:hints
(("goal" :in-theory (enable hifat-place-file hifat-equiv)
:use ((:instance (:rewrite hifat-place-file-correctness-lemma-1)
(x (hifat-file-alist-fix m1-file-alist2))
(file file)
(path path)
(y (hifat-file-alist-fix m1-file-alist1)))
(:instance (:rewrite hifat-place-file-correctness-lemma-1)
(x (hifat-file-alist-fix m1-file-alist1))
(file file)
(path path)
(y (hifat-file-alist-fix m1-file-alist2))))
:do-not-induct t)))
(defthm
hifat-equiv-implies-equal-m1-directory-file-p-mv-nth-0-hifat-find-file-2
(implies
(hifat-equiv fs1 fs2)
(equal (m1-directory-file-p
(mv-nth 0 (hifat-find-file fs1 path)))
(m1-directory-file-p
(mv-nth 0 (hifat-find-file fs2 path)))))
:hints
(("goal" :in-theory (enable hifat-find-file hifat-equiv)))
:rule-classes :congruence)
(defthm abs-pwrite-correctness-lemma-22
(implies (and (m1-file-alist-p x)
(hifat-subsetp x y)
(atom (assoc-equal name x)))
(hifat-subsetp x (cons (cons name val) y)))
:hints (("goal" :in-theory (enable hifat-subsetp append))))
(defthm abs-pwrite-correctness-lemma-23
(implies
(true-equiv d-e1 d-e2)
(hifat-equiv (put-assoc-equal name (m1-file d-e1 contents)
fs)
(put-assoc-equal name (m1-file d-e2 contents)
fs)))
:hints
(("goal" :induct (mv (put-assoc-equal name (m1-file d-e1 contents)
fs)
(put-assoc-equal name (m1-file d-e2 contents)
fs))
:in-theory
(e/d (hifat-no-dups-p hifat-equiv
hifat-file-alist-fix hifat-subsetp)
(hifat-subsetp-reflexive-lemma-4
(:rewrite hifat-file-alist-fix-when-hifat-no-dups-p)))))
:rule-classes :congruence)
(defthm
hifat-pwrite-correctness-lemma-1
(implies
(true-equiv d-e1 d-e2)
(equal
(mv-nth 1
(hifat-place-file fs path (m1-file d-e1 contents)))
(mv-nth
1
(hifat-place-file fs path (m1-file d-e2 contents)))))
:hints (("goal" :in-theory (enable hifat-place-file)))
:rule-classes :congruence)
|