:: 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 or b1 in { [0,<*b2*>] where B is Element of INT : verum } or b1 in { [1,<*b2*>] where B is Element of SCM-Data-Loc : verum } or 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} } or 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} } or 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
b1 being
set for
b2,
b3 being
Element of
SCM-Data-Loc for
b4,
b5 being
Integer st
b1 in {9,10,11,12,13} holds
[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 c6 be
Int_position ;
let c7,
c8 be
Integer;
func c1,
c2 <>0_goto c3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 9
[4,<*a1,a2,a3*>];
correctness
coherence
[4,<*c6,c7,c8*>] is Instruction of SCMPDS ;
func c1,
c2 <=0_goto c3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 10
[5,<*a1,a2,a3*>];
correctness
coherence
[5,<*c6,c7,c8*>] is Instruction of SCMPDS ;
func c1,
c2 >=0_goto c3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 11
[6,<*a1,a2,a3*>];
correctness
coherence
[6,<*c6,c7,c8*>] is Instruction of SCMPDS ;
func c1,
c2 := c3 -> Instruction of
SCMPDS equals :: SCMPDS_2:def 12
[7,<*a1,a2,a3*>];
correctness
coherence
[7,<*c6,c7,c8*>] is Instruction of SCMPDS ;
func AddTo c1,
c2,
c3 -> 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 c6,
c7 be
Int_position ;
let c8,
c9 be
Integer;
func AddTo c1,
c3,
c2,
c4 -> 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 c1,
c3,
c2,
c4 -> 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 c1,
c3,
c2,
c4 -> 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 c1,
c3,
c2,
c4 -> 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 c1,
c3 := c2,
c4 -> 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 st b1 in { [0,<*b2*>] where B is Element of INT : verum } holds
InsCode b1 = 0
Lemma15:
for b1 being Instruction of SCMPDS st b1 in { [1,<*b2*>] where B is Element of SCM-Data-Loc : verum } holds
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} } or InsCode b1 = 2 or 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} } or InsCode b1 = 4 or InsCode b1 = 5 or InsCode b1 = 6 or InsCode b1 = 7 or 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} } or InsCode b1 = 9 or InsCode b1 = 10 or InsCode b1 = 11 or InsCode b1 = 12 or 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 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} } ) or InsCode b1 = 0 or InsCode b1 = 1 or InsCode b1 = 2 or InsCode b1 = 3 or InsCode b1 = 9 or InsCode b1 = 10 or InsCode b1 = 11 or InsCode b1 = 12 or 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 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} } ) or InsCode b1 = 0 or InsCode b1 = 1 or InsCode b1 = 2 or InsCode b1 = 3 or InsCode b1 = 4 or InsCode b1 = 5 or InsCode b1 = 6 or InsCode b1 = 7 or 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
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4,
b5 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) = b1 . (DataLoc (b1 . b5),b3) & ( for
b6 being
Int_position st
b6 <> DataLoc (b1 . b4),
b2 holds
(Exec (b4,b2 := b5,b3),b1) . b6 = b1 . b6 ) )
theorem Th60: :: SCMPDS_2:60
for
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4 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)) + b3 & ( for
b5 being
Int_position st
b5 <> DataLoc (b1 . b4),
b2 holds
(Exec (AddTo b4,b2,b3),b1) . b5 = b1 . b5 ) )
theorem Th61: :: SCMPDS_2:61
for
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4,
b5 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
b6 being
Int_position st
b6 <> DataLoc (b1 . b4),
b2 holds
(Exec (AddTo b4,b2,b5,b3),b1) . b6 = b1 . b6 ) )
theorem Th62: :: SCMPDS_2:62
for
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4,
b5 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
b6 being
Int_position st
b6 <> DataLoc (b1 . b4),
b2 holds
(Exec (SubFrom b4,b2,b5,b3),b1) . b6 = b1 . b6 ) )
theorem Th63: :: SCMPDS_2:63
for
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4,
b5 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
b6 being
Int_position st
b6 <> DataLoc (b1 . b4),
b2 holds
(Exec (MultBy b4,b2,b5,b3),b1) . b6 = b1 . b6 ) )
theorem Th64: :: SCMPDS_2:64
for
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4,
b5 being
Int_position holds
(
(Exec (Divide b4,b2,b5,b3),b1) . (IC SCMPDS ) = Next (IC b1) & (
DataLoc (b1 . b4),
b2 <> DataLoc (b1 . b5),
b3 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
b6 being
Int_position st
b6 <> DataLoc (b1 . b4),
b2 &
b6 <> DataLoc (b1 . b5),
b3 holds
(Exec (Divide b4,b2,b5,b3),b1) . b6 = b1 . b6 ) )
theorem Th65: :: SCMPDS_2:65
for
b1 being
State of
SCMPDS for
b2 being
Integer for
b3 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
b4 being
Int_position st
b4 <> DataLoc (b1 . b3),
b2 holds
(Exec (Divide b3,b2,b3,b2),b1) . b4 = b1 . b4 ) )
by Th64;
:: deftheorem Def20 defines ICplusConst SCMPDS_2:def 20 :
theorem Th66: :: SCMPDS_2:66
theorem Th67: :: SCMPDS_2:67
for
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4,
b5 being
Int_position holds
( (
b1 . (DataLoc (b1 . b4),b2) <> 0 implies
(Exec (b4,b2 <>0_goto b3),b1) . (IC SCMPDS ) = ICplusConst b1,
b3 ) & (
b1 . (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) . b5 = b1 . b5 )
theorem Th68: :: SCMPDS_2:68
for
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4,
b5 being
Int_position holds
( (
b1 . (DataLoc (b1 . b4),b2) <= 0 implies
(Exec (b4,b2 <=0_goto b3),b1) . (IC SCMPDS ) = ICplusConst b1,
b3 ) & (
b1 . (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) . b5 = b1 . b5 )
theorem Th69: :: SCMPDS_2:69
for
b1 being
State of
SCMPDS for
b2,
b3 being
Integer for
b4,
b5 being
Int_position holds
( (
b1 . (DataLoc (b1 . b4),b2) >= 0 implies
(Exec (b4,b2 >=0_goto b3),b1) . (IC SCMPDS ) = ICplusConst b1,
b3 ) & (
b1 . (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) . b5 = b1 . b5 )
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
b1 being
set holds
(
b1 is
Instruction of
SCMPDS iff ( ex
b2 being
Integer st
b1 = goto b2 or ex
b2 being
Int_position st
b1 = return b2 or ex
b2 being
Int_position ex
b3 being
Integer st
b1 = saveIC b2,
b3 or ex
b2 being
Int_position ex
b3 being
Integer st
b1 = b2 := b3 or ex
b2 being
Int_position ex
b3,
b4 being
Integer st
b1 = b2,
b3 := b4 or ex
b2 being
Int_position ex
b3,
b4 being
Integer st
b1 = b2,
b3 <>0_goto b4 or ex
b2 being
Int_position ex
b3,
b4 being
Integer st
b1 = b2,
b3 <=0_goto b4 or ex
b2 being
Int_position ex
b3,
b4 being
Integer st
b1 = b2,
b3 >=0_goto b4 or ex
b2,
b3 being
Int_position ex
b4,
b5 being
Integer st
b1 = AddTo b2,
b4,
b5 or ex
b2,
b3 being
Int_position ex
b4,
b5 being
Integer st
b1 = AddTo b2,
b4,
b3,
b5 or ex
b2,
b3 being
Int_position ex
b4,
b5 being
Integer st
b1 = SubFrom b2,
b4,
b3,
b5 or ex
b2,
b3 being
Int_position ex
b4,
b5 being
Integer st
b1 = MultBy b2,
b4,
b3,
b5 or ex
b2,
b3 being
Int_position ex
b4,
b5 being
Integer st
b1 = Divide b2,
b4,
b3,
b5 or ex
b2,
b3 being
Int_position ex
b4,
b5 being
Integer st
b1 = b2,
b4 := b3,
b5 ) )
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