Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
File size: 46,234 Bytes
4365a98 |
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 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 |
:: On the Instructions of { \bf SCM }
:: by Artur Korni{\l}owicz
environ
vocabularies NUMBERS, AMI_3, AMI_1, FSM_1, ORDINAL1, CAT_1, XBOOLE_0, FUNCT_1,
RELAT_1, FINSEQ_1, CARD_1, AMISTD_2, GRAPHSP, CARD_3, AMISTD_1, SUBSET_1,
CIRCUIT2, FUNCT_4, FUNCOP_1, SETFAM_1, XXREAL_0, TARSKI, ARYTM_3,
GOBOARD5, FRECHET, ARYTM_1, INT_1, PARTFUN1, NAT_1, COMPOS_1, GOBRD13,
MEMSTR_0;
notations TARSKI, XBOOLE_0, XTUPLE_0, SUBSET_1, SETFAM_1, RELAT_1, FUNCT_1,
CARD_1, ORDINAL1, NUMBERS, XCMPLX_0, INT_1, FUNCOP_1, PARTFUN1, FINSEQ_1,
FUNCT_4, XXREAL_0, VALUED_1, CARD_3, FUNCT_7, MEMSTR_0, COMPOS_0,
COMPOS_1, EXTPRO_1, AMI_3, AMISTD_1, AMISTD_2;
constructors NAT_D, AMI_3, AMISTD_2, RELSET_1, AMISTD_1, PRE_POLY, FUNCT_7,
DOMAIN_1;
registrations XBOOLE_0, RELAT_1, FUNCT_1, ORDINAL1, FUNCOP_1, XREAL_0, NAT_1,
INT_1, FINSEQ_1, CARD_3, AMI_3, AMISTD_2, FUNCT_4, VALUED_0, EXTPRO_1,
FUNCT_7, PRE_POLY, MEMSTR_0, CARD_1, COMPOS_0, XTUPLE_0;
requirements NUMERALS, BOOLE, SUBSET, REAL, ARITHM;
definitions TARSKI, AMISTD_1, AMISTD_2, XBOOLE_0, COMPOS_0;
equalities AMISTD_1, AMI_3, FUNCOP_1, COMPOS_1, EXTPRO_1, MEMSTR_0, COMPOS_0,
XTUPLE_0;
expansions AMISTD_1, XBOOLE_0;
theorems TARSKI, NAT_1, AMI_3, FUNCT_4, AMI_5, FUNCT_1, FUNCOP_1, SETFAM_1,
AMISTD_1, FINSEQ_1, MEMSTR_0, FUNCT_7, CARD_3, XBOOLE_0, XBOOLE_1, NAT_D,
ORDINAL1, PARTFUN1, PBOOLE, VALUED_1, EXTPRO_1, AMI_2, COMPOS_0,
XTUPLE_0;
begin
reserve a, b, d1, d2 for Data-Location,
il, i1, i2 for Nat,
I for Instruction of SCM,
s, s1, s2 for State of SCM,
T for InsType of the InstructionsF of SCM,
k,k1 for Nat;
theorem
T = 0 or ... or T = 8
proof
consider y being object such that
A1: [T,y] in proj1 the InstructionsF of SCM by XTUPLE_0:def 12;
consider x being object such that
A2: [[T,y],x] in the InstructionsF of SCM by A1,XTUPLE_0:def 12;
reconsider I = [T,y,x] as Instruction of SCM by A2;
T = InsCode I;
hence thesis by AMI_5:5;
end;
theorem Th2:
JumpPart halt SCM = {};
theorem
T = 0 implies JumpParts T = {0}
proof
assume
A1: T = 0;
hereby
let a be object;
assume a in JumpParts T;
then consider I such that
A2: a = JumpPart I and
A3: InsCode I = T;
I = halt SCM by A1,A3,AMI_5:7;
hence a in {0} by A2,TARSKI:def 1;
end;
let a be object;
assume a in {0};
then
A4: a = 0 by TARSKI:def 1;
InsCode halt SCM = 0;
hence thesis by A1,Th2,A4;
end;
theorem
T = 1 implies JumpParts T = {{}}
proof
assume
A1: T = 1;
hereby
let x be object;
assume x in JumpParts T;
then consider I being Instruction of SCM such that
A2: x = JumpPart I and
A3: InsCode I = T;
consider a,b such that
A4: I = a:=b by A1,A3,AMI_5:8;
x = {} by A2,A4;
hence x in {{}} by TARSKI:def 1;
end;
set a = the Data-Location;
let x be object;
assume x in {{}};
then x = {} by TARSKI:def 1;
then
A5: x = JumpPart(a:= a);
InsCode(a:= a) = 1;
hence thesis by A5,A1;
end;
theorem
T = 2 implies JumpParts T = {{}}
proof
assume
A1: T = 2;
hereby
let x be object;
assume x in JumpParts T;
then consider I being Instruction of SCM such that
A2: x = JumpPart I and
A3: InsCode I = T;
consider a,b such that
A4: I = AddTo(a,b) by A1,A3,AMI_5:9;
x = {} by A2,A4;
hence x in {{}} by TARSKI:def 1;
end;
set a = the Data-Location;
let x be object;
assume x in {{}};
then x = {} by TARSKI:def 1;
then
A5: x = JumpPart AddTo(a,a);
InsCode AddTo(a,a) = 2;
hence thesis by A5,A1;
end;
theorem
T = 3 implies JumpParts T = {{}}
proof
assume
A1: T = 3;
hereby
let x be object;
assume x in JumpParts T;
then consider I being Instruction of SCM such that
A2: x = JumpPart I and
A3: InsCode I = T;
consider a,b such that
A4: I = SubFrom(a,b) by A1,A3,AMI_5:10;
x = {} by A2,A4;
hence x in {{}} by TARSKI:def 1;
end;
set a = the Data-Location;
let x be object;
assume x in {{}};
then x = {} by TARSKI:def 1;
then
A5: x = JumpPart SubFrom(a,a);
InsCode SubFrom(a,a) = 3;
hence thesis by A5,A1;
end;
theorem
T = 4 implies JumpParts T = {{}}
proof
assume
A1: T = 4;
hereby
let x be object;
assume x in JumpParts T;
then consider I being Instruction of SCM such that
A2: x = JumpPart I and
A3: InsCode I = T;
consider a,b such that
A4: I = MultBy(a,b) by A1,A3,AMI_5:11;
x = {} by A2,A4;
hence x in {{}} by TARSKI:def 1;
end;
set a = the Data-Location;
let x be object;
assume x in {{}};
then x = {} by TARSKI:def 1;
then
A5: x = JumpPart MultBy(a,a);
InsCode MultBy(a,a) = 4;
hence thesis by A5,A1;
end;
theorem
T = 5 implies JumpParts T = {{}}
proof
assume
A1: T = 5;
hereby
let x be object;
assume x in JumpParts T;
then consider I being Instruction of SCM such that
A2: x = JumpPart I and
A3: InsCode I = T;
consider a,b such that
A4: I = Divide(a,b) by A1,A3,AMI_5:12;
x = {} by A2,A4;
hence x in {{}} by TARSKI:def 1;
end;
set a = the Data-Location;
let x be object;
assume x in {{}};
then x = {} by TARSKI:def 1;
then
A5: x = JumpPart Divide(a,a);
InsCode Divide(a,a) = 5;
hence thesis by A5,A1;
end;
theorem Th9:
T = 6 implies dom product" JumpParts T = {1}
proof
set i1 = the Element of NAT;
assume
A1: T = 6;
hereby
let x be object;
InsCode SCM-goto i1 = 6;
then
A2: JumpPart SCM-goto i1 in JumpParts T by A1;
assume x in dom product" JumpParts T;
then x in DOM JumpParts T by CARD_3:def 12;
then x in dom JumpPart SCM-goto i1 by A2,CARD_3:108;
hence x in {1} by FINSEQ_1:2,def 8;
end;
let x be object;
assume
A3: x in {1};
for f being Function st f in JumpParts T holds x in dom f
proof
let f be Function;
assume f in JumpParts T;
then consider I being Instruction of SCM such that
A4: f = JumpPart I and
A5: InsCode I = T;
consider i1 such that
A6: I = SCM-goto i1 by A1,A5,AMI_5:13;
f = <*i1*> by A4,A6;
hence thesis by A3,FINSEQ_1:2,def 8;
end;
then x in DOM JumpParts T by CARD_3:109;
hence thesis by CARD_3:def 12;
end;
theorem Th10:
T = 7 implies dom product" JumpParts T = {1}
proof
set i1 = the Element of NAT,a = the Data-Location;
assume
A1: T = 7;
hereby
let x be object;
InsCode (a =0_goto i1) = 7;
then
A2: JumpPart (a =0_goto i1) in JumpParts T by A1;
assume x in dom product" JumpParts T;
then x in DOM JumpParts T by CARD_3:def 12;
then x in dom JumpPart (a =0_goto i1) by A2,CARD_3:108;
hence x in {1} by FINSEQ_1:2,38;
end;
let x be object;
assume
A3: x in {1};
for f being Function st f in JumpParts T holds x in dom f
proof
let f be Function;
assume f in JumpParts T;
then consider I being Instruction of SCM such that
A4: f = JumpPart I and
A5: InsCode I = T;
consider i1, a such that
A6: I = a =0_goto i1 by A1,A5,AMI_5:14;
f = <*i1*> by A4,A6;
hence thesis by A3,FINSEQ_1:2,38;
end;
then x in DOM JumpParts T by CARD_3:109;
hence thesis by CARD_3:def 12;
end;
theorem Th11:
T = 8 implies dom product" JumpParts T = {1}
proof
set i1 = the Element of NAT,a = the Data-Location;
assume
A1: T = 8;
hereby
let x be object;
InsCode (a >0_goto i1) = 8;
then
A2: JumpPart (a >0_goto i1) in JumpParts T by A1;
assume x in dom product" JumpParts T;
then x in DOM JumpParts T by CARD_3:def 12;
then x in dom JumpPart (a >0_goto i1) by A2,CARD_3:108;
hence x in {1} by FINSEQ_1:2,38;
end;
let x be object;
assume
A3: x in {1};
for f being Function st f in JumpParts T holds x in dom f
proof
let f be Function;
assume f in JumpParts T;
then consider I being Instruction of SCM such that
A4: f = JumpPart I and
A5: InsCode I = T;
consider i1, a such that
A6: I = a >0_goto i1 by A1,A5,AMI_5:15;
f = <*i1*> by A4,A6;
hence thesis by A3,FINSEQ_1:2,38;
end;
then x in DOM JumpParts T by CARD_3:109;
hence thesis by CARD_3:def 12;
end;
theorem
(product" JumpParts InsCode SCM-goto k1).1 = NAT
proof
dom product" JumpParts InsCode SCM-goto k1 = {1}
by Th9;
then
A1: 1 in dom product" JumpParts InsCode SCM-goto k1 by TARSKI:def 1;
hereby
let x be object;
assume x in (product" JumpParts InsCode SCM-goto k1).1;
then x in pi(JumpParts InsCode SCM-goto k1,1) by A1,CARD_3:def 12;
then consider g being Function such that
A2: g in JumpParts InsCode SCM-goto k1 and
A3: x = g.1 by CARD_3:def 6;
consider I being Instruction of SCM such that
A4: g = JumpPart I and
A5: InsCode I = InsCode SCM-goto k1 by A2;
InsCode I = 6 by A5;
then consider i2 such that
A6: I = SCM-goto i2 by AMI_5:13;
g = <*i2*> by A4,A6;
then x = i2 by A3,FINSEQ_1:def 8;
hence x in NAT by ORDINAL1:def 12;
end;
let x be object;
assume x in NAT;
then reconsider x as Element of NAT;
JumpPart SCM-goto x = <*x*> & InsCode SCM-goto k1
= InsCode SCM-goto x;
then
A7: <*x*> in JumpParts InsCode SCM-goto k1;
<*x*>.1 = x by FINSEQ_1:def 8;
then x in pi(JumpParts InsCode SCM-goto k1,1) by A7,CARD_3:def 6;
hence thesis by A1,CARD_3:def 12;
end;
theorem
(product" JumpParts InsCode (a =0_goto k1)).1 = NAT
proof
dom product" JumpParts InsCode (a =0_goto k1) = {1} by Th10;
then
A1: 1 in dom product" JumpParts InsCode (a =0_goto k1) by TARSKI:def 1;
hereby
let x be object;
assume x in (product" JumpParts InsCode (a =0_goto k1)).1;
then x in pi(JumpParts InsCode (a =0_goto k1),1) by A1,CARD_3:def 12;
then consider g being Function such that
A2: g in JumpParts InsCode (a =0_goto k1) and
A3: x = g.1 by CARD_3:def 6;
consider I being Instruction of SCM such that
A4: g = JumpPart I and
A5: InsCode I = InsCode (a =0_goto k1) by A2;
InsCode I = 7 by A5;
then consider i2, b such that
A6: I = b =0_goto i2 by AMI_5:14;
g = <*i2*> by A4,A6;
then x = i2 by A3,FINSEQ_1:40;
hence x in NAT by ORDINAL1:def 12;
end;
let x be object;
assume x in NAT;
then reconsider x as Element of NAT;
JumpPart (a =0_goto x) = <*x*> & InsCode (a =0_goto k1) = InsCode
(a =0_goto x);
then
A7: <*x*> in JumpParts InsCode (a =0_goto k1);
<*x*>.1 = x by FINSEQ_1:40;
then x in pi(JumpParts InsCode (a =0_goto k1),1) by A7,CARD_3:def 6;
hence thesis by A1,CARD_3:def 12;
end;
theorem
(product" JumpParts InsCode (a >0_goto k1)).1 = NAT
proof
dom product" JumpParts InsCode (a >0_goto k1) = {1} by Th11;
then
A1: 1 in dom product" JumpParts InsCode (a >0_goto k1) by TARSKI:def 1;
hereby
let x be object;
assume x in (product" JumpParts InsCode (a >0_goto k1)).1;
then x in pi(JumpParts InsCode (a >0_goto k1),1) by A1,CARD_3:def 12;
then consider g being Function such that
A2: g in JumpParts InsCode (a >0_goto k1) and
A3: x = g.1 by CARD_3:def 6;
consider I being Instruction of SCM such that
A4: g = JumpPart I and
A5: InsCode I = InsCode (a >0_goto k1) by A2;
InsCode I = 8 by A5;
then consider i2, b such that
A6: I = b >0_goto i2 by AMI_5:15;
g = <*i2*> by A4,A6;
then x = i2 by A3,FINSEQ_1:40;
hence x in NAT by ORDINAL1:def 12;
end;
let x be object;
assume x in NAT;
then reconsider x as Element of NAT;
JumpPart (a >0_goto x) = <*x*> & InsCode (a >0_goto k1) = InsCode
(a >0_goto x);
then
A7: <*x*> in JumpParts InsCode (a >0_goto k1);
<*x*>.1 = x by FINSEQ_1:40;
then x in pi(JumpParts InsCode (a >0_goto k1),1) by A7,CARD_3:def 6;
hence thesis by A1,CARD_3:def 12;
end;
Lm1: for i being Instruction of SCM holds (for l being Element of NAT
holds NIC(i,l)={l+1}) implies JUMP i is empty
proof
set p=1, q=2;
let i be Instruction of SCM;
assume
A1: for l being Element of NAT holds NIC(i,l)={l+1};
set X = the set of all NIC(i,f) where f is Nat;
reconsider p, q as Element of NAT;
assume not thesis;
then consider x being object such that
A2: x in meet X;
NIC(i,p) = {p+1} by A1;
then {succ p} in X;
then x in {succ p} by A2,SETFAM_1:def 1;
then
A3: x = succ p by TARSKI:def 1;
NIC(i,q) = {q+1} by A1;
then {succ q} in X;
then x in {succ q} by A2,SETFAM_1:def 1;
hence contradiction by A3,TARSKI:def 1;
end;
registration
cluster JUMP halt SCM -> empty;
coherence;
end;
registration
let a, b;
cluster a:=b -> sequential;
coherence
by AMI_3:2;
cluster AddTo(a,b) -> sequential;
coherence
by AMI_3:3;
cluster SubFrom(a,b) -> sequential;
coherence
by AMI_3:4;
cluster MultBy(a,b) -> sequential;
coherence
by AMI_3:5;
cluster Divide(a,b) -> sequential;
coherence
by AMI_3:6;
end;
registration
let a, b;
cluster JUMP (a := b) -> empty;
coherence
proof
for l being Element of NAT holds NIC(a:=b,l)={l+1} by AMISTD_1:12;
hence thesis by Lm1;
end;
end;
registration
let a, b;
cluster JUMP AddTo(a, b) -> empty;
coherence
proof
for l being Element of NAT holds NIC(AddTo(a,b),l)={l+1} by AMISTD_1:12;
hence thesis by Lm1;
end;
end;
registration
let a, b;
cluster JUMP SubFrom(a, b) -> empty;
coherence
proof
for l being Element of NAT holds NIC(SubFrom(a,b),l)={l+1} by AMISTD_1:12;
hence thesis by Lm1;
end;
end;
registration
let a, b;
cluster JUMP MultBy(a,b) -> empty;
coherence
proof
for l being Element of NAT holds NIC(MultBy(a,b),l)={l+1} by AMISTD_1:12;
hence thesis by Lm1;
end;
end;
registration
let a, b;
cluster JUMP Divide(a,b) -> empty;
coherence
proof
for l being Element of NAT holds NIC(Divide(a,b),l)={l+1} by AMISTD_1:12;
hence thesis by Lm1;
end;
end;
theorem Th15:
NIC(SCM-goto k, il) = {k}
proof
now
let x be object;
A1: now
il in NAT by ORDINAL1:def 12;
then reconsider il1 = il as Element of Values IC SCM by MEMSTR_0:def 6;
set I = SCM-goto k;
set t = the State of SCM,
Q = the Instruction-Sequence of SCM;
assume
A2: x = k;
reconsider n = il as Element of NAT by ORDINAL1:def 12;
reconsider u = t+*(IC SCM,il1)
as Element of product the_Values_of SCM by CARD_3:107;
reconsider P = Q +* (il,I)
as Instruction-Sequence of SCM;
reconsider ill=il as Element of NAT by ORDINAL1:def 12;
A3: P/.ill = P.ill by PBOOLE:143;
IC SCM in dom t by MEMSTR_0:2;
then
A4: IC u = n by FUNCT_7:31;
il in NAT by ORDINAL1:def 12;
then il in dom Q by PARTFUN1:def 2;
then
A5: P.n = I by FUNCT_7:31;
then IC Following(P,u) = k by A3,A4,AMI_3:7;
hence x in {IC Exec(SCM-goto k,s)
where s is Element of product the_Values_of SCM
: IC s = il} by A2,A4,A3,A5;
end;
now
assume x in {IC Exec(SCM-goto k,s)
where s is Element of product the_Values_of SCM
: IC s = il};
then ex s being Element of product the_Values_of SCM
st x = IC Exec(SCM-goto k,s) & IC s = il;
hence x = k by AMI_3:7;
end;
hence
x in {k} iff x in {IC Exec(SCM-goto k,s)
where s is Element of product the_Values_of SCM
: IC s = il} by A1,TARSKI:def 1;
end;
hence thesis by TARSKI:2;
end;
theorem Th16:
JUMP SCM-goto k = {k}
proof
set X = the set of all NIC(SCM-goto k, il) ;
now
let x be object;
hereby
set il1 = 1;
A1: NIC(SCM-goto k, il1) in X;
assume x in meet X;
then x in NIC(SCM-goto k, il1) by A1,SETFAM_1:def 1;
hence x in {k} by Th15;
end;
assume x in {k};
then
A2: x = k by TARSKI:def 1;
A3: now
let Y be set;
assume Y in X;
then consider il being Nat such that
A4: Y = NIC(SCM-goto k, il);
NIC(SCM-goto k, il) = {k} by Th15;
hence k in Y by A4,TARSKI:def 1;
end;
reconsider k as Element of NAT by ORDINAL1:def 12;
NIC(SCM-goto k, k) in X;
hence x in meet X by A2,A3,SETFAM_1:def 1;
end;
hence thesis by TARSKI:2;
end;
registration
let i1;
cluster JUMP SCM-goto i1 -> 1-element;
coherence
proof
JUMP SCM-goto i1 = {i1} by Th16;
hence thesis;
end;
end;
theorem Th17:
NIC(a=0_goto k, il) = {k, il+1}
proof
set t = the State of SCM,
Q = the Instruction-Sequence of SCM;
hereby
let x be object;
assume x in NIC(a=0_goto k, il);
then consider s being Element of product the_Values_of SCM
such that
A1: x = IC Exec(a=0_goto k,s) & IC s = il;
per cases;
suppose
s.a = 0;
then x = k by A1,AMI_3:8;
hence x in {k, il+1} by TARSKI:def 2;
end;
suppose
s.a <> 0;
then x = il + 1 by A1,AMI_3:8;
hence x in {k, il+1} by TARSKI:def 2;
end;
end;
let x be object;
set I = a=0_goto k;
A2: IC SCM <> a by AMI_5:2;
reconsider n = il as Element of NAT by ORDINAL1:def 12;
reconsider il1 = n as Element of Values IC SCM by MEMSTR_0:def 6;
reconsider u = t+*(IC SCM,il1)
as Element of product the_Values_of SCM by CARD_3:107;
reconsider P = Q +* (il,I)
as Instruction-Sequence of SCM;
assume
A3: x in {k,il+1};
per cases by A3,TARSKI:def 2;
suppose
A4: x = k;
reconsider v = u+*(a .--> 0)
as Element of product the_Values_of SCM by CARD_3:107;
A5: IC SCM in dom t by MEMSTR_0:2;
not IC SCM in dom (a .--> 0) by A2,TARSKI:def 1;
then
A7: IC v = IC u by FUNCT_4:11
.= n by A5,FUNCT_7:31;
reconsider il as Element of NAT by ORDINAL1:def 12;
A8: P/.il = P.il by PBOOLE:143;
il in NAT;
then il in dom Q by PARTFUN1:def 2;
then
A9: P.il = I by FUNCT_7:31;
a in dom (a .--> 0) by TARSKI:def 1;
then
v.a = (a .--> 0).a by FUNCT_4:13
.= 0 by FUNCOP_1:72;
then IC Following(P,v) = k by A7,A9,A8,AMI_3:8;
hence thesis by A4,A7,A9,A8;
end;
suppose
A10: x = il+1;
reconsider v = u+*(a .--> 1)
as Element of product the_Values_of SCM by CARD_3:107;
A11: IC SCM in dom t by MEMSTR_0:2;
not IC SCM in dom (a .--> 1) by A2,TARSKI:def 1;
then
A13: IC v = IC u by FUNCT_4:11
.= n by A11,FUNCT_7:31;
reconsider il as Element of NAT by ORDINAL1:def 12;
A14: P/.il = P.il by PBOOLE:143;
il in NAT;
then il in dom Q by PARTFUN1:def 2;
then
A15: P.il = I by FUNCT_7:31;
a in dom (a .--> 1) by TARSKI:def 1;
then v.a = (a .--> 1).a by FUNCT_4:13
.= 1 by FUNCOP_1:72;
then IC Following(P,v) = il+1 by A13,A15,A14,AMI_3:8;
hence thesis by A10,A13,A15,A14;
end;
end;
theorem Th18:
JUMP (a=0_goto k) = {k}
proof
set X = the set of all NIC(a=0_goto k, il) ;
now
let x be object;
A1: now
let Y be set;
assume Y in X;
then consider il being Nat such that
A2: Y = NIC(a=0_goto k, il);
NIC(a=0_goto k, il) = {k, il+1} by Th17;
hence k in Y by A2,TARSKI:def 2;
end;
hereby
set il1 = 1, il2 = 2;
assume
A3: x in meet X;
A4: NIC(a=0_goto k, il2) = {k, il2+1} by Th17;
NIC(a=0_goto k, il2) in X;
then x in NIC(a=0_goto k, il2) by A3,SETFAM_1:def 1;
then
A5: x = k or x = il2+1 by A4,TARSKI:def 2;
A6: NIC(a=0_goto k, il1) = {k, il1+1} by Th17;
NIC(a=0_goto k, il1) in X;
then x in NIC(a=0_goto k, il1) by A3,SETFAM_1:def 1;
then x = k or x = il1+1 by A6,TARSKI:def 2;
hence x in {k} by A5,TARSKI:def 1;
end;
assume x in {k};
then
A7: x = k by TARSKI:def 1;
reconsider k as Element of NAT by ORDINAL1:def 12;
NIC(a=0_goto k, k) in X;
hence x in meet X by A7,A1,SETFAM_1:def 1;
end;
hence thesis by TARSKI:2;
end;
registration
let a, i1;
cluster JUMP (a =0_goto i1) -> 1-element;
coherence
proof
JUMP (a =0_goto i1) = {i1} by Th18;
hence thesis;
end;
end;
theorem Th19:
NIC(a>0_goto k, il) = {k, il+1}
proof
set t = the State of SCM,
Q = the Instruction-Sequence of SCM;
hereby
let x be object;
assume x in NIC(a>0_goto k, il);
then consider s being Element of product the_Values_of SCM
such that
A1: x = IC Exec(a>0_goto k,s) & IC s = il;
per cases;
suppose
s.a > 0;
then x = k by A1,AMI_3:9;
hence x in {k, il+1} by TARSKI:def 2;
end;
suppose
s.a <= 0;
then x = il+1 by A1,AMI_3:9;
hence x in {k, il+1} by TARSKI:def 2;
end;
end;
let x be object;
set I = a>0_goto k;
A2: IC SCM <> a by AMI_5:2;
assume
A3: x in {k,il+1};
reconsider n = il as Element of NAT by ORDINAL1:def 12;
reconsider il1 = n as Element of Values IC SCM by MEMSTR_0:def 6;
reconsider u = t+*(IC SCM,il1)
as Element of product the_Values_of SCM by CARD_3:107;
reconsider P = Q +* (il,I)
as Instruction-Sequence of SCM;
per cases by A3,TARSKI:def 2;
suppose
A4: x = k;
reconsider v = u+*(a .--> 1)
as Element of product the_Values_of SCM by CARD_3:107;
A5: IC SCM in dom t by MEMSTR_0:2;
not IC SCM in dom (a .--> 1) by A2,TARSKI:def 1;
then
A7: IC v = IC u by FUNCT_4:11
.= n by A5,FUNCT_7:31;
reconsider il as Element of NAT by ORDINAL1:def 12;
A8: P/.il = P.il by PBOOLE:143;
il in NAT;
then il in dom Q by PARTFUN1:def 2;
then
A9: P.il = I by FUNCT_7:31;
a in dom (a .--> 1) by TARSKI:def 1;
then v.a = (a .--> 1).a by FUNCT_4:13
.= 1 by FUNCOP_1:72;
then IC Following(P,v) = k by A7,A9,A8,AMI_3:9;
hence thesis by A4,A7,A9,A8;
end;
suppose
A10: x = il+1;
reconsider v = u+*(a .--> 0)
as Element of product the_Values_of SCM by CARD_3:107;
A11: IC SCM in dom t by MEMSTR_0:2;
not IC SCM in dom (a .--> 0) by A2,TARSKI:def 1;
then
A13: IC v = IC u by FUNCT_4:11
.= n by A11,FUNCT_7:31;
reconsider il as Element of NAT by ORDINAL1:def 12;
A14: P/.il = P.il by PBOOLE:143;
il in NAT;
then il in dom Q by PARTFUN1:def 2;
then
A15: P.il = I by FUNCT_7:31;
a in dom (a .--> 0) by TARSKI:def 1;
then v.a = (a .--> 0).a by FUNCT_4:13
.= 0 by FUNCOP_1:72;
then IC Following(P,v) = il+1 by A13,A15,A14,AMI_3:9;
hence thesis by A10,A13,A15,A14;
end;
end;
theorem Th20:
JUMP (a>0_goto k) = {k}
proof
set X = the set of all NIC(a>0_goto k, il) ;
now
let x be object;
A1: now
let Y be set;
assume Y in X;
then consider il being Nat such that
A2: Y = NIC(a>0_goto k, il);
NIC(a>0_goto k, il) = {k, il+1} by Th19;
hence k in Y by A2,TARSKI:def 2;
end;
hereby
set il1 = 1, il2 = 2;
assume
A3: x in meet X;
A4: NIC(a>0_goto k, il2) = {k, il2+1} by Th19;
NIC(a>0_goto k, il2) in X;
then x in NIC(a>0_goto k, il2) by A3,SETFAM_1:def 1;
then
A5: x = k or x = il2+1 by A4,TARSKI:def 2;
A6: NIC(a>0_goto k, il1) = {k, il1+1} by Th19;
NIC(a>0_goto k, il1) in X;
then x in NIC(a>0_goto k, il1) by A3,SETFAM_1:def 1;
then x = k or x = il1+1 by A6,TARSKI:def 2;
hence x in {k} by A5,TARSKI:def 1;
end;
assume x in {k};
then
A7: x = k by TARSKI:def 1;
reconsider k as Element of NAT by ORDINAL1:def 12;
NIC(a>0_goto k, k) in X;
hence x in meet X by A7,A1,SETFAM_1:def 1;
end;
hence thesis by TARSKI:2;
end;
registration
let a, i1;
cluster JUMP (a >0_goto i1) -> 1-element;
coherence
proof
JUMP (a >0_goto i1) = {i1} by Th20;
hence thesis;
end;
end;
theorem Th21:
SUCC(il,SCM) = {il, il+1}
proof
set X = the set of all
NIC(I, il) \ JUMP I where I is Element of the InstructionsF of SCM;
set N = {il, il+1};
now
let x be object;
hereby
assume x in union X;
then consider Y being set such that
A1: x in Y and
A2: Y in X by TARSKI:def 4;
consider i being Element of the InstructionsF of SCM such that
A3: Y = NIC(i, il) \ JUMP i by A2;
per cases by AMI_3:24;
suppose
i = [0,{},{}];
then x in {il} \ JUMP halt SCM by A1,A3,AMISTD_1:2;
then x = il by TARSKI:def 1;
hence x in N by TARSKI:def 2;
end;
suppose
ex a,b st i = a:=b;
then consider a, b such that
A4: i = a:=b;
x in {il+1} \ JUMP (a:=b) by A1,A3,A4,AMISTD_1:12;
then x = il+1 by TARSKI:def 1;
hence x in N by TARSKI:def 2;
end;
suppose
ex a,b st i = AddTo(a,b);
then consider a, b such that
A5: i = AddTo(a,b);
x in {il+1} \ JUMP AddTo(a,b) by A1,A3,A5,AMISTD_1:12;
then x = il+1 by TARSKI:def 1;
hence x in N by TARSKI:def 2;
end;
suppose
ex a,b st i = SubFrom(a,b);
then consider a, b such that
A6: i = SubFrom(a,b);
x in {il+1} \ JUMP SubFrom(a,b) by A1,A3,A6,AMISTD_1:12;
then x = il+1 by TARSKI:def 1;
hence x in N by TARSKI:def 2;
end;
suppose
ex a,b st i = MultBy(a,b);
then consider a, b such that
A7: i = MultBy(a,b);
x in {il+1} \ JUMP MultBy(a,b) by A1,A3,A7,AMISTD_1:12;
then x = il+1 by TARSKI:def 1;
hence x in N by TARSKI:def 2;
end;
suppose
ex a,b st i = Divide(a,b);
then consider a, b such that
A8: i = Divide(a,b);
x in {il+1} \ JUMP Divide(a,b) by A1,A3,A8,AMISTD_1:12;
then x = il+1 by TARSKI:def 1;
hence x in N by TARSKI:def 2;
end;
suppose
ex k st i = SCM-goto k;
then consider k such that
A9: i = SCM-goto k;
x in {k} \ JUMP i by A1,A3,A9,Th15;
then x in {k} \ {k} by A9,Th16;
hence x in N by XBOOLE_1:37;
end;
suppose
ex a,k st i = a=0_goto k;
then consider a, k such that
A10: i = a=0_goto k;
A11: NIC(i, il) = {k, il+1} by A10,Th17;
x in NIC(i, il) by A1,A3,XBOOLE_0:def 5;
then
A12: x = k or x = il+1 by A11,TARSKI:def 2;
x in NIC(i, il) \ {k} by A1,A3,A10,Th18;
then not x in {k} by XBOOLE_0:def 5;
hence x in N by A12,TARSKI:def 1,def 2;
end;
suppose
ex a,k st i = a>0_goto k;
then consider a, k such that
A13: i = a>0_goto k;
A14: NIC(i, il) = {k, il+1} by A13,Th19;
x in NIC(i, il) by A1,A3,XBOOLE_0:def 5;
then
A15: x = k or x = il+1 by A14,TARSKI:def 2;
x in NIC(i, il) \ {k} by A1,A3,A13,Th20;
then not x in {k} by XBOOLE_0:def 5;
hence x in N by A15,TARSKI:def 1,def 2;
end;
end;
assume
A16: x in {il, il+1};
per cases by A16,TARSKI:def 2;
suppose
A17: x = il;
set i = halt SCM;
NIC(i, il) \ JUMP i = {il} by AMISTD_1:2;
then
A18: {il} in X;
x in {il} by A17,TARSKI:def 1;
hence x in union X by A18,TARSKI:def 4;
end;
suppose
A19: x = il+1;
set a = the Data-Location;
set i = AddTo(a,a);
NIC(i, il) \ JUMP i = {il+1} by AMISTD_1:12;
then
A20: {il+1} in X;
x in {il+1} by A19,TARSKI:def 1;
hence x in union X by A20,TARSKI:def 4;
end;
end;
hence thesis by TARSKI:2;
end;
theorem Th22:
for k being Nat holds k+1 in SUCC(k,SCM) &
for j being Nat st j in SUCC(k,SCM) holds k <= j
proof
let k be Nat;
reconsider fk = k as Element of NAT by ORDINAL1:def 12;
A1: SUCC(k,SCM) = {k, fk+1} by Th21;
hence k+1 in SUCC(k,SCM) by TARSKI:def 2;
let j be Nat;
assume
A2: j in SUCC(k,SCM);
reconsider fk = k as Element of NAT by ORDINAL1:def 12;
per cases by A1,A2,TARSKI:def 2;
suppose
j = k;
hence thesis;
end;
suppose
j = fk + 1;
hence thesis by NAT_1:11;
end;
end;
registration
cluster SCM -> standard;
coherence by Th22,AMISTD_1:3;
end;
registration
cluster InsCode halt SCM -> jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
now
let s be State of SCM, o be Object of SCM, I be Instruction of SCM;
assume that
A1: InsCode I = InsCode halt SCM and
o in Data-Locations SCM;
I = halt SCM by A1,AMI_5:7;
hence Exec(I, s).o = s.o by EXTPRO_1:def 3;
end;
hence thesis;
end;
end;
registration
cluster halt SCM -> jump-only;
coherence;
end;
registration
let i1;
cluster InsCode SCM-goto i1 -> jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
let T be InsType of the InstructionsF of SCM such that
A1: T = InsCode SCM-goto i1;
let s be State of SCM, o be Object of SCM, I be Instruction of SCM;
assume that
A2: InsCode I = T and
A3: o in Data-Locations SCM;
InsCode I = 6 by A2,A1;
then
A4: ex i2 st I = SCM-goto i2 by AMI_5:13;
o is Data-Location by A3,AMI_2:def 16,AMI_3:27;
hence Exec(I, s).o = s.o by A4,AMI_3:7;
end;
end;
registration
let i1;
cluster SCM-goto i1 -> jump-only non sequential non ins-loc-free;
coherence
proof
thus InsCode SCM-goto i1 is jump-only;
JUMP SCM-goto i1 <> {};
hence SCM-goto i1 is non sequential by AMISTD_1:13;
thus JumpPart SCM-goto i1 is not empty;
end;
end;
registration
let a, i1;
cluster InsCode (a =0_goto i1) -> jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
set S = SCM;
now
let s be State of S, o be Object of S, I be Instruction of S;
assume that
A1: InsCode I = InsCode (a =0_goto i1) and
A2: o in Data-Locations SCM;
InsCode I = 7 by A1;
then
A3: ex i2, b st I = (b =0_goto i2) by AMI_5:14;
o is Data-Location by A2,AMI_2:def 16,AMI_3:27;
hence Exec(I, s).o = s.o by A3,AMI_3:8;
end;
hence thesis;
end;
cluster InsCode (a >0_goto i1) -> jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
set S = SCM;
now
let s be State of S, o be Object of S, I be Instruction of S;
assume that
A4: InsCode I = InsCode (a >0_goto i1) and
A5: o in Data-Locations SCM;
InsCode I = 8 by A4;
then
A6: ex i2, b st I = (b >0_goto i2) by AMI_5:15;
o is Data-Location by A5,AMI_2:def 16,AMI_3:27;
hence Exec(I, s).o = s.o by A6,AMI_3:9;
end;
hence thesis;
end;
end;
registration
let a, i1;
cluster a =0_goto i1 -> jump-only non sequential non ins-loc-free;
coherence
proof
thus InsCode (a =0_goto i1) is jump-only;
JUMP (a =0_goto i1) <> {};
hence a =0_goto i1 is non sequential by AMISTD_1:13;
thus JumpPart(a =0_goto i1) is not empty;
end;
cluster a >0_goto i1 -> jump-only non sequential non ins-loc-free;
coherence
proof
thus InsCode (a >0_goto i1) is jump-only;
JUMP (a >0_goto i1) <> {};
hence a >0_goto i1 is non sequential by AMISTD_1:13;
thus JumpPart(a >0_goto i1) is not empty;
end;
end;
Lm2: dl.0 <> dl.1 by AMI_3:10;
registration
let a, b;
cluster InsCode (a:=b) -> non jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
set w = the State of SCM;
set t = w+*((dl.0, dl.1)-->(0,1));
A1: InsCode (a:=b) = 1
.= InsCode (dl.0:=dl.1);
A2: dl.0 in Data-Locations SCM by AMI_3:28;
A3: dom ((dl.0, dl.1)-->(0,1)) = {dl.0, dl.1} by FUNCT_4:62;
then
A4: dl.1 in dom ((dl.0, dl.1)-->(0,1)) by TARSKI:def 2;
dl.0 in dom ((dl.0, dl.1)-->(0,1)) by A3,TARSKI:def 2;
then
A5: t.dl.0 = (dl.0, dl.1)-->(0,1).dl.0 by FUNCT_4:13
.= 0 by AMI_3:10,FUNCT_4:63;
Exec((dl.0:=dl.1), t).dl.0 = t.dl.1 by AMI_3:2
.= (dl.0, dl.1)-->(0,1).dl.1 by A4,FUNCT_4:13
.= 1 by FUNCT_4:63;
hence thesis by A1,A2,A5;
end;
cluster InsCode AddTo(a,b) -> non jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
set w = the State of SCM;
set t = w+*((dl.0, dl.1)-->(0,1));
A6: InsCode AddTo(a,b) = 2
.= InsCode AddTo(dl.0, dl.1);
A7: dom ((dl.0, dl.1)-->(0,1)) = {dl.0, dl.1} by FUNCT_4:62;
then dl.0 in dom ((dl.0, dl.1)-->(0,1)) by TARSKI:def 2;
then
A8: t.dl.0 = (dl.0, dl.1)-->(0,1).dl.0 by FUNCT_4:13
.= 0 by AMI_3:10,FUNCT_4:63;
A9: dl.0 in Data-Locations SCM by AMI_3:28;
dl.1 in dom ((dl.0, dl.1)-->(0,1)) by A7,TARSKI:def 2;
then t.dl.1 = (dl.0, dl.1)-->(0,1).dl.1 by FUNCT_4:13
.= 1 by FUNCT_4:63;
then dl.0 <> IC SCM &
Exec(AddTo(dl.0, dl.1), t).dl.0 = (0 qua Nat)+1 by A8,AMI_3:3,13;
hence thesis by A6,A8,A9;
end;
cluster InsCode SubFrom(a,b) -> non jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
set w = the State of SCM;
set t = w+*((dl.0, dl.1)-->(0,1));
A10: InsCode SubFrom(a,b) = 3
.= InsCode SubFrom(dl.0, dl.1);
A11: dom ((dl.0, dl.1)-->(0,1)) = {dl.0, dl.1} by FUNCT_4:62;
then dl.0 in dom ((dl.0, dl.1)-->(0,1)) by TARSKI:def 2;
then
A12: t.dl.0 = (dl.0, dl.1)-->(0,1).dl.0 by FUNCT_4:13
.= 0 by AMI_3:10,FUNCT_4:63;
A13: dl.0 in Data-Locations SCM by AMI_3:28;
dl.1 in dom ((dl.0, dl.1)-->(0,1)) by A11,TARSKI:def 2;
then
A14: t.dl.1 = (dl.0, dl.1)-->(0,1).dl.1 by FUNCT_4:13
.= 1 by FUNCT_4:63;
Exec(SubFrom(dl.0, dl.1), t).dl.0 = t.dl.0 - t.dl.1 by AMI_3:4
.= -1 by A12,A14;
hence thesis by A10,A12,A13;
end;
cluster InsCode MultBy(a,b) -> non jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
set w = the State of SCM;
set t = w+*((dl.0, dl.1)-->(1,0));
A15: InsCode MultBy(a,b) = 4
.= InsCode MultBy(dl.0, dl.1);
A16: dom ((dl.0, dl.1)-->(1,0)) = {dl.0, dl.1} by FUNCT_4:62;
then dl.0 in dom ((dl.0, dl.1)-->(1,0)) by TARSKI:def 2;
then
A17: t.dl.0 = (dl.0, dl.1)-->(1,0).dl.0 by FUNCT_4:13
.= 1 by AMI_3:10,FUNCT_4:63;
A18: dl.0 in Data-Locations SCM by AMI_3:28;
dl.1 in dom ((dl.0, dl.1)-->(1,0)) by A16,TARSKI:def 2;
then
A19: t.dl.1 = (dl.0, dl.1)-->(1,0).dl.1 by FUNCT_4:13
.= 0 by FUNCT_4:63;
Exec(MultBy(dl.0, dl.1), t).dl.0 = t.dl.0 * t.dl.1 by AMI_3:5
.= 0 by A19;
hence thesis by A15,A17,A18;
end;
cluster InsCode Divide(a,b) -> non jump-only
for InsType of the InstructionsF of SCM;
coherence
proof
set w = the State of SCM;
set t = w+*((dl.0, dl.1)-->(7,3));
A20: InsCode Divide(a,b) = 5
.= InsCode Divide(dl.0, dl.1);
A21: dom ((dl.0, dl.1)-->(7,3)) = {dl.0, dl.1} by FUNCT_4:62;
then dl.0 in dom ((dl.0, dl.1)-->(7,3)) by TARSKI:def 2;
then
A22: t.dl.0 = (dl.0, dl.1)-->(7,3).dl.0 by FUNCT_4:13
.= 7 by AMI_3:10,FUNCT_4:63;
A23: 7 = 2 * 3 + 1;
A24: dl.0 in Data-Locations SCM by AMI_3:28;
dl.1 in dom ((dl.0, dl.1)-->(7,3)) by A21,TARSKI:def 2;
then t.dl.1 = (dl.0, dl.1)-->(7,3).dl.1 by FUNCT_4:13
.= 3 by FUNCT_4:63;
then Exec(Divide(dl.0, dl.1), t).dl.0 = 7 div (3 qua Element of NAT) by A22
,Lm2,AMI_3:6
.= 2 by A23,NAT_D:def 1;
hence thesis by A20,A22,A24;
end;
end;
registration
let a, b;
cluster a:=b -> non jump-only;
coherence;
cluster AddTo(a,b) -> non jump-only;
coherence;
cluster SubFrom(a,b) -> non jump-only;
coherence;
cluster MultBy(a,b) -> non jump-only;
coherence;
cluster Divide(a,b) -> non jump-only;
coherence;
end;
registration
cluster SCM -> with_explicit_jumps;
coherence
proof
let I be Instruction of SCM;
thus JUMP I c= rng JumpPart I
proof
let f be object such that
A1: f in JUMP I;
per cases by AMI_3:24;
suppose
I = [0,{},{}];
hence thesis by A1,AMI_3:26;
end;
suppose
ex a,b st I = a:=b;
hence thesis by A1;
end;
suppose
ex a,b st I = AddTo(a,b);
hence thesis by A1;
end;
suppose
ex a,b st I = SubFrom(a,b);
hence thesis by A1;
end;
suppose
ex a,b st I = MultBy(a,b);
hence thesis by A1;
end;
suppose
ex a,b st I = Divide(a,b);
hence thesis by A1;
end;
suppose
A2: ex k st I = SCM-goto k;
consider k1 such that
A3: I = SCM-goto k1 by A2;
A4: rng<*k1*> = {k1} by FINSEQ_1:39;
JUMP SCM-goto k1 = {k1} by Th16;
hence thesis by A1,A3,A4;
end;
suppose
A5: ex a,k1 st I = a=0_goto k1;
consider a, k1 such that
A6: I = a=0_goto k1 by A5;
A7: rng<*k1*> = {k1} by FINSEQ_1:39;
JUMP (a=0_goto k1) = {k1} by Th18;
hence thesis by A1,A6,A7;
end;
suppose
A8: ex a,k1 st I = a>0_goto k1;
consider a, k1 such that
A9: I = a>0_goto k1 by A8;
A10: rng<*k1*> = {k1} by FINSEQ_1:39;
JUMP (a>0_goto k1) = {k1} by Th20;
hence thesis by A1,A9,A10;
end;
end;
let f being object;
assume f in rng JumpPart I;
then consider k being object such that
A11: k in dom JumpPart I and
A12: f = (JumpPart I).k by FUNCT_1:def 3;
per cases by AMI_3:24;
suppose
I = [0,{},{}];
then dom JumpPart I = dom {};
hence thesis by A11;
end;
suppose
ex a,b st I = a:=b;
then consider a, b such that
A13: I = a:=b;
k in dom {} by A11,A13;
hence thesis;
end;
suppose
ex a,b st I = AddTo(a,b);
then consider a, b such that
A14: I = AddTo(a,b);
k in dom {} by A11,A14;
hence thesis;
end;
suppose
ex a,b st I = SubFrom(a,b);
then consider a, b such that
A15: I = SubFrom(a,b);
k in dom {} by A11,A15;
hence thesis;
end;
suppose
ex a,b st I = MultBy(a,b);
then consider a, b such that
A16: I = MultBy(a,b);
k in dom {} by A11,A16;
hence thesis;
end;
suppose
ex a,b st I = Divide(a,b);
then consider a, b such that
A17: I = Divide(a,b);
k in dom {} by A11,A17;
hence thesis;
end;
suppose
ex k st I = SCM-goto k;
then consider k1 such that
A18: I = SCM-goto k1;
A19: JumpPart I = <*k1*> by A18;
then k = 1 by A11,FINSEQ_1:90;
then
A20: f = k1 by A19,A12,FINSEQ_1:def 8;
JUMP I = {k1} by A18,Th16;
hence thesis by A20,TARSKI:def 1;
end;
suppose
ex a,k st I = a=0_goto k;
then consider a, k1 such that
A21: I = a=0_goto k1;
A22: JumpPart I = <*k1*> by A21;
then k = 1 by A11,FINSEQ_1:90;
then
A23: f = k1 by A22,A12,FINSEQ_1:40;
JUMP I = {k1} by A21,Th18;
hence thesis by A23,TARSKI:def 1;
end;
suppose
ex a,k1 st I = a>0_goto k1;
then consider a, k1 such that
A24: I = a>0_goto k1;
A25: JumpPart I = <*k1*> by A24;
then k = 1 by A11,FINSEQ_1:90;
then
A26: f = k1 by A25,A12,FINSEQ_1:40;
JUMP I = {k1} by A24,Th20;
hence thesis by A26,TARSKI:def 1;
end;
end;
end;
theorem Th23:
IncAddr(SCM-goto i1,k) = SCM-goto(i1+k)
proof
A1: JumpPart IncAddr(SCM-goto i1,k) = k + JumpPart SCM-goto i1
by COMPOS_0:def 9;
then
A2: dom JumpPart IncAddr(SCM-goto i1,k) = dom JumpPart SCM-goto i1
by VALUED_1:def 2;
A3: dom JumpPart SCM-goto(i1+k)
= dom <*i1+k*>
.= Seg 1 by FINSEQ_1:def 8
.= dom <*i1*> by FINSEQ_1:def 8
.= dom JumpPart SCM-goto i1;
A4: for x being object st x in dom JumpPart SCM-goto i1 holds (JumpPart
IncAddr(SCM-goto i1,k)).x = (JumpPart SCM-goto(i1+k)).x
proof
let x be object;
assume
A5: x in dom JumpPart SCM-goto i1;
then x in dom <*i1*>;
then
A6: x = 1 by FINSEQ_1:90;
set f = (JumpPart SCM-goto i1).x;
A7: (JumpPart IncAddr(SCM-goto i1,k)).x = k + f by A5,A2,A1,VALUED_1:def 2;
f = <*i1*>.x
.= i1 by A6,FINSEQ_1:def 8;
hence
(JumpPart IncAddr(SCM-goto i1,k)).x = <*i1+k*>.x
by A6,A7,FINSEQ_1:def 8
.= (JumpPart SCM-goto(i1+k)).x;
end;
A8: AddressPart IncAddr(SCM-goto i1,k) = AddressPart SCM-goto i1
by COMPOS_0:def 9
.= {}
.= AddressPart SCM-goto(i1+k);
A9: InsCode IncAddr(SCM-goto i1,k) = InsCode SCM-goto i1 by COMPOS_0:def 9
.= 6
.= InsCode SCM-goto(i1+k);
JumpPart IncAddr(SCM-goto i1,k) = JumpPart SCM-goto(i1+k)
by A2,A3,A4,FUNCT_1:2;
hence thesis by A8,A9,COMPOS_0:1;
end;
theorem Th24:
IncAddr(a=0_goto i1,k) = a=0_goto(i1+k)
proof
A1: JumpPart IncAddr(a=0_goto i1,k) = k + JumpPart (a=0_goto i1)
by COMPOS_0:def 9;
then
A2: dom JumpPart IncAddr(a=0_goto i1,k) = dom JumpPart (a=0_goto i1)
by VALUED_1:def 2;
A3: dom JumpPart (a=0_goto(i1+k)) = dom <*i1 + k*>
.= Seg 1 by FINSEQ_1:38
.= dom <*i1*> by FINSEQ_1:38
.= dom JumpPart (a=0_goto i1);
A4: for x being object st x in dom JumpPart (a=0_goto i1) holds (JumpPart
IncAddr(a=0_goto i1,k)).x =
(JumpPart (a=0_goto(i1+k))).x
proof
let x be object;
assume
A5: x in dom JumpPart (a=0_goto i1);
then x in dom <*i1*>;
then
A6: x = 1 by FINSEQ_1:90;
set f = (JumpPart (a=0_goto i1)).x;
A7: (JumpPart IncAddr(a=0_goto i1,k)).x = k + f by A1,A2,A5,VALUED_1:def 2;
f = <*i1*>.x
.= i1 by A6,FINSEQ_1:40;
hence
(JumpPart IncAddr(a=0_goto i1,k)).x
= <*i1+k*>.x by A6,A7,FINSEQ_1:40
.= (JumpPart (a=0_goto(i1+k))).x;
end;
A8: AddressPart IncAddr(a=0_goto i1,k) = AddressPart (a=0_goto i1)
by COMPOS_0:def 9
.= <*a*>
.= AddressPart (a=0_goto(i1+k));
A9: InsCode IncAddr(a=0_goto i1,k) = InsCode (a=0_goto i1) by COMPOS_0:def 9
.= 7
.= InsCode (a=0_goto(i1+k));
JumpPart IncAddr(a=0_goto i1,k) = JumpPart (a=0_goto(i1+k))
by A2,A3,A4,FUNCT_1:2;
hence thesis by A8,A9,COMPOS_0:1;
end;
theorem Th25:
IncAddr(a>0_goto i1,k) = a>0_goto(i1+k)
proof
A1: JumpPart IncAddr(a>0_goto i1,k) = k + JumpPart (a>0_goto i1)
by COMPOS_0:def 9;
then
A2: dom JumpPart IncAddr(a>0_goto i1,k) = dom JumpPart (a>0_goto i1)
by VALUED_1:def 2;
A3: dom JumpPart (a>0_goto(i1+k)) = dom <*i1 + k*>
.= Seg 1 by FINSEQ_1:38
.= dom <*i1*> by FINSEQ_1:38
.= dom JumpPart (a>0_goto i1);
A4: for x being object st x in dom JumpPart (a>0_goto i1) holds (JumpPart
IncAddr(a>0_goto i1,k)).x = (JumpPart (a>0_goto(i1+k))).x
proof
let x be object;
assume
A5: x in dom JumpPart (a>0_goto i1);
then x in dom <*i1*>;
then
A6: x = 1 by FINSEQ_1:90;
set f = (JumpPart (a>0_goto i1)).x;
A7: (JumpPart IncAddr(a>0_goto i1,k)).x = k + f by A1,A2,A5,VALUED_1:def 2;
f = <*i1*>.x
.= i1 by A6,FINSEQ_1:40;
hence
(JumpPart IncAddr(a>0_goto i1,k)).x
= <*i1+k*>.x by A6,A7,FINSEQ_1:40
.= (JumpPart (a>0_goto(i1+k))).x;
end;
A8: AddressPart IncAddr(a>0_goto i1,k) = AddressPart (a>0_goto i1)
by COMPOS_0:def 9
.= <*a*>
.= AddressPart (a>0_goto(i1+k));
A9: InsCode IncAddr(a>0_goto i1,k) = InsCode (a>0_goto i1) by COMPOS_0:def 9
.= 8
.= InsCode (a>0_goto(i1+k));
JumpPart IncAddr(a>0_goto i1,k) = JumpPart (a>0_goto(i1+k))
by A2,A3,A4,FUNCT_1:2;
hence thesis by A8,A9,COMPOS_0:1;
end;
registration
cluster SCM -> IC-relocable;
coherence
proof
thus SCM is IC-relocable
proof
let I be Instruction of SCM;
per cases by AMI_3:24;
suppose
I = [0,{},{}];
hence thesis by AMI_3:26;
end;
suppose
ex a,b st I = a:=b;
hence thesis;
end;
suppose
ex a,b st I = AddTo(a,b);
hence thesis;
end;
suppose
ex a,b st I = SubFrom(a,b);
hence thesis;
end;
suppose
ex a,b st I = MultBy(a,b);
hence thesis;
end;
suppose
ex a,b st I = Divide(a,b);
hence thesis;
end;
suppose
A1: ex k st I = SCM-goto k;
let j,k be Nat, s1 be State of SCM;
set s2 = IncIC(s1,k);
consider k1 such that
A2: I = SCM-goto k1 by A1;
reconsider i1=k1 as Element of NAT by ORDINAL1:def 12;
thus IC Exec(IncAddr(I,j),s1) + k
= IC Exec(SCM-goto(j+k1),s1) + k by A2,Th23
.= j+k1+k by AMI_3:7
.= IC Exec(SCM-goto(j+i1+k),s2) by AMI_3:7
.= IC Exec(SCM-goto(j+k+i1),s2)
.= IC Exec(IncAddr(I,j+k), s2) by A2,Th23;
end;
suppose
ex a,k st I = a=0_goto k;
then consider a, k1 such that
A3: I = a=0_goto k1;
reconsider i1=k1 as Element of NAT by ORDINAL1:def 12;
let j,k be Nat, s1 be State of SCM;
set s2 = IncIC(s1,k);
a <> IC SCM & dom (IC SCM .--> (IC s1 + k)) = {IC SCM}
by AMI_5:2;
then not a in dom (IC SCM .--> (IC s1 + k)) by TARSKI:def 1;
then
A4: s1.a = s2.a by FUNCT_4:11;
now
per cases;
suppose
A5: s1.a = 0;
thus IC Exec(IncAddr(I,j),s1) + k
= IC Exec(a=0_goto(j+k1),s1) + k by A3,Th24
.= j+k1+k by A5,AMI_3:8
.= IC Exec(a=0_goto(j+i1+k),s2) by A4,A5,AMI_3:8
.= IC Exec(a=0_goto(j+k+i1),s2)
.= IC Exec(IncAddr(I,j+k), s2) by A3,Th24;
end;
suppose
A6: s1.a <> 0;
A7: IncAddr(I,j) = a=0_goto(i1+j) by A3,Th24;
A8: IncAddr(I,j+k) = a=0_goto(i1+(j+k)) by A3,Th24;
IC SCM in dom (IC SCM .--> (IC s1 + k)) by TARSKI:def 1;
then
A9: IC s2 = (IC SCM .--> (IC s1 + k)).IC SCM by FUNCT_4:13
.= (IC s1 + k) by FUNCOP_1:72;
thus IC Exec(IncAddr(I,j),s1) + k
= IC s1 + 1 + k by A7,A6,AMI_3:8
.= IC s1 + 1 + k
.= IC s2 + 1 by A9
.= IC Exec(IncAddr(I,j+k), s2) by A8,A6,A4,AMI_3:8;
end;
end;
hence thesis;
end;
suppose
ex a,k st I = a>0_goto k;
then consider a, k1 such that
A10: I = a>0_goto k1;
reconsider i1=k1 as Element of NAT by ORDINAL1:def 12;
let j,k be Nat, s1 be State of SCM;
set s2 = IncIC(s1,k);
a <> IC SCM & dom (IC SCM .--> (IC s1 + k)) = {IC SCM}
by AMI_5:2;
then not a in dom (IC SCM .--> (IC s1 + k)) by TARSKI:def 1;
then
A11: s1.a = s2.a by FUNCT_4:11;
per cases;
suppose
A12: s1.a > 0;
thus IC Exec(IncAddr(I,j),s1) + k
= IC Exec(a>0_goto(j+k1),s1) + k by A10,Th25
.= j+k1+k by A12,AMI_3:9
.= IC Exec(a>0_goto(j+i1+k),s2) by A11,A12,AMI_3:9
.= IC Exec(a>0_goto(j+k+i1),s2)
.= IC Exec(IncAddr(I,j+k), s2) by A10,Th25;
end;
suppose
A13: s1.a <= 0;
A14: IncAddr(I,j) = a>0_goto(i1+j) by A10,Th25;
A15: IncAddr(I,j+k) = a>0_goto(i1+(j+k)) by A10,Th25;
IC SCM in dom (IC SCM .--> (IC s1 + k)) by TARSKI:def 1;
then
A16: IC s2 = (IC SCM .--> (IC s1 + k)).IC SCM by FUNCT_4:13
.= (IC s1 + k) by FUNCOP_1:72;
thus IC Exec(IncAddr(I,j),s1) + k
= IC s1 + 1 + k by A14,A13,AMI_3:9
.= IC s1 + 1 + k
.= IC s2 + 1 by A16
.= IC Exec(IncAddr(I,j+k), s2) by A15,A13,A11,AMI_3:9;
end;
end;
end;
end;
end;
|