:: SFMASTR2 semantic presentation
set c1 = Int-Locations \/ FinSeq-Locations ;
set c2 = Start-At (insloc 0);
set c3 = the Instruction-Locations of SCM+FSA ;
theorem Th1: :: SFMASTR2:1
theorem Th2: :: SFMASTR2:2
theorem Th3: :: SFMASTR2:3
theorem Th4: :: SFMASTR2:4
theorem Th5: :: SFMASTR2:5
theorem Th6: :: SFMASTR2:6
theorem Th7: :: SFMASTR2:7
:: deftheorem Def1 defines times SFMASTR2:def 1 :
theorem Th8: :: SFMASTR2:8
theorem Th9: :: SFMASTR2:9
definition
let c4 be
State of
SCM+FSA ;
let c5 be
Macro-Instruction;
let c6 be
Int-Location ;
set c7 = 1
-stRWNotIn ({c6} \/ (UsedIntLoc c5));
func StepTimes c3,
c2,
c1 -> Function of
NAT ,
product the
Object-Kind of
SCM+FSA equals :: SFMASTR2:def 2
StepWhile>0 (1 -stRWNotIn ({a3} \/ (UsedIntLoc a2))),
(a2 ';' (SubFrom (1 -stRWNotIn ({a3} \/ (UsedIntLoc a2))),(intloc 0))),
(Exec ((1 -stRWNotIn ({a3} \/ (UsedIntLoc a2))) := a3),(Initialize a1));
correctness
coherence
StepWhile>0 (1 -stRWNotIn ({c6} \/ (UsedIntLoc c5))),(c5 ';' (SubFrom (1 -stRWNotIn ({c6} \/ (UsedIntLoc c5))),(intloc 0))),(Exec ((1 -stRWNotIn ({c6} \/ (UsedIntLoc c5))) := c6),(Initialize c4)) is Function of NAT , product the Object-Kind of SCM+FSA ;
;
end;
:: deftheorem Def2 defines StepTimes SFMASTR2:def 2 :
theorem Th10: :: SFMASTR2:10
theorem Th11: :: SFMASTR2:11
theorem Th12: :: SFMASTR2:12
for
b1 being
State of
SCM+FSA for
b2 being
Int-Location for
b3 being
good Macro-Instruction for
b4 being
Nat st
((StepTimes b2,b3,b1) . b4) . (intloc 0) = 1 &
b3 is_closed_on (StepTimes b2,b3,b1) . b4 &
b3 is_halting_on (StepTimes b2,b3,b1) . b4 holds
(
((StepTimes b2,b3,b1) . (b4 + 1)) . (intloc 0) = 1 & (
((StepTimes b2,b3,b1) . b4) . (1 -stRWNotIn ({b2} \/ (UsedIntLoc b3))) > 0 implies
((StepTimes b2,b3,b1) . (b4 + 1)) . (1 -stRWNotIn ({b2} \/ (UsedIntLoc b3))) = (((StepTimes b2,b3,b1) . b4) . (1 -stRWNotIn ({b2} \/ (UsedIntLoc b3)))) - 1 ) )
theorem Th13: :: SFMASTR2:13
theorem Th14: :: SFMASTR2:14
:: deftheorem Def3 defines ProperTimesBody SFMASTR2:def 3 :
theorem Th15: :: SFMASTR2:15
theorem Th16: :: SFMASTR2:16
theorem Th17: :: SFMASTR2:17
theorem Th18: :: SFMASTR2:18
theorem Th19: :: SFMASTR2:19
theorem Th20: :: SFMASTR2:20
for
b1 being
State of
SCM+FSA for
b2 being
Int-Location for
b3 being
good Macro-Instruction for
b4 being
Nat st
((StepTimes b2,b3,b1) . b4) . (intloc 0) = 1 &
b3 is_halting_on Initialize ((StepTimes b2,b3,b1) . b4) &
b3 is_closed_on Initialize ((StepTimes b2,b3,b1) . b4) &
((StepTimes b2,b3,b1) . b4) . (1 -stRWNotIn ({b2} \/ (UsedIntLoc b3))) > 0 holds
((StepTimes b2,b3,b1) . (b4 + 1)) | ((UsedIntLoc b3) \/ FinSeq-Locations ) = (IExec b3,((StepTimes b2,b3,b1) . b4)) | ((UsedIntLoc b3) \/ FinSeq-Locations )
theorem Th21: :: SFMASTR2:21
theorem Th22: :: SFMASTR2:22
theorem Th23: :: SFMASTR2:23
theorem Th24: :: SFMASTR2:24
:: deftheorem Def4 defines triv-times SFMASTR2:def 4 :
theorem Th25: :: SFMASTR2:25
theorem Th26: :: SFMASTR2:26
definition
let c4,
c5 be
Int-Location ;
set c6 = 1
-stRWNotIn {c4,c5};
set c7 = 1
-stNotUsed (times c4,((AddTo c5,(1 -stRWNotIn {c4,c5})) ';' (swap c5,(1 -stRWNotIn {c4,c5}))));
func Fib-macro c1,
c2 -> Macro-Instruction equals :: SFMASTR2:def 5
(((((1 -stNotUsed (times a1,((AddTo a2,(1 -stRWNotIn {a1,a2})) ';' (swap a2,(1 -stRWNotIn {a1,a2}))))) := a1) ';' (SubFrom a2,a2)) ';' ((1 -stRWNotIn {a1,a2}) := (intloc 0))) ';' (times a1,((AddTo a2,(1 -stRWNotIn {a1,a2})) ';' (swap a2,(1 -stRWNotIn {a1,a2}))))) ';' (a1 := (1 -stNotUsed (times a1,((AddTo a2,(1 -stRWNotIn {a1,a2})) ';' (swap a2,(1 -stRWNotIn {a1,a2}))))));
correctness
coherence
(((((1 -stNotUsed (times c4,((AddTo c5,(1 -stRWNotIn {c4,c5})) ';' (swap c5,(1 -stRWNotIn {c4,c5}))))) := c4) ';' (SubFrom c5,c5)) ';' ((1 -stRWNotIn {c4,c5}) := (intloc 0))) ';' (times c4,((AddTo c5,(1 -stRWNotIn {c4,c5})) ';' (swap c5,(1 -stRWNotIn {c4,c5}))))) ';' (c4 := (1 -stNotUsed (times c4,((AddTo c5,(1 -stRWNotIn {c4,c5})) ';' (swap c5,(1 -stRWNotIn {c4,c5})))))) is Macro-Instruction;
;
end;
:: deftheorem Def5 defines Fib-macro SFMASTR2:def 5 :
for
b1,
b2 being
Int-Location holds
Fib-macro b1,
b2 = (((((1 -stNotUsed (times b1,((AddTo b2,(1 -stRWNotIn {b1,b2})) ';' (swap b2,(1 -stRWNotIn {b1,b2}))))) := b1) ';' (SubFrom b2,b2)) ';' ((1 -stRWNotIn {b1,b2}) := (intloc 0))) ';' (times b1,((AddTo b2,(1 -stRWNotIn {b1,b2})) ';' (swap b2,(1 -stRWNotIn {b1,b2}))))) ';' (b1 := (1 -stNotUsed (times b1,((AddTo b2,(1 -stRWNotIn {b1,b2})) ';' (swap b2,(1 -stRWNotIn {b1,b2}))))));
theorem Th27: :: SFMASTR2:27