:: SFMASTR1  semantic presentation
:: deftheorem Def1   defines good SFMASTR1:def 1 : 
theorem Th1: :: SFMASTR1:1
set c1 = Int-Locations  \/ FinSeq-Locations ;
theorem Th2: :: SFMASTR1:2
theorem Th3: :: SFMASTR1:3
theorem Th4: :: SFMASTR1:4
theorem Th5: :: SFMASTR1:5
Lemma7: 
for b1 being good Macro-Instruction
 for b2 being  Macro-Instruction
 for b3 being  State of SCM+FSA   st b3 . (intloc 0) = 1 & b1 is_halting_on b3 & b2 is_halting_on  IExec b1,b3 & b1 is_closed_on b3 & b2 is_closed_on  IExec b1,b3 &  Initialized (b1 ';' b2) c= b3 holds 
(  IC ((Computation b3) . ((LifeSpan (b3 +* b1)) + 1)) =  insloc (card b1) & ((Computation b3) . ((LifeSpan (b3 +* b1)) + 1)) | (Int-Locations  \/ FinSeq-Locations ) = (((Computation (b3 +* b1)) . (LifeSpan (b3 +* b1))) +* (Initialized b2)) | (Int-Locations  \/ FinSeq-Locations ) &  ProgramPart (Relocated b2,(card b1)) c= (Computation b3) . ((LifeSpan (b3 +* b1)) + 1) & ((Computation b3) . ((LifeSpan (b3 +* b1)) + 1)) . (intloc 0) = 1 & b3 is halting &  LifeSpan b3 = ((LifeSpan (b3 +* b1)) + 1) + (LifeSpan ((Result (b3 +* b1)) +* (Initialized b2))) & ( b2 is good implies (Result b3) . (intloc 0) = 1 ) )
 
theorem Th6: :: SFMASTR1:6
theorem Th7: :: SFMASTR1:7
theorem Th8: :: SFMASTR1:8
theorem Th9: :: SFMASTR1:9
theorem Th10: :: SFMASTR1:10
theorem Th11: :: SFMASTR1:11
theorem Th12: :: SFMASTR1:12
theorem Th13: :: SFMASTR1:13
theorem Th14: :: SFMASTR1:14
theorem Th15: :: SFMASTR1:15
theorem Th16: :: SFMASTR1:16
theorem Th17: :: SFMASTR1:17
definition
let c2 be    
Int-Location ;
redefine func { as 
{c1} ->   Subset of 
Int-Locations ;
coherence 
{c2} is   Subset of Int-Locations 
 
let c3 be    
Int-Location ;
redefine func { as 
{c1,c2} ->   Subset of 
Int-Locations ;
coherence 
{c2,c3} is   Subset of Int-Locations 
 
let c4 be    
Int-Location ;
redefine func { as 
{c1,c2,c3} ->   Subset of 
Int-Locations ;
coherence 
{c2,c3,c4} is   Subset of Int-Locations 
 
let c5 be    
Int-Location ;
redefine func { as 
{c1,c2,c3,c4} ->   Subset of 
Int-Locations ;
coherence 
{c2,c3,c4,c5} is   Subset of Int-Locations 
 
 
end;
 
Lemma18: 
for b1 being   set   st not b1 is finite holds 
 not b1 is empty
 
:: deftheorem Def2   defines RWNotIn-seq SFMASTR1:def 2 : 
theorem Th18: :: SFMASTR1:18
theorem Th19: :: SFMASTR1:19
theorem Th20: :: SFMASTR1:20
:: deftheorem Def3   defines -thRWNotIn SFMASTR1:def 3 : 
theorem Th21: :: SFMASTR1:21
theorem Th22: :: SFMASTR1:22
:: deftheorem Def4   defines -thNotUsed SFMASTR1:def 4 : 
theorem Th23: :: SFMASTR1:23
definition
let c2, 
c3 be    
Int-Location ;
set c4 = 1 
-stRWNotIn {c2,c3};
set c5 = 1 
-stRWNotIn (UsedIntLoc (swap c3,(1 -stRWNotIn {c2,c3})));
set c6 = 2 
-ndRWNotIn (UsedIntLoc (swap c3,(1 -stRWNotIn {c2,c3})));
func  Fib_macro c1,
c2 ->   Macro-Instruction equals :: SFMASTR1:def 5
((((((2 -ndRWNotIn (UsedIntLoc (swap a2,(1 -stRWNotIn {a1,a2})))) := a1) ';' (SubFrom a2,a2)) ';' ((1 -stRWNotIn {a1,a2}) := (intloc 0))) ';' ((1 -stRWNotIn (UsedIntLoc (swap a2,(1 -stRWNotIn {a1,a2})))) := (2 -ndRWNotIn (UsedIntLoc (swap a2,(1 -stRWNotIn {a1,a2})))))) ';' (Times (1 -stRWNotIn (UsedIntLoc (swap a2,(1 -stRWNotIn {a1,a2})))),((AddTo a2,(1 -stRWNotIn {a1,a2})) ';' (swap a2,(1 -stRWNotIn {a1,a2}))))) ';' (a1 := (2 -ndRWNotIn (UsedIntLoc (swap a2,(1 -stRWNotIn {a1,a2})))));
correctness 
coherence 
((((((2 -ndRWNotIn (UsedIntLoc (swap c3,(1 -stRWNotIn {c2,c3})))) := c2) ';' (SubFrom c3,c3)) ';' ((1 -stRWNotIn {c2,c3}) := (intloc 0))) ';' ((1 -stRWNotIn (UsedIntLoc (swap c3,(1 -stRWNotIn {c2,c3})))) := (2 -ndRWNotIn (UsedIntLoc (swap c3,(1 -stRWNotIn {c2,c3})))))) ';' (Times (1 -stRWNotIn (UsedIntLoc (swap c3,(1 -stRWNotIn {c2,c3})))),((AddTo c3,(1 -stRWNotIn {c2,c3})) ';' (swap c3,(1 -stRWNotIn {c2,c3}))))) ';' (c2 := (2 -ndRWNotIn (UsedIntLoc (swap c3,(1 -stRWNotIn {c2,c3}))))) is   Macro-Instruction;
;
 
end;
 
:: deftheorem Def5   defines Fib_macro SFMASTR1:def 5 : 
for 
b1, 
b2 being   
Int-Location  holds   
Fib_macro b1,
b2 = ((((((2 -ndRWNotIn (UsedIntLoc (swap b2,(1 -stRWNotIn {b1,b2})))) := b1) ';' (SubFrom b2,b2)) ';' ((1 -stRWNotIn {b1,b2}) := (intloc 0))) ';' ((1 -stRWNotIn (UsedIntLoc (swap b2,(1 -stRWNotIn {b1,b2})))) := (2 -ndRWNotIn (UsedIntLoc (swap b2,(1 -stRWNotIn {b1,b2})))))) ';' (Times (1 -stRWNotIn (UsedIntLoc (swap b2,(1 -stRWNotIn {b1,b2})))),((AddTo b2,(1 -stRWNotIn {b1,b2})) ';' (swap b2,(1 -stRWNotIn {b1,b2}))))) ';' (b1 := (2 -ndRWNotIn (UsedIntLoc (swap b2,(1 -stRWNotIn {b1,b2})))));
theorem Th24: :: SFMASTR1:24