:: by Andrzej Trybulec , Yatsuka Nakamura and Noriko Asamoto

::

:: Received June 20, 1996

:: Copyright (c) 1996-2012 Association of Mizar Users

begin

definition

let P be NAT -defined the InstructionsF of SCM+FSA -valued finite Function;

let l be Element of NAT ;

P +~ ((halt SCM+FSA),(goto l)) is preProgram of SCM+FSA ;

end;
let l be Element of NAT ;

func Directed (P,l) -> preProgram of SCM+FSA equals :: SCMFSA6A:def 1

P +~ ((halt SCM+FSA),(goto l));

coherence P +~ ((halt SCM+FSA),(goto l));

P +~ ((halt SCM+FSA),(goto l)) is preProgram of SCM+FSA ;

:: deftheorem defines Directed SCMFSA6A:def 1 :

for P being NAT -defined the InstructionsF of SCM+FSA -valued finite Function

for l being Element of NAT holds Directed (P,l) = P +~ ((halt SCM+FSA),(goto l));

for P being NAT -defined the InstructionsF of SCM+FSA -valued finite Function

for l being Element of NAT holds Directed (P,l) = P +~ ((halt SCM+FSA),(goto l));

definition

let P be NAT -defined the InstructionsF of SCM+FSA -valued finite Function;

coherence

Directed (P,(card P)) is preProgram of SCM+FSA ;

end;
coherence

Directed (P,(card P)) is preProgram of SCM+FSA ;

:: deftheorem defines Directed SCMFSA6A:def 2 :

for P being NAT -defined the InstructionsF of SCM+FSA -valued finite Function holds Directed P = Directed (P,(card P));

for P being NAT -defined the InstructionsF of SCM+FSA -valued finite Function holds Directed P = Directed (P,(card P));

registration
end;

theorem :: SCMFSA6A:1

theorem :: SCMFSA6A:2

for m being Element of NAT

for I being Program of holds Reloc ((Directed I),m) = ((id the InstructionsF of SCM+FSA) +* ((halt SCM+FSA) .--> (goto (m + (card I))))) * (Reloc (I,m))

for I being Program of holds Reloc ((Directed I),m) = ((id the InstructionsF of SCM+FSA) +* ((halt SCM+FSA) .--> (goto (m + (card I))))) * (Reloc (I,m))

proof end;

set q = (intloc 0) .--> 1;

set f = the_Values_of SCM+FSA;

theorem Th23: :: SCMFSA6A:3

for i being Instruction of SCM+FSA

for s being State of SCM+FSA holds

( InsCode i in {0,6,7,8} or (Exec (i,s)) . (IC ) = succ (IC s) )

for s being State of SCM+FSA holds

( InsCode i in {0,6,7,8} or (Exec (i,s)) . (IC ) = succ (IC s) )

proof end;

theorem :: SCMFSA6A:8

for s1, s2 being State of SCM+FSA

for n being Element of NAT

for i being Instruction of SCM+FSA st (IC s1) + n = IC s2 & DataPart s1 = DataPart s2 holds

( (IC (Exec (i,s1))) + n = IC (Exec ((IncAddr (i,n)),s2)) & DataPart (Exec (i,s1)) = DataPart (Exec ((IncAddr (i,n)),s2)) )

for n being Element of NAT

for i being Instruction of SCM+FSA st (IC s1) + n = IC s2 & DataPart s1 = DataPart s2 holds

( (IC (Exec (i,s1))) + n = IC (Exec ((IncAddr (i,n)),s2)) & DataPart (Exec (i,s1)) = DataPart (Exec ((IncAddr (i,n)),s2)) )

proof end;

begin

definition

canceled;

let I, J be Program of ;

(Directed (CutLastLoc (stop I))) +* (Reloc (J,(card I))) is Program of

;

end;
let I, J be Program of ;

func I ";" J -> Program of equals :: SCMFSA6A:def 4

(Directed (CutLastLoc (stop I))) +* (Reloc (J,(card I)));

coherence (Directed (CutLastLoc (stop I))) +* (Reloc (J,(card I)));

(Directed (CutLastLoc (stop I))) +* (Reloc (J,(card I))) is Program of

proof end;

correctness ;

:: deftheorem defines ";" SCMFSA6A:def 4 :

for I, J being Program of holds I ";" J = (Directed (CutLastLoc (stop I))) +* (Reloc (J,(card I)));

for I, J being Program of holds I ";" J = (Directed (CutLastLoc (stop I))) +* (Reloc (J,(card I)));

registration
end;

theorem :: SCMFSA6A:15

for I, J being Program of

for l being Element of NAT st l in dom I & I . l <> halt SCM+FSA holds

(I ";" J) . l = I . l

for l being Element of NAT st l in dom I & I . l <> halt SCM+FSA holds

(I ";" J) . l = I . l

proof end;

begin

definition

let i be Instruction of SCM+FSA;

let J be Program of ;

correctness

coherence

(Macro i) ";" J is Program of ;

;

end;
let J be Program of ;

correctness

coherence

(Macro i) ";" J is Program of ;

;

:: deftheorem defines ";" SCMFSA6A:def 5 :

for i being Instruction of SCM+FSA

for J being Program of holds i ";" J = (Macro i) ";" J;

for i being Instruction of SCM+FSA

for J being Program of holds i ";" J = (Macro i) ";" J;

definition

let I be Program of ;

let j be Instruction of SCM+FSA;

correctness

coherence

I ";" (Macro j) is Program of ;

;

end;
let j be Instruction of SCM+FSA;

correctness

coherence

I ";" (Macro j) is Program of ;

;

:: deftheorem defines ";" SCMFSA6A:def 6 :

for I being Program of

for j being Instruction of SCM+FSA holds I ";" j = I ";" (Macro j);

for I being Program of

for j being Instruction of SCM+FSA holds I ";" j = I ";" (Macro j);

definition
end;

:: deftheorem defines ";" SCMFSA6A:def 7 :

for i, j being Instruction of SCM+FSA holds i ";" j = (Macro i) ";" (Macro j);

for i, j being Instruction of SCM+FSA holds i ";" j = (Macro i) ";" (Macro j);

registration

let P be preProgram of SCM+FSA;

let l be Element of NAT ;

correctness

coherence

Directed (P,l) is halt-free ;

end;
let l be Element of NAT ;

correctness

coherence

Directed (P,l) is halt-free ;

proof end;

theorem Th63: :: SCMFSA6A:22

for I being preProgram of SCM+FSA

for l being Element of NAT st I is halt-free holds

Directed (I,l) = I

for l being Element of NAT st I is halt-free holds

Directed (I,l) = I

proof end;

theorem Th65: :: SCMFSA6A:23

for I being preProgram of SCM+FSA

for k being Element of NAT holds Reloc ((Directed I),k) = Directed ((Reloc (I,k)),((card I) + k))

for k being Element of NAT holds Reloc ((Directed I),k) = Directed ((Reloc (I,k)),((card I) + k))

proof end;

theorem :: SCMFSA6A:26

theorem :: SCMFSA6A:27

theorem :: SCMFSA6A:28

theorem :: SCMFSA6A:29

theorem :: SCMFSA6A:30

theorem :: SCMFSA6A:31

theorem :: SCMFSA6A:32