Lm1:
for p1, p2, p3, p4 being XFinSequence holds
( ((p1 ^ p2) ^ p3) ^ p4 = (p1 ^ p2) ^ (p3 ^ p4) & ((p1 ^ p2) ^ p3) ^ p4 = p1 ^ ((p2 ^ p3) ^ p4) & ((p1 ^ p2) ^ p3) ^ p4 = p1 ^ (p2 ^ (p3 ^ p4)) & ((p1 ^ p2) ^ p3) ^ p4 = (p1 ^ (p2 ^ p3)) ^ p4 )
Lm2:
for p1, p2, p3, p4, p5 being XFinSequence holds
( (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = ((p1 ^ p2) ^ p3) ^ (p4 ^ p5) & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = (p1 ^ p2) ^ ((p3 ^ p4) ^ p5) & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = (p1 ^ p2) ^ (p3 ^ (p4 ^ p5)) & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = p1 ^ (((p2 ^ p3) ^ p4) ^ p5) & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = p1 ^ ((p2 ^ p3) ^ (p4 ^ p5)) & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = p1 ^ (p2 ^ ((p3 ^ p4) ^ p5)) & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = p1 ^ (p2 ^ (p3 ^ (p4 ^ p5))) & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = ((p1 ^ p2) ^ (p3 ^ p4)) ^ p5 & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = (p1 ^ ((p2 ^ p3) ^ p4)) ^ p5 & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = (p1 ^ (p2 ^ (p3 ^ p4))) ^ p5 & (((p1 ^ p2) ^ p3) ^ p4) ^ p5 = p1 ^ ((p2 ^ (p3 ^ p4)) ^ p5) )
deffunc H1( Nat) -> Element of NAT = $1 -' 1;
definition
let f be
FinSeq-Location ;
let p be
FinSequence of
INT ;
existence
ex b1 being XFinSequence of the InstructionsF of SCM+FSA ex pp being XFinSequence of the InstructionsF of SCM+FSA ^omega st
( len pp = len p & ( for k being Nat st k < len pp holds
ex i being Integer st
( i = p . (k + 1) & pp . k = ((aSeq ((intloc 1),(k + 1))) ^ (aSeq ((intloc 2),i))) ^ <%((f,(intloc 1)) := (intloc 2))%> ) ) & b1 = FlattenSeq pp )
uniqueness
for b1, b2 being XFinSequence of the InstructionsF of SCM+FSA st ex pp being XFinSequence of the InstructionsF of SCM+FSA ^omega st
( len pp = len p & ( for k being Nat st k < len pp holds
ex i being Integer st
( i = p . (k + 1) & pp . k = ((aSeq ((intloc 1),(k + 1))) ^ (aSeq ((intloc 2),i))) ^ <%((f,(intloc 1)) := (intloc 2))%> ) ) & b1 = FlattenSeq pp ) & ex pp being XFinSequence of the InstructionsF of SCM+FSA ^omega st
( len pp = len p & ( for k being Nat st k < len pp holds
ex i being Integer st
( i = p . (k + 1) & pp . k = ((aSeq ((intloc 1),(k + 1))) ^ (aSeq ((intloc 2),i))) ^ <%((f,(intloc 1)) := (intloc 2))%> ) ) & b2 = FlattenSeq pp ) holds
b1 = b2
correctness
;
end;
theorem Th4:
for
P being the
InstructionsF of
SCM+FSA -valued ManySortedSet of
NAT for
c0 being
Nat for
s being
b2 -started State of
SCM+FSA st
s . (intloc 0) = 1 holds
for
a being
Int-Location for
k being
Integer st
a <> intloc 0 & ( for
c being
Nat st
c in dom (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ) holds
( ( for
i being
Nat st
i <= len (aSeq (a,k)) holds
(
IC (Comput (P,s,i)) = c0 + i & ( for
b being
Int-Location st
b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Comput (P,s,i)) . f = s . f ) ) ) &
(Comput (P,s,(len (aSeq (a,k))))) . a = k )
theorem Th5:
for
P being the
InstructionsF of
SCM+FSA -valued ManySortedSet of
NAT for
s being
0 -started State of
SCM+FSA st
s . (intloc 0) = 1 holds
for
a being
Int-Location for
k being
Integer st
aSeq (
a,
k)
c= P &
a <> intloc 0 holds
( ( for
i being
Nat st
i <= len (aSeq (a,k)) holds
(
IC (Comput (P,s,i)) = i & ( for
b being
Int-Location st
b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Comput (P,s,i)) . f = s . f ) ) ) &
(Comput (P,s,(len (aSeq (a,k))))) . a = k )