begin
:: deftheorem Def1 defines State-consisting SCM_1:def 1 :
for D being FinSequence of INT
for ds being Element of NAT
for b3 being State of SCM holds
( b3 is State-consisting of ds,D iff for k being Element of NAT st k < len D holds
b3 . (dl. (ds + k)) = D . (k + 1) );
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
theorem Th14:
theorem Th15:
Lm3:
for F being NAT -defined the Instructions of SCM -valued total Function
for k being Element of NAT
for s being State of SCM holds Comput (F,s,(k + 1)) = Exec ((CurInstr (F,(Comput (F,s,k)))),(Comput (F,s,k)))
Lm4:
now
let F be
NAT -defined the
Instructions of
SCM -valued total Function;
for k, n being Element of NAT
for s being State of SCM
for a, b being Data-Location st IC (Comput (F,s,k)) = n & ( F . n = a := b or F . n = AddTo (a,b) or F . n = SubFrom (a,b) or F . n = MultBy (a,b) or ( a <> b & F . n = Divide (a,b) ) ) holds
( Comput (F,s,(k + 1)) = Exec ((F . n),(Comput (F,s,k))) & IC (Comput (F,s,(k + 1))) = n + 1 )let k,
n be
Element of
NAT ;
for s being State of SCM
for a, b being Data-Location st IC (Comput (F,s,k)) = n & ( F . n = a := b or F . n = AddTo (a,b) or F . n = SubFrom (a,b) or F . n = MultBy (a,b) or ( a <> b & F . n = Divide (a,b) ) ) holds
( Comput (F,s,(k + 1)) = Exec ((F . n),(Comput (F,s,k))) & IC (Comput (F,s,(k + 1))) = n + 1 )let s be
State of
SCM;
for a, b being Data-Location st IC (Comput (F,s,k)) = n & ( F . n = a := b or F . n = AddTo (a,b) or F . n = SubFrom (a,b) or F . n = MultBy (a,b) or ( a <> b & F . n = Divide (a,b) ) ) holds
( Comput (F,s,(k + 1)) = Exec ((F . n),(Comput (F,s,k))) & IC (Comput (F,s,(k + 1))) = n + 1 )let a,
b be
Data-Location ;
( IC (Comput (F,s,k)) = n & ( F . n = a := b or F . n = AddTo (a,b) or F . n = SubFrom (a,b) or F . n = MultBy (a,b) or ( a <> b & F . n = Divide (a,b) ) ) implies ( Comput (F,s,(k + 1)) = Exec ((F . n),(Comput (F,s,k))) & IC (Comput (F,s,(k + 1))) = n + 1 ) )assume A1:
IC (Comput (F,s,k)) = n
;
( ( F . n = a := b or F . n = AddTo (a,b) or F . n = SubFrom (a,b) or F . n = MultBy (a,b) or ( a <> b & F . n = Divide (a,b) ) ) implies ( Comput (F,s,(k + 1)) = Exec ((F . n),(Comput (F,s,k))) & IC (Comput (F,s,(k + 1))) = n + 1 ) )set csk1 =
Comput (
F,
s,
(k + 1));
set csk =
Comput (
F,
s,
k);
assume A2:
(
F . n = a := b or
F . n = AddTo (
a,
b) or
F . n = SubFrom (
a,
b) or
F . n = MultBy (
a,
b) or (
a <> b &
F . n = Divide (
a,
b) ) )
;
( Comput (F,s,(k + 1)) = Exec ((F . n),(Comput (F,s,k))) & IC (Comput (F,s,(k + 1))) = n + 1 )A3:
dom F = NAT
by PARTFUN1:def 4;
thus Comput (
F,
s,
(k + 1)) =
Exec (
(CurInstr (F,(Comput (F,s,k)))),
(Comput (F,s,k)))
by Lm3
.=
Exec (
(F . n),
(Comput (F,s,k)))
by A1, A3, PARTFUN1:def 8
;
IC (Comput (F,s,(k + 1))) = n + 1hence IC (Comput (F,s,(k + 1))) =
succ (IC (Comput (F,s,k)))
by A2, AMI_3:8, AMI_3:9, AMI_3:10, AMI_3:11, AMI_3:12
.=
n + 1
by A1
;
verum
end;
theorem
canceled;
theorem
canceled;
theorem Th18:
for
F being
NAT -defined the
Instructions of
SCM -valued total Function for
k,
n being
Element of
NAT for
s being
State of
SCM for
a,
b being
Data-Location st
IC (Comput (F,s,k)) = n &
F . n = a := b holds
(
IC (Comput (F,s,(k + 1))) = n + 1 &
(Comput (F,s,(k + 1))) . a = (Comput (F,s,k)) . b & ( for
d being
Data-Location st
d <> a holds
(Comput (F,s,(k + 1))) . d = (Comput (F,s,k)) . d ) )
theorem Th19:
for
F being
NAT -defined the
Instructions of
SCM -valued total Function for
k,
n being
Element of
NAT for
s being
State of
SCM for
a,
b being
Data-Location st
IC (Comput (F,s,k)) = n &
F . n = AddTo (
a,
b) holds
(
IC (Comput (F,s,(k + 1))) = n + 1 &
(Comput (F,s,(k + 1))) . a = ((Comput (F,s,k)) . a) + ((Comput (F,s,k)) . b) & ( for
d being
Data-Location st
d <> a holds
(Comput (F,s,(k + 1))) . d = (Comput (F,s,k)) . d ) )
theorem Th20:
for
F being
NAT -defined the
Instructions of
SCM -valued total Function for
k,
n being
Element of
NAT for
s being
State of
SCM for
a,
b being
Data-Location st
IC (Comput (F,s,k)) = n &
F . n = SubFrom (
a,
b) holds
(
IC (Comput (F,s,(k + 1))) = n + 1 &
(Comput (F,s,(k + 1))) . a = ((Comput (F,s,k)) . a) - ((Comput (F,s,k)) . b) & ( for
d being
Data-Location st
d <> a holds
(Comput (F,s,(k + 1))) . d = (Comput (F,s,k)) . d ) )
theorem Th21:
for
F being
NAT -defined the
Instructions of
SCM -valued total Function for
k,
n being
Element of
NAT for
s being
State of
SCM for
a,
b being
Data-Location st
IC (Comput (F,s,k)) = n &
F . n = MultBy (
a,
b) holds
(
IC (Comput (F,s,(k + 1))) = n + 1 &
(Comput (F,s,(k + 1))) . a = ((Comput (F,s,k)) . a) * ((Comput (F,s,k)) . b) & ( for
d being
Data-Location st
d <> a holds
(Comput (F,s,(k + 1))) . d = (Comput (F,s,k)) . d ) )
theorem Th22:
for
F being
NAT -defined the
Instructions of
SCM -valued total Function for
k,
n being
Element of
NAT for
s being
State of
SCM for
a,
b being
Data-Location st
IC (Comput (F,s,k)) = n &
F . n = Divide (
a,
b) &
a <> b holds
(
IC (Comput (F,s,(k + 1))) = n + 1 &
(Comput (F,s,(k + 1))) . a = ((Comput (F,s,k)) . a) div ((Comput (F,s,k)) . b) &
(Comput (F,s,(k + 1))) . b = ((Comput (F,s,k)) . a) mod ((Comput (F,s,k)) . b) & ( for
d being
Data-Location st
d <> a &
d <> b holds
(Comput (F,s,(k + 1))) . d = (Comput (F,s,k)) . d ) )
theorem Th23:
theorem Th24:
for
F being
NAT -defined the
Instructions of
SCM -valued total Function for
k,
n being
Element of
NAT for
s being
State of
SCM for
a being
Data-Location for
il being
Element of
NAT st
IC (Comput (F,s,k)) = n &
F . n = a =0_goto il holds
( (
(Comput (F,s,k)) . a = 0 implies
IC (Comput (F,s,(k + 1))) = il ) & (
(Comput (F,s,k)) . a <> 0 implies
IC (Comput (F,s,(k + 1))) = n + 1 ) & ( for
d being
Data-Location holds
(Comput (F,s,(k + 1))) . d = (Comput (F,s,k)) . d ) )
theorem Th25:
for
F being
NAT -defined the
Instructions of
SCM -valued total Function for
k,
n being
Element of
NAT for
s being
State of
SCM for
a being
Data-Location for
il being
Element of
NAT st
IC (Comput (F,s,k)) = n &
F . n = a >0_goto il holds
( (
(Comput (F,s,k)) . a > 0 implies
IC (Comput (F,s,(k + 1))) = il ) & (
(Comput (F,s,k)) . a <= 0 implies
IC (Comput (F,s,(k + 1))) = n + 1 ) & ( for
d being
Data-Location holds
(Comput (F,s,(k + 1))) . d = (Comput (F,s,k)) . d ) )
theorem Th26:
(
(halt SCM) `1_3 = 0 & ( for
a,
b being
Data-Location holds
(a := b) `1_3 = 1 ) & ( for
a,
b being
Data-Location holds
(AddTo (a,b)) `1_3 = 2 ) & ( for
a,
b being
Data-Location holds
(SubFrom (a,b)) `1_3 = 3 ) & ( for
a,
b being
Data-Location holds
(MultBy (a,b)) `1_3 = 4 ) & ( for
a,
b being
Data-Location holds
(Divide (a,b)) `1_3 = 5 ) & ( for
i being
Element of
NAT holds
(SCM-goto i) `1_3 = 6 ) & ( for
a being
Data-Location for
i being
Element of
NAT holds
(a =0_goto i) `1_3 = 7 ) & ( for
a being
Data-Location for
i being
Element of
NAT holds
(a >0_goto i) `1_3 = 8 ) )
by AMI_3:71, RECDEF_2:def 1;
theorem
canceled;
theorem
canceled;
theorem
canceled;
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem
theorem