:: SCMPDS_7 semantic presentation
set c1 = the Instruction-Locations of SCMPDS ;
set c2 = SCM-Data-Loc ;
theorem Th1: :: SCMPDS_7:1
theorem Th2: :: SCMPDS_7:2
theorem Th3: :: SCMPDS_7:3
theorem Th4: :: SCMPDS_7:4
theorem Th5: :: SCMPDS_7:5
theorem Th6: :: SCMPDS_7:6
theorem Th7: :: SCMPDS_7:7
theorem Th8: :: SCMPDS_7:8
theorem Th9: :: SCMPDS_7:9
theorem Th10: :: SCMPDS_7:10
theorem Th11: :: SCMPDS_7:11
theorem Th12: :: SCMPDS_7:12
theorem Th13: :: SCMPDS_7:13
canceled;
theorem Th14: :: SCMPDS_7:14
theorem Th15: :: SCMPDS_7:15
theorem Th16: :: SCMPDS_7:16
theorem Th17: :: SCMPDS_7:17
theorem Th18: :: SCMPDS_7:18
theorem Th19: :: SCMPDS_7:19
theorem Th20: :: SCMPDS_7:20
theorem Th21: :: SCMPDS_7:21
theorem Th22: :: SCMPDS_7:22
theorem Th23: :: SCMPDS_7:23
theorem Th24: :: SCMPDS_7:24
theorem Th25: :: SCMPDS_7:25
theorem Th26: :: SCMPDS_7:26
theorem Th27: :: SCMPDS_7:27
theorem Th28: :: SCMPDS_7:28
theorem Th29: :: SCMPDS_7:29
theorem Th30: :: SCMPDS_7:30
theorem Th31: :: SCMPDS_7:31
theorem Th32: :: SCMPDS_7:32
theorem Th33: :: SCMPDS_7:33
theorem Th34: :: SCMPDS_7:34
theorem Th35: :: SCMPDS_7:35
theorem Th36: :: SCMPDS_7:36
theorem Th37: :: SCMPDS_7:37
theorem Th38: :: SCMPDS_7:38
theorem Th39: :: SCMPDS_7:39
theorem Th40: :: SCMPDS_7:40
theorem Th41: :: SCMPDS_7:41
theorem Th42: :: SCMPDS_7:42
theorem Th43: :: SCMPDS_7:43
theorem Th44: :: SCMPDS_7:44
theorem Th45: :: SCMPDS_7:45
theorem Th46: :: SCMPDS_7:46
Lemma35:
for b1 being No-StopCode Program-block
for b2 being shiftable Program-block
for b3, b4, b5 being State of SCMPDS st b1 is_closed_on b3 & b1 is_halting_on b3 & b2 is_closed_on IExec b1,b3 & b2 is_halting_on IExec b1,b3 & b5 = b3 +* (Initialized (stop (b1 ';' b2))) & b4 = b3 +* (Initialized (stop b1)) holds
( IC ((Computation b5) . (LifeSpan b4)) = inspos (card b1) & ((Computation b5) . (LifeSpan b4)) | SCM-Data-Loc = (((Computation b4) . (LifeSpan b4)) +* (Initialized (stop b2))) | SCM-Data-Loc & Shift (stop b2),(card b1) c= (Computation b5) . (LifeSpan b4) & LifeSpan b5 = (LifeSpan b4) + (LifeSpan ((Result b4) +* (Initialized (stop b2)))) )
theorem Th47: :: SCMPDS_7:47
theorem Th48: :: SCMPDS_7:48
theorem Th49: :: SCMPDS_7:49
theorem Th50: :: SCMPDS_7:50
:: deftheorem Def1 defines for-up SCMPDS_7:def 1 :
theorem Th51: :: SCMPDS_7:51
Lemma40:
for b1 being Int_position
for b2 being Integer
for b3 being Nat
for b4 being Program-block holds card (stop (for-up b1,b2,b3,b4)) = (card b4) + 4
theorem Th52: :: SCMPDS_7:52
theorem Th53: :: SCMPDS_7:53
for
b1 being
Int_position for
b2 being
Integer for
b3 being
Nat for
b4 being
Program-block holds
(
(for-up b1,b2,b3,b4) . (inspos 0) = b1,
b2 >=0_goto ((card b4) + 3) &
(for-up b1,b2,b3,b4) . (inspos ((card b4) + 1)) = AddTo b1,
b2,
b3 &
(for-up b1,b2,b3,b4) . (inspos ((card b4) + 2)) = goto (- ((card b4) + 2)) )
Lemma43:
for b1 being Int_position
for b2 being Integer
for b3 being Nat
for b4 being Program-block holds for-up b1,b2,b3,b4 = (b1,b2 >=0_goto ((card b4) + 3)) ';' ((b4 ';' (AddTo b1,b2,b3)) ';' (goto (- ((card b4) + 2))))
by Th15;
theorem Th54: :: SCMPDS_7:54
theorem Th55: :: SCMPDS_7:55
theorem Th56: :: SCMPDS_7:56
theorem Th57: :: SCMPDS_7:57
Lemma46:
for b1 being Program-block
for b2 being Int_position
for b3 being Integer
for b4 being Nat holds Shift b1,1 c= for-up b2,b3,b4,b1
theorem Th58: :: SCMPDS_7:58
for
b1 being
State of
SCMPDS for
b2 being
shiftable No-StopCode Program-block for
b3 being
Int_position for
b4 being
Integer for
b5 being
Nat for
b6 being
set st
b1 . (DataLoc (b1 . b3),b4) < 0 & not
DataLoc (b1 . b3),
b4 in b6 &
b5 > 0 &
card b2 > 0 &
b3 <> DataLoc (b1 . b3),
b4 & ( for
b7 being
State of
SCMPDS st ( for
b8 being
Int_position st
b8 in b6 holds
b7 . b8 = b1 . b8 ) &
b7 . b3 = b1 . b3 holds
(
(IExec b2,b7) . b3 = b7 . b3 &
(IExec b2,b7) . (DataLoc (b1 . b3),b4) = b7 . (DataLoc (b1 . b3),b4) &
b2 is_closed_on b7 &
b2 is_halting_on b7 & ( for
b8 being
Int_position st
b8 in b6 holds
(IExec b2,b7) . b8 = b7 . b8 ) ) ) holds
(
for-up b3,
b4,
b5,
b2 is_closed_on b1 &
for-up b3,
b4,
b5,
b2 is_halting_on b1 )
theorem Th59: :: SCMPDS_7:59
for
b1 being
State of
SCMPDS for
b2 being
shiftable No-StopCode Program-block for
b3 being
Int_position for
b4 being
Integer for
b5 being
Nat for
b6 being
set st
b1 . (DataLoc (b1 . b3),b4) < 0 & not
DataLoc (b1 . b3),
b4 in b6 &
b5 > 0 &
card b2 > 0 &
b3 <> DataLoc (b1 . b3),
b4 & ( for
b7 being
State of
SCMPDS st ( for
b8 being
Int_position st
b8 in b6 holds
b7 . b8 = b1 . b8 ) &
b7 . b3 = b1 . b3 holds
(
(IExec b2,b7) . b3 = b7 . b3 &
(IExec b2,b7) . (DataLoc (b1 . b3),b4) = b7 . (DataLoc (b1 . b3),b4) &
b2 is_closed_on b7 &
b2 is_halting_on b7 & ( for
b8 being
Int_position st
b8 in b6 holds
(IExec b2,b7) . b8 = b7 . b8 ) ) ) holds
IExec (for-up b3,b4,b5,b2),
b1 = IExec (for-up b3,b4,b5,b2),
(IExec (b2 ';' (AddTo b3,b4,b5)),b1)
:: deftheorem Def2 defines for-down SCMPDS_7:def 2 :
theorem Th60: :: SCMPDS_7:60
Lemma49:
for b1 being Int_position
for b2 being Integer
for b3 being Nat
for b4 being Program-block holds card (stop (for-down b1,b2,b3,b4)) = (card b4) + 4
theorem Th61: :: SCMPDS_7:61
theorem Th62: :: SCMPDS_7:62
for
b1 being
Int_position for
b2 being
Integer for
b3 being
Nat for
b4 being
Program-block holds
(
(for-down b1,b2,b3,b4) . (inspos 0) = b1,
b2 <=0_goto ((card b4) + 3) &
(for-down b1,b2,b3,b4) . (inspos ((card b4) + 1)) = AddTo b1,
b2,
(- b3) &
(for-down b1,b2,b3,b4) . (inspos ((card b4) + 2)) = goto (- ((card b4) + 2)) )
Lemma52:
for b1 being Int_position
for b2 being Integer
for b3 being Nat
for b4 being Program-block holds for-down b1,b2,b3,b4 = (b1,b2 <=0_goto ((card b4) + 3)) ';' ((b4 ';' (AddTo b1,b2,(- b3))) ';' (goto (- ((card b4) + 2))))
by Th15;
theorem Th63: :: SCMPDS_7:63
theorem Th64: :: SCMPDS_7:64
theorem Th65: :: SCMPDS_7:65
theorem Th66: :: SCMPDS_7:66
Lemma56:
for b1 being Program-block
for b2 being Int_position
for b3 being Integer
for b4 being Nat holds Shift b1,1 c= for-down b2,b3,b4,b1
theorem Th67: :: SCMPDS_7:67
for
b1 being
State of
SCMPDS for
b2 being
shiftable No-StopCode Program-block for
b3 being
Int_position for
b4 being
Integer for
b5 being
Nat for
b6 being
set st
b1 . (DataLoc (b1 . b3),b4) > 0 & not
DataLoc (b1 . b3),
b4 in b6 &
b5 > 0 &
card b2 > 0 &
b3 <> DataLoc (b1 . b3),
b4 & ( for
b7 being
State of
SCMPDS st ( for
b8 being
Int_position st
b8 in b6 holds
b7 . b8 = b1 . b8 ) &
b7 . b3 = b1 . b3 holds
(
(IExec b2,b7) . b3 = b7 . b3 &
(IExec b2,b7) . (DataLoc (b1 . b3),b4) = b7 . (DataLoc (b1 . b3),b4) &
b2 is_closed_on b7 &
b2 is_halting_on b7 & ( for
b8 being
Int_position st
b8 in b6 holds
(IExec b2,b7) . b8 = b7 . b8 ) ) ) holds
(
for-down b3,
b4,
b5,
b2 is_closed_on b1 &
for-down b3,
b4,
b5,
b2 is_halting_on b1 )
theorem Th68: :: SCMPDS_7:68
for
b1 being
State of
SCMPDS for
b2 being
shiftable No-StopCode Program-block for
b3 being
Int_position for
b4 being
Integer for
b5 being
Nat for
b6 being
set st
b1 . (DataLoc (b1 . b3),b4) > 0 & not
DataLoc (b1 . b3),
b4 in b6 &
b5 > 0 &
card b2 > 0 &
b3 <> DataLoc (b1 . b3),
b4 & ( for
b7 being
State of
SCMPDS st ( for
b8 being
Int_position st
b8 in b6 holds
b7 . b8 = b1 . b8 ) &
b7 . b3 = b1 . b3 holds
(
(IExec b2,b7) . b3 = b7 . b3 &
(IExec b2,b7) . (DataLoc (b1 . b3),b4) = b7 . (DataLoc (b1 . b3),b4) &
b2 is_closed_on b7 &
b2 is_halting_on b7 & ( for
b8 being
Int_position st
b8 in b6 holds
(IExec b2,b7) . b8 = b7 . b8 ) ) ) holds
IExec (for-down b3,b4,b5,b2),
b1 = IExec (for-down b3,b4,b5,b2),
(IExec (b2 ';' (AddTo b3,b4,(- b5))),b1)
definition
let c3 be
Nat;
func sum c1 -> Program-block equals :: SCMPDS_7:def 3
(((GBP := 0) ';' (GBP ,2 := a1)) ';' (GBP ,3 := 0)) ';' (for-down GBP ,2,1,(Load (AddTo GBP ,3,1)));
coherence
(((GBP := 0) ';' (GBP ,2 := c3)) ';' (GBP ,3 := 0)) ';' (for-down GBP ,2,1,(Load (AddTo GBP ,3,1))) is Program-block
;
end;
:: deftheorem Def3 defines sum SCMPDS_7:def 3 :
theorem Th69: :: SCMPDS_7:69
for
b1 being
State of
SCMPDS st
b1 . GBP = 0 holds
(
for-down GBP ,2,1,
(Load (AddTo GBP ,3,1)) is_closed_on b1 &
for-down GBP ,2,1,
(Load (AddTo GBP ,3,1)) is_halting_on b1 )
theorem Th70: :: SCMPDS_7:70
theorem Th71: :: SCMPDS_7:71
definition
let c3,
c4,
c5,
c6,
c7 be
Nat;
func sum c1,
c2,
c3,
c4,
c5 -> Program-block equals :: SCMPDS_7:def 4
(((intpos a1),a3 := 0) ';' ((intpos a4) := a5)) ';' (for-down (intpos a1),a2,1,((AddTo (intpos a1),a3,(intpos a5),0) ';' (AddTo (intpos a4),0,1)));
coherence
(((intpos c3),c5 := 0) ';' ((intpos c6) := c7)) ';' (for-down (intpos c3),c4,1,((AddTo (intpos c3),c5,(intpos c7),0) ';' (AddTo (intpos c6),0,1))) is Program-block
;
end;
:: deftheorem Def4 defines sum SCMPDS_7:def 4 :
for
b1,
b2,
b3,
b4,
b5 being
Nat holds
sum b1,
b2,
b3,
b4,
b5 = (((intpos b1),b3 := 0) ';' ((intpos b4) := b5)) ';' (for-down (intpos b1),b2,1,((AddTo (intpos b1),b3,(intpos b5),0) ';' (AddTo (intpos b4),0,1)));
theorem Th72: :: SCMPDS_7:72
for
b1 being
State of
SCMPDS for
b2,
b3,
b4,
b5,
b6 being
Nat st
b1 . (intpos b2) > b2 &
b3 < b4 &
b1 . (intpos b5) = b6 &
(b1 . (intpos b2)) + b4 < b5 &
b5 < b6 &
b6 < b1 . (intpos b6) holds
(
for-down (intpos b2),
b3,1,
((AddTo (intpos b2),b4,(intpos b6),0) ';' (AddTo (intpos b5),0,1)) is_closed_on b1 &
for-down (intpos b2),
b3,1,
((AddTo (intpos b2),b4,(intpos b6),0) ';' (AddTo (intpos b5),0,1)) is_halting_on b1 )
theorem Th73: :: SCMPDS_7:73
for
b1 being
State of
SCMPDS for
b2,
b3,
b4,
b5,
b6 being
Nat for
b7 being
FinSequence of
NAT st
b1 . (intpos b2) > b2 &
b3 < b4 &
b1 . (intpos b5) = b6 &
(b1 . (intpos b2)) + b4 < b5 &
b5 < b6 &
b6 < b1 . (intpos b6) &
b1 . (DataLoc (b1 . (intpos b2)),b4) = 0 &
len b7 = b1 . (DataLoc (b1 . (intpos b2)),b3) & ( for
b8 being
Nat st
b8 < len b7 holds
b7 . (b8 + 1) = b1 . (DataLoc (b1 . (intpos b6)),b8) ) holds
(IExec (for-down (intpos b2),b3,1,((AddTo (intpos b2),b4,(intpos b6),0) ';' (AddTo (intpos b5),0,1))),b1) . (DataLoc (b1 . (intpos b2)),b4) = Sum b7
theorem Th74: :: SCMPDS_7:74
for
b1 being
State of
SCMPDS for
b2,
b3,
b4,
b5,
b6 being
Nat for
b7 being
FinSequence of
NAT st
b1 . (intpos b2) > b2 &
b3 < b4 &
(b1 . (intpos b2)) + b4 < b5 &
b5 < b6 &
b6 < b1 . (intpos b6) &
len b7 = b1 . (DataLoc (b1 . (intpos b2)),b3) & ( for
b8 being
Nat st
b8 < len b7 holds
b7 . (b8 + 1) = b1 . (DataLoc (b1 . (intpos b6)),b8) ) holds
(IExec (sum b2,b3,b4,b5,b6),b1) . (DataLoc (b1 . (intpos b2)),b4) = Sum b7