let I be Program of SCM+FSA ; :: thesis: ( I is parahalting implies I is paraclosed )
set IAt = I +* (Start-At (insloc 0 ));
dom I misses dom (Start-At (insloc 0 ))
by SF_MASTR:64;
then A1:
I c= I +* (Start-At (insloc 0 ))
by FUNCT_4:33;
assume
I is parahalting
; :: thesis: I is paraclosed
then A2:
I +* (Start-At (insloc 0 )) is halting
by Def3;
let s be State of SCM+FSA ; :: according to SCMFSA6B:def 2 :: thesis: for n being Element of NAT st I +* (Start-At (insloc 0 )) c= s holds
IC (Computation s,n) in dom I
let n be Element of NAT ; :: thesis: ( I +* (Start-At (insloc 0 )) c= s implies IC (Computation s,n) in dom I )
defpred S1[ Nat] means not IC (Computation s,c1) in dom I;
assume A3:
I +* (Start-At (insloc 0 )) c= s
; :: thesis: IC (Computation s,n) in dom I
then A4:
I c= s
by A1, XBOOLE_1:1;
assume
not IC (Computation s,n) in dom I
; :: thesis: contradiction
then A5:
ex n being Nat st S1[n]
;
consider n being Nat such that
A6:
S1[n]
and
A7:
for m being Nat st S1[m] holds
n <= m
from NAT_1:sch 5(A5);
reconsider n = n as Element of NAT by ORDINAL1:def 13;
A8:
for m being Element of NAT st m < n holds
IC (Computation s,m) in dom I
by A7;
set s2 = Computation s,n;
set s0 = s +* (IC (Computation s,n)),(goto (IC (Computation s,n)));
set s1 = (Computation s,n) +* (IC (Computation s,n)),(goto (IC (Computation s,n)));
A9:
s | NAT = (Computation s,n) | NAT
by AMI_1:123;
A10: (Computation (s +* (IC (Computation s,n)),(goto (IC (Computation s,n)))),n) | NAT =
(s +* (IC (Computation s,n)),(goto (IC (Computation s,n)))) | NAT
by AMI_1:123
.=
((Computation s,n) +* (IC (Computation s,n)),(goto (IC (Computation s,n)))) | NAT
by A9, FUNCT_7:95
;
A11:
IC (Computation s,n) in NAT
by AMI_1:def 4;
then A12:
s +* (IC (Computation s,n)),(goto (IC (Computation s,n))),s equal_outside NAT
by FUNCT_7:28, FUNCT_7:93;
A13:
Computation s,n,(Computation s,n) +* (IC (Computation s,n)),(goto (IC (Computation s,n))) equal_outside NAT
by A11, FUNCT_7:93;
(I +* (Start-At (insloc 0 ))) | NAT = I
by Th6;
then
dom I = (dom (I +* (Start-At (insloc 0 )))) /\ NAT
by RELAT_1:90;
then
not IC (Computation s,n) in dom (I +* (Start-At (insloc 0 )))
by A6, A11, XBOOLE_0:def 4;
then A14:
I +* (Start-At (insloc 0 )) c= s +* (IC (Computation s,n)),(goto (IC (Computation s,n)))
by A3, FUNCT_7:91;
then
I c= s +* (IC (Computation s,n)),(goto (IC (Computation s,n)))
by A1, XBOOLE_1:1;
then
Computation (s +* (IC (Computation s,n)),(goto (IC (Computation s,n)))),n, Computation s,n equal_outside NAT
by A12, A4, A8, Th21;
then A15:
Computation (s +* (IC (Computation s,n)),(goto (IC (Computation s,n)))),n = (Computation s,n) +* (IC (Computation s,n)),(goto (IC (Computation s,n)))
by A13, A10, FUNCT_7:29, FUNCT_7:92;
A16:
not (Computation s,n) +* (IC (Computation s,n)),(goto (IC (Computation s,n))) is halting
by Th20;
s +* (IC (Computation s,n)),(goto (IC (Computation s,n))) is halting
by A2, A14, AMI_1:def 26;
hence
contradiction
by A15, A16, AMI_1:93; :: thesis: verum