:: SCMPDS_2 semantic presentation
definition
func SCMPDS -> strict AMI-Struct of
{INT } equals :: SCMPDS_2:def 1
AMI-Struct(#
NAT ,0,
SCM-Instr-Loc ,
(Segm 14),
SCMPDS-Instr ,
SCMPDS-OK ,
SCMPDS-Exec #);
correctness
coherence
AMI-Struct(# NAT ,0,SCM-Instr-Loc ,(Segm 14),SCMPDS-Instr ,SCMPDS-OK ,SCMPDS-Exec #) is strict AMI-Struct of {INT };
;
end;
:: deftheorem Def1 defines SCMPDS SCMPDS_2:def 1 :
theorem Th1: :: SCMPDS_2:1
theorem Th2: :: SCMPDS_2:2
theorem Th3: :: SCMPDS_2:3
theorem Th4: :: SCMPDS_2:4
theorem Th5: :: SCMPDS_2:5
theorem Th6: :: SCMPDS_2:6
theorem Th7: :: SCMPDS_2:7
:: deftheorem Def2 defines Int_position SCMPDS_2:def 2 :
theorem Th8: :: SCMPDS_2:8
canceled;
theorem Th9: :: SCMPDS_2:9
theorem Th10: :: SCMPDS_2:10
theorem Th11: :: SCMPDS_2:11
theorem Th12: :: SCMPDS_2:12
theorem Th13: :: SCMPDS_2:13
theorem Th14: :: SCMPDS_2:14
set c1 = { [0,<*b1*>] where B is Element of INT : verum } ;
set c2 = { [1,<*b1*>] where B is Element of SCM-Data-Loc : verum } ;
set c3 = { [b1,<*b2,b3*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT : b1 in {2,3} } ;
set c4 = { [b1,<*b2,b3,b4*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT , B is Element of INT : b1 in {4,5,6,7,8} } ;
set c5 = { [b1,<*b2,b3,b4,b5*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc , B is Element of INT , B is Element of INT : b1 in {9,10,11,12,13} } ;
Lemma8:
for b1 being Instruction of SCMPDS holds
not ( b1 in SCMPDS-Instr & not b1 in { [0,<*b2*>] where B is Element of INT : verum } & not b1 in { [1,<*b2*>] where B is Element of SCM-Data-Loc : verum } & not b1 in { [b2,<*b3,b4*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT : b2 in {2,3} } & not b1 in { [b2,<*b3,b4,b5*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT , B is Element of INT : b2 in {4,5,6,7,8} } & not b1 in { [b2,<*b3,b4,b5,b6*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc , B is Element of INT , B is Element of INT : b2 in {9,10,11,12,13} } )
theorem Th15: :: SCMPDS_2:15
:: deftheorem Def3 SCMPDS_2:def 3 :
canceled;
:: deftheorem Def4 defines DataLoc SCMPDS_2:def 4 :
theorem Th16: :: SCMPDS_2:16
theorem Th17: :: SCMPDS_2:17
theorem Th18: :: SCMPDS_2:18
theorem Th19: :: SCMPDS_2:19
theorem Th20: :: SCMPDS_2:20
for b
1 being
set for b
2, b
3 being
Element of
SCM-Data-Loc for b
4, b
5 being
Integer holds
( b
1 in {9,10,11,12,13} implies
[b1,<*b2,b3,b4,b5*>] in SCMPDS-Instr )
:: deftheorem Def5 defines goto SCMPDS_2:def 5 :
:: deftheorem Def6 defines return SCMPDS_2:def 6 :
:: deftheorem Def7 defines := SCMPDS_2:def 7 :
:: deftheorem Def8 defines saveIC SCMPDS_2:def 8 :
definition
let c
6 be
Int_position ;
let c
7, c
8 be
Integer;
func c
1,c
2 <>0_goto c
3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 9
[4,<*a1,a2,a3*>];
correctness
coherence
[4,<*c6,c7,c8*>] is Instruction of SCMPDS ;
func c
1,c
2 <=0_goto c
3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 10
[5,<*a1,a2,a3*>];
correctness
coherence
[5,<*c6,c7,c8*>] is Instruction of SCMPDS ;
func c
1,c
2 >=0_goto c
3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 11
[6,<*a1,a2,a3*>];
correctness
coherence
[6,<*c6,c7,c8*>] is Instruction of SCMPDS ;
func c
1,c
2 := c
3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 12
[7,<*a1,a2,a3*>];
correctness
coherence
[7,<*c6,c7,c8*>] is Instruction of SCMPDS ;
func AddTo c
1,c
2,c
3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 13
[8,<*a1,a2,a3*>];
correctness
coherence
[8,<*c6,c7,c8*>] is Instruction of SCMPDS ;
end;
:: deftheorem Def9 defines <>0_goto SCMPDS_2:def 9 :
:: deftheorem Def10 defines <=0_goto SCMPDS_2:def 10 :
:: deftheorem Def11 defines >=0_goto SCMPDS_2:def 11 :
:: deftheorem Def12 defines := SCMPDS_2:def 12 :
:: deftheorem Def13 defines AddTo SCMPDS_2:def 13 :
definition
let c
6, c
7 be
Int_position ;
let c
8, c
9 be
Integer;
func AddTo c
1,c
3,c
2,c
4 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 14
[9,<*a1,a2,a3,a4*>];
correctness
coherence
[9,<*c6,c7,c8,c9*>] is Instruction of SCMPDS ;
func SubFrom c
1,c
3,c
2,c
4 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 15
[10,<*a1,a2,a3,a4*>];
correctness
coherence
[10,<*c6,c7,c8,c9*>] is Instruction of SCMPDS ;
func MultBy c
1,c
3,c
2,c
4 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 16
[11,<*a1,a2,a3,a4*>];
correctness
coherence
[11,<*c6,c7,c8,c9*>] is Instruction of SCMPDS ;
func Divide c
1,c
3,c
2,c
4 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 17
[12,<*a1,a2,a3,a4*>];
correctness
coherence
[12,<*c6,c7,c8,c9*>] is Instruction of SCMPDS ;
func c
1,c
3 := c
2,c
4 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 18
[13,<*a1,a2,a3,a4*>];
correctness
coherence
[13,<*c6,c7,c8,c9*>] is Instruction of SCMPDS ;
end;
:: deftheorem Def14 defines AddTo SCMPDS_2:def 14 :
:: deftheorem Def15 defines SubFrom SCMPDS_2:def 15 :
:: deftheorem Def16 defines MultBy SCMPDS_2:def 16 :
:: deftheorem Def17 defines Divide SCMPDS_2:def 17 :
:: deftheorem Def18 defines := SCMPDS_2:def 18 :
theorem Th21: :: SCMPDS_2:21
theorem Th22: :: SCMPDS_2:22
theorem Th23: :: SCMPDS_2:23
theorem Th24: :: SCMPDS_2:24
theorem Th25: :: SCMPDS_2:25
theorem Th26: :: SCMPDS_2:26
theorem Th27: :: SCMPDS_2:27
theorem Th28: :: SCMPDS_2:28
theorem Th29: :: SCMPDS_2:29
theorem Th30: :: SCMPDS_2:30
theorem Th31: :: SCMPDS_2:31
theorem Th32: :: SCMPDS_2:32
theorem Th33: :: SCMPDS_2:33
theorem Th34: :: SCMPDS_2:34
Lemma14:
for b1 being Instruction of SCMPDS holds
( b1 in { [0,<*b2*>] where B is Element of INT : verum } implies InsCode b1 = 0 )
Lemma15:
for b1 being Instruction of SCMPDS holds
( b1 in { [1,<*b2*>] where B is Element of SCM-Data-Loc : verum } implies InsCode b1 = 1 )
Lemma16:
for b1 being Instruction of SCMPDS holds
not ( b1 in { [b2,<*b3,b4*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT : b2 in {2,3} } & not InsCode b1 = 2 & not InsCode b1 = 3 )
Lemma17:
for b1 being Instruction of SCMPDS holds
not ( b1 in { [b2,<*b3,b4,b5*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT , B is Element of INT : b2 in {4,5,6,7,8} } & not InsCode b1 = 4 & not InsCode b1 = 5 & not InsCode b1 = 6 & not InsCode b1 = 7 & not InsCode b1 = 8 )
Lemma18:
for b1 being Instruction of SCMPDS holds
not ( b1 in { [b2,<*b3,b4,b5,b6*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc , B is Element of INT , B is Element of INT : b2 in {9,10,11,12,13} } & not InsCode b1 = 9 & not InsCode b1 = 10 & not InsCode b1 = 11 & not InsCode b1 = 12 & not InsCode b1 = 13 )
theorem Th35: :: SCMPDS_2:35
theorem Th36: :: SCMPDS_2:36
theorem Th37: :: SCMPDS_2:37
theorem Th38: :: SCMPDS_2:38
Lemma19:
for b1 being Instruction of SCMPDS holds
not ( not ( not b1 in { [0,<*b2*>] where B is Element of INT : verum } & not b1 in { [1,<*b2*>] where B is Element of SCM-Data-Loc : verum } & not b1 in { [b2,<*b3,b4*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT : b2 in {2,3} } & not b1 in { [b2,<*b3,b4,b5,b6*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of SCM-Data-Loc , B is Element of INT , B is Element of INT : b2 in {9,10,11,12,13} } ) & not InsCode b1 = 0 & not InsCode b1 = 1 & not InsCode b1 = 2 & not InsCode b1 = 3 & not InsCode b1 = 9 & not InsCode b1 = 10 & not InsCode b1 = 11 & not InsCode b1 = 12 & not InsCode b1 = 13 )
theorem Th39: :: SCMPDS_2:39
theorem Th40: :: SCMPDS_2:40
theorem Th41: :: SCMPDS_2:41
theorem Th42: :: SCMPDS_2:42
theorem Th43: :: SCMPDS_2:43
Lemma20:
for b1 being Instruction of SCMPDS holds
not ( not ( not b1 in { [0,<*b2*>] where B is Element of INT : verum } & not b1 in { [1,<*b2*>] where B is Element of SCM-Data-Loc : verum } & not b1 in { [b2,<*b3,b4*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT : b2 in {2,3} } & not b1 in { [b2,<*b3,b4,b5*>] where B is Element of Segm 14, B is Element of SCM-Data-Loc , B is Element of INT , B is Element of INT : b2 in {4,5,6,7,8} } ) & not InsCode b1 = 0 & not InsCode b1 = 1 & not InsCode b1 = 2 & not InsCode b1 = 3 & not InsCode b1 = 4 & not InsCode b1 = 5 & not InsCode b1 = 6 & not InsCode b1 = 7 & not InsCode b1 = 8 )
theorem Th44: :: SCMPDS_2:44
theorem Th45: :: SCMPDS_2:45
theorem Th46: :: SCMPDS_2:46
theorem Th47: :: SCMPDS_2:47
theorem Th48: :: SCMPDS_2:48
theorem Th49: :: SCMPDS_2:49
theorem Th50: :: SCMPDS_2:50
theorem Th51: :: SCMPDS_2:51
theorem Th52: :: SCMPDS_2:52
theorem Th53: :: SCMPDS_2:53
theorem Th54: :: SCMPDS_2:54
:: deftheorem Def19 defines Next SCMPDS_2:def 19 :
theorem Th55: :: SCMPDS_2:55
theorem Th56: :: SCMPDS_2:56
theorem Th57: :: SCMPDS_2:57
theorem Th58: :: SCMPDS_2:58
theorem Th59: :: SCMPDS_2:59
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4, b
5 being
Int_position holds
(
(Exec (b4,b2 := b5,b3),b1) . (IC SCMPDS ) = Next (IC b1) &
(Exec (b4,b2 := b5,b3),b1) . (DataLoc (b1 . b4),b2) = b
1 . (DataLoc (b1 . b5),b3) & ( for b
6 being
Int_position holds
( b
6 <> DataLoc (b1 . b4),b
2 implies
(Exec (b4,b2 := b5,b3),b1) . b
6 = b
1 . b
6 ) ) )
theorem Th60: :: SCMPDS_2:60
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4 being
Int_position holds
(
(Exec (AddTo b4,b2,b3),b1) . (IC SCMPDS ) = Next (IC b1) &
(Exec (AddTo b4,b2,b3),b1) . (DataLoc (b1 . b4),b2) = (b1 . (DataLoc (b1 . b4),b2)) + b
3 & ( for b
5 being
Int_position holds
( b
5 <> DataLoc (b1 . b4),b
2 implies
(Exec (AddTo b4,b2,b3),b1) . b
5 = b
1 . b
5 ) ) )
theorem Th61: :: SCMPDS_2:61
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4, b
5 being
Int_position holds
(
(Exec (AddTo b4,b2,b5,b3),b1) . (IC SCMPDS ) = Next (IC b1) &
(Exec (AddTo b4,b2,b5,b3),b1) . (DataLoc (b1 . b4),b2) = (b1 . (DataLoc (b1 . b4),b2)) + (b1 . (DataLoc (b1 . b5),b3)) & ( for b
6 being
Int_position holds
( b
6 <> DataLoc (b1 . b4),b
2 implies
(Exec (AddTo b4,b2,b5,b3),b1) . b
6 = b
1 . b
6 ) ) )
theorem Th62: :: SCMPDS_2:62
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4, b
5 being
Int_position holds
(
(Exec (SubFrom b4,b2,b5,b3),b1) . (IC SCMPDS ) = Next (IC b1) &
(Exec (SubFrom b4,b2,b5,b3),b1) . (DataLoc (b1 . b4),b2) = (b1 . (DataLoc (b1 . b4),b2)) - (b1 . (DataLoc (b1 . b5),b3)) & ( for b
6 being
Int_position holds
( b
6 <> DataLoc (b1 . b4),b
2 implies
(Exec (SubFrom b4,b2,b5,b3),b1) . b
6 = b
1 . b
6 ) ) )
theorem Th63: :: SCMPDS_2:63
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4, b
5 being
Int_position holds
(
(Exec (MultBy b4,b2,b5,b3),b1) . (IC SCMPDS ) = Next (IC b1) &
(Exec (MultBy b4,b2,b5,b3),b1) . (DataLoc (b1 . b4),b2) = (b1 . (DataLoc (b1 . b4),b2)) * (b1 . (DataLoc (b1 . b5),b3)) & ( for b
6 being
Int_position holds
( b
6 <> DataLoc (b1 . b4),b
2 implies
(Exec (MultBy b4,b2,b5,b3),b1) . b
6 = b
1 . b
6 ) ) )
theorem Th64: :: SCMPDS_2:64
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4, b
5 being
Int_position holds
(
(Exec (Divide b4,b2,b5,b3),b1) . (IC SCMPDS ) = Next (IC b1) & (
DataLoc (b1 . b4),b
2 <> DataLoc (b1 . b5),b
3 implies
(Exec (Divide b4,b2,b5,b3),b1) . (DataLoc (b1 . b4),b2) = (b1 . (DataLoc (b1 . b4),b2)) div (b1 . (DataLoc (b1 . b5),b3)) ) &
(Exec (Divide b4,b2,b5,b3),b1) . (DataLoc (b1 . b5),b3) = (b1 . (DataLoc (b1 . b4),b2)) mod (b1 . (DataLoc (b1 . b5),b3)) & ( for b
6 being
Int_position holds
( b
6 <> DataLoc (b1 . b4),b
2 & b
6 <> DataLoc (b1 . b5),b
3 implies
(Exec (Divide b4,b2,b5,b3),b1) . b
6 = b
1 . b
6 ) ) )
theorem Th65: :: SCMPDS_2:65
for b
1 being
State of
SCMPDS for b
2 being
Integerfor b
3 being
Int_position holds
(
(Exec (Divide b3,b2,b3,b2),b1) . (IC SCMPDS ) = Next (IC b1) &
(Exec (Divide b3,b2,b3,b2),b1) . (DataLoc (b1 . b3),b2) = (b1 . (DataLoc (b1 . b3),b2)) mod (b1 . (DataLoc (b1 . b3),b2)) & ( for b
4 being
Int_position holds
( b
4 <> DataLoc (b1 . b3),b
2 implies
(Exec (Divide b3,b2,b3,b2),b1) . b
4 = b
1 . b
4 ) ) )
by Th64;
:: deftheorem Def20 defines ICplusConst SCMPDS_2:def 20 :
theorem Th66: :: SCMPDS_2:66
theorem Th67: :: SCMPDS_2:67
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4, b
5 being
Int_position holds
( ( b
1 . (DataLoc (b1 . b4),b2) <> 0 implies
(Exec (b4,b2 <>0_goto b3),b1) . (IC SCMPDS ) = ICplusConst b
1,b
3 ) & ( b
1 . (DataLoc (b1 . b4),b2) = 0 implies
(Exec (b4,b2 <>0_goto b3),b1) . (IC SCMPDS ) = Next (IC b1) ) &
(Exec (b4,b2 <>0_goto b3),b1) . b
5 = b
1 . b
5 )
theorem Th68: :: SCMPDS_2:68
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4, b
5 being
Int_position holds
( ( b
1 . (DataLoc (b1 . b4),b2) <= 0 implies
(Exec (b4,b2 <=0_goto b3),b1) . (IC SCMPDS ) = ICplusConst b
1,b
3 ) & ( b
1 . (DataLoc (b1 . b4),b2) > 0 implies
(Exec (b4,b2 <=0_goto b3),b1) . (IC SCMPDS ) = Next (IC b1) ) &
(Exec (b4,b2 <=0_goto b3),b1) . b
5 = b
1 . b
5 )
theorem Th69: :: SCMPDS_2:69
for b
1 being
State of
SCMPDS for b
2, b
3 being
Integerfor b
4, b
5 being
Int_position holds
( ( b
1 . (DataLoc (b1 . b4),b2) >= 0 implies
(Exec (b4,b2 >=0_goto b3),b1) . (IC SCMPDS ) = ICplusConst b
1,b
3 ) & ( b
1 . (DataLoc (b1 . b4),b2) < 0 implies
(Exec (b4,b2 >=0_goto b3),b1) . (IC SCMPDS ) = Next (IC b1) ) &
(Exec (b4,b2 >=0_goto b3),b1) . b
5 = b
1 . b
5 )
theorem Th70: :: SCMPDS_2:70
theorem Th71: :: SCMPDS_2:71
theorem Th72: :: SCMPDS_2:72
theorem Th73: :: SCMPDS_2:73
theorem Th74: :: SCMPDS_2:74
theorem Th75: :: SCMPDS_2:75
theorem Th76: :: SCMPDS_2:76
theorem Th77: :: SCMPDS_2:77
theorem Th78: :: SCMPDS_2:78
theorem Th79: :: SCMPDS_2:79
theorem Th80: :: SCMPDS_2:80
theorem Th81: :: SCMPDS_2:81
theorem Th82: :: SCMPDS_2:82
theorem Th83: :: SCMPDS_2:83
theorem Th84: :: SCMPDS_2:84
theorem Th85: :: SCMPDS_2:85
theorem Th86: :: SCMPDS_2:86
theorem Th87: :: SCMPDS_2:87
theorem Th88: :: SCMPDS_2:88
theorem Th89: :: SCMPDS_2:89
theorem Th90: :: SCMPDS_2:90
theorem Th91: :: SCMPDS_2:91
for b
1 being
set holds
( b
1 is
Instruction of
SCMPDS iff not ( ( for b
2 being
Integer holds
not b
1 = goto b
2 ) & ( for b
2 being
Int_position holds
not b
1 = return b
2 ) & ( for b
2 being
Int_position for b
3 being
Integer holds
not b
1 = saveIC b
2,b
3 ) & ( for b
2 being
Int_position for b
3 being
Integer holds
not b
1 = b
2 := b
3 ) & ( for b
2 being
Int_position for b
3, b
4 being
Integer holds
not b
1 = b
2,b
3 := b
4 ) & ( for b
2 being
Int_position for b
3, b
4 being
Integer holds
not b
1 = b
2,b
3 <>0_goto b
4 ) & ( for b
2 being
Int_position for b
3, b
4 being
Integer holds
not b
1 = b
2,b
3 <=0_goto b
4 ) & ( for b
2 being
Int_position for b
3, b
4 being
Integer holds
not b
1 = b
2,b
3 >=0_goto b
4 ) & ( for b
2, b
3 being
Int_position for b
4, b
5 being
Integer holds
not b
1 = AddTo b
2,b
4,b
5 ) & ( for b
2, b
3 being
Int_position for b
4, b
5 being
Integer holds
not b
1 = AddTo b
2,b
4,b
3,b
5 ) & ( for b
2, b
3 being
Int_position for b
4, b
5 being
Integer holds
not b
1 = SubFrom b
2,b
4,b
3,b
5 ) & ( for b
2, b
3 being
Int_position for b
4, b
5 being
Integer holds
not b
1 = MultBy b
2,b
4,b
3,b
5 ) & ( for b
2, b
3 being
Int_position for b
4, b
5 being
Integer holds
not b
1 = Divide b
2,b
4,b
3,b
5 ) & ( for b
2, b
3 being
Int_position for b
4, b
5 being
Integer holds
not b
1 = b
2,b
4 := b
3,b
5 ) ) )
theorem Th92: :: SCMPDS_2:92
theorem Th93: :: SCMPDS_2:93
theorem Th94: :: SCMPDS_2:94
canceled;
theorem Th95: :: SCMPDS_2:95
canceled;
theorem Th96: :: SCMPDS_2:96
theorem Th97: :: SCMPDS_2:97
theorem Th98: :: SCMPDS_2:98
theorem Th99: :: SCMPDS_2:99