:: SCMPDS_6 semantic presentation begin set A = NAT ; set D = SCM-Data-Loc ; Lm1: (Stop SCMPDS) . 0 = halt SCMPDS by AFINSQ_1:34; Lm2: 0 in dom (Stop SCMPDS) by COMPOS_1:3; theorem :: SCMPDS_6:1 canceled; theorem :: SCMPDS_6:2 canceled; theorem :: SCMPDS_6:3 canceled; theorem :: SCMPDS_6:4 canceled; theorem :: SCMPDS_6:5 canceled; theorem Th6: :: SCMPDS_6:6 for i being Instruction of SCMPDS for I being Program of SCMPDS holds card (i ';' I) = (card I) + 1 proof let i be Instruction of SCMPDS; ::_thesis: for I being Program of SCMPDS holds card (i ';' I) = (card I) + 1 let I be Program of SCMPDS; ::_thesis: card (i ';' I) = (card I) + 1 thus card (i ';' I) = card ((Load i) ';' I) .= (card (Load i)) + (card I) by AFINSQ_1:17 .= (card I) + 1 by COMPOS_1:54 ; ::_thesis: verum end; theorem Th7: :: SCMPDS_6:7 for i being Instruction of SCMPDS for I being Program of SCMPDS holds (i ';' I) . 0 = i proof let i be Instruction of SCMPDS; ::_thesis: for I being Program of SCMPDS holds (i ';' I) . 0 = i let I be Program of SCMPDS; ::_thesis: (i ';' I) . 0 = i ( i ';' I = (Load i) ';' I & 0 in dom (Load i) ) by COMPOS_1:50; hence (i ';' I) . 0 = (Load i) . 0 by AFINSQ_1:def_3 .= i by COMPOS_1:52 ; ::_thesis: verum end; theorem :: SCMPDS_6:8 canceled; theorem :: SCMPDS_6:9 canceled; theorem :: SCMPDS_6:10 canceled; theorem Th11: :: SCMPDS_6:11 for i being Instruction of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for P being Instruction-Sequence of SCMPDS holds CurInstr ((P +* (stop (i ';' I))),(Initialize s)) = i proof let i be Instruction of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for P being Instruction-Sequence of SCMPDS holds CurInstr ((P +* (stop (i ';' I))),(Initialize s)) = i let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for P being Instruction-Sequence of SCMPDS holds CurInstr ((P +* (stop (i ';' I))),(Initialize s)) = i let I be Program of SCMPDS; ::_thesis: for P being Instruction-Sequence of SCMPDS holds CurInstr ((P +* (stop (i ';' I))),(Initialize s)) = i let P be Instruction-Sequence of SCMPDS; ::_thesis: CurInstr ((P +* (stop (i ';' I))),(Initialize s)) = i set iI = i ';' I; set P3 = P +* (stop (i ';' I)); A1: 0 in dom (Load i) by COMPOS_1:50; card (i ';' I) = (card I) + 1 by Th6; then A2: 0 in dom (i ';' I) by AFINSQ_1:66; i ';' I c= stop (i ';' I) by AFINSQ_1:74; then dom (i ';' I) c= dom (stop (i ';' I)) by RELAT_1:11; then A3: 0 in dom (stop (i ';' I)) by A2; A4: (P +* (stop (i ';' I))) /. (IC (Initialize s)) = (P +* (stop (i ';' I))) . (IC (Initialize s)) by PBOOLE:143; (P +* (stop (i ';' I))) . 0 = (P +* (stop (i ';' I))) . 0 .= (stop (i ';' I)) . 0 by A3, FUNCT_4:13 .= (i ';' I) . 0 by A2, COMPOS_1:63 .= ((Load i) ';' I) . 0 .= (Load i) . 0 by A1, AFINSQ_1:def_3 .= i by COMPOS_1:52 ; hence CurInstr ((P +* (stop (i ';' I))),(Initialize s)) = i by A4, MEMSTR_0:47; ::_thesis: verum end; theorem Th12: :: SCMPDS_6:12 for s being State of SCMPDS for m1, m2 being Element of NAT st IC s = m1 holds ICplusConst (s,m2) = m1 + m2 proof let s be State of SCMPDS; ::_thesis: for m1, m2 being Element of NAT st IC s = m1 holds ICplusConst (s,m2) = m1 + m2 let m1, m2 be Element of NAT ; ::_thesis: ( IC s = m1 implies ICplusConst (s,m2) = m1 + m2 ) ex m being Element of NAT st ( m = IC s & ICplusConst (s,m2) = abs (m + m2) ) by SCMPDS_2:def_18; hence ( IC s = m1 implies ICplusConst (s,m2) = m1 + m2 ) by ABSVALUE:def_1; ::_thesis: verum end; theorem Th13: :: SCMPDS_6:13 for I, J being Program of SCMPDS holds Shift ((stop J),(card I)) c= stop (I ';' J) proof let I, J be Program of SCMPDS; ::_thesis: Shift ((stop J),(card I)) c= stop (I ';' J) stop (I ';' J) = (I ';' J) ';' (Stop SCMPDS) .= I ';' (J ';' (Stop SCMPDS)) by AFINSQ_1:27 .= I ';' (stop J) ; then stop (I ';' J) = I +* (Shift ((stop J),(card I))) ; hence Shift ((stop J),(card I)) c= stop (I ';' J) by FUNCT_4:25; ::_thesis: verum end; theorem :: SCMPDS_6:14 canceled; theorem :: SCMPDS_6:15 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for i being No-StopCode parahalting Instruction of SCMPDS for J being parahalting shiftable Program of SCMPDS for a being Int_position holds (IExec ((i ';' J),P,s)) . a = (IExec (J,P,(Initialize (Exec (i,s))))) . a proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for i being No-StopCode parahalting Instruction of SCMPDS for J being parahalting shiftable Program of SCMPDS for a being Int_position holds (IExec ((i ';' J),P,s)) . a = (IExec (J,P,(Initialize (Exec (i,s))))) . a let s be 0 -started State of SCMPDS; ::_thesis: for i being No-StopCode parahalting Instruction of SCMPDS for J being parahalting shiftable Program of SCMPDS for a being Int_position holds (IExec ((i ';' J),P,s)) . a = (IExec (J,P,(Initialize (Exec (i,s))))) . a let i be No-StopCode parahalting Instruction of SCMPDS; ::_thesis: for J being parahalting shiftable Program of SCMPDS for a being Int_position holds (IExec ((i ';' J),P,s)) . a = (IExec (J,P,(Initialize (Exec (i,s))))) . a let J be parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position holds (IExec ((i ';' J),P,s)) . a = (IExec (J,P,(Initialize (Exec (i,s))))) . a let a be Int_position; ::_thesis: (IExec ((i ';' J),P,s)) . a = (IExec (J,P,(Initialize (Exec (i,s))))) . a thus (IExec ((i ';' J),P,s)) . a = (IExec (((Load i) ';' J),P,s)) . a .= (IExec (J,P,(Initialize (IExec ((Load i),P,s))))) . a by SCMPDS_5:35 .= (IExec (J,P,(Initialize (Exec (i,s))))) . a by SCMPDS_5:40 ; ::_thesis: verum end; theorem :: SCMPDS_6:16 for a being Int_position for k1, k2 being Integer holds (a,k1) <>0_goto k2 <> halt SCMPDS proof InsCode (halt SCMPDS) = 0 by COMPOS_1:70; hence for a being Int_position for k1, k2 being Integer holds (a,k1) <>0_goto k2 <> halt SCMPDS by SCMPDS_2:16; ::_thesis: verum end; theorem :: SCMPDS_6:17 for a being Int_position for k1, k2 being Integer holds (a,k1) <=0_goto k2 <> halt SCMPDS proof InsCode (halt SCMPDS) = 0 by COMPOS_1:70; hence for a being Int_position for k1, k2 being Integer holds (a,k1) <=0_goto k2 <> halt SCMPDS by SCMPDS_2:17; ::_thesis: verum end; theorem :: SCMPDS_6:18 for a being Int_position for k1, k2 being Integer holds (a,k1) >=0_goto k2 <> halt SCMPDS proof InsCode (halt SCMPDS) = 0 by COMPOS_1:70; hence for a being Int_position for k1, k2 being Integer holds (a,k1) >=0_goto k2 <> halt SCMPDS by SCMPDS_2:18; ::_thesis: verum end; definition let k1 be Integer; func Goto k1 -> Program of SCMPDS equals :: SCMPDS_6:def 1 Load (goto k1); coherence Load (goto k1) is Program of SCMPDS ; end; :: deftheorem defines Goto SCMPDS_6:def_1_:_ for k1 being Integer holds Goto k1 = Load (goto k1); registration let n be Element of NAT ; cluster goto (n + 1) -> No-StopCode ; correctness coherence goto (n + 1) is No-StopCode ; by SCMPDS_5:21; cluster goto (- (n + 1)) -> No-StopCode ; correctness coherence goto (- (n + 1)) is No-StopCode ; by SCMPDS_5:21; end; registration let n be Element of NAT ; cluster Goto (n + 1) -> halt-free ; correctness coherence Goto (n + 1) is halt-free ; ; cluster Goto (- (n + 1)) -> halt-free ; correctness coherence Goto (- (n + 1)) is halt-free ; ; end; theorem Th19: :: SCMPDS_6:19 for k1 being Integer holds ( 0 in dom (Goto k1) & (Goto k1) . 0 = goto k1 ) by AFINSQ_1:34, AFINSQ_1:65; begin definition let I be Program of SCMPDS; let s be State of SCMPDS; let P be Instruction-Sequence of SCMPDS; predI is_closed_on s,P means :Def2: :: SCMPDS_6:def 2 for k being Element of NAT holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom (stop I); predI is_halting_on s,P means :Def3: :: SCMPDS_6:def 3 P +* (stop I) halts_on Initialize s; end; :: deftheorem Def2 defines is_closed_on SCMPDS_6:def_2_:_ for I being Program of SCMPDS for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds ( I is_closed_on s,P iff for k being Element of NAT holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom (stop I) ); :: deftheorem Def3 defines is_halting_on SCMPDS_6:def_3_:_ for I being Program of SCMPDS for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds ( I is_halting_on s,P iff P +* (stop I) halts_on Initialize s ); theorem Th20: :: SCMPDS_6:20 for I being Program of SCMPDS holds ( I is paraclosed iff for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_closed_on s,P ) proof let I be Program of SCMPDS; ::_thesis: ( I is paraclosed iff for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_closed_on s,P ) hereby ::_thesis: ( ( for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_closed_on s,P ) implies I is paraclosed ) assume A1: I is paraclosed ; ::_thesis: for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_closed_on s,P let s be State of SCMPDS; ::_thesis: for P being Instruction-Sequence of SCMPDS holds I is_closed_on s,P let P be Instruction-Sequence of SCMPDS; ::_thesis: I is_closed_on s,P stop I c= P +* (stop I) by FUNCT_4:25; then for n being Element of NAT holds IC (Comput ((P +* (stop I)),(Initialize s),n)) in dom (stop I) by A1, SCMPDS_4:def_6; hence I is_closed_on s,P by Def2; ::_thesis: verum end; assume A2: for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_closed_on s,P ; ::_thesis: I is paraclosed let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_6 ::_thesis: for b1 being Element of NAT for b2 being set holds ( not stop I c= b2 or IC (Comput (b2,s,b1)) in K249((stop I)) ) let k be Element of NAT ; ::_thesis: for b1 being set holds ( not stop I c= b1 or IC (Comput (b1,s,k)) in K249((stop I)) ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop I c= P or IC (Comput (P,s,k)) in K249((stop I)) ) A3: Initialize s = s by MEMSTR_0:44; assume stop I c= P ; ::_thesis: IC (Comput (P,s,k)) in K249((stop I)) then A4: P = P +* (stop I) by FUNCT_4:98; I is_closed_on s,P by A2; hence IC (Comput (P,s,k)) in dom (stop I) by A3, A4, Def2; ::_thesis: verum end; theorem Th21: :: SCMPDS_6:21 for I being Program of SCMPDS holds ( I is parahalting iff for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_halting_on s,P ) proof let I be Program of SCMPDS; ::_thesis: ( I is parahalting iff for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_halting_on s,P ) hereby ::_thesis: ( ( for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_halting_on s,P ) implies I is parahalting ) assume A1: I is parahalting ; ::_thesis: for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_halting_on s,P let s be State of SCMPDS; ::_thesis: for P being Instruction-Sequence of SCMPDS holds I is_halting_on s,P let P be Instruction-Sequence of SCMPDS; ::_thesis: I is_halting_on s,P stop I c= P +* (stop I) by FUNCT_4:25; then P +* (stop I) halts_on Initialize s by A1, SCMPDS_4:def_7; hence I is_halting_on s,P by Def3; ::_thesis: verum end; assume A2: for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS holds I is_halting_on s,P ; ::_thesis: I is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop I c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop I c= P or P halts_on s ) A3: Initialize s = s by MEMSTR_0:44; assume stop I c= P ; ::_thesis: P halts_on s then A4: P = P +* (stop I) by FUNCT_4:98; I is_halting_on s,P by A2; hence P halts_on s by A4, Def3, A3; ::_thesis: verum end; theorem Th22: :: SCMPDS_6:22 for P1, P2 being Instruction-Sequence of SCMPDS for s1, s2 being State of SCMPDS for I being Program of SCMPDS st DataPart s1 = DataPart s2 & I is_closed_on s1,P1 holds I is_closed_on s2,P2 proof let P1, P2 be Instruction-Sequence of SCMPDS; ::_thesis: for s1, s2 being State of SCMPDS for I being Program of SCMPDS st DataPart s1 = DataPart s2 & I is_closed_on s1,P1 holds I is_closed_on s2,P2 let s1, s2 be State of SCMPDS; ::_thesis: for I being Program of SCMPDS st DataPart s1 = DataPart s2 & I is_closed_on s1,P1 holds I is_closed_on s2,P2 let I be Program of SCMPDS; ::_thesis: ( DataPart s1 = DataPart s2 & I is_closed_on s1,P1 implies I is_closed_on s2,P2 ) set pI = stop I; set S1 = Initialize s1; set S2 = Initialize s2; set E1 = P1 +* (stop I); set E2 = P2 +* (stop I); assume A1: DataPart s1 = DataPart s2 ; ::_thesis: ( not I is_closed_on s1,P1 or I is_closed_on s2,P2 ) A2: Comput ((P2 +* (stop I)),(Initialize s2),0) = Initialize s2 by EXTPRO_1:2; A3: Comput ((P1 +* (stop I)),(Initialize s1),0) = Initialize s1 by EXTPRO_1:2; then A4: DataPart (Comput ((P1 +* (stop I)),(Initialize s1),0)) = DataPart s1 by MEMSTR_0:45 .= DataPart (Comput ((P2 +* (stop I)),(Initialize s2),0)) by A1, A2, MEMSTR_0:45 ; defpred S1[ Element of NAT ] means ( IC (Comput ((P1 +* (stop I)),(Initialize s1),$1)) = IC (Comput ((P2 +* (stop I)),(Initialize s2),$1)) & CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),$1))) = CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),$1))) & DataPart (Comput ((P1 +* (stop I)),(Initialize s1),$1)) = DataPart (Comput ((P2 +* (stop I)),(Initialize s2),$1)) ); A5: 0 in dom (stop I) by COMPOS_1:36; assume A6: I is_closed_on s1,P1 ; ::_thesis: I is_closed_on s2,P2 A7: now__::_thesis:_for_k_being_Element_of_NAT_st_S1[k]_holds_ S1[k_+_1] let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) A8: Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)) = Following ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),k))) by EXTPRO_1:3; assume A9: S1[k] ; ::_thesis: S1[k + 1] then A10: for a being Int_position holds (Comput ((P1 +* (stop I)),(Initialize s1),k)) . a = (Comput ((P2 +* (stop I)),(Initialize s2),k)) . a by SCMPDS_4:8; stop I c= P2 +* (stop I) by FUNCT_4:25; then A11: stop I c= P2 +* (stop I) ; A12: IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1))) in dom (stop I) by A6, Def2; A13: Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)) = Following ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),k))) by EXTPRO_1:3; Comput ((P1 +* (stop I)),(Initialize s1),k) = Comput ((P2 +* (stop I)),(Initialize s2),k) by A9, A10, SCMPDS_4:2; then A14: Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)) = Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)) by A9, A8, A13; then A15: Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)) = Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)) ; A16: IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1))) = IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1))) by A14; A17: (P1 +* (stop I)) /. (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) = (P1 +* (stop I)) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) by PBOOLE:143; A18: (P2 +* (stop I)) /. (IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) = (P2 +* (stop I)) . (IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) by PBOOLE:143; stop I c= P1 +* (stop I) by FUNCT_4:25; then stop I c= P1 +* (stop I) ; then CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) = (stop I) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) by A12, A17, GRFUNC_1:2 .= CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) by A11, A16, A12, A18, GRFUNC_1:2 ; hence S1[k + 1] by A15; ::_thesis: verum end; A19: IC (Comput ((P2 +* (stop I)),(Initialize s2),0)) = IC (Initialize s2) by A2 .= 0 by MEMSTR_0:def_11 ; A20: (P1 +* (stop I)) /. (IC (Comput ((P1 +* (stop I)),(Initialize s1),0))) = (P1 +* (stop I)) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),0))) by PBOOLE:143; A21: (P2 +* (stop I)) /. (IC (Comput ((P2 +* (stop I)),(Initialize s2),0))) = (P2 +* (stop I)) . (IC (Comput ((P2 +* (stop I)),(Initialize s2),0))) by PBOOLE:143; A22: IC (Comput ((P1 +* (stop I)),(Initialize s1),0)) = IC (Initialize s1) by A3 .= 0 by MEMSTR_0:def_11 ; then CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),0))) = (stop I) . 0 by A5, A20, FUNCT_4:13 .= CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),0))) by A19, A5, A21, FUNCT_4:13 ; then A23: S1[ 0 ] by A22, A19, A4; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P2_+*_(stop_I)),(Initialize_s2),k))_in_dom_(stop_I) let k be Element of NAT ; ::_thesis: IC (Comput ((P2 +* (stop I)),(Initialize s2),k)) in dom (stop I) A24: for k being Element of NAT holds S1[k] from NAT_1:sch_1(A23, A7); IC (Comput ((P1 +* (stop I)),(Initialize s1),k)) in dom (stop I) by A6, Def2; hence IC (Comput ((P2 +* (stop I)),(Initialize s2),k)) in dom (stop I) by A24; ::_thesis: verum end; hence I is_closed_on s2,P2 by Def2; ::_thesis: verum end; theorem :: SCMPDS_6:23 for P1, P2 being Instruction-Sequence of SCMPDS for s1, s2 being State of SCMPDS for I being Program of SCMPDS st DataPart s1 = DataPart s2 & I is_closed_on s1,P1 & I is_halting_on s1,P1 holds ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) proof let P1, P2 be Instruction-Sequence of SCMPDS; ::_thesis: for s1, s2 being State of SCMPDS for I being Program of SCMPDS st DataPart s1 = DataPart s2 & I is_closed_on s1,P1 & I is_halting_on s1,P1 holds ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) let s1, s2 be State of SCMPDS; ::_thesis: for I being Program of SCMPDS st DataPart s1 = DataPart s2 & I is_closed_on s1,P1 & I is_halting_on s1,P1 holds ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) let I be Program of SCMPDS; ::_thesis: ( DataPart s1 = DataPart s2 & I is_closed_on s1,P1 & I is_halting_on s1,P1 implies ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) ) set pI = stop I; set S1 = Initialize s1; set S2 = Initialize s2; set E1 = P1 +* (stop I); set E2 = P2 +* (stop I); defpred S1[ Element of NAT ] means ( IC (Comput ((P1 +* (stop I)),(Initialize s1),$1)) = IC (Comput ((P2 +* (stop I)),(Initialize s2),$1)) & CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),$1))) = CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),$1))) & DataPart (Comput ((P1 +* (stop I)),(Initialize s1),$1)) = DataPart (Comput ((P2 +* (stop I)),(Initialize s2),$1)) ); A1: Comput ((P1 +* (stop I)),(Initialize s1),0) = Initialize s1 by EXTPRO_1:2; A2: Comput ((P2 +* (stop I)),(Initialize s2),0) = Initialize s2 by EXTPRO_1:2; assume DataPart s1 = DataPart s2 ; ::_thesis: ( not I is_closed_on s1,P1 or not I is_halting_on s1,P1 or ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) ) then A3: Comput ((P1 +* (stop I)),(Initialize s1),0) = Comput ((P2 +* (stop I)),(Initialize s2),0) by A1, A2, MEMSTR_0:80; A4: 0 in dom (stop I) by COMPOS_1:36; assume A5: I is_closed_on s1,P1 ; ::_thesis: ( not I is_halting_on s1,P1 or ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) ) A6: now__::_thesis:_for_k_being_Element_of_NAT_st_S1[k]_holds_ S1[k_+_1] let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) A7: Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)) = Following ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),k))) by EXTPRO_1:3; assume A8: S1[k] ; ::_thesis: S1[k + 1] then for a being Int_position holds (Comput ((P1 +* (stop I)),(Initialize s1),k)) . a = (Comput ((P2 +* (stop I)),(Initialize s2),k)) . a by SCMPDS_4:8; then A9: Comput ((P1 +* (stop I)),(Initialize s1),k) = Comput ((P2 +* (stop I)),(Initialize s2),k) by A8, SCMPDS_4:2; A10: stop I c= P2 +* (stop I) by FUNCT_4:25; A11: IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1))) in dom (stop I) by A5, Def2; Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)) = Following ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),k))) by EXTPRO_1:3; then A12: Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)) = Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)) by A8, A9, A7; then A13: IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1))) = IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1))) ; A14: (P1 +* (stop I)) /. (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) = (P1 +* (stop I)) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) by PBOOLE:143; A15: (P2 +* (stop I)) /. (IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) = (P2 +* (stop I)) . (IC (Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) by PBOOLE:143; stop I c= P1 +* (stop I) by FUNCT_4:25; then CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) = (stop I) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),(k + 1)))) by A11, A14, GRFUNC_1:2 .= CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),(k + 1)))) by A10, A13, A11, A15, GRFUNC_1:2 ; hence S1[k + 1] by A12; ::_thesis: verum end; A16: IC (Comput ((P2 +* (stop I)),(Initialize s2),0)) = IC (Initialize s2) by A2 .= 0 by MEMSTR_0:def_11 ; assume I is_halting_on s1,P1 ; ::_thesis: ( I is_closed_on s2,P2 & I is_halting_on s2,P2 ) then P1 +* (stop I) halts_on Initialize s1 by Def3; then consider m being Element of NAT such that A17: CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),m))) = halt SCMPDS by EXTPRO_1:29; A18: (P1 +* (stop I)) /. (IC (Comput ((P1 +* (stop I)),(Initialize s1),0))) = (P1 +* (stop I)) . (IC (Comput ((P1 +* (stop I)),(Initialize s1),0))) by PBOOLE:143; A19: (P2 +* (stop I)) /. (IC (Comput ((P2 +* (stop I)),(Initialize s2),0))) = (P2 +* (stop I)) . (IC (Comput ((P2 +* (stop I)),(Initialize s2),0))) by PBOOLE:143; IC (Comput ((P1 +* (stop I)),(Initialize s1),0)) = IC (Initialize s1) by A1 .= 0 by MEMSTR_0:def_11 ; then CurInstr ((P1 +* (stop I)),(Comput ((P1 +* (stop I)),(Initialize s1),0))) = (stop I) . 0 by A4, A18, FUNCT_4:13 .= CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),0))) by A16, A4, A19, FUNCT_4:13 ; then A20: S1[ 0 ] by A3; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P2_+*_(stop_I)),(Initialize_s2),k))_in_dom_(stop_I) let k be Element of NAT ; ::_thesis: IC (Comput ((P2 +* (stop I)),(Initialize s2),k)) in dom (stop I) A21: for k being Element of NAT holds S1[k] from NAT_1:sch_1(A20, A6); IC (Comput ((P1 +* (stop I)),(Initialize s1),k)) in dom (stop I) by A5, Def2; hence IC (Comput ((P2 +* (stop I)),(Initialize s2),k)) in dom (stop I) by A21; ::_thesis: verum end; hence I is_closed_on s2,P2 by Def2; ::_thesis: I is_halting_on s2,P2 for k being Element of NAT holds S1[k] from NAT_1:sch_1(A20, A6); then CurInstr ((P2 +* (stop I)),(Comput ((P2 +* (stop I)),(Initialize s2),m))) = halt SCMPDS by A17; then P2 +* (stop I) halts_on Initialize s2 by EXTPRO_1:29; hence I is_halting_on s2,P2 by Def3; ::_thesis: verum end; theorem Th24: :: SCMPDS_6:24 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I, J being Program of SCMPDS holds ( I is_closed_on s,P iff I is_closed_on Initialize s,P +* J ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I, J being Program of SCMPDS holds ( I is_closed_on s,P iff I is_closed_on Initialize s,P +* J ) let s be State of SCMPDS; ::_thesis: for I, J being Program of SCMPDS holds ( I is_closed_on s,P iff I is_closed_on Initialize s,P +* J ) let I, J be Program of SCMPDS; ::_thesis: ( I is_closed_on s,P iff I is_closed_on Initialize s,P +* J ) DataPart s = DataPart (Initialize s) by MEMSTR_0:45; hence ( I is_closed_on s,P iff I is_closed_on Initialize s,P +* J ) by Th22; ::_thesis: verum end; theorem Th25: :: SCMPDS_6:25 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I, J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds IC (Comput ((P +* (stop I)),s,k)) = IC (Comput ((P +* (stop (I ';' J))),s,k)) ) & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I, J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds IC (Comput ((P +* (stop I)),s,k)) = IC (Comput ((P +* (stop (I ';' J))),s,k)) ) & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) ) let s be 0 -started State of SCMPDS; ::_thesis: for I, J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds IC (Comput ((P +* (stop I)),s,k)) = IC (Comput ((P +* (stop (I ';' J))),s,k)) ) & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) ) let I, J be Program of SCMPDS; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies ( ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds IC (Comput ((P +* (stop I)),s,k)) = IC (Comput ((P +* (stop (I ';' J))),s,k)) ) & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) ) ) assume A1: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds IC (Comput ((P +* (stop I)),s,k)) = IC (Comput ((P +* (stop (I ';' J))),s,k)) ) & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) ) ) A2: Initialize s = s by MEMSTR_0:44; set pI = stop I; set pIJ = stop (I ';' J); set P1 = P +* (stop I); defpred S1[ Element of NAT ] means ( $1 <= LifeSpan ((P +* (stop I)),s) implies Comput ((P +* (stop I)),s,$1) = Comput (((P +* (stop I)) +* (stop (I ';' J))),s,$1) ); assume I is_halting_on s,P ; ::_thesis: ( ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds IC (Comput ((P +* (stop I)),s,k)) = IC (Comput ((P +* (stop (I ';' J))),s,k)) ) & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) ) then A3: P +* (stop I) halts_on s by Def3, A2; A4: for m being Element of NAT st S1[m] holds S1[m + 1] proof set JS = J ';' (Stop SCMPDS); set E2 = (P +* (stop I)) +* (stop (I ';' J)); let m be Element of NAT ; ::_thesis: ( S1[m] implies S1[m + 1] ) assume A5: ( m <= LifeSpan ((P +* (stop I)),s) implies Comput ((P +* (stop I)),s,m) = Comput (((P +* (stop I)) +* (stop (I ';' J))),s,m) ) ; ::_thesis: S1[m + 1] A6: stop (I ';' J) c= (P +* (stop I)) +* (stop (I ';' J)) by FUNCT_4:25; A7: Comput ((P +* (stop I)),s,(m + 1)) = Following ((P +* (stop I)),(Comput ((P +* (stop I)),s,m))) by EXTPRO_1:3; A8: stop (I ';' J) = (I ';' J) ';' (Stop SCMPDS) .= I ';' (J ';' (Stop SCMPDS)) by AFINSQ_1:27 ; dom (I ';' (J ';' (Stop SCMPDS))) = dom (I +* (Shift ((J ';' (Stop SCMPDS)),(card I)))) .= (dom I) \/ (dom (Shift ((J ';' (Stop SCMPDS)),(card I)))) by FUNCT_4:def_1 ; then A9: dom I c= dom (I ';' (J ';' (Stop SCMPDS))) by XBOOLE_1:7; A10: Comput (((P +* (stop I)) +* (stop (I ';' J))),s,(m + 1)) = Following (((P +* (stop I)) +* (stop (I ';' J))),(Comput (((P +* (stop I)) +* (stop (I ';' J))),s,m))) by EXTPRO_1:3; A11: IC (Comput ((P +* (stop I)),s,m)) in dom (stop I) by A1, Def2, A2; A12: (P +* (stop I)) /. (IC (Comput ((P +* (stop I)),s,m))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),s,m))) by PBOOLE:143; stop I c= P +* (stop I) by FUNCT_4:25; then A13: CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,m))) = (stop I) . (IC (Comput ((P +* (stop I)),s,m))) by A11, A12, GRFUNC_1:2; assume A14: m + 1 <= LifeSpan ((P +* (stop I)),s) ; ::_thesis: Comput ((P +* (stop I)),s,(m + 1)) = Comput (((P +* (stop I)) +* (stop (I ';' J))),s,(m + 1)) then m < LifeSpan ((P +* (stop I)),s) by NAT_1:13; then (stop I) . (IC (Comput ((P +* (stop I)),s,m))) <> halt SCMPDS by A3, A13, EXTPRO_1:def_15; then A15: IC (Comput ((P +* (stop I)),s,m)) in dom I by A11, COMPOS_1:51; A16: ((P +* (stop I)) +* (stop (I ';' J))) /. (IC (Comput (((P +* (stop I)) +* (stop (I ';' J))),s,m))) = ((P +* (stop I)) +* (stop (I ';' J))) . (IC (Comput (((P +* (stop I)) +* (stop (I ';' J))),s,m))) by PBOOLE:143; CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,m))) = (I ';' (Stop SCMPDS)) . (IC (Comput ((P +* (stop I)),s,m))) by A13 .= I . (IC (Comput ((P +* (stop I)),s,m))) by A15, AFINSQ_1:def_3 .= (stop (I ';' J)) . (IC (Comput ((P +* (stop I)),s,m))) by A15, A8, AFINSQ_1:def_3 .= ((P +* (stop I)) +* (stop (I ';' J))) . (IC (Comput ((P +* (stop I)),s,m))) by A6, A15, A8, A9, GRFUNC_1:2 .= CurInstr (((P +* (stop I)) +* (stop (I ';' J))),(Comput (((P +* (stop I)) +* (stop (I ';' J))),s,m))) by A5, A14, A16, NAT_1:13 ; hence Comput ((P +* (stop I)),s,(m + 1)) = Comput (((P +* (stop I)) +* (stop (I ';' J))),s,(m + 1)) by A5, A14, A7, A10, NAT_1:13; ::_thesis: verum end; ( Comput ((P +* (stop I)),s,0) = s & Comput (((P +* (stop I)) +* (stop (I ';' J))),s,0) = s ) by EXTPRO_1:2; then A17: S1[ 0 ] ; A18: for m being Element of NAT holds S1[m] from NAT_1:sch_1(A17, A4); A19: (P +* (stop I)) +* (stop (I ';' J)) = P +* ((stop I) +* (stop (I ';' J))) by FUNCT_4:14 .= P +* (stop (I ';' J)) by SCMPDS_5:14 ; thus for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds IC (Comput ((P +* (stop I)),s,k)) = IC (Comput ((P +* (stop (I ';' J))),s,k)) by A18, A19; ::_thesis: DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s))) = Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s))) by A19, A18; hence DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop (I ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) ; ::_thesis: verum end; theorem Th26: :: SCMPDS_6:26 for s being State of SCMPDS for P being Instruction-Sequence of SCMPDS for I being Program of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom I proof let s be State of SCMPDS; ::_thesis: for P being Instruction-Sequence of SCMPDS for I being Program of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom I let P be Instruction-Sequence of SCMPDS; ::_thesis: for I being Program of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom I let I be Program of SCMPDS; ::_thesis: for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom I let k be Element of NAT ; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) implies IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom I ) set ss = Initialize s; set PP = P +* (stop I); set m = LifeSpan ((P +* (stop I)),(Initialize s)); set Sp = Stop SCMPDS; assume that A1: I is_closed_on s,P and A2: I is_halting_on s,P and A3: k < LifeSpan ((P +* (stop I)),(Initialize s)) ; ::_thesis: IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom I set Sk = Comput ((P +* (stop I)),(Initialize s),k); set Ik = IC (Comput ((P +* (stop I)),(Initialize s),k)); A4: IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom (stop I) by A1, Def2; reconsider n = IC (Comput ((P +* (stop I)),(Initialize s),k)) as Element of NAT ; A5: stop I c= P +* (stop I) by FUNCT_4:25; A6: P +* (stop I) halts_on Initialize s by A2, Def3; A7: now__::_thesis:_not_n_=_card_I A8: (P +* (stop I)) /. (IC (Comput ((P +* (stop I)),(Initialize s),k))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),(Initialize s),k))) by PBOOLE:143; assume A9: n = card I ; ::_thesis: contradiction CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),(Initialize s),k))) by A8 .= (stop I) . (0 + n) by A4, A5, GRFUNC_1:2 .= halt SCMPDS by A9, Lm1, Lm2, AFINSQ_1:def_3 ; hence contradiction by A3, A6, EXTPRO_1:def_15; ::_thesis: verum end; card (stop I) = (card I) + 1 by COMPOS_1:55; then n < (card I) + 1 by A4, AFINSQ_1:66; then n <= card I by INT_1:7; then n < card I by A7, XXREAL_0:1; hence IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom I by AFINSQ_1:66; ::_thesis: verum end; theorem Th27: :: SCMPDS_6:27 for P being Instruction-Sequence of SCMPDS for I, J being Program of SCMPDS for s being 0 -started State of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,k))) = CurInstr ((P +* (stop (I ';' J))),(Comput ((P +* (stop (I ';' J))),s,k))) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for I, J being Program of SCMPDS for s being 0 -started State of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,k))) = CurInstr ((P +* (stop (I ';' J))),(Comput ((P +* (stop (I ';' J))),s,k))) let I, J be Program of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,k))) = CurInstr ((P +* (stop (I ';' J))),(Comput ((P +* (stop (I ';' J))),s,k))) let s be 0 -started State of SCMPDS; ::_thesis: for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,k))) = CurInstr ((P +* (stop (I ';' J))),(Comput ((P +* (stop (I ';' J))),s,k))) let k be Element of NAT ; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),s) implies CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,k))) = CurInstr ((P +* (stop (I ';' J))),(Comput ((P +* (stop (I ';' J))),s,k))) ) set P1 = P +* (stop I); set P2 = P +* (stop (I ';' J)); set s3 = Comput ((P +* (stop I)),s,k); set s4 = Comput ((P +* (stop (I ';' J))),s,k); set P3 = P +* (stop I); set P4 = P +* (stop (I ';' J)); set SS = Stop SCMPDS; assume that A1: I is_closed_on s,P and A2: ( I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),s) ) ; ::_thesis: CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,k))) = CurInstr ((P +* (stop (I ';' J))),(Comput ((P +* (stop (I ';' J))),s,k))) A3: Initialize s = s by MEMSTR_0:44; then A4: IC (Comput ((P +* (stop I)),s,k)) in dom I by A1, A2, Th26; A5: IC (Comput ((P +* (stop I)),s,k)) = IC (Comput ((P +* (stop (I ';' J))),s,k)) by A1, A2, Th25; A6: IC (Comput ((P +* (stop I)),s,k)) in dom (stop I) by A1, Def2, A3; A7: ( dom (stop I) c= dom (stop (I ';' J)) & stop (I ';' J) c= P +* (stop (I ';' J)) ) by FUNCT_4:25, SCMPDS_5:13; A8: stop I c= P +* (stop I) by FUNCT_4:25; A9: stop (I ';' J) = (I ';' J) ';' (Stop SCMPDS) .= I ';' (J ';' (Stop SCMPDS)) by AFINSQ_1:27 ; A10: (P +* (stop I)) /. (IC (Comput ((P +* (stop I)),s,k))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),s,k))) by PBOOLE:143; A11: (P +* (stop (I ';' J))) /. (IC (Comput ((P +* (stop (I ';' J))),s,k))) = (P +* (stop (I ';' J))) . (IC (Comput ((P +* (stop (I ';' J))),s,k))) by PBOOLE:143; thus CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,k))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),s,k))) by A10 .= (stop I) . (IC (Comput ((P +* (stop I)),s,k))) by A6, A8, GRFUNC_1:2 .= I . (IC (Comput ((P +* (stop I)),s,k))) by A4, AFINSQ_1:def_3 .= (stop (I ';' J)) . (IC (Comput ((P +* (stop I)),s,k))) by A4, A9, AFINSQ_1:def_3 .= (P +* (stop (I ';' J))) . (IC (Comput ((P +* (stop (I ';' J))),s,k))) by A5, A6, A7, GRFUNC_1:2 .= CurInstr ((P +* (stop (I ';' J))),(Comput ((P +* (stop (I ';' J))),s,k))) by A11 ; ::_thesis: verum end; theorem Th28: :: SCMPDS_6:28 for P being Instruction-Sequence of SCMPDS for I being halt-free Program of SCMPDS for s being State of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) holds CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) <> halt SCMPDS proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for I being halt-free Program of SCMPDS for s being State of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) holds CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) <> halt SCMPDS let I be halt-free Program of SCMPDS; ::_thesis: for s being State of SCMPDS for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) holds CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) <> halt SCMPDS let s be State of SCMPDS; ::_thesis: for k being Element of NAT st I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) holds CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) <> halt SCMPDS let k be Element of NAT ; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) implies CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) <> halt SCMPDS ) set ss = Initialize s; set PP = P +* (stop I); set s2 = Comput ((P +* (stop I)),(Initialize s),k); set P2 = P +* (stop I); assume ( I is_closed_on s,P & I is_halting_on s,P & k < LifeSpan ((P +* (stop I)),(Initialize s)) ) ; ::_thesis: CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) <> halt SCMPDS then A1: IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom I by Th26; A2: (P +* (stop I)) /. (IC (Comput ((P +* (stop I)),(Initialize s),k))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),(Initialize s),k))) by PBOOLE:143; A3: stop I c= P +* (stop I) by FUNCT_4:25; I c= stop I by AFINSQ_1:74; then I c= P +* (stop I) by A3, XBOOLE_1:1; then CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) = I . (IC (Comput ((P +* (stop I)),(Initialize s),k))) by A1, A2, GRFUNC_1:2; hence CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),k))) <> halt SCMPDS by A1, COMPOS_1:def_27; ::_thesis: verum end; theorem Th29: :: SCMPDS_6:29 for P being Instruction-Sequence of SCMPDS for I being halt-free Program of SCMPDS for s being State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = card I proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for I being halt-free Program of SCMPDS for s being State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = card I let I be halt-free Program of SCMPDS; ::_thesis: for s being State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = card I let s be State of SCMPDS; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = card I ) set s1 = Initialize s; set P1 = P +* (stop I); assume that A1: I is_closed_on s,P and A2: I is_halting_on s,P ; ::_thesis: IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = card I set Css = Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))); reconsider n = IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) as Element of NAT ; A3: stop I c= P +* (stop I) by FUNCT_4:25; I c= stop I by AFINSQ_1:74; then A4: I c= P +* (stop I) by A3, XBOOLE_1:1; A5: P +* (stop I) halts_on Initialize s by A2, Def3; now__::_thesis:_not_IC_(Comput_((P_+*_(stop_I)),(Initialize_s),(LifeSpan_((P_+*_(stop_I)),(Initialize_s)))))_in_dom_I A6: (P +* (stop I)) /. (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by PBOOLE:143; assume A7: IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) in dom I ; ::_thesis: contradiction then I . (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A4, GRFUNC_1:2 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A6 .= halt SCMPDS by A5, EXTPRO_1:def_15 ; hence contradiction by A7, COMPOS_1:def_27; ::_thesis: verum end; then A8: n >= card I by AFINSQ_1:66; A9: card (stop I) = (card I) + 1 by COMPOS_1:55; IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) in dom (stop I) by A1, Def2; then n < (card I) + 1 by A9, AFINSQ_1:66; then n <= card I by NAT_1:13; then IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = card I by A8, XXREAL_0:1; hence IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) = card I ; ::_thesis: verum end; Lm3: for P being Instruction-Sequence of SCMPDS for I being halt-free Program of SCMPDS for J being Program of SCMPDS for s being 0 -started State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for I being halt-free Program of SCMPDS for J being Program of SCMPDS for s being 0 -started State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) let I be halt-free Program of SCMPDS; ::_thesis: for J being Program of SCMPDS for s being 0 -started State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) let J be Program of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) let s be 0 -started State of SCMPDS; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies ( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) ) assume A1: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) ) set G1 = Goto ((card J) + 1); set SS = Stop SCMPDS; set J2 = ((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS); set IJ = (I ';' (Goto ((card J) + 1))) ';' J; set pJ = stop ((I ';' (Goto ((card J) + 1))) ';' J); set s1 = s; set P1 = P +* (stop I); set s2 = s; reconsider P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) as Instruction-Sequence of SCMPDS ; assume A2: I is_halting_on s,P ; ::_thesis: ( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = ((card I) + (card J)) + 1 & DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) A3: Initialize s = s by MEMSTR_0:44; set sm = Comput (P2,s,(LifeSpan ((P +* (stop I)),s))); A4: (I ';' (Goto ((card J) + 1))) ';' J = I ';' ((Goto ((card J) + 1)) ';' J) by AFINSQ_1:27; then A5: IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = IC (Comput (P2,s,(LifeSpan ((P +* (stop I)),s)))) by A1, A2, Th25; then A6: IC (Comput (P2,s,(LifeSpan ((P +* (stop I)),s)))) = card I by A1, A2, Th29, A3; A7: 0 in dom (Goto ((card J) + 1)) by Th19; A8: (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) . 0 = ((Goto ((card J) + 1)) ';' (J ';' (Stop SCMPDS))) . 0 by AFINSQ_1:27 .= (Goto ((card J) + 1)) . 0 by A7, AFINSQ_1:def_3 .= goto ((card J) + 1) by Th19 ; card ((Goto ((card J) + 1)) ';' J) = (card (Goto ((card J) + 1))) + (card J) by AFINSQ_1:17 .= 1 + (card J) by COMPOS_1:54 ; then A9: (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) . ((card J) + 1) = (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) . (0 + (card ((Goto ((card J) + 1)) ';' J))) .= halt SCMPDS by Lm1, Lm2, AFINSQ_1:def_3 ; A10: card (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) = card ((Goto ((card J) + 1)) ';' (J ';' (Stop SCMPDS))) by AFINSQ_1:27 .= (card (Goto ((card J) + 1))) + (card (J ';' (Stop SCMPDS))) by AFINSQ_1:17 .= 1 + (card (J ';' (Stop SCMPDS))) by COMPOS_1:54 ; then A11: 0 in dom (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) by AFINSQ_1:66; A12: stop ((I ';' (Goto ((card J) + 1))) ';' J) = ((I ';' (Goto ((card J) + 1))) ';' J) ';' (Stop SCMPDS) .= (I ';' ((Goto ((card J) + 1)) ';' J)) ';' (Stop SCMPDS) by AFINSQ_1:27 .= I ';' (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) by AFINSQ_1:27 ; then A13: card (stop ((I ';' (Goto ((card J) + 1))) ';' J)) = (card I) + (card (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS))) by AFINSQ_1:17; then (card I) + 0 < card (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by XREAL_1:6; then A14: card I in dom (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by AFINSQ_1:66; A15: card (Stop SCMPDS) = 1 by AFINSQ_1:33; A16: card (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) = 1 + ((card J) + (card (Stop SCMPDS))) by A10, AFINSQ_1:17 .= (card J) + (1 + (card (Stop SCMPDS))) ; then (card J) + 1 < card (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) by A15, XREAL_1:6; then A17: (card J) + 1 in dom (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) by AFINSQ_1:66; card (stop ((I ';' (Goto ((card J) + 1))) ';' J)) = (((card I) + (card J)) + 1) + 1 by A13, A16, A15; then ((card I) + (card J)) + 1 < card (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by NAT_1:13; then A18: ((card I) + (card J)) + 1 in dom (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by AFINSQ_1:66; A19: P2 /. (IC (Comput (P2,s,(LifeSpan ((P +* (stop I)),s))))) = P2 . (IC (Comput (P2,s,(LifeSpan ((P +* (stop I)),s))))) by PBOOLE:143; A20: CurInstr (P2,(Comput (P2,s,(LifeSpan ((P +* (stop I)),s))))) = P2 . (card I) by A1, A2, A5, Th29, A19, A3 .= P2 . (card I) .= (stop ((I ';' (Goto ((card J) + 1))) ';' J)) . (card I) by A14, FUNCT_4:13 .= (I ';' (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS))) . (0 + (card I)) by A12 .= goto ((card J) + 1) by A11, A8, AFINSQ_1:def_3 ; A21: now__::_thesis:_for_a_being_Int_position_holds_(Comput_(P2,s,((LifeSpan_((P_+*_(stop_I)),s))_+_1)))_._a_=_(Comput_(P2,s,(LifeSpan_((P_+*_(stop_I)),s))))_._a let a be Int_position; ::_thesis: (Comput (P2,s,((LifeSpan ((P +* (stop I)),s)) + 1))) . a = (Comput (P2,s,(LifeSpan ((P +* (stop I)),s)))) . a thus (Comput (P2,s,((LifeSpan ((P +* (stop I)),s)) + 1))) . a = (Following (P2,(Comput (P2,s,(LifeSpan ((P +* (stop I)),s)))))) . a by EXTPRO_1:3 .= (Comput (P2,s,(LifeSpan ((P +* (stop I)),s)))) . a by A20, SCMPDS_2:54 ; ::_thesis: verum end; A22: P2 /. (IC (Comput (P2,s,((LifeSpan ((P +* (stop I)),s)) + 1)))) = P2 . (IC (Comput (P2,s,((LifeSpan ((P +* (stop I)),s)) + 1)))) by PBOOLE:143; thus IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = IC (Following (P2,(Comput (P2,s,(LifeSpan ((P +* (stop I)),s)))))) by EXTPRO_1:3 .= ICplusConst ((Comput (P2,s,(LifeSpan ((P +* (stop I)),s)))),((card J) + 1)) by A20, SCMPDS_2:54 .= (card I) + ((card J) + 1) by A6, Th12 .= ((card I) + (card J)) + 1 ; ::_thesis: ( DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) & ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) then A23: CurInstr (P2,(Comput (P2,s,((LifeSpan ((P +* (stop I)),s)) + 1)))) = P2 . (((card I) + (card J)) + 1) by A22 .= (stop ((I ';' (Goto ((card J) + 1))) ';' J)) . (((card I) + (card J)) + 1) by A18, FUNCT_4:13 .= (I ';' (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS))) . ((card I) + ((card J) + 1)) by A12 .= halt SCMPDS by A17, A9, AFINSQ_1:def_3 ; DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput (P2,s,(LifeSpan ((P +* (stop I)),s)))) by A1, A2, A4, Th25; hence DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) by A21, SCMPDS_4:8; ::_thesis: ( ( for k being Element of NAT st k <= LifeSpan ((P +* (stop I)),s) holds CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS ) & IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) hereby ::_thesis: ( IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I & P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) let k be Element of NAT ; ::_thesis: ( k <= LifeSpan ((P +* (stop I)),s) implies CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,b1))) <> halt SCMPDS ) assume A25: k <= LifeSpan ((P +* (stop I)),s) ; ::_thesis: CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,b1))) <> halt SCMPDS percases ( k < LifeSpan ((P +* (stop I)),s) or LifeSpan ((P +* (stop I)),s) <= k ) ; supposeA26: k < LifeSpan ((P +* (stop I)),s) ; ::_thesis: CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,b1))) <> halt SCMPDS then CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,k))) <> halt SCMPDS by A1, A2, Th28, A3; hence CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS by A1, A2, A4, A26, Th27; ::_thesis: verum end; suppose LifeSpan ((P +* (stop I)),s) <= k ; ::_thesis: CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,b1))) <> halt SCMPDS then k = LifeSpan ((P +* (stop I)),s) by A25, XXREAL_0:1; hence CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k))) <> halt SCMPDS by A20; ::_thesis: verum end; end; end; thus IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop I)),s)))) = card I by A1, A2, A5, Th29, A3; ::_thesis: ( P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) thus A27: P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s by A23, EXTPRO_1:29; ::_thesis: LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 now__::_thesis:_for_k_being_Element_of_NAT_st_CurInstr_(P2,(Comput_(P2,s,k)))_=_halt_SCMPDS_holds_ (LifeSpan_((P_+*_(stop_I)),s))_+_1_<=_k let k be Element of NAT ; ::_thesis: ( CurInstr (P2,(Comput (P2,s,k))) = halt SCMPDS implies (LifeSpan ((P +* (stop I)),s)) + 1 <= k ) assume CurInstr (P2,(Comput (P2,s,k))) = halt SCMPDS ; ::_thesis: (LifeSpan ((P +* (stop I)),s)) + 1 <= k then LifeSpan ((P +* (stop I)),s) < k by A24; hence (LifeSpan ((P +* (stop I)),s)) + 1 <= k by INT_1:7; ::_thesis: verum end; hence LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 by A23, A27, EXTPRO_1:def_15; ::_thesis: verum end; theorem Th30: :: SCMPDS_6:30 for P being Instruction-Sequence of SCMPDS for I, J being Program of SCMPDS for s being 0 -started State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for I, J being Program of SCMPDS for s being 0 -started State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P ) let I, J be Program of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds ( (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P ) let s be 0 -started State of SCMPDS; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies ( (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P ) ) set G = Goto ((card J) + 1); set IJ = (I ';' (Goto ((card J) + 1))) ';' J; set J2 = I ';' ((Goto ((card J) + 1)) ';' J); set pJ = stop (I ';' ((Goto ((card J) + 1)) ';' J)); set pI = stop I; set P1 = P +* (stop I); set P2 = P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J))); set m = LifeSpan ((P +* (stop I)),s); set SS = Stop SCMPDS; set s3 = Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s))); set s4 = Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s))); set P3 = P +* (stop I); set P4 = P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J))); A1: Initialize s = s by MEMSTR_0:44; A2: (I ';' (Goto ((card J) + 1))) ';' J = I ';' ((Goto ((card J) + 1)) ';' J) by AFINSQ_1:27; A3: I c= stop I by AFINSQ_1:74; stop I c= P +* (stop I) by FUNCT_4:25; then A4: I c= P +* (stop I) by A3, XBOOLE_1:1; A5: dom (stop I) c= dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by SCMPDS_5:13; set JS = ((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS); reconsider n = IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) as Element of NAT ; A6: card (stop I) = (card I) + 1 by COMPOS_1:55; assume A7: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P ) ) then IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) in dom (stop I) by Def2, A1; then n < (card I) + 1 by A6, AFINSQ_1:66; then A8: n <= card I by INT_1:7; A9: stop (I ';' ((Goto ((card J) + 1)) ';' J)) c= P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by FUNCT_4:25; A10: stop (I ';' ((Goto ((card J) + 1)) ';' J)) = (I ';' ((Goto ((card J) + 1)) ';' J)) ';' (Stop SCMPDS) .= I ';' (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) by AFINSQ_1:27 ; then I c= stop (I ';' ((Goto ((card J) + 1)) ';' J)) by AFINSQ_1:74; then I c= P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by A9, XBOOLE_1:1; then A11: I c= P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J))) ; assume A12: I is_halting_on s,P ; ::_thesis: ( (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P ) then A13: P +* (stop I) halts_on s by Def3, A1; A14: (P +* (stop I)) /. (IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s))))) = (P +* (stop I)) . (IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s))))) by PBOOLE:143; A15: (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) /. (IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s))))) = (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) . (IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s))))) by PBOOLE:143; percases ( IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) <> card I or IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = card I ) ; suppose IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) <> card I ; ::_thesis: ( (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P ) then n < card I by A8, XXREAL_0:1; then A16: IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) in dom I by AFINSQ_1:66; A17: halt SCMPDS = CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s))))) by A13, EXTPRO_1:def_15 .= I . (IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s))))) by A4, A16, A14, GRFUNC_1:2 .= (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) . (IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s))))) by A11, A16, GRFUNC_1:2 .= CurInstr ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),(Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s))))) by A7, A12, Th25, A15 ; then A18: P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J))) halts_on s by EXTPRO_1:29; hence (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P by A2, Def3, A1; ::_thesis: (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(I_';'_((Goto_((card_J)_+_1))_';'_J)))),s,k))_in_dom_(stop_(I_';'_((Goto_((card_J)_+_1))_';'_J))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,b1)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) set C1k = IC (Comput ((P +* (stop I)),s,k)); set C2k = IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)); percases ( k <= LifeSpan ((P +* (stop I)),s) or k > LifeSpan ((P +* (stop I)),s) ) ; supposeA19: k <= LifeSpan ((P +* (stop I)),s) ; ::_thesis: IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,b1)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) IC (Comput ((P +* (stop I)),s,k)) in dom (stop I) by A7, Def2, A1; then IC (Comput ((P +* (stop I)),s,k)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by A5; hence IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by A7, A12, A19, Th25; ::_thesis: verum end; supposeA20: k > LifeSpan ((P +* (stop I)),s) ; ::_thesis: IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,b1)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) set m2 = LifeSpan ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s); A21: LifeSpan ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s) <= LifeSpan ((P +* (stop I)),s) by A17, A18, EXTPRO_1:def_15; then IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)) = IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s)))) by A18, A20, EXTPRO_1:25, XXREAL_0:2 .= IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s)))) by A7, A12, A21, Th25 ; then IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)) in dom (stop I) by A7, Def2, A1; hence IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by A5; ::_thesis: verum end; end; end; hence (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P by A2, Def2, A1; ::_thesis: verum end; supposeA22: IC (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) = card I ; ::_thesis: ( (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P ) then A23: IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s)))) = card I by A7, A12, Th25; A24: 0 in dom (Goto ((card J) + 1)) by Th19; A25: card (Stop SCMPDS) = 1 by AFINSQ_1:33; A26: ((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS) = (Goto ((card J) + 1)) ';' (J ';' (Stop SCMPDS)) by AFINSQ_1:27; then A27: card (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) = (card (Goto ((card J) + 1))) + (card (J ';' (Stop SCMPDS))) by AFINSQ_1:17 .= 1 + (card (J ';' (Stop SCMPDS))) by COMPOS_1:54 .= ((card J) + 1) + 1 by A25, AFINSQ_1:17 ; then A28: 0 in dom (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) by AFINSQ_1:66; (card J) + 1 < card (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) by A27, NAT_1:13; then A29: (card J) + 1 in dom (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) by AFINSQ_1:66; card (stop (I ';' ((Goto ((card J) + 1)) ';' J))) = (card I) + ((card J) + (1 + 1)) by A10, A27, AFINSQ_1:17 .= (((card I) + (card J)) + 1) + 1 ; then A30: ((card I) + (card J)) + 1 < card (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by NAT_1:13; then A31: ((card I) + (card J)) + 1 in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by AFINSQ_1:66; A32: (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) /. (IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s))))) = (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) . (IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s))))) by PBOOLE:143; card (stop (I ';' ((Goto ((card J) + 1)) ';' J))) = (card I) + (card (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS))) by A10, AFINSQ_1:17; then (card I) + 0 < card (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by XREAL_1:6; then A33: card I in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by AFINSQ_1:66; A34: CurInstr ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),(Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s))))) = (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) . (card I) by A7, A12, A22, Th25, A32 .= (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) . (card I) .= (I ';' (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS))) . (0 + (card I)) by A10, A9, A33, GRFUNC_1:2 .= (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) . 0 by A28, AFINSQ_1:def_3 .= (Goto ((card J) + 1)) . 0 by A26, A24, AFINSQ_1:def_3 .= goto ((card J) + 1) by Th19 ; card ((Goto ((card J) + 1)) ';' J) = (card (Goto ((card J) + 1))) + (card J) by AFINSQ_1:17 .= 1 + (card J) by COMPOS_1:54 ; then A35: (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) . ((card J) + 1) = (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS)) . (0 + (card ((Goto ((card J) + 1)) ';' J))) .= halt SCMPDS by Lm1, Lm2, AFINSQ_1:def_3 ; A36: (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) /. (IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,((LifeSpan ((P +* (stop I)),s)) + 1)))) = (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) . (IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,((LifeSpan ((P +* (stop I)),s)) + 1)))) by PBOOLE:143; A37: IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,((LifeSpan ((P +* (stop I)),s)) + 1))) = IC (Following ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),(Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s)))))) by EXTPRO_1:3 .= ICplusConst ((Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop I)),s)))),((card J) + 1)) by A34, SCMPDS_2:54 .= (card I) + ((card J) + 1) by A23, Th12 .= ((card I) + (card J)) + 1 ; then A38: CurInstr ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),(Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,((LifeSpan ((P +* (stop I)),s)) + 1)))) = (P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))) . (((card I) + (card J)) + 1) by A36 .= (I ';' (((Goto ((card J) + 1)) ';' J) ';' (Stop SCMPDS))) . ((card I) + ((card J) + 1)) by A10, A9, A31, GRFUNC_1:2 .= halt SCMPDS by A29, A35, AFINSQ_1:def_3 ; then A39: P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J))) halts_on s by EXTPRO_1:29; hence (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P by A2, Def3, A1; ::_thesis: (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(I_';'_((Goto_((card_J)_+_1))_';'_J)))),s,k))_in_dom_(stop_(I_';'_((Goto_((card_J)_+_1))_';'_J))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,b1)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) set C1k = IC (Comput ((P +* (stop I)),s,k)); set C2k = IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)); percases ( k <= LifeSpan ((P +* (stop I)),s) or k > LifeSpan ((P +* (stop I)),s) ) ; supposeA40: k <= LifeSpan ((P +* (stop I)),s) ; ::_thesis: IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,b1)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) IC (Comput ((P +* (stop I)),s,k)) in dom (stop I) by A7, Def2, A1; then IC (Comput ((P +* (stop I)),s,k)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by A5; hence IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by A7, A12, A40, Th25; ::_thesis: verum end; supposeA41: k > LifeSpan ((P +* (stop I)),s) ; ::_thesis: IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,b1)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) set m2 = LifeSpan ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s); A42: LifeSpan ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s) <= (LifeSpan ((P +* (stop I)),s)) + 1 by A38, A39, EXTPRO_1:def_15; k >= (LifeSpan ((P +* (stop I)),s)) + 1 by A41, INT_1:7; then IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)) = IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,(LifeSpan ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s)))) by A39, A42, EXTPRO_1:25, XXREAL_0:2 .= ((card I) + (card J)) + 1 by A37, A39, A42, EXTPRO_1:25 ; hence IC (Comput ((P +* (stop (I ';' ((Goto ((card J) + 1)) ';' J)))),s,k)) in dom (stop (I ';' ((Goto ((card J) + 1)) ';' J))) by A30, AFINSQ_1:66; ::_thesis: verum end; end; end; hence (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P by A2, Def2, A1; ::_thesis: verum end; end; end; theorem Th31: :: SCMPDS_6:31 for s2 being State of SCMPDS for P1, P2 being Instruction-Sequence of SCMPDS for s1 being 0 -started State of SCMPDS for I being shiftable Program of SCMPDS st stop I c= P1 & I is_closed_on s1,P1 holds for n being Element of NAT st Shift ((stop I),n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds for i being Element of NAT holds ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) proof let s2 be State of SCMPDS; ::_thesis: for P1, P2 being Instruction-Sequence of SCMPDS for s1 being 0 -started State of SCMPDS for I being shiftable Program of SCMPDS st stop I c= P1 & I is_closed_on s1,P1 holds for n being Element of NAT st Shift ((stop I),n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds for i being Element of NAT holds ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) let P1, P2 be Instruction-Sequence of SCMPDS; ::_thesis: for s1 being 0 -started State of SCMPDS for I being shiftable Program of SCMPDS st stop I c= P1 & I is_closed_on s1,P1 holds for n being Element of NAT st Shift ((stop I),n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds for i being Element of NAT holds ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) let s1 be 0 -started State of SCMPDS; ::_thesis: for I being shiftable Program of SCMPDS st stop I c= P1 & I is_closed_on s1,P1 holds for n being Element of NAT st Shift ((stop I),n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds for i being Element of NAT holds ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) let I be shiftable Program of SCMPDS; ::_thesis: ( stop I c= P1 & I is_closed_on s1,P1 implies for n being Element of NAT st Shift ((stop I),n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds for i being Element of NAT holds ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) set SI = stop I; assume that A1: stop I c= P1 and A2: I is_closed_on s1,P1 ; ::_thesis: for n being Element of NAT st Shift ((stop I),n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 holds for i being Element of NAT holds ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) A3: Initialize s1 = s1 by MEMSTR_0:44; let n be Element of NAT ; ::_thesis: ( Shift ((stop I),n) c= P2 & IC s2 = n & DataPart s1 = DataPart s2 implies for i being Element of NAT holds ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ) defpred S1[ Element of NAT ] means ( (IC (Comput (P1,s1,$1))) + n = IC (Comput (P2,s2,$1)) & CurInstr (P1,(Comput (P1,s1,$1))) = CurInstr (P2,(Comput (P2,s2,$1))) & DataPart (Comput (P1,s1,$1)) = DataPart (Comput (P2,s2,$1)) ); assume that A4: Shift ((stop I),n) c= P2 and A5: IC s2 = n and A6: DataPart s1 = DataPart s2 ; ::_thesis: for i being Element of NAT holds ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) let i be Element of NAT ; ::_thesis: ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) A7: DataPart (Comput (P1,s1,0)) = DataPart s2 by A6, EXTPRO_1:2 .= DataPart (Comput (P2,s2,0)) by EXTPRO_1:2 ; A8: 0 in dom (stop I) by COMPOS_1:36; then A9: 0 + n in dom (Shift ((stop I),n)) by VALUED_1:24; A10: P1 . (IC s1) = P1 . (IC (Initialize s1)) by A3 .= P1 . 0 by MEMSTR_0:def_11 .= (stop I) . 0 by A1, A8, GRFUNC_1:2 ; A11: P1 = P1 +* (stop I) by A1, FUNCT_4:98; A12: for k being Element of NAT st S1[k] holds S1[k + 1] proof let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] ) assume A13: S1[k] ; ::_thesis: S1[k + 1] reconsider m = IC (Comput (P1,s1,k)) as Element of NAT ; set i = CurInstr (P1,(Comput (P1,s1,k))); A14: Comput (P1,s1,(k + 1)) = Following (P1,(Comput (P1,s1,k))) by EXTPRO_1:3; reconsider l = IC (Comput (P1,s1,(k + 1))) as Element of NAT ; A15: IC (Comput (P1,s1,(k + 1))) in dom (stop I) by A2, A11, Def2, A3; then A16: l + n in dom (Shift ((stop I),n)) by VALUED_1:24; A17: Comput (P2,s2,(k + 1)) = Following (P2,(Comput (P2,s2,k))) by EXTPRO_1:3; A18: IC (Comput (P1,s1,k)) in dom (stop I) by A2, A11, Def2, A3; A19: P1 /. (IC (Comput (P1,s1,k))) = P1 . (IC (Comput (P1,s1,k))) by PBOOLE:143; A20: CurInstr (P1,(Comput (P1,s1,k))) = P1 . (IC (Comput (P1,s1,k))) by A19 .= (stop I) . (IC (Comput (P1,s1,k))) by A1, A18, GRFUNC_1:2 ; then A21: ( InsCode (CurInstr (P1,(Comput (P1,s1,k)))) <> 1 & InsCode (CurInstr (P1,(Comput (P1,s1,k)))) <> 3 ) by A18, SCMPDS_4:def_9; A22: CurInstr (P1,(Comput (P1,s1,k))) valid_at m by A18, A20, SCMPDS_4:def_9; hence A23: (IC (Comput (P1,s1,(k + 1)))) + n = IC (Comput (P2,s2,(k + 1))) by A13, A14, A17, A21, SCMPDS_4:28; ::_thesis: ( CurInstr (P1,(Comput (P1,s1,(k + 1)))) = CurInstr (P2,(Comput (P2,s2,(k + 1)))) & DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) ) A24: P1 /. (IC (Comput (P1,s1,(k + 1)))) = P1 . (IC (Comput (P1,s1,(k + 1)))) by PBOOLE:143; A25: P2 /. (IC (Comput (P2,s2,(k + 1)))) = P2 . (IC (Comput (P2,s2,(k + 1)))) by PBOOLE:143; CurInstr (P1,(Comput (P1,s1,(k + 1)))) = P1 . l by A24 .= (stop I) . l by A1, A15, GRFUNC_1:2 .= (stop I) . l ; hence CurInstr (P1,(Comput (P1,s1,(k + 1)))) = (Shift ((stop I),n)) . (IC (Comput (P2,s2,(k + 1)))) by A23, A15, VALUED_1:def_12 .= P2 . (IC (Comput (P2,s2,(k + 1)))) by A4, A23, A16, GRFUNC_1:2 .= CurInstr (P2,(Comput (P2,s2,(k + 1)))) by A25 ; ::_thesis: DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) thus DataPart (Comput (P1,s1,(k + 1))) = DataPart (Comput (P2,s2,(k + 1))) by A13, A14, A17, A21, A22, SCMPDS_4:28; ::_thesis: verum end; A26: IC (Comput (P1,s1,0)) = IC s1 by EXTPRO_1:2 .= IC (Initialize s1) by A3 .= 0 by MEMSTR_0:def_11 ; A27: Comput (P1,s1,0) = s1 by EXTPRO_1:2; A28: Comput (P2,s2,0) = s2 by EXTPRO_1:2; A29: P2 /. (IC s2) = P2 . (IC s2) by PBOOLE:143; A30: P1 /. (IC s1) = P1 . (IC s1) by PBOOLE:143; CurInstr (P1,(Comput (P1,s1,0))) = CurInstr (P1,s1) by A27 .= (Shift ((stop I),n)) . (0 + n) by A8, A10, A30, VALUED_1:def_12 .= CurInstr (P2,s2) by A4, A5, A9, A29, GRFUNC_1:2 .= CurInstr (P2,(Comput (P2,s2,0))) by A28 ; then A31: S1[ 0 ] by A5, A26, A7, EXTPRO_1:2; for k being Element of NAT holds S1[k] from NAT_1:sch_1(A31, A12); hence ( (IC (Comput (P1,s1,i))) + n = IC (Comput (P2,s2,i)) & CurInstr (P1,(Comput (P1,s1,i))) = CurInstr (P2,(Comput (P2,s2,i))) & DataPart (Comput (P1,s1,i)) = DataPart (Comput (P2,s2,i)) ) ; ::_thesis: verum end; theorem Th32: :: SCMPDS_6:32 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free Program of SCMPDS for J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) = ((card I) + (card J)) + 1 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free Program of SCMPDS for J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) = ((card I) + (card J)) + 1 let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free Program of SCMPDS for J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) = ((card I) + (card J)) + 1 let I be halt-free Program of SCMPDS; ::_thesis: for J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) = ((card I) + (card J)) + 1 let J be Program of SCMPDS; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) = ((card I) + (card J)) + 1 ) set m = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1; set G = Goto ((card J) + 1); set P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)); A1: Initialize s = s by MEMSTR_0:44; assume A2: ( I is_closed_on s,P & I is_halting_on s,P ) ; ::_thesis: IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) = ((card I) + (card J)) + 1 then ( P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 ) by Lm3, A1; then IC (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) by EXTPRO_1:23 .= ((card I) + (card J)) + 1 by A2, Lm3, A1 ; hence IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) = ((card I) + (card J)) + 1 ; ::_thesis: verum end; theorem Th33: :: SCMPDS_6:33 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free Program of SCMPDS for J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free Program of SCMPDS for J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free Program of SCMPDS for J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) let I be halt-free Program of SCMPDS; ::_thesis: for J being Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) let J be Program of SCMPDS; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) ) set P1 = P +* (stop I); set m = (LifeSpan ((P +* (stop I)),s)) + 1; set G = Goto ((card J) + 1); set P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)); set l = ((card I) + (card J)) + 1; assume that A1: I is_closed_on s,P and A2: I is_halting_on s,P ; ::_thesis: IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) Initialize s = s by MEMSTR_0:44; then A3: P +* (stop I) halts_on s by A2, Def3; ( P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s & LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (LifeSpan ((P +* (stop I)),s)) + 1 ) by A1, A2, Lm3; then A4: Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,((LifeSpan ((P +* (stop I)),s)) + 1)) by EXTPRO_1:23; then DataPart (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = DataPart (Comput ((P +* (stop I)),s,(LifeSpan ((P +* (stop I)),s)))) by A1, A2, Lm3; then A5: DataPart (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = DataPart (Result ((P +* (stop I)),s)) by A3, EXTPRO_1:23 .= DataPart ((Result ((P +* (stop I)),s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS))) by MEMSTR_0:79 ; IC (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = ((card I) + (card J)) + 1 by A1, A2, A4, Lm3 .= IC ((Result ((P +* (stop I)),s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS))) by FUNCT_4:113 ; then A6: Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) = (Result ((P +* (stop I)),s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) by A5, MEMSTR_0:78; thus IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s) = Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) .= (Result ((P +* (stop I)),s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) by A6 .= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS)) ; ::_thesis: verum end; theorem Th34: :: SCMPDS_6:34 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (IExec (I,P,(Initialize s))) = card I proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (IExec (I,P,(Initialize s))) = card I let s be State of SCMPDS; ::_thesis: for I being halt-free Program of SCMPDS st I is_closed_on s,P & I is_halting_on s,P holds IC (IExec (I,P,(Initialize s))) = card I let I be halt-free Program of SCMPDS; ::_thesis: ( I is_closed_on s,P & I is_halting_on s,P implies IC (IExec (I,P,(Initialize s))) = card I ) set s1 = Initialize s; set P1 = P +* (stop I); assume that A1: I is_closed_on s,P and A2: I is_halting_on s,P ; ::_thesis: IC (IExec (I,P,(Initialize s))) = card I A3: P +* (stop I) halts_on Initialize s by A2, Def3; thus IC (IExec (I,P,(Initialize s))) = IC (Result ((P +* (stop I)),(Initialize s))) .= IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A3, EXTPRO_1:23 .= card I by A1, A2, Th29 ; ::_thesis: verum end; begin definition let a be Int_position; let k be Integer; let I, J be Program of SCMPDS; func if=0 (a,k,I,J) -> Program of SCMPDS equals :: SCMPDS_6:def 4 ((((a,k) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J; coherence ((((a,k) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J is Program of SCMPDS ; func if>0 (a,k,I,J) -> Program of SCMPDS equals :: SCMPDS_6:def 5 ((((a,k) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J; coherence ((((a,k) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J is Program of SCMPDS ; func if<0 (a,k,I,J) -> Program of SCMPDS equals :: SCMPDS_6:def 6 ((((a,k) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J; coherence ((((a,k) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J is Program of SCMPDS ; end; :: deftheorem defines if=0 SCMPDS_6:def_4_:_ for a being Int_position for k being Integer for I, J being Program of SCMPDS holds if=0 (a,k,I,J) = ((((a,k) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J; :: deftheorem defines if>0 SCMPDS_6:def_5_:_ for a being Int_position for k being Integer for I, J being Program of SCMPDS holds if>0 (a,k,I,J) = ((((a,k) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J; :: deftheorem defines if<0 SCMPDS_6:def_6_:_ for a being Int_position for k being Integer for I, J being Program of SCMPDS holds if<0 (a,k,I,J) = ((((a,k) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) ';' J; definition let a be Int_position; let k be Integer; let I be Program of SCMPDS; func if=0 (a,k,I) -> Program of SCMPDS equals :: SCMPDS_6:def 7 ((a,k) <>0_goto ((card I) + 1)) ';' I; coherence ((a,k) <>0_goto ((card I) + 1)) ';' I is Program of SCMPDS ; func if<>0 (a,k,I) -> Program of SCMPDS equals :: SCMPDS_6:def 8 (((a,k) <>0_goto 2) ';' (goto ((card I) + 1))) ';' I; coherence (((a,k) <>0_goto 2) ';' (goto ((card I) + 1))) ';' I is Program of SCMPDS ; func if>0 (a,k,I) -> Program of SCMPDS equals :: SCMPDS_6:def 9 ((a,k) <=0_goto ((card I) + 1)) ';' I; coherence ((a,k) <=0_goto ((card I) + 1)) ';' I is Program of SCMPDS ; func if<=0 (a,k,I) -> Program of SCMPDS equals :: SCMPDS_6:def 10 (((a,k) <=0_goto 2) ';' (goto ((card I) + 1))) ';' I; coherence (((a,k) <=0_goto 2) ';' (goto ((card I) + 1))) ';' I is Program of SCMPDS ; func if<0 (a,k,I) -> Program of SCMPDS equals :: SCMPDS_6:def 11 ((a,k) >=0_goto ((card I) + 1)) ';' I; coherence ((a,k) >=0_goto ((card I) + 1)) ';' I is Program of SCMPDS ; func if>=0 (a,k,I) -> Program of SCMPDS equals :: SCMPDS_6:def 12 (((a,k) >=0_goto 2) ';' (goto ((card I) + 1))) ';' I; coherence (((a,k) >=0_goto 2) ';' (goto ((card I) + 1))) ';' I is Program of SCMPDS ; end; :: deftheorem defines if=0 SCMPDS_6:def_7_:_ for a being Int_position for k being Integer for I being Program of SCMPDS holds if=0 (a,k,I) = ((a,k) <>0_goto ((card I) + 1)) ';' I; :: deftheorem defines if<>0 SCMPDS_6:def_8_:_ for a being Int_position for k being Integer for I being Program of SCMPDS holds if<>0 (a,k,I) = (((a,k) <>0_goto 2) ';' (goto ((card I) + 1))) ';' I; :: deftheorem defines if>0 SCMPDS_6:def_9_:_ for a being Int_position for k being Integer for I being Program of SCMPDS holds if>0 (a,k,I) = ((a,k) <=0_goto ((card I) + 1)) ';' I; :: deftheorem defines if<=0 SCMPDS_6:def_10_:_ for a being Int_position for k being Integer for I being Program of SCMPDS holds if<=0 (a,k,I) = (((a,k) <=0_goto 2) ';' (goto ((card I) + 1))) ';' I; :: deftheorem defines if<0 SCMPDS_6:def_11_:_ for a being Int_position for k being Integer for I being Program of SCMPDS holds if<0 (a,k,I) = ((a,k) >=0_goto ((card I) + 1)) ';' I; :: deftheorem defines if>=0 SCMPDS_6:def_12_:_ for a being Int_position for k being Integer for I being Program of SCMPDS holds if>=0 (a,k,I) = (((a,k) >=0_goto 2) ';' (goto ((card I) + 1))) ';' I; Lm4: for n being Element of NAT for i being Instruction of SCMPDS for I, J being Program of SCMPDS holds card (((i ';' I) ';' (Goto n)) ';' J) = ((card I) + (card J)) + 2 proof let n be Element of NAT ; ::_thesis: for i being Instruction of SCMPDS for I, J being Program of SCMPDS holds card (((i ';' I) ';' (Goto n)) ';' J) = ((card I) + (card J)) + 2 let i be Instruction of SCMPDS; ::_thesis: for I, J being Program of SCMPDS holds card (((i ';' I) ';' (Goto n)) ';' J) = ((card I) + (card J)) + 2 let I, J be Program of SCMPDS; ::_thesis: card (((i ';' I) ';' (Goto n)) ';' J) = ((card I) + (card J)) + 2 set G = Goto n; thus card (((i ';' I) ';' (Goto n)) ';' J) = (card ((i ';' I) ';' (Goto n))) + (card J) by AFINSQ_1:17 .= ((card (i ';' I)) + (card (Goto n))) + (card J) by AFINSQ_1:17 .= ((card (i ';' I)) + 1) + (card J) by COMPOS_1:54 .= (((card I) + 1) + 1) + (card J) by Th6 .= ((card I) + (card J)) + 2 ; ::_thesis: verum end; begin theorem :: SCMPDS_6:35 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds card (if=0 (a,k1,I,J)) = ((card I) + (card J)) + 2 by Lm4; theorem :: SCMPDS_6:36 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds ( 0 in dom (if=0 (a,k1,I,J)) & 1 in dom (if=0 (a,k1,I,J)) ) proof let a be Int_position; ::_thesis: for k1 being Integer for I, J being Program of SCMPDS holds ( 0 in dom (if=0 (a,k1,I,J)) & 1 in dom (if=0 (a,k1,I,J)) ) let k1 be Integer; ::_thesis: for I, J being Program of SCMPDS holds ( 0 in dom (if=0 (a,k1,I,J)) & 1 in dom (if=0 (a,k1,I,J)) ) let I, J be Program of SCMPDS; ::_thesis: ( 0 in dom (if=0 (a,k1,I,J)) & 1 in dom (if=0 (a,k1,I,J)) ) set ci = card (if=0 (a,k1,I,J)); card (if=0 (a,k1,I,J)) = ((card I) + (card J)) + 2 by Lm4; then 2 <= card (if=0 (a,k1,I,J)) by NAT_1:12; then 1 < card (if=0 (a,k1,I,J)) by XXREAL_0:2; hence ( 0 in dom (if=0 (a,k1,I,J)) & 1 in dom (if=0 (a,k1,I,J)) ) by AFINSQ_1:66; ::_thesis: verum end; Lm5: for i being Instruction of SCMPDS for I, J, K being Program of SCMPDS holds (((i ';' I) ';' J) ';' K) . 0 = i proof let i be Instruction of SCMPDS; ::_thesis: for I, J, K being Program of SCMPDS holds (((i ';' I) ';' J) ';' K) . 0 = i let I, J, K be Program of SCMPDS; ::_thesis: (((i ';' I) ';' J) ';' K) . 0 = i A1: 0 in dom (Load i) by COMPOS_1:50; ((i ';' I) ';' J) ';' K = (i ';' (I ';' J)) ';' K by SCMPDS_4:14 .= i ';' ((I ';' J) ';' K) by SCMPDS_4:14 .= (Load i) ';' ((I ';' J) ';' K) ; hence (((i ';' I) ';' J) ';' K) . 0 = (Load i) . 0 by A1, AFINSQ_1:def_3 .= i by COMPOS_1:52 ; ::_thesis: verum end; theorem :: SCMPDS_6:37 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds (if=0 (a,k1,I,J)) . 0 = (a,k1) <>0_goto ((card I) + 2) by Lm5; Lm6: for i being Instruction of SCMPDS for I being Program of SCMPDS for P being Instruction-Sequence of SCMPDS holds Shift ((stop I),1) c= P +* (stop (i ';' I)) proof let i be Instruction of SCMPDS; ::_thesis: for I being Program of SCMPDS for P being Instruction-Sequence of SCMPDS holds Shift ((stop I),1) c= P +* (stop (i ';' I)) let I be Program of SCMPDS; ::_thesis: for P being Instruction-Sequence of SCMPDS holds Shift ((stop I),1) c= P +* (stop (i ';' I)) let P be Instruction-Sequence of SCMPDS; ::_thesis: Shift ((stop I),1) c= P +* (stop (i ';' I)) set pI = stop I; set iI = i ';' I; set piI = stop (i ';' I); set P3 = P +* (stop (i ';' I)); ( card (Load i) = 1 & i ';' I = (Load i) ';' I ) by COMPOS_1:54; then A1: Shift ((stop I),1) c= stop (i ';' I) by Th13; stop (i ';' I) c= P +* (stop (i ';' I)) by FUNCT_4:25; then Shift ((stop I),1) c= P +* (stop (i ';' I)) by A1, XBOOLE_1:1; hence Shift ((stop I),1) c= P +* (stop (i ';' I)) ; ::_thesis: verum end; Lm7: for i, j being Instruction of SCMPDS for I being Program of SCMPDS for P being Instruction-Sequence of SCMPDS holds Shift ((stop I),2) c= P +* (stop ((i ';' j) ';' I)) proof let i, j be Instruction of SCMPDS; ::_thesis: for I being Program of SCMPDS for P being Instruction-Sequence of SCMPDS holds Shift ((stop I),2) c= P +* (stop ((i ';' j) ';' I)) let I be Program of SCMPDS; ::_thesis: for P being Instruction-Sequence of SCMPDS holds Shift ((stop I),2) c= P +* (stop ((i ';' j) ';' I)) let P be Instruction-Sequence of SCMPDS; ::_thesis: Shift ((stop I),2) c= P +* (stop ((i ';' j) ';' I)) set pI = stop I; set pjI = stop ((i ';' j) ';' I); set P3 = P +* (stop ((i ';' j) ';' I)); card (i ';' j) = card ((Load i) ';' (Load j)) .= (card (Load i)) + (card (Load j)) by AFINSQ_1:17 .= 1 + (card (Load j)) by COMPOS_1:54 .= 1 + 1 by COMPOS_1:54 ; then A1: Shift ((stop I),2) c= stop ((i ';' j) ';' I) by Th13; stop ((i ';' j) ';' I) c= P +* (stop ((i ';' j) ';' I)) by FUNCT_4:25; then Shift ((stop I),2) c= P +* (stop ((i ';' j) ';' I)) by A1, XBOOLE_1:1; hence Shift ((stop I),2) c= P +* (stop ((i ';' j) ';' I)) ; ::_thesis: verum end; theorem Th38: :: SCMPDS_6:38 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let s be 0 -started State of SCMPDS; ::_thesis: for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let I, J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) ) set i = (a,k1) <>0_goto ((card I) + 2); set G = Goto ((card J) + 1); set I2 = (I ';' (Goto ((card J) + 1))) ';' J; set IF = if=0 (a,k1,I,J); set pIF = stop (if=0 (a,k1,I,J)); set pI2 = stop ((I ';' (Goto ((card J) + 1))) ';' J); set P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)); set P3 = P +* (stop (if=0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1); set P4 = P +* (stop (if=0 (a,k1,I,J))); A2: Initialize s = s by MEMSTR_0:44; then A3: IC s = 0 by MEMSTR_0:47; A4: if=0 (a,k1,I,J) = (((a,k1) <>0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) <>0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; then A5: Shift ((stop ((I ';' (Goto ((card J) + 1))) ';' J)),1) c= P +* (stop (if=0 (a,k1,I,J))) by Lm6; A6: Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,0))) by EXTPRO_1:3 .= Following ((P +* (stop (if=0 (a,k1,I,J)))),s) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto ((card I) + 2)),s) by A4, Th11, A2 ; for a being Int_position holds s . a = (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)) . a by A6, SCMPDS_2:55; then A7: DataPart s = DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)) by SCMPDS_4:8; s . (DataLoc ((s . a),k1)) = s . (DataLoc ((s . a),k1)) .= 0 by A1 ; then A8: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)) = succ (IC s) by A6, SCMPDS_2:55 .= 0 + 1 by A3 ; A9: 0 in dom (stop (if=0 (a,k1,I,J))) by COMPOS_1:36; assume A10: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) ) assume A11: I is_halting_on s,P ; ::_thesis: ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) then (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P by A10, Th30; then A12: P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s by Def3, A2; A13: (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P by A10, A11, Th30; then A14: ( Start-At (0,SCMPDS) c= s & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) ) by Th24, A2, FUNCT_4:25; A15: card (stop (if=0 (a,k1,I,J))) = (card (if=0 (a,k1,I,J))) + 1 by COMPOS_1:55 .= ((card ((I ';' (Goto ((card J) + 1))) ';' J)) + 1) + 1 by A4, Th6 ; A16: stop ((I ';' (Goto ((card J) + 1))) ';' J) c= P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by FUNCT_4:25; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if=0_(a,k1,I,J)))),s,k))_in_dom_(stop_(if=0_(a,k1,I,J))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,b1)) in dom (stop (if=0 (a,k1,I,J))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,b1)) in dom (stop (if=0 (a,k1,I,J))) then consider k1 being Nat such that A17: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k1)) as Element of NAT ; A18: card (stop (if=0 (a,k1,I,J))) = (card (stop ((I ';' (Goto ((card J) + 1))) ';' J))) + 1 by A15, COMPOS_1:55; m in dom (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by A13, Def2, A2; then m < card (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by AFINSQ_1:66; then A19: m + 1 < card (stop (if=0 (a,k1,I,J))) by A18, XREAL_1:6; IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,k)) = IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),k1)) by A17, EXTPRO_1:4 .= m + 1 by A14, A5, A8, A7, Th31, A16 ; hence IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,k)) in dom (stop (if=0 (a,k1,I,J))) by A19, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,b1)) in dom (stop (if=0 (a,k1,I,J))) hence IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,k)) in dom (stop (if=0 (a,k1,I,J))) by A9, A3, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if=0 (a,k1,I,J) is_closed_on s,P by Def2, A2; ::_thesis: if=0 (a,k1,I,J) is_halting_on s,P A20: Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)) = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))) by EXTPRO_1:4; CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A20 .= CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A14, A5, A8, A7, Th31, A16 .= halt SCMPDS by A12, EXTPRO_1:def_15 ; then P +* (stop (if=0 (a,k1,I,J))) halts_on s by EXTPRO_1:29; hence if=0 (a,k1,I,J) is_halting_on s,P by Def3, A2; ::_thesis: verum end; theorem Th39: :: SCMPDS_6:39 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P implies ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set pJ = stop J; set s1 = Initialize s; set P1 = P +* (stop J); set IF = if=0 (a,k1,I,J); set pIF = stop (if=0 (a,k1,I,J)); set s3 = Initialize s; set P3 = P +* (stop (if=0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1); set P4 = P +* (stop (if=0 (a,k1,I,J))); set i = (a,k1) <>0_goto ((card I) + 2); set G = Goto ((card J) + 1); set iG = (((a,k1) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1)); A1: if=0 (a,k1,I,J) = (((a,k1) <>0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) <>0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; A2: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto ((card I) + 2)),(Initialize s)) by A1, Th11 ; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: IC (Initialize s) = 0 by MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: ( not J is_closed_on s,P or not J is_halting_on s,P or ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) ) then A6: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 2)) by A2, A4, SCMPDS_2:55 .= 0 + ((card I) + 2) by A5, Th12 ; assume A7: J is_closed_on s,P ; ::_thesis: ( not J is_halting_on s,P or ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) ) then A8: ( Start-At (0,SCMPDS) c= Initialize s & J is_closed_on Initialize s,P +* (stop J) ) by Th24, FUNCT_4:25; A9: stop (if=0 (a,k1,I,J)) c= P +* (stop (if=0 (a,k1,I,J))) by FUNCT_4:25; A10: card ((((a,k1) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) = (card (((a,k1) <>0_goto ((card I) + 2)) ';' I)) + (card (Goto ((card J) + 1))) by AFINSQ_1:17 .= (card (((a,k1) <>0_goto ((card I) + 2)) ';' I)) + 1 by COMPOS_1:54 .= ((card I) + 1) + 1 by Th6 .= (card I) + (1 + 1) ; then Shift ((stop J),((card I) + 2)) c= stop (if=0 (a,k1,I,J)) by Th13; then A11: Shift ((stop J),((card I) + 2)) c= P +* (stop (if=0 (a,k1,I,J))) by A9, XBOOLE_1:1; assume J is_halting_on s,P ; ::_thesis: ( if=0 (a,k1,I,J) is_closed_on s,P & if=0 (a,k1,I,J) is_halting_on s,P ) then A12: P +* (stop J) halts_on Initialize s by Def3; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)) . a by A2, SCMPDS_2:55; then A13: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)) by SCMPDS_4:8; A14: stop J c= P +* (stop J) by FUNCT_4:25; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if=0_(a,k1,I,J)))),(Initialize_s),k))_in_dom_(stop_(if=0_(a,k1,I,J))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I,J))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I,J))) then consider k1 being Nat such that A15: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop J)),(Initialize s),k1)) as Element of NAT ; m in dom (stop J) by A7, Def2; then m < card (stop J) by AFINSQ_1:66; then A16: m + ((card I) + 2) < (card (stop J)) + ((card I) + 2) by XREAL_1:6; A17: card (stop J) = (card J) + 1 by COMPOS_1:55; A18: card (stop (if=0 (a,k1,I,J))) = (card (if=0 (a,k1,I,J))) + 1 by COMPOS_1:55 .= (((card I) + 2) + (card J)) + 1 by A10, AFINSQ_1:17 .= ((card I) + 2) + (card (stop J)) by A17 ; IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),k1)) by A15, EXTPRO_1:4 .= m + ((card I) + 2) by A8, A13, A11, A6, Th31, A14 ; hence IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),k)) in dom (stop (if=0 (a,k1,I,J))) by A18, A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I,J))) then Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),k)) in dom (stop (if=0 (a,k1,I,J))) by A5, COMPOS_1:36; ::_thesis: verum end; end; end; hence if=0 (a,k1,I,J) is_closed_on s,P by Def2; ::_thesis: if=0 (a,k1,I,J) is_halting_on s,P A19: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)) = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A19 .= CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A8, A13, A11, A6, Th31, A14 .= halt SCMPDS by A12, EXTPRO_1:def_15 ; then P +* (stop (if=0 (a,k1,I,J))) halts_on Initialize s by EXTPRO_1:29; hence if=0 (a,k1,I,J) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th40: :: SCMPDS_6:40 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) set i = (a,k1) <>0_goto ((card I) + 2); set G = Goto ((card J) + 1); set I2 = (I ';' (Goto ((card J) + 1))) ';' J; set IF = if=0 (a,k1,I,J); set pI2 = stop ((I ';' (Goto ((card J) + 1))) ';' J); set s2 = s; set s3 = s; set P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)); set P3 = P +* (stop (if=0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1); set P4 = P +* (stop (if=0 (a,k1,I,J))); A2: Initialize s = s by MEMSTR_0:44; then A3: IC s = 0 by MEMSTR_0:47; A4: if=0 (a,k1,I,J) = (((a,k1) <>0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) <>0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; then A5: Shift ((stop ((I ';' (Goto ((card J) + 1))) ';' J)),1) c= P +* (stop (if=0 (a,k1,I,J))) by Lm6; A6: Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,0))) by EXTPRO_1:3 .= Following ((P +* (stop (if=0 (a,k1,I,J)))),s) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto ((card I) + 2)),s) by A4, Th11, A2 ; s . (DataLoc ((s . a),k1)) = s . (DataLoc ((s . a),k1)) .= 0 by A1 ; then A7: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)) = succ (IC s) by A6, SCMPDS_2:55 .= 0 + 1 by A3 ; for a being Int_position holds s . a = (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)) . a by A6, SCMPDS_2:55; then A8: DataPart s = DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)) by SCMPDS_4:8; set SAl = Start-At ((((card I) + (card J)) + 2),SCMPDS); assume A9: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) assume A10: I is_halting_on s,P ; ::_thesis: IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) then (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P by A9, Th30; then A11: P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s by Def3, A2; (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P by A9, A10, Th30; then A12: ( Start-At (0,SCMPDS) c= s & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) ) by Th24, A2, FUNCT_4:25; A13: stop ((I ';' (Goto ((card J) + 1))) ';' J) c= P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by FUNCT_4:25; A14: Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)) = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))) by EXTPRO_1:4; A15: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A14 .= CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A12, A5, A7, A8, Th31, A13 .= halt SCMPDS by A11, EXTPRO_1:def_15 ; then A16: P +* (stop (if=0 (a,k1,I,J))) halts_on s by EXTPRO_1:29; A17: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),s) = (a,k1) <>0_goto ((card I) + 2) by A4, Th11, A2; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_((I_';'_(Goto_((card_J)_+_1)))_';'_J))),s))_+_1_holds_ CurInstr_((P_+*_(stop_(if=0_(a,k1,I,J)))),(Comput_((P_+*_(stop_(if=0_(a,k1,I,J)))),s,l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 implies CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS ) assume A18: l < (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 ; ::_thesis: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS A19: Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,0) = s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,l))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),s) by A19; hence CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,l))) <> halt SCMPDS by A17; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,b1))) = halt SCMPDS then consider n being Nat such that A20: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A21: n < LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) by A18, A20, XREAL_1:6; assume A22: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,l))) = halt SCMPDS ; ::_thesis: contradiction A23: Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,(n + 1)) = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,n))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),n))) by A12, A5, A7, A8, Th31, A13 .= halt SCMPDS by A20, A22, A23 ; hence contradiction by A11, A21, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,l))) = halt SCMPDS holds (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 <= l ; then A24: LifeSpan ((P +* (stop (if=0 (a,k1,I,J)))),s) = (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 by A15, A16, EXTPRO_1:def_15; A25: DataPart (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A11, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A12, A5, A7, A8, Th31, A13 .= DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if=0 (a,k1,I,J)))),s)) by A16, A24, EXTPRO_1:23 ; A26: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if=0_(a,k1,I,J)),P,s))_holds_ (IExec_((if=0_(a,k1,I,J)),P,s))_._x_=_((IExec_(((I_';'_(Goto_((card_J)_+_1)))_';'_J),P,s))_+*_(Start-At_((((card_I)_+_(card_J))_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if=0 (a,k1,I,J)),P,s)) implies (IExec ((if=0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 ) A27: dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A28: x in dom (IExec ((if=0 (a,k1,I,J)),P,s)) ; ::_thesis: (IExec ((if=0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A28, SCMPDS_4:6; supposeA29: x is Int_position ; ::_thesis: (IExec ((if=0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A30: not x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A27, TARSKI:def_1; thus (IExec ((if=0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if=0 (a,k1,I,J)))),s)) . x .= (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) . x by A25, A29, SCMPDS_4:8 .= (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) . x .= ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A30, FUNCT_4:11 ; ::_thesis: verum end; supposeA31: x = IC ; ::_thesis: (IExec ((if=0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 A32: IC (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) .= ((card I) + (card J)) + 1 by A9, A10, Th32 ; A33: x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A27, A31, TARSKI:def_1; thus (IExec ((if=0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if=0 (a,k1,I,J)))),s)) . x .= (Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1))) . x by A16, A24, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A31, EXTPRO_1:4 .= (IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) + 1 by A12, A5, A7, A8, Th31, A13 .= (IC (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))) + 1 by A11, EXTPRO_1:23 .= IC (Start-At (((((card I) + (card J)) + 1) + 1),SCMPDS)) by A32, FUNCOP_1:72 .= ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A31, A33, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if=0 (a,k1,I,J)),P,s)) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A26, FUNCT_1:2 .= ((IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A9, A10, Th33 .= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by MEMSTR_0:36 ; ::_thesis: verum end; theorem Th41: :: SCMPDS_6:41 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let J be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 & J is_closed_on s,P & J is_halting_on s,P implies IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set pJ = stop J; set s1 = Initialize s; set P1 = P +* (stop J); set P2 = P +* (stop J); set IF = if=0 (a,k1,I,J); set pIF = stop (if=0 (a,k1,I,J)); set s3 = Initialize s; set P3 = P +* (stop (if=0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1); set P4 = P +* (stop (if=0 (a,k1,I,J))); set i = (a,k1) <>0_goto ((card I) + 2); set G = Goto ((card J) + 1); set iG = (((a,k1) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1)); set SAl = Start-At ((((card I) + (card J)) + 2),SCMPDS); A1: if=0 (a,k1,I,J) = (((a,k1) <>0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) <>0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; A2: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto ((card I) + 2)),(Initialize s)) by A1, Th11 ; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: IC (Initialize s) = 0 by MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: ( not J is_closed_on s,P or not J is_halting_on s,P or IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) then A6: IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 2)) by A2, A4, SCMPDS_2:55 .= 0 + ((card I) + 2) by A5, Th12 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)) . a by A2, SCMPDS_2:55; then A7: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)) by SCMPDS_4:8; card ((((a,k1) <>0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) = (card (((a,k1) <>0_goto ((card I) + 2)) ';' I)) + (card (Goto ((card J) + 1))) by AFINSQ_1:17 .= (card (((a,k1) <>0_goto ((card I) + 2)) ';' I)) + 1 by COMPOS_1:54 .= ((card I) + 1) + 1 by Th6 .= (card I) + (1 + 1) ; then A8: Shift ((stop J),((card I) + 2)) c= stop (if=0 (a,k1,I,J)) by Th13; stop (if=0 (a,k1,I,J)) c= P +* (stop (if=0 (a,k1,I,J))) by FUNCT_4:25; then Shift ((stop J),((card I) + 2)) c= P +* (stop (if=0 (a,k1,I,J))) by A8, XBOOLE_1:1; then A9: Shift ((stop J),((card I) + 2)) c= P +* (stop (if=0 (a,k1,I,J))) ; assume A10: J is_closed_on s,P ; ::_thesis: ( not J is_halting_on s,P or IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) then A11: ( Start-At (0,SCMPDS) c= Initialize s & J is_closed_on Initialize s,P +* (stop J) ) by Th24, FUNCT_4:25; A12: stop J c= P +* (stop J) by FUNCT_4:25; assume A13: J is_halting_on s,P ; ::_thesis: IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) then A14: P +* (stop J) halts_on Initialize s by Def3; A15: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)) = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))) by EXTPRO_1:4; A16: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A15 .= CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A11, A9, A6, A7, Th31, A12 .= halt SCMPDS by A14, EXTPRO_1:def_15 ; then A17: P +* (stop (if=0 (a,k1,I,J))) halts_on Initialize s by EXTPRO_1:29; A18: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) = (a,k1) <>0_goto ((card I) + 2) by A1, Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_J)),(Initialize_s)))_+_1_holds_ CurInstr_((P_+*_(stop_(if=0_(a,k1,I,J)))),(Comput_((P_+*_(stop_(if=0_(a,k1,I,J)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1))) <> halt SCMPDS ) assume A19: l < (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 ; ::_thesis: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1))) <> halt SCMPDS A20: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),l))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) by A20; hence CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),l))) <> halt SCMPDS by A18; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),b1))) = halt SCMPDS then consider n being Nat such that A21: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A22: n < LifeSpan ((P +* (stop J)),(Initialize s)) by A19, A21, XREAL_1:6; assume A23: CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),l))) = halt SCMPDS ; ::_thesis: contradiction A24: Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize s),n))) = CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),n))) by A11, A9, A6, A7, Th31, A12 .= halt SCMPDS by A21, A23, A24 ; hence contradiction by A14, A22, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),l))) = halt SCMPDS holds (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 <= l ; then A25: LifeSpan ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s)) = (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 by A16, A17, EXTPRO_1:def_15; A26: DataPart (Result ((P +* (stop J)),(Initialize s))) = DataPart (Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A14, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A11, A9, A6, A7, Th31, A12 .= DataPart (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s))) by A17, A25, EXTPRO_1:23 ; A27: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if=0_(a,k1,I,J)),P,(Initialize_s)))_holds_ (IExec_((if=0_(a,k1,I,J)),P,(Initialize_s)))_._x_=_((IExec_(J,P,(Initialize_s)))_+*_(Start-At_((((card_I)_+_(card_J))_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) implies (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 ) A28: dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A29: x in dom (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) ; ::_thesis: (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A29, SCMPDS_4:6; supposeA30: x is Int_position ; ::_thesis: (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A31: not x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A28, TARSKI:def_1; thus (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . x = (Result ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s))) . x .= (Result ((P +* (stop J)),(Initialize s))) . x by A26, A30, SCMPDS_4:8 .= (IExec (J,P,(Initialize s))) . x .= ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A31, FUNCT_4:11 ; ::_thesis: verum end; supposeA32: x = IC ; ::_thesis: (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 A33: IC (Result ((P +* (stop J)),(Initialize s))) = IC (IExec (J,P,(Initialize s))) .= card J by A10, A13, Th34 ; A34: x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A28, A32, TARSKI:def_1; thus (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . x = (Result ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s))) . x .= (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1))) . x by A17, A25, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Comput ((P +* (stop (if=0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A32, EXTPRO_1:4 .= (IC (Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) + ((card I) + 2) by A11, A9, A6, A7, Th31, A12 .= (IC (Result ((P +* (stop J)),(Initialize s)))) + ((card I) + 2) by A14, EXTPRO_1:23 .= IC (Start-At (((card J) + ((card I) + 2)),SCMPDS)) by A33, FUNCOP_1:72 .= ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A32, A34, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A27, FUNCT_1:2; ::_thesis: verum end; registration let I, J be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if=0 (a,k1,I,J) -> parahalting shiftable ; correctness coherence ( if=0 (a,k1,I,J) is shiftable & if=0 (a,k1,I,J) is parahalting ); proof set i = (a,k1) <>0_goto ((card I) + 2); set G = Goto ((card J) + 1); set IF = if=0 (a,k1,I,J); reconsider IJ = (I ';' (Goto ((card J) + 1))) ';' J as shiftable Program of SCMPDS ; thus if=0 (a,k1,I,J) is shiftable ; ::_thesis: if=0 (a,k1,I,J) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if=0 (a,k1,I,J)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if=0 (a,k1,I,J)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if=0 (a,k1,I,J)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if=0 (a,k1,I,J))) by FUNCT_4:98; A3: ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; A4: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) = 0 or s . (DataLoc ((s . a),k1)) <> 0 ) ; suppose s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: P halts_on s then if=0 (a,k1,I,J) is_halting_on s,P by A4, Th38; hence P halts_on s by A1, A2, Def3; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: P halts_on s then if=0 (a,k1,I,J) is_halting_on s,P by A3, Th39; hence P halts_on s by A1, A2, Def3; ::_thesis: verum end; end; end; end; registration let I, J be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if=0 (a,k1,I,J) -> halt-free ; coherence if=0 (a,k1,I,J) is halt-free ; end; theorem :: SCMPDS_6:42 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let s be 0 -started State of SCMPDS; ::_thesis: for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let I, J be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let k1 be Integer; ::_thesis: IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 set IF = if=0 (a,k1,I,J); A1: ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; A2: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; A3: Initialize s = s by MEMSTR_0:44; hereby ::_thesis: verum percases ( s . (DataLoc ((s . a),k1)) = 0 or s . (DataLoc ((s . a),k1)) <> 0 ) ; suppose s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 then IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A2, Th40; hence IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 then IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th41, A3; hence IC (IExec ((if=0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 by FUNCT_4:113; ::_thesis: verum end; end; end; end; theorem :: SCMPDS_6:43 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let J be shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 implies (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b ) assume A1: s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b A2: not b in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if=0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th40; hence (IExec ((if=0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:44 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let I be Program of SCMPDS; ::_thesis: for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let J be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 implies (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b ) assume A1: s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b A2: not b in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by SCMPDS_4:18; ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; then IExec ((if=0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th41; hence (IExec ((if=0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b by A2, FUNCT_4:11; ::_thesis: verum end; begin theorem :: SCMPDS_6:45 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds card (if=0 (a,k1,I)) = (card I) + 1 by Th6; theorem :: SCMPDS_6:46 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds 0 in dom (if=0 (a,k1,I)) proof let a be Int_position; ::_thesis: for k1 being Integer for I being Program of SCMPDS holds 0 in dom (if=0 (a,k1,I)) let k1 be Integer; ::_thesis: for I being Program of SCMPDS holds 0 in dom (if=0 (a,k1,I)) let I be Program of SCMPDS; ::_thesis: 0 in dom (if=0 (a,k1,I)) set ci = card (if=0 (a,k1,I)); card (if=0 (a,k1,I)) = (card I) + 1 by Th6; hence 0 in dom (if=0 (a,k1,I)) by AFINSQ_1:66; ::_thesis: verum end; theorem :: SCMPDS_6:47 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds (if=0 (a,k1,I)) . 0 = (a,k1) <>0_goto ((card I) + 1) by Th7; theorem Th48: :: SCMPDS_6:48 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) let I be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) ) set i = (a,k1) <>0_goto ((card I) + 1); set IF = if=0 (a,k1,I); set pIF = stop (if=0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if=0 (a,k1,I))); A2: IC (Initialize s) = 0 by MEMSTR_0:47; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; A4: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto ((card I) + 1)),(Initialize s)) by Th11 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) . a by A4, SCMPDS_2:55; then A5: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= 0 by A1, A3, FUNCT_4:11 ; then A6: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A4, SCMPDS_2:55 .= 0 + 1 by A2 ; assume A7: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) ) then A8: I is_closed_on Initialize s,P +* (stop I) by Th24; assume I is_halting_on s,P ; ::_thesis: ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) then A9: P +* (stop I) halts_on Initialize s by Def3; A10: 0 in dom (stop (if=0 (a,k1,I))) by COMPOS_1:36; A11: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),1) c= P +* (stop (if=0 (a,k1,I))) ) by Lm6, FUNCT_4:25; A12: stop I c= P +* (stop I) by FUNCT_4:25; A13: card (stop (if=0 (a,k1,I))) = (card (if=0 (a,k1,I))) + 1 by COMPOS_1:55 .= ((card I) + 1) + 1 by Th6 ; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if=0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if=0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I))) then consider k1 being Nat such that A14: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop I)),(Initialize s),k1)) as Element of NAT ; A15: card (stop (if=0 (a,k1,I))) = (card (stop I)) + 1 by A13, COMPOS_1:55; m in dom (stop I) by A7, Def2; then m < card (stop I) by AFINSQ_1:66; then A16: m + 1 < card (stop (if=0 (a,k1,I))) by A15, XREAL_1:6; IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),k1)) by A14, EXTPRO_1:4 .= m + 1 by A8, A11, A6, A5, Th31, A12 ; hence IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if=0 (a,k1,I))) by A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I))) hence IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if=0 (a,k1,I))) by A10, A2, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if=0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if=0 (a,k1,I) is_halting_on s,P A17: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A17 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A8, A11, A6, A5, Th31, A12 .= halt SCMPDS by A9, EXTPRO_1:def_15 ; then P +* (stop (if=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; hence if=0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th49: :: SCMPDS_6:49 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 implies ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: ( if=0 (a,k1,I) is_closed_on s,P & if=0 (a,k1,I) is_halting_on s,P ) set i = (a,k1) <>0_goto ((card I) + 1); set IF = if=0 (a,k1,I); set pIF = stop (if=0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if=0 (a,k1,I))); A2: IC (Initialize s) = 0 by MEMSTR_0:47; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto ((card I) + 1)),(Initialize s)) by Th11 ; then A5: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 1)) by A1, A4, SCMPDS_2:55 .= 0 + ((card I) + 1) by A2, Th12 ; A6: card (if=0 (a,k1,I)) = (card I) + 1 by Th6; then A7: (card I) + 1 in dom (stop (if=0 (a,k1,I))) by COMPOS_1:64; A8: (P +* (stop (if=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; stop (if=0 (a,k1,I)) c= P +* (stop (if=0 (a,k1,I))) by FUNCT_4:25; then stop (if=0 (a,k1,I)) c= P +* (stop (if=0 (a,k1,I))) ; then (P +* (stop (if=0 (a,k1,I)))) . ((card I) + 1) = (stop (if=0 (a,k1,I))) . ((card I) + 1) by A7, GRFUNC_1:2 .= halt SCMPDS by A6, COMPOS_1:64 ; then A9: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1))) = halt SCMPDS by A5, A8; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if=0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if=0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I))) then 1 + 0 <= k by INT_1:7; hence IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if=0 (a,k1,I))) by A7, A5, A9, EXTPRO_1:5; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if=0 (a,k1,I))) then Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if=0 (a,k1,I))) by A2, COMPOS_1:36; ::_thesis: verum end; end; end; hence if=0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if=0 (a,k1,I) is_halting_on s,P P +* (stop (if=0 (a,k1,I))) halts_on Initialize s by A9, EXTPRO_1:29; hence if=0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th50: :: SCMPDS_6:50 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) set i = (a,k1) <>0_goto ((card I) + 1); set IF = if=0 (a,k1,I); set pI = stop I; set pIF = stop (if=0 (a,k1,I)); set s2 = Initialize s; set P2 = P +* (stop I); set s3 = Initialize s; set P3 = P +* (stop (if=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if=0 (a,k1,I))); A2: IC (Initialize s) = 0 by MEMSTR_0:47; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; A4: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto ((card I) + 1)),(Initialize s)) by Th11 ; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= 0 by A1, A3, FUNCT_4:11 ; then A5: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A4, SCMPDS_2:55 .= 0 + 1 by A2 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) . a by A4, SCMPDS_2:55; then A6: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; assume A7: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) then A8: I is_closed_on Initialize s,P +* (stop I) by Th24; set SAl = Start-At (((card I) + 1),SCMPDS); A9: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),1) c= P +* (stop (if=0 (a,k1,I))) ) by Lm6, FUNCT_4:25; A10: stop I c= P +* (stop I) by FUNCT_4:25; assume A11: I is_halting_on s,P ; ::_thesis: IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) then A12: P +* (stop I) halts_on Initialize s by Def3; A13: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; A14: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A13 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A8, A9, A5, A6, Th31, A10 .= halt SCMPDS by A12, EXTPRO_1:def_15 ; then A15: P +* (stop (if=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A16: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) = (a,k1) <>0_goto ((card I) + 1) by Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_I)),(Initialize_s)))_+_1_holds_ CurInstr_((P_+*_(stop_(if=0_(a,k1,I)))),(Comput_((P_+*_(stop_(if=0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume A17: l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 ; ::_thesis: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS A18: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) by A18; hence CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A16; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),b1))) = halt SCMPDS then consider n being Nat such that A19: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A20: n < LifeSpan ((P +* (stop I)),(Initialize s)) by A17, A19, XREAL_1:6; assume A21: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS ; ::_thesis: contradiction A22: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),n))) = CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),n))) by A8, A9, A5, A6, Th31, A10 .= halt SCMPDS by A19, A21, A22 ; hence contradiction by A12, A20, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 <= l ; then A23: LifeSpan ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 by A14, A15, EXTPRO_1:def_15; A24: DataPart (Result ((P +* (stop I)),(Initialize s))) = DataPart (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A12, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A8, A9, A5, A6, Th31, A10 .= DataPart (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if=0 (a,k1,I)))),(Initialize s))) by A15, A23, EXTPRO_1:23 ; A25: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if=0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if=0_(a,k1,I)),P,(Initialize_s)))_._x_=_((IExec_(I,P,(Initialize_s)))_+*_(Start-At_(((card_I)_+_1),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if=0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 ) A26: dom (Start-At (((card I) + 1),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A27: x in dom (IExec ((if=0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A27, SCMPDS_4:6; supposeA28: x is Int_position ; ::_thesis: (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A29: not x in dom (Start-At (((card I) + 1),SCMPDS)) by A26, TARSKI:def_1; thus (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if=0 (a,k1,I)))),(Initialize s))) . x .= (Result ((P +* (stop I)),(Initialize s))) . x by A24, A28, SCMPDS_4:8 .= (IExec (I,P,(Initialize s))) . x .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . x by A29, FUNCT_4:11 ; ::_thesis: verum end; supposeA30: x = IC ; ::_thesis: (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 A31: IC (Result ((P +* (stop I)),(Initialize s))) = IC (IExec (I,P,(Initialize s))) .= card I by A7, A11, Th34 ; A32: x in dom (Start-At (((card I) + 1),SCMPDS)) by A26, A30, TARSKI:def_1; thus (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if=0 (a,k1,I)))),(Initialize s))) . x .= (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) . x by A15, A23, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A30, EXTPRO_1:4 .= (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) + 1 by A8, A9, A5, A6, Th31, A10 .= (IC (Result ((P +* (stop I)),(Initialize s)))) + 1 by A12, EXTPRO_1:23 .= IC (Start-At (((card I) + 1),SCMPDS)) by A31, FUNCOP_1:72 .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . x by A30, A32, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if=0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) by A25, FUNCT_1:2; ::_thesis: verum end; theorem Th51: :: SCMPDS_6:51 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 implies IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if=0 (a,k1,I); set pIF = stop (if=0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if=0 (a,k1,I))); set i = (a,k1) <>0_goto ((card I) + 1); set SAl = Start-At (((card I) + 1),SCMPDS); A1: IC (Initialize s) = 0 by MEMSTR_0:47; A2: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A3: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A2, FUNCT_4:11 ; A4: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto ((card I) + 1)),(Initialize s)) by Th11 ; assume s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) then A5: IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 1)) by A4, A3, SCMPDS_2:55 .= 0 + ((card I) + 1) by A1, Th12 ; A6: stop (if=0 (a,k1,I)) c= P +* (stop (if=0 (a,k1,I))) by FUNCT_4:25; A7: (P +* (stop (if=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; A8: card (if=0 (a,k1,I)) = (card I) + 1 by Th6; then (card I) + 1 in dom (stop (if=0 (a,k1,I))) by COMPOS_1:64; then (P +* (stop (if=0 (a,k1,I)))) . ((card I) + 1) = (stop (if=0 (a,k1,I))) . ((card I) + 1) by A6, GRFUNC_1:2 .= halt SCMPDS by A8, COMPOS_1:64 ; then A9: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1))) = halt SCMPDS by A5, A7; then A10: P +* (stop (if=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A11: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) = (a,k1) <>0_goto ((card I) + 1) by Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_1_holds_ CurInstr_((P_+*_(stop_(if=0_(a,k1,I)))),(Comput_((P_+*_(stop_(if=0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < 1 implies CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS ) A12: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; assume l < 1 ; ::_thesis: CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS then l < 1 + 0 ; then l = 0 by NAT_1:13; then CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) by A12; hence CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A11; ::_thesis: verum end; then for l being Element of NAT st CurInstr ((P +* (stop (if=0 (a,k1,I)))),(Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds 1 <= l ; then LifeSpan ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) = 1 by A9, A10, EXTPRO_1:def_15; then A13: Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1) = Result ((P +* (stop (if=0 (a,k1,I)))),(Initialize s)) by A10, EXTPRO_1:23; A14: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if=0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if=0_(a,k1,I)),P,(Initialize_s)))_._x_=_(s_+*_(Start-At_(((card_I)_+_1),SCMPDS)))_._x A15: dom (Start-At (((card I) + 1),SCMPDS)) = {(IC )} by FUNCOP_1:13; let x be set ; ::_thesis: ( x in dom (IExec ((if=0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 ) assume A16: x in dom (IExec ((if=0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A16, SCMPDS_4:6; supposeA17: x is Int_position ; ::_thesis: (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A18: not x in dom (Start-At (((card I) + 1),SCMPDS)) by A15, TARSKI:def_1; A19: not x in dom (Start-At (0,SCMPDS)) by A17, SCMPDS_4:18; thus (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . x = (Comput ((P +* (stop (if=0 (a,k1,I)))),(Initialize s),1)) . x by A13 .= (Initialize s) . x by A4, A17, SCMPDS_2:55 .= s . x by A19, FUNCT_4:11 .= (s +* (Start-At (((card I) + 1),SCMPDS))) . x by A18, FUNCT_4:11 ; ::_thesis: verum end; supposeA20: x = IC ; ::_thesis: (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 hence (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . x = (card I) + 1 by A5, A13 .= (s +* (Start-At (((card I) + 1),SCMPDS))) . x by A20, FUNCT_4:113 ; ::_thesis: verum end; end; end; dom (IExec ((if=0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom (s +* (Start-At (((card I) + 1),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) by A14, FUNCT_1:2; ::_thesis: verum end; registration let I be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if=0 (a,k1,I) -> parahalting shiftable ; correctness coherence ( if=0 (a,k1,I) is shiftable & if=0 (a,k1,I) is parahalting ); proof set i = (a,k1) <>0_goto ((card I) + 1); set IF = if=0 (a,k1,I); thus if=0 (a,k1,I) is shiftable ; ::_thesis: if=0 (a,k1,I) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if=0 (a,k1,I)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if=0 (a,k1,I)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if=0 (a,k1,I)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if=0 (a,k1,I))) by FUNCT_4:98; A3: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) = 0 or s . (DataLoc ((s . a),k1)) <> 0 ) ; suppose s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: P halts_on s then if=0 (a,k1,I) is_halting_on s,P by A3, Th48; hence P halts_on s by A1, A2, Def3; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: P halts_on s then if=0 (a,k1,I) is_halting_on s,P by Th49; hence P halts_on s by A1, A2, Def3; ::_thesis: verum end; end; end; end; registration let I be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if=0 (a,k1,I) -> halt-free ; coherence if=0 (a,k1,I) is halt-free ; end; theorem :: SCMPDS_6:52 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 let k1 be Integer; ::_thesis: IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 set IF = if=0 (a,k1,I); A1: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; A2: Initialize s = s by MEMSTR_0:44; percases ( s . (DataLoc ((s . a),k1)) = 0 or s . (DataLoc ((s . a),k1)) <> 0 ) ; suppose s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 then IExec ((if=0 (a,k1,I)),P,s) = (IExec (I,P,s)) +* (Start-At (((card I) + 1),SCMPDS)) by A1, Th50, A2; hence IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 then IExec ((if=0 (a,k1,I)),P,s) = s +* (Start-At (((card I) + 1),SCMPDS)) by Th51, A2; hence IC (IExec ((if=0 (a,k1,I)),P,s)) = (card I) + 1 by FUNCT_4:113; ::_thesis: verum end; end; end; theorem :: SCMPDS_6:53 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let s be State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 implies (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b ) assume A1: s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b A2: not b in dom (Start-At (((card I) + 1),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) by A1, Th50; hence (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:54 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = s . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = s . b let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = s . b let I be Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = s . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = s . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 implies (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = s . b ) assume s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = s . b then A1: IExec ((if=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) by Th51; not b in dom (Start-At (((card I) + 1),SCMPDS)) by SCMPDS_4:18; hence (IExec ((if=0 (a,k1,I)),P,(Initialize s))) . b = s . b by A1, FUNCT_4:11; ::_thesis: verum end; Lm8: for i, j being Instruction of SCMPDS for I being Program of SCMPDS holds card ((i ';' j) ';' I) = (card I) + 2 proof let i, j be Instruction of SCMPDS; ::_thesis: for I being Program of SCMPDS holds card ((i ';' j) ';' I) = (card I) + 2 let I be Program of SCMPDS; ::_thesis: card ((i ';' j) ';' I) = (card I) + 2 thus card ((i ';' j) ';' I) = card (i ';' (j ';' I)) by SCMPDS_4:16 .= (card (j ';' I)) + 1 by Th6 .= ((card I) + 1) + 1 by Th6 .= (card I) + 2 ; ::_thesis: verum end; begin theorem :: SCMPDS_6:55 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds card (if<>0 (a,k1,I)) = (card I) + 2 by Lm8; Lm9: for i, j being Instruction of SCMPDS for I being Program of SCMPDS holds ( 0 in dom ((i ';' j) ';' I) & 1 in dom ((i ';' j) ';' I) ) proof let i, j be Instruction of SCMPDS; ::_thesis: for I being Program of SCMPDS holds ( 0 in dom ((i ';' j) ';' I) & 1 in dom ((i ';' j) ';' I) ) let I be Program of SCMPDS; ::_thesis: ( 0 in dom ((i ';' j) ';' I) & 1 in dom ((i ';' j) ';' I) ) set ci = card ((i ';' j) ';' I); card ((i ';' j) ';' I) = (card I) + 2 by Lm8; then 2 <= card ((i ';' j) ';' I) by NAT_1:11; then 1 < card ((i ';' j) ';' I) by XXREAL_0:2; hence ( 0 in dom ((i ';' j) ';' I) & 1 in dom ((i ';' j) ';' I) ) by AFINSQ_1:66; ::_thesis: verum end; theorem :: SCMPDS_6:56 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds ( 0 in dom (if<>0 (a,k1,I)) & 1 in dom (if<>0 (a,k1,I)) ) by Lm9; Lm10: for i, j being Instruction of SCMPDS for I being Program of SCMPDS holds ( ((i ';' j) ';' I) . 0 = i & ((i ';' j) ';' I) . 1 = j ) proof let i, j be Instruction of SCMPDS; ::_thesis: for I being Program of SCMPDS holds ( ((i ';' j) ';' I) . 0 = i & ((i ';' j) ';' I) . 1 = j ) let I be Program of SCMPDS; ::_thesis: ( ((i ';' j) ';' I) . 0 = i & ((i ';' j) ';' I) . 1 = j ) set jI = j ';' I; A1: (i ';' j) ';' I = i ';' (j ';' I) by SCMPDS_4:16 .= (Load i) ';' (j ';' I) ; 0 in dom (Load i) by COMPOS_1:50; hence ((i ';' j) ';' I) . 0 = (Load i) . 0 by A1, AFINSQ_1:def_3 .= i by COMPOS_1:52 ; ::_thesis: ((i ';' j) ';' I) . 1 = j A2: 0 in dom (Load j) by COMPOS_1:50; card (j ';' I) = (card I) + 1 by Th6; then A3: ( card (Load i) = 1 & 0 in dom (j ';' I) ) by AFINSQ_1:66, COMPOS_1:54; thus ((i ';' j) ';' I) . 1 = ((Load i) ';' (j ';' I)) . (0 + 1) by A1 .= (j ';' I) . 0 by A3, AFINSQ_1:def_3 .= ((Load j) ';' I) . 0 .= (Load j) . 0 by A2, AFINSQ_1:def_3 .= j by COMPOS_1:52 ; ::_thesis: verum end; theorem :: SCMPDS_6:57 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds ( (if<>0 (a,k1,I)) . 0 = (a,k1) <>0_goto 2 & (if<>0 (a,k1,I)) . 1 = goto ((card I) + 1) ) by Lm10; theorem Th58: :: SCMPDS_6:58 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) let I be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set IF = if<>0 (a,k1,I); set pIF = stop (if<>0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set P2 = P +* (stop I); set s3 = Initialize s; set P3 = P +* (stop (if<>0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if<>0 (a,k1,I))); set i = (a,k1) <>0_goto 2; set j = goto ((card I) + 1); A1: if<>0 (a,k1,I) = ((a,k1) <>0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A2: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto 2),(Initialize s)) by A1, Th11 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) . a by A2, SCMPDS_2:55; then A3: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; A4: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A5: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A4, FUNCT_4:11 ; A6: IC (Initialize s) = 0 by MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) ) then A7: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),2) by A2, A5, SCMPDS_2:55 .= 0 + 2 by A6, Th12 ; assume A8: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) ) then A9: I is_closed_on Initialize s,P +* (stop I) by Th24; assume I is_halting_on s,P ; ::_thesis: ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) then A10: P +* (stop I) halts_on Initialize s by Def3; A11: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),2) c= P +* (stop (if<>0 (a,k1,I))) ) by Lm7, FUNCT_4:25; A12: stop I c= P +* (stop I) by FUNCT_4:25; A13: 0 in dom (stop (if<>0 (a,k1,I))) by COMPOS_1:36; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if<>0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if<>0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<>0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<>0 (a,k1,I))) then consider k1 being Nat such that A14: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop I)),(Initialize s),k1)) as Element of NAT ; A15: card (stop (if<>0 (a,k1,I))) = 1 + (card (if<>0 (a,k1,I))) by COMPOS_1:55 .= 1 + ((card I) + 2) by Lm8 .= (1 + (card I)) + 2 .= (card (stop I)) + 2 by COMPOS_1:55 ; m in dom (stop I) by A8, Def2; then m < card (stop I) by AFINSQ_1:66; then A16: m + 2 < card (stop (if<>0 (a,k1,I))) by A15, XREAL_1:6; IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),k1)) by A14, EXTPRO_1:4 .= m + 2 by A9, A11, A7, A3, Th31, A12 ; hence IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<>0 (a,k1,I))) by A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<>0 (a,k1,I))) hence IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<>0 (a,k1,I))) by A13, A6, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if<>0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if<>0 (a,k1,I) is_halting_on s,P A17: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A17 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A9, A11, A7, A3, Th31, A12 .= halt SCMPDS by A10, EXTPRO_1:def_15 ; then P +* (stop (if<>0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; hence if<>0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th59: :: SCMPDS_6:59 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 implies ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: ( if<>0 (a,k1,I) is_closed_on s,P & if<>0 (a,k1,I) is_halting_on s,P ) set IF = if<>0 (a,k1,I); set pIF = stop (if<>0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if<>0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1); set s5 = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2); set P4 = P +* (stop (if<>0 (a,k1,I))); set P5 = P +* (stop (if<>0 (a,k1,I))); A2: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A3: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= 0 by A1, A2, FUNCT_4:11 ; A4: stop (if<>0 (a,k1,I)) c= P +* (stop (if<>0 (a,k1,I))) by FUNCT_4:25; set i = (a,k1) <>0_goto 2; set j = goto ((card I) + 1); A5: if<>0 (a,k1,I) = ((a,k1) <>0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A6: IC (Initialize s) = 0 by MEMSTR_0:47; Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto 2),(Initialize s)) by A5, Th11 ; then A7: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A3, SCMPDS_2:55 .= 0 + 1 by A6 ; A8: 1 in dom (if<>0 (a,k1,I)) by Lm9; then 1 in dom (stop (if<>0 (a,k1,I))) by COMPOS_1:62; then A9: (P +* (stop (if<>0 (a,k1,I)))) . 1 = (stop (if<>0 (a,k1,I))) . 1 by A4, GRFUNC_1:2 .= (if<>0 (a,k1,I)) . 1 by A8, COMPOS_1:63 .= goto ((card I) + 1) by Lm10 ; A10: card (if<>0 (a,k1,I)) = (card I) + 2 by Lm8; then A11: (card I) + 2 in dom (stop (if<>0 (a,k1,I))) by COMPOS_1:64; A12: (P +* (stop (if<>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if<>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(1 + 1)) = Following ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) by EXTPRO_1:3 .= Exec ((goto ((card I) + 1)),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) by A7, A9, A12 ; then A13: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2)) = ICplusConst ((Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),((card I) + 1)) by SCMPDS_2:54 .= ((card I) + 1) + 1 by A7, Th12 .= (card I) + (1 + 1) ; A14: (P +* (stop (if<>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2))) = (P +* (stop (if<>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2))) by PBOOLE:143; stop (if<>0 (a,k1,I)) c= P +* (stop (if<>0 (a,k1,I))) by FUNCT_4:25; then (P +* (stop (if<>0 (a,k1,I)))) . ((card I) + 2) = (stop (if<>0 (a,k1,I))) . ((card I) + 2) by A11, GRFUNC_1:2 .= halt SCMPDS by A10, COMPOS_1:64 ; then A15: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2))) = halt SCMPDS by A13, A14; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if<>0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if<>0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<>0 (a,k1,I))) A16: ( k = 0 or 0 + 1 <= k ) by INT_1:7; percases ( k = 0 or k = 1 or 1 < k ) by A16, XXREAL_0:1; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<>0 (a,k1,I))) then Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<>0 (a,k1,I))) by A6, COMPOS_1:36; ::_thesis: verum end; suppose k = 1 ; ::_thesis: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<>0 (a,k1,I))) hence IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<>0 (a,k1,I))) by A8, A7, COMPOS_1:62; ::_thesis: verum end; suppose 1 < k ; ::_thesis: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<>0 (a,k1,I))) then 1 + 1 <= k by INT_1:7; hence IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<>0 (a,k1,I))) by A11, A13, A15, EXTPRO_1:5; ::_thesis: verum end; end; end; hence if<>0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if<>0 (a,k1,I) is_halting_on s,P P +* (stop (if<>0 (a,k1,I))) halts_on Initialize s by A15, EXTPRO_1:29; hence if<>0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th60: :: SCMPDS_6:60 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if<>0 (a,k1,I); set pI = stop I; set pIF = stop (if<>0 (a,k1,I)); set s2 = Initialize s; set P2 = P +* (stop I); set s3 = Initialize s; set P3 = P +* (stop (if<>0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if<>0 (a,k1,I))); set i = (a,k1) <>0_goto 2; set j = goto ((card I) + 1); set SAl = Start-At (((card I) + 2),SCMPDS); A1: if<>0 (a,k1,I) = ((a,k1) <>0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A2: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto 2),(Initialize s)) by A1, Th11 ; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: IC (Initialize s) = 0 by MEMSTR_0:47; A6: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),2) c= P +* (stop (if<>0 (a,k1,I))) ) by Lm7, FUNCT_4:25; A7: stop I c= P +* (stop I) by FUNCT_4:25; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) . a by A2, SCMPDS_2:55; then A8: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; assume s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) then A9: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),2) by A2, A4, SCMPDS_2:55 .= 0 + 2 by A5, Th12 ; assume A10: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) then A11: I is_closed_on Initialize s,P +* (stop I) by Th24; assume A12: I is_halting_on s,P ; ::_thesis: IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) then A13: P +* (stop I) halts_on Initialize s by Def3; A14: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; A15: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A14 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A11, A6, A9, A8, Th31, A7 .= halt SCMPDS by A13, EXTPRO_1:def_15 ; then A16: P +* (stop (if<>0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A17: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) = (a,k1) <>0_goto 2 by A1, Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_I)),(Initialize_s)))_+_1_holds_ CurInstr_((P_+*_(stop_(if<>0_(a,k1,I)))),(Comput_((P_+*_(stop_(if<>0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume A18: l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 ; ::_thesis: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS A19: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) by A19; hence CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A17; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) = halt SCMPDS then consider n being Nat such that A20: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A21: n < LifeSpan ((P +* (stop I)),(Initialize s)) by A18, A20, XREAL_1:6; assume A22: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS ; ::_thesis: contradiction A23: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),n))) = CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),n))) by A11, A6, A9, A8, Th31, A7 .= halt SCMPDS by A20, A22, A23 ; hence contradiction by A13, A21, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 <= l ; then A24: LifeSpan ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 by A15, A16, EXTPRO_1:def_15; A25: DataPart (Result ((P +* (stop I)),(Initialize s))) = DataPart (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A13, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A11, A6, A9, A8, Th31, A7 .= DataPart (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s))) by A16, A24, EXTPRO_1:23 ; A26: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if<>0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if<>0_(a,k1,I)),P,(Initialize_s)))_._x_=_((IExec_(I,P,(Initialize_s)))_+*_(Start-At_(((card_I)_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 ) A27: dom (Start-At (((card I) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A28: x in dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A28, SCMPDS_4:6; supposeA29: x is Int_position ; ::_thesis: (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A30: not x in dom (Start-At (((card I) + 2),SCMPDS)) by A27, TARSKI:def_1; thus (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s))) . x .= (Result ((P +* (stop I)),(Initialize s))) . x by A25, A29, SCMPDS_4:8 .= (IExec (I,P,(Initialize s))) . x .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . x by A30, FUNCT_4:11 ; ::_thesis: verum end; supposeA31: x = IC ; ::_thesis: (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 A32: IC (Result ((P +* (stop I)),(Initialize s))) = IC (IExec (I,P,(Initialize s))) .= card I by A10, A12, Th34 ; A33: x in dom (Start-At (((card I) + 2),SCMPDS)) by A27, A31, TARSKI:def_1; thus (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s))) . x .= (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) . x by A16, A24, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A31, EXTPRO_1:4 .= (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) + 2 by A11, A6, A9, A8, Th31, A7 .= (IC (Result ((P +* (stop I)),(Initialize s)))) + 2 by A13, EXTPRO_1:23 .= IC (Start-At (((card I) + 2),SCMPDS)) by A32, FUNCOP_1:72 .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . x by A31, A33, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) by A26, FUNCT_1:2; ::_thesis: verum end; theorem Th61: :: SCMPDS_6:61 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 implies IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) set SAl = Start-At (((card I) + 2),SCMPDS); set i = (a,k1) <>0_goto 2; set j = goto ((card I) + 1); set IF = if<>0 (a,k1,I); set pIF = stop (if<>0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if<>0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1); set s5 = Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2); set P4 = P +* (stop (if<>0 (a,k1,I))); set P5 = P +* (stop (if<>0 (a,k1,I))); A2: if<>0 (a,k1,I) = ((a,k1) <>0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A3: stop (if<>0 (a,k1,I)) c= P +* (stop (if<>0 (a,k1,I))) by FUNCT_4:25; then A4: stop (if<>0 (a,k1,I)) c= P +* (stop (if<>0 (a,k1,I))) ; A5: stop (if<>0 (a,k1,I)) c= P +* (stop (if<>0 (a,k1,I))) by A3; A6: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; A7: IC (Initialize s) = 0 by MEMSTR_0:47; A8: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <>0_goto 2),(Initialize s)) by A2, Th11 ; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= 0 by A1, A6, FUNCT_4:11 ; then A9: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A8, SCMPDS_2:55 .= 0 + 1 by A7 ; A10: 1 in dom (if<>0 (a,k1,I)) by Lm9; then 1 in dom (stop (if<>0 (a,k1,I))) by COMPOS_1:62; then A11: (P +* (stop (if<>0 (a,k1,I)))) . 1 = (stop (if<>0 (a,k1,I))) . 1 by A4, GRFUNC_1:2 .= (if<>0 (a,k1,I)) . 1 by A10, COMPOS_1:63 .= goto ((card I) + 1) by Lm10 ; A12: (P +* (stop (if<>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if<>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; A13: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),(1 + 1)) = Following ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) by EXTPRO_1:3 .= Exec ((goto ((card I) + 1)),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1))) by A9, A11, A12 ; then A14: IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2)) = ICplusConst ((Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)),((card I) + 1)) by SCMPDS_2:54 .= ((card I) + 1) + 1 by A9, Th12 .= (card I) + (1 + 1) ; A15: (P +* (stop (if<>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2))) = (P +* (stop (if<>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2))) by PBOOLE:143; A16: card (if<>0 (a,k1,I)) = (card I) + 2 by Lm8; then (card I) + 2 in dom (stop (if<>0 (a,k1,I))) by COMPOS_1:64; then (P +* (stop (if<>0 (a,k1,I)))) . ((card I) + 2) = (stop (if<>0 (a,k1,I))) . ((card I) + 2) by A5, GRFUNC_1:2 .= halt SCMPDS by A16, COMPOS_1:64 ; then A17: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2))) = halt SCMPDS by A14, A15; then A18: P +* (stop (if<>0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A19: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) = (a,k1) <>0_goto 2 by A2, Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_1_+_1_holds_ CurInstr_((P_+*_(stop_(if<>0_(a,k1,I)))),(Comput_((P_+*_(stop_(if<>0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < 1 + 1 implies CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume l < 1 + 1 ; ::_thesis: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then A20: l <= 1 by NAT_1:13; A21: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; A22: (P +* (stop (if<>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) = (P +* (stop (if<>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) by PBOOLE:143; percases ( l = 0 or l = 1 ) by A20, NAT_1:25; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) by A21; hence CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A19; ::_thesis: verum end; suppose l = 1 ; ::_thesis: CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS hence CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A9, A11, A22; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if<>0 (a,k1,I)))),(Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds 2 <= l ; then LifeSpan ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) = 2 by A17, A18, EXTPRO_1:def_15; then A23: Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2) = Result ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s)) by A18, EXTPRO_1:23; A24: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if<>0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if<>0_(a,k1,I)),P,(Initialize_s)))_._x_=_(s_+*_(Start-At_(((card_I)_+_2),SCMPDS)))_._x A25: dom (Start-At (((card I) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; let x be set ; ::_thesis: ( x in dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 ) assume A26: x in dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A26, SCMPDS_4:6; supposeA27: x is Int_position ; ::_thesis: (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A28: not x in dom (Start-At (((card I) + 2),SCMPDS)) by A25, TARSKI:def_1; A29: not x in dom (Start-At (0,SCMPDS)) by A27, SCMPDS_4:18; thus (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . x = (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),2)) . x by A23 .= (Comput ((P +* (stop (if<>0 (a,k1,I)))),(Initialize s),1)) . x by A13, A27, SCMPDS_2:54 .= (Initialize s) . x by A8, A27, SCMPDS_2:55 .= s . x by A29, FUNCT_4:11 .= (s +* (Start-At (((card I) + 2),SCMPDS))) . x by A28, FUNCT_4:11 ; ::_thesis: verum end; supposeA30: x = IC ; ::_thesis: (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 hence (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . x = (card I) + 2 by A14, A23 .= (s +* (Start-At (((card I) + 2),SCMPDS))) . x by A30, FUNCT_4:113 ; ::_thesis: verum end; end; end; dom (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom (s +* (Start-At (((card I) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) by A24, FUNCT_1:2; ::_thesis: verum end; registration let I be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if<>0 (a,k1,I) -> parahalting shiftable ; correctness coherence ( if<>0 (a,k1,I) is shiftable & if<>0 (a,k1,I) is parahalting ); proof set i = (a,k1) <>0_goto 2; set j = goto ((card I) + 1); set IF = if<>0 (a,k1,I); set pIF = stop (if<>0 (a,k1,I)); thus if<>0 (a,k1,I) is shiftable ; ::_thesis: if<>0 (a,k1,I) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if<>0 (a,k1,I)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if<>0 (a,k1,I)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if<>0 (a,k1,I)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if<>0 (a,k1,I))) by FUNCT_4:98; A3: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) <> 0 or s . (DataLoc ((s . a),k1)) = 0 ) ; suppose s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: P halts_on s then if<>0 (a,k1,I) is_halting_on s,P by A3, Th58; hence P halts_on s by A1, A2, Def3; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: P halts_on s then if<>0 (a,k1,I) is_halting_on s,P by Th59; hence P halts_on s by A1, A2, Def3; ::_thesis: verum end; end; end; end; registration let I be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if<>0 (a,k1,I) -> halt-free ; coherence if<>0 (a,k1,I) is halt-free ; end; theorem :: SCMPDS_6:62 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 let s be State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 let k1 be Integer; ::_thesis: IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 set IF = if<>0 (a,k1,I); A1: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) <> 0 or s . (DataLoc ((s . a),k1)) = 0 ) ; suppose s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 then IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) by A1, Th60; hence IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 then IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) by Th61; hence IC (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) = (card I) + 2 by FUNCT_4:113; ::_thesis: verum end; end; end; theorem :: SCMPDS_6:63 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let s be State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <> 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <> 0 implies (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b ) assume A1: s . (DataLoc ((s . a),k1)) <> 0 ; ::_thesis: (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b A2: not b in dom (Start-At (((card I) + 2),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) by A1, Th60; hence (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:64 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = s . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = s . b let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = s . b let I be Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = s . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) = 0 holds (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = s . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) = 0 implies (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = s . b ) assume s . (DataLoc ((s . a),k1)) = 0 ; ::_thesis: (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = s . b then A1: IExec ((if<>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) by Th61; not b in dom (Start-At (((card I) + 2),SCMPDS)) by SCMPDS_4:18; hence (IExec ((if<>0 (a,k1,I)),P,(Initialize s))) . b = s . b by A1, FUNCT_4:11; ::_thesis: verum end; begin theorem :: SCMPDS_6:65 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds card (if>0 (a,k1,I,J)) = ((card I) + (card J)) + 2 by Lm4; theorem :: SCMPDS_6:66 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds ( 0 in dom (if>0 (a,k1,I,J)) & 1 in dom (if>0 (a,k1,I,J)) ) proof let a be Int_position; ::_thesis: for k1 being Integer for I, J being Program of SCMPDS holds ( 0 in dom (if>0 (a,k1,I,J)) & 1 in dom (if>0 (a,k1,I,J)) ) let k1 be Integer; ::_thesis: for I, J being Program of SCMPDS holds ( 0 in dom (if>0 (a,k1,I,J)) & 1 in dom (if>0 (a,k1,I,J)) ) let I, J be Program of SCMPDS; ::_thesis: ( 0 in dom (if>0 (a,k1,I,J)) & 1 in dom (if>0 (a,k1,I,J)) ) set ci = card (if>0 (a,k1,I,J)); card (if>0 (a,k1,I,J)) = ((card I) + (card J)) + 2 by Lm4; then 2 <= card (if>0 (a,k1,I,J)) by NAT_1:12; then 1 < card (if>0 (a,k1,I,J)) by XXREAL_0:2; hence ( 0 in dom (if>0 (a,k1,I,J)) & 1 in dom (if>0 (a,k1,I,J)) ) by AFINSQ_1:66; ::_thesis: verum end; theorem :: SCMPDS_6:67 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds (if>0 (a,k1,I,J)) . 0 = (a,k1) <=0_goto ((card I) + 2) by Lm5; theorem Th68: :: SCMPDS_6:68 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let s be 0 -started State of SCMPDS; ::_thesis: for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let I, J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set G = Goto ((card J) + 1); set I2 = (I ';' (Goto ((card J) + 1))) ';' J; set IF = if>0 (a,k1,I,J); set pIF = stop (if>0 (a,k1,I,J)); set pI2 = stop ((I ';' (Goto ((card J) + 1))) ';' J); set s2 = Initialize s; set P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)); set P3 = P +* (stop (if>0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1); set P4 = P +* (stop (if>0 (a,k1,I,J))); set i = (a,k1) <=0_goto ((card I) + 2); A1: 0 in dom (stop (if>0 (a,k1,I,J))) by COMPOS_1:36; A2: Initialize s = s by MEMSTR_0:44; then A3: IC s = 0 by MEMSTR_0:47; A4: if>0 (a,k1,I,J) = (((a,k1) <=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) <=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; then A5: Shift ((stop ((I ';' (Goto ((card J) + 1))) ';' J)),1) c= P +* (stop (if>0 (a,k1,I,J))) by Lm6; A6: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>0 (a,k1,I,J)))),s) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto ((card I) + 2)),s) by A4, Th11, A2 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) . a by A6, A2, SCMPDS_2:56; then A7: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) by SCMPDS_4:8; assume s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) ) then A8: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) = succ (IC s) by A6, SCMPDS_2:56 .= 0 + 1 by A3 ; assume A9: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) ) assume A10: I is_halting_on s,P ; ::_thesis: ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) then A11: (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P by A9, Th30; then A12: ( Start-At (0,SCMPDS) c= Initialize s & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on Initialize s,P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) ) by Th24, FUNCT_4:25; A13: stop ((I ';' (Goto ((card J) + 1))) ';' J) c= P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by FUNCT_4:25; (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P by A9, A10, Th30; then A14: P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on Initialize s by Def3; A15: card (stop (if>0 (a,k1,I,J))) = (card (if>0 (a,k1,I,J))) + 1 by COMPOS_1:55 .= ((card ((I ';' (Goto ((card J) + 1))) ';' J)) + 1) + 1 by A4, Th6 ; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if>0_(a,k1,I,J)))),s,k))_in_dom_(stop_(if>0_(a,k1,I,J))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1)) in dom (stop (if>0 (a,k1,I,J))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1)) in dom (stop (if>0 (a,k1,I,J))) then consider k1 being Nat such that A16: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s),k1)) as Element of NAT ; A17: card (stop (if>0 (a,k1,I,J))) = (card (stop ((I ';' (Goto ((card J) + 1))) ';' J))) + 1 by A15, COMPOS_1:55; m in dom (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by A11, Def2; then m < card (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by AFINSQ_1:66; then A18: m + 1 < card (stop (if>0 (a,k1,I,J))) by A17, XREAL_1:6; IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,k)) = IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),k1)) by A16, EXTPRO_1:4 .= m + 1 by A12, A5, A8, A7, Th31, A13 ; hence IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,k)) in dom (stop (if>0 (a,k1,I,J))) by A18, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1)) in dom (stop (if>0 (a,k1,I,J))) hence IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,k)) in dom (stop (if>0 (a,k1,I,J))) by A1, A3, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if>0 (a,k1,I,J) is_closed_on s,P by Def2, A2; ::_thesis: if>0 (a,k1,I,J) is_halting_on s,P A19: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s))) + 1)) = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s)))))) by A19 .= CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Initialize s)))))) by A12, A5, A8, A7, Th31, A13 .= halt SCMPDS by A14, EXTPRO_1:def_15 ; then P +* (stop (if>0 (a,k1,I,J))) halts_on s by EXTPRO_1:29; hence if>0 (a,k1,I,J) is_halting_on s,P by Def3, A2; ::_thesis: verum end; theorem Th69: :: SCMPDS_6:69 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P implies ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set pJ = stop J; set s1 = Initialize s; set P1 = P +* (stop J); set IF = if>0 (a,k1,I,J); set pIF = stop (if>0 (a,k1,I,J)); set s3 = Initialize s; set P3 = P +* (stop (if>0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),1); set P4 = P +* (stop (if>0 (a,k1,I,J))); set i = (a,k1) <=0_goto ((card I) + 2); set G = Goto ((card J) + 1); set iG = (((a,k1) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1)); A1: if>0 (a,k1,I,J) = (((a,k1) <=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) <=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; A2: Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto ((card I) + 2)),(Initialize s)) by A1, Th11 ; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: IC (Initialize s) = 0 by MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: ( not J is_closed_on s,P or not J is_halting_on s,P or ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) ) then A6: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 2)) by A2, A4, SCMPDS_2:56 .= 0 + ((card I) + 2) by A5, Th12 ; assume A7: J is_closed_on s,P ; ::_thesis: ( not J is_halting_on s,P or ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) ) then A8: ( Start-At (0,SCMPDS) c= Initialize s & J is_closed_on Initialize s,P +* (stop J) ) by Th24, FUNCT_4:25; A9: stop J c= P +* (stop J) by FUNCT_4:25; A10: stop (if>0 (a,k1,I,J)) c= P +* (stop (if>0 (a,k1,I,J))) by FUNCT_4:25; A11: card ((((a,k1) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) = (card (((a,k1) <=0_goto ((card I) + 2)) ';' I)) + (card (Goto ((card J) + 1))) by AFINSQ_1:17 .= (card (((a,k1) <=0_goto ((card I) + 2)) ';' I)) + 1 by COMPOS_1:54 .= ((card I) + 1) + 1 by Th6 .= (card I) + (1 + 1) ; then Shift ((stop J),((card I) + 2)) c= stop (if>0 (a,k1,I,J)) by Th13; then A12: Shift ((stop J),((card I) + 2)) c= P +* (stop (if>0 (a,k1,I,J))) by A10, XBOOLE_1:1; assume J is_halting_on s,P ; ::_thesis: ( if>0 (a,k1,I,J) is_closed_on s,P & if>0 (a,k1,I,J) is_halting_on s,P ) then A13: P +* (stop J) halts_on Initialize s by Def3; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),1)) . a by A2, SCMPDS_2:56; then A14: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),1)) by SCMPDS_4:8; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if>0_(a,k1,I,J)))),(Initialize_s),k))_in_dom_(stop_(if>0_(a,k1,I,J))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I,J))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I,J))) then consider k1 being Nat such that A15: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop J)),(Initialize s),k1)) as Element of NAT ; m in dom (stop J) by A7, Def2; then m < card (stop J) by AFINSQ_1:66; then A16: m + ((card I) + 2) < (card (stop J)) + ((card I) + 2) by XREAL_1:6; A17: card (stop J) = (card J) + 1 by COMPOS_1:55; A18: card (stop (if>0 (a,k1,I,J))) = (card (if>0 (a,k1,I,J))) + 1 by COMPOS_1:55 .= (((card I) + 2) + (card J)) + 1 by A11, AFINSQ_1:17 .= ((card I) + 2) + (card (stop J)) by A17 ; IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),1)),k1)) by A15, EXTPRO_1:4 .= m + ((card I) + 2) by A8, A14, A12, A6, Th31, A9 ; hence IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),k)) in dom (stop (if>0 (a,k1,I,J))) by A18, A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I,J))) then Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),k)) in dom (stop (if>0 (a,k1,I,J))) by A5, COMPOS_1:36; ::_thesis: verum end; end; end; hence if>0 (a,k1,I,J) is_closed_on s,P by Def2; ::_thesis: if>0 (a,k1,I,J) is_halting_on s,P A19: Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)) = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A19 .= CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A8, A14, A12, A6, Th31, A9 .= halt SCMPDS by A13, EXTPRO_1:def_15 ; then P +* (stop (if>0 (a,k1,I,J))) halts_on Initialize s by EXTPRO_1:29; hence if>0 (a,k1,I,J) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th70: :: SCMPDS_6:70 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set G = Goto ((card J) + 1); set I2 = (I ';' (Goto ((card J) + 1))) ';' J; set IF = if>0 (a,k1,I,J); set pIF = stop (if>0 (a,k1,I,J)); set pI2 = stop ((I ';' (Goto ((card J) + 1))) ';' J); set P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)); set P3 = P +* (stop (if>0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1); set P4 = P +* (stop (if>0 (a,k1,I,J))); set i = (a,k1) <=0_goto ((card I) + 2); set SAl = Start-At ((((card I) + (card J)) + 2),SCMPDS); A1: Initialize s = s by MEMSTR_0:44; then A2: IC s = 0 by MEMSTR_0:47; A3: if>0 (a,k1,I,J) = (((a,k1) <=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) <=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; then A4: Shift ((stop ((I ';' (Goto ((card J) + 1))) ';' J)),1) c= P +* (stop (if>0 (a,k1,I,J))) by Lm6; A5: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>0 (a,k1,I,J)))),s) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto ((card I) + 2)),s) by A3, Th11, A1 ; assume s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) then A6: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) = succ (IC s) by A5, SCMPDS_2:56 .= 0 + 1 by A2 ; for a being Int_position holds s . a = (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) . a by A5, SCMPDS_2:56; then A7: DataPart s = DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) by SCMPDS_4:8; assume A8: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) assume A9: I is_halting_on s,P ; ::_thesis: IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) then (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P by A8, Th30; then A10: P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s by Def3, A1; (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P by A8, A9, Th30; then A11: ( Start-At (0,SCMPDS) c= s & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) ) by Th24, A1, FUNCT_4:25; A12: stop ((I ';' (Goto ((card J) + 1))) ';' J) c= P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by FUNCT_4:25; A13: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)) = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))) by EXTPRO_1:4; A14: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A13 .= CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A11, A4, A6, A7, Th31, A12 .= halt SCMPDS by A10, EXTPRO_1:def_15 ; then A15: P +* (stop (if>0 (a,k1,I,J))) halts_on s by EXTPRO_1:29; A16: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),s) = (a,k1) <=0_goto ((card I) + 2) by A3, Th11, A1; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_((I_';'_(Goto_((card_J)_+_1)))_';'_J))),s))_+_1_holds_ CurInstr_((P_+*_(stop_(if>0_(a,k1,I,J)))),(Comput_((P_+*_(stop_(if>0_(a,k1,I,J)))),s,l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 implies CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS ) assume A17: l < (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 ; ::_thesis: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS A18: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,0) = s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),s) by A18; hence CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) <> halt SCMPDS by A16; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) = halt SCMPDS then consider n being Nat such that A19: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A20: n < LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) by A17, A19, XREAL_1:6; assume A21: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = halt SCMPDS ; ::_thesis: contradiction A22: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,(n + 1)) = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,n))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),n))) by A11, A4, A6, A7, Th31, A12 .= halt SCMPDS by A19, A21, A22 ; hence contradiction by A10, A20, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = halt SCMPDS holds (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 <= l ; then A23: LifeSpan ((P +* (stop (if>0 (a,k1,I,J)))),s) = (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 by A14, A15, EXTPRO_1:def_15; A24: DataPart (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A10, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A11, A4, A6, A7, Th31, A12 .= DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) by A15, A23, EXTPRO_1:23 ; A25: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if>0_(a,k1,I,J)),P,s))_holds_ (IExec_((if>0_(a,k1,I,J)),P,s))_._x_=_((IExec_(((I_';'_(Goto_((card_J)_+_1)))_';'_J),P,s))_+*_(Start-At_((((card_I)_+_(card_J))_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if>0 (a,k1,I,J)),P,s)) implies (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 ) A26: dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A27: x in dom (IExec ((if>0 (a,k1,I,J)),P,s)) ; ::_thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A27, SCMPDS_4:6; supposeA28: x is Int_position ; ::_thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A29: not x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A26, TARSKI:def_1; thus (IExec ((if>0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) . x .= (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) . x by A24, A28, SCMPDS_4:8 .= (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) . x .= ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A29, FUNCT_4:11 ; ::_thesis: verum end; supposeA30: x = IC ; ::_thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 A31: IC (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) .= ((card I) + (card J)) + 1 by A8, A9, Th32 ; A32: x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A26, A30, TARSKI:def_1; thus (IExec ((if>0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) . x .= (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1))) . x by A15, A23, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A30, EXTPRO_1:4 .= (IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) + 1 by A11, A4, A6, A7, Th31, A12 .= (IC (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))) + 1 by A10, EXTPRO_1:23 .= IC (Start-At (((((card I) + (card J)) + 1) + 1),SCMPDS)) by A31, FUNCOP_1:72 .= ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A30, A32, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if>0 (a,k1,I,J)),P,s)) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A25, FUNCT_1:2 .= ((IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A8, A9, Th33 .= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by MEMSTR_0:36 ; ::_thesis: verum end; theorem Th71: :: SCMPDS_6:71 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let s be 0 -started State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let J be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 & J is_closed_on s,P & J is_halting_on s,P implies IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) A1: Initialize s = s by MEMSTR_0:44; set b = DataLoc ((s . a),k1); set pJ = stop J; set s1 = s; set P1 = P +* (stop J); set IF = if>0 (a,k1,I,J); set pIF = stop (if>0 (a,k1,I,J)); set s3 = s; set P3 = P +* (stop (if>0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1); set P4 = P +* (stop (if>0 (a,k1,I,J))); set i = (a,k1) <=0_goto ((card I) + 2); set G = Goto ((card J) + 1); set iG = (((a,k1) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1)); set SAl = Start-At ((((card I) + (card J)) + 2),SCMPDS); A2: if>0 (a,k1,I,J) = (((a,k1) <=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) <=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; A3: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>0 (a,k1,I,J)))),s) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto ((card I) + 2)),s) by A2, Th11, A1 ; A4: IC s = 0 by A1, MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: ( not J is_closed_on s,P or not J is_halting_on s,P or IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) then A5: IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) = ICplusConst (s,((card I) + 2)) by A3, SCMPDS_2:56 .= 0 + ((card I) + 2) by A4, Th12 ; for a being Int_position holds s . a = (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) . a by A3, SCMPDS_2:56; then A6: DataPart s = DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)) by SCMPDS_4:8; card ((((a,k1) <=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) = (card (((a,k1) <=0_goto ((card I) + 2)) ';' I)) + (card (Goto ((card J) + 1))) by AFINSQ_1:17 .= (card (((a,k1) <=0_goto ((card I) + 2)) ';' I)) + 1 by COMPOS_1:54 .= ((card I) + 1) + 1 by Th6 .= (card I) + (1 + 1) ; then A7: Shift ((stop J),((card I) + 2)) c= stop (if>0 (a,k1,I,J)) by Th13; stop (if>0 (a,k1,I,J)) c= P +* (stop (if>0 (a,k1,I,J))) by FUNCT_4:25; then A8: Shift ((stop J),((card I) + 2)) c= P +* (stop (if>0 (a,k1,I,J))) by A7, XBOOLE_1:1; assume A9: J is_closed_on s,P ; ::_thesis: ( not J is_halting_on s,P or IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) then A10: ( Start-At (0,SCMPDS) c= s & J is_closed_on s,P +* (stop J) ) by Th24, A1, FUNCT_4:25; A11: stop J c= P +* (stop J) by FUNCT_4:25; assume A12: J is_halting_on s,P ; ::_thesis: IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) then A13: P +* (stop J) halts_on s by Def3, A1; A14: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop J)),s)) + 1)) = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop J)),s))) by EXTPRO_1:4; A15: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop J)),s)) + 1)))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop J)),s))))) by A14 .= CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),s,(LifeSpan ((P +* (stop J)),s))))) by A10, A8, A5, A6, Th31, A11 .= halt SCMPDS by A13, EXTPRO_1:def_15 ; then A16: P +* (stop (if>0 (a,k1,I,J))) halts_on s by EXTPRO_1:29; A17: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),s) = (a,k1) <=0_goto ((card I) + 2) by A2, Th11, A1; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_J)),s))_+_1_holds_ CurInstr_((P_+*_(stop_(if>0_(a,k1,I,J)))),(Comput_((P_+*_(stop_(if>0_(a,k1,I,J)))),s,l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop J)),s)) + 1 implies CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS ) assume A18: l < (LifeSpan ((P +* (stop J)),s)) + 1 ; ::_thesis: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS A19: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,0) = s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),s) by A19; hence CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) <> halt SCMPDS by A17; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,b1))) = halt SCMPDS then consider n being Nat such that A20: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A21: n < LifeSpan ((P +* (stop J)),s) by A18, A20, XREAL_1:6; assume A22: CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = halt SCMPDS ; ::_thesis: contradiction A23: Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,(n + 1)) = Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),s,n))) = CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),n))) by A10, A8, A5, A6, Th31, A11 .= halt SCMPDS by A20, A22, A23 ; hence contradiction by A13, A21, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,l))) = halt SCMPDS holds (LifeSpan ((P +* (stop J)),s)) + 1 <= l ; then A24: LifeSpan ((P +* (stop (if>0 (a,k1,I,J)))),s) = (LifeSpan ((P +* (stop J)),s)) + 1 by A15, A16, EXTPRO_1:def_15; A25: DataPart (Result ((P +* (stop J)),s)) = DataPart (Comput ((P +* (stop J)),s,(LifeSpan ((P +* (stop J)),s)))) by A13, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop J)),s)))) by A10, A8, A5, A6, Th31, A11 .= DataPart (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop J)),s)) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) by A16, A24, EXTPRO_1:23 ; A26: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if>0_(a,k1,I,J)),P,s))_holds_ (IExec_((if>0_(a,k1,I,J)),P,s))_._x_=_((IExec_(J,P,s))_+*_(Start-At_((((card_I)_+_(card_J))_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if>0 (a,k1,I,J)),P,s)) implies (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 ) A27: dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A28: x in dom (IExec ((if>0 (a,k1,I,J)),P,s)) ; ::_thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A28, SCMPDS_4:6; supposeA29: x is Int_position ; ::_thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A30: not x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A27, TARSKI:def_1; thus (IExec ((if>0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) . x .= (Result ((P +* (stop J)),s)) . x by A25, A29, SCMPDS_4:8 .= (IExec (J,P,s)) . x .= ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A30, FUNCT_4:11 ; ::_thesis: verum end; supposeA31: x = IC ; ::_thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b1 = ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 A32: IC (Result ((P +* (stop J)),s)) = IC (IExec (J,P,s)) .= card J by A9, A12, Th34, A1 ; A33: x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A27, A31, TARSKI:def_1; thus (IExec ((if>0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if>0 (a,k1,I,J)))),s)) . x .= (Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop J)),s)) + 1))) . x by A16, A24, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if>0 (a,k1,I,J)))),(Comput ((P +* (stop (if>0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop J)),s)))) by A31, EXTPRO_1:4 .= (IC (Comput ((P +* (stop J)),s,(LifeSpan ((P +* (stop J)),s))))) + ((card I) + 2) by A10, A8, A5, A6, Th31, A11 .= (IC (Result ((P +* (stop J)),s))) + ((card I) + 2) by A13, EXTPRO_1:23 .= IC (Start-At (((card J) + ((card I) + 2)),SCMPDS)) by A32, FUNCOP_1:72 .= ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A31, A33, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if>0 (a,k1,I,J)),P,s)) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A26, FUNCT_1:2; ::_thesis: verum end; registration let I, J be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if>0 (a,k1,I,J) -> parahalting shiftable ; correctness coherence ( if>0 (a,k1,I,J) is shiftable & if>0 (a,k1,I,J) is parahalting ); proof set i = (a,k1) <=0_goto ((card I) + 2); set G = Goto ((card J) + 1); set IF = if>0 (a,k1,I,J); set pIF = stop (if>0 (a,k1,I,J)); reconsider IJ = (I ';' (Goto ((card J) + 1))) ';' J as shiftable Program of SCMPDS ; thus if>0 (a,k1,I,J) is shiftable ; ::_thesis: if>0 (a,k1,I,J) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if>0 (a,k1,I,J)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if>0 (a,k1,I,J)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if>0 (a,k1,I,J)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if>0 (a,k1,I,J))) by FUNCT_4:98; A3: ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; A4: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) > 0 or s . (DataLoc ((s . a),k1)) <= 0 ) ; suppose s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: P halts_on s then if>0 (a,k1,I,J) is_halting_on s,P by A4, Th68; hence P halts_on s by A1, A2, Def3; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: P halts_on s then if>0 (a,k1,I,J) is_halting_on s,P by A3, Th69; hence P halts_on s by A1, A2, Def3; ::_thesis: verum end; end; end; end; registration let I, J be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if>0 (a,k1,I,J) -> halt-free ; coherence if>0 (a,k1,I,J) is halt-free ; end; theorem :: SCMPDS_6:72 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let s be 0 -started State of SCMPDS; ::_thesis: for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let I, J be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let k1 be Integer; ::_thesis: IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 set IF = if>0 (a,k1,I,J); A1: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; A2: ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) > 0 or s . (DataLoc ((s . a),k1)) <= 0 ) ; suppose s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 then IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th70; hence IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 then IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A2, Th71; hence IC (IExec ((if>0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 by FUNCT_4:113; ::_thesis: verum end; end; end; theorem :: SCMPDS_6:73 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let J be shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 implies (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b ) assume A1: s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b A2: not b in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th70; hence (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:74 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b let s be 0 -started State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b let I be Program of SCMPDS; ::_thesis: for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b let J be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 implies (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b ) set IF = if>0 (a,k1,I,J); assume A1: s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b A2: not b in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by SCMPDS_4:18; ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; then IExec ((if>0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th71; hence (IExec ((if>0 (a,k1,I,J)),P,s)) . b = (IExec (J,P,s)) . b by A2, FUNCT_4:11; ::_thesis: verum end; begin theorem :: SCMPDS_6:75 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds card (if>0 (a,k1,I)) = (card I) + 1 by Th6; theorem :: SCMPDS_6:76 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds 0 in dom (if>0 (a,k1,I)) proof let a be Int_position; ::_thesis: for k1 being Integer for I being Program of SCMPDS holds 0 in dom (if>0 (a,k1,I)) let k1 be Integer; ::_thesis: for I being Program of SCMPDS holds 0 in dom (if>0 (a,k1,I)) let I be Program of SCMPDS; ::_thesis: 0 in dom (if>0 (a,k1,I)) set ci = card (if>0 (a,k1,I)); card (if>0 (a,k1,I)) = (card I) + 1 by Th6; hence 0 in dom (if>0 (a,k1,I)) by AFINSQ_1:66; ::_thesis: verum end; theorem :: SCMPDS_6:77 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds (if>0 (a,k1,I)) . 0 = (a,k1) <=0_goto ((card I) + 1) by Th7; theorem Th78: :: SCMPDS_6:78 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) let I be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set IF = if>0 (a,k1,I); set pIF = stop (if>0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if>0 (a,k1,I))); set s4 = Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if>0 (a,k1,I))); set i = (a,k1) <=0_goto ((card I) + 1); A1: 0 in dom (stop (if>0 (a,k1,I))) by COMPOS_1:36; A2: IC (Initialize s) = 0 by MEMSTR_0:47; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto ((card I) + 1)),(Initialize s)) by Th11 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) . a by A5, SCMPDS_2:56; then A6: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; assume s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) ) then A7: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A5, A4, SCMPDS_2:56 .= 0 + 1 by A2 ; assume A8: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) ) then A9: I is_closed_on Initialize s,P +* (stop I) by Th24; assume I is_halting_on s,P ; ::_thesis: ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) then A10: P +* (stop I) halts_on Initialize s by Def3; A11: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),1) c= P +* (stop (if>0 (a,k1,I))) ) by Lm6, FUNCT_4:25; A12: stop I c= P +* (stop I) by FUNCT_4:25; A13: card (stop (if>0 (a,k1,I))) = (card (if>0 (a,k1,I))) + 1 by COMPOS_1:55 .= ((card I) + 1) + 1 by Th6 ; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if>0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if>0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I))) then consider k1 being Nat such that A14: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop I)),(Initialize s),k1)) as Element of NAT ; A15: card (stop (if>0 (a,k1,I))) = (card (stop I)) + 1 by A13, COMPOS_1:55; m in dom (stop I) by A8, Def2; then m < card (stop I) by AFINSQ_1:66; then A16: m + 1 < card (stop (if>0 (a,k1,I))) by A15, XREAL_1:6; IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),k1)) by A14, EXTPRO_1:4 .= m + 1 by A9, A11, A7, A6, Th31, A12 ; hence IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>0 (a,k1,I))) by A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I))) hence IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>0 (a,k1,I))) by A1, A2, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if>0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if>0 (a,k1,I) is_halting_on s,P A17: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A17 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A9, A11, A7, A6, Th31, A12 .= halt SCMPDS by A10, EXTPRO_1:def_15 ; then P +* (stop (if>0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; hence if>0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th79: :: SCMPDS_6:79 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 implies ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: ( if>0 (a,k1,I) is_closed_on s,P & if>0 (a,k1,I) is_halting_on s,P ) set i = (a,k1) <=0_goto ((card I) + 1); set IF = if>0 (a,k1,I); set pIF = stop (if>0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if>0 (a,k1,I))); set s4 = Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if>0 (a,k1,I))); A2: IC (Initialize s) = 0 by MEMSTR_0:47; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto ((card I) + 1)),(Initialize s)) by Th11 ; then A5: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 1)) by A1, A4, SCMPDS_2:56 .= 0 + ((card I) + 1) by A2, Th12 ; A6: card (if>0 (a,k1,I)) = (card I) + 1 by Th6; then A7: (card I) + 1 in dom (stop (if>0 (a,k1,I))) by COMPOS_1:64; A8: (P +* (stop (if>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; stop (if>0 (a,k1,I)) c= P +* (stop (if>0 (a,k1,I))) by FUNCT_4:25; then stop (if>0 (a,k1,I)) c= P +* (stop (if>0 (a,k1,I))) ; then (P +* (stop (if>0 (a,k1,I)))) . ((card I) + 1) = (stop (if>0 (a,k1,I))) . ((card I) + 1) by A7, GRFUNC_1:2 .= halt SCMPDS by A6, COMPOS_1:64 ; then A9: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1))) = halt SCMPDS by A5, A8; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if>0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if>0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I))) then 1 + 0 <= k by INT_1:7; hence IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>0 (a,k1,I))) by A7, A5, A9, EXTPRO_1:5; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>0 (a,k1,I))) then Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>0 (a,k1,I))) by A2, COMPOS_1:36; ::_thesis: verum end; end; end; hence if>0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if>0 (a,k1,I) is_halting_on s,P P +* (stop (if>0 (a,k1,I))) halts_on Initialize s by A9, EXTPRO_1:29; hence if>0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th80: :: SCMPDS_6:80 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if>0 (a,k1,I); set pI = stop I; set pIF = stop (if>0 (a,k1,I)); set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if>0 (a,k1,I))); set s4 = Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if>0 (a,k1,I))); set i = (a,k1) <=0_goto ((card I) + 1); set SAl = Start-At (((card I) + 1),SCMPDS); A1: IC (Initialize s) = 0 by MEMSTR_0:47; A2: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A3: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A2, FUNCT_4:11 ; A4: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto ((card I) + 1)),(Initialize s)) by Th11 ; assume s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) then A5: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A4, A3, SCMPDS_2:56 .= 0 + 1 by A1 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) . a by A4, SCMPDS_2:56; then A6: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; assume A7: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) then A8: I is_closed_on Initialize s,P +* (stop I) by Th24; A9: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),1) c= P +* (stop (if>0 (a,k1,I))) ) by Lm6, FUNCT_4:25; A10: stop I c= P +* (stop I) by FUNCT_4:25; assume A11: I is_halting_on s,P ; ::_thesis: IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) then A12: P +* (stop I) halts_on Initialize s by Def3; A13: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; A14: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A13 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A8, A9, A5, A6, Th31, A10 .= halt SCMPDS by A12, EXTPRO_1:def_15 ; then A15: P +* (stop (if>0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A16: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) = (a,k1) <=0_goto ((card I) + 1) by Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_I)),(Initialize_s)))_+_1_holds_ CurInstr_((P_+*_(stop_(if>0_(a,k1,I)))),(Comput_((P_+*_(stop_(if>0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume A17: l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 ; ::_thesis: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS A18: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) by A18; hence CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A16; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),b1))) = halt SCMPDS then consider n being Nat such that A19: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A20: n < LifeSpan ((P +* (stop I)),(Initialize s)) by A17, A19, XREAL_1:6; assume A21: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS ; ::_thesis: contradiction A22: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),n))) = CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),n))) by A8, A9, A5, A6, Th31, A10 .= halt SCMPDS by A19, A21, A22 ; hence contradiction by A12, A20, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 <= l ; then A23: LifeSpan ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 by A14, A15, EXTPRO_1:def_15; A24: DataPart (Result ((P +* (stop I)),(Initialize s))) = DataPart (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A12, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A8, A9, A5, A6, Th31, A10 .= DataPart (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if>0 (a,k1,I)))),(Initialize s))) by A15, A23, EXTPRO_1:23 ; A25: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if>0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if>0_(a,k1,I)),P,(Initialize_s)))_._x_=_((IExec_(I,P,(Initialize_s)))_+*_(Start-At_(((card_I)_+_1),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if>0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 ) A26: dom (Start-At (((card I) + 1),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A27: x in dom (IExec ((if>0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A27, SCMPDS_4:6; supposeA28: x is Int_position ; ::_thesis: (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A29: not x in dom (Start-At (((card I) + 1),SCMPDS)) by A26, TARSKI:def_1; thus (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if>0 (a,k1,I)))),(Initialize s))) . x .= (Result ((P +* (stop I)),(Initialize s))) . x by A24, A28, SCMPDS_4:8 .= (IExec (I,P,(Initialize s))) . x .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . x by A29, FUNCT_4:11 ; ::_thesis: verum end; supposeA30: x = IC ; ::_thesis: (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 A31: IC (Result ((P +* (stop I)),(Initialize s))) = IC (IExec (I,P,(Initialize s))) .= card I by A7, A11, Th34 ; A32: x in dom (Start-At (((card I) + 1),SCMPDS)) by A26, A30, TARSKI:def_1; thus (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if>0 (a,k1,I)))),(Initialize s))) . x .= (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) . x by A15, A23, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A30, EXTPRO_1:4 .= (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) + 1 by A8, A9, A5, A6, Th31, A10 .= (IC (Result ((P +* (stop I)),(Initialize s)))) + 1 by A12, EXTPRO_1:23 .= IC (Start-At (((card I) + 1),SCMPDS)) by A31, FUNCOP_1:72 .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . x by A30, A32, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if>0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) by A25, FUNCT_1:2; ::_thesis: verum end; theorem Th81: :: SCMPDS_6:81 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 implies IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if>0 (a,k1,I); set pIF = stop (if>0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if>0 (a,k1,I))); set s4 = Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if>0 (a,k1,I))); set i = (a,k1) <=0_goto ((card I) + 1); set SAl = Start-At (((card I) + 1),SCMPDS); A1: IC (Initialize s) = 0 by MEMSTR_0:47; A2: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A3: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A2, FUNCT_4:11 ; A4: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto ((card I) + 1)),(Initialize s)) by Th11 ; assume s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) then A5: IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 1)) by A4, A3, SCMPDS_2:56 .= 0 + ((card I) + 1) by A1, Th12 ; stop (if>0 (a,k1,I)) c= P +* (stop (if>0 (a,k1,I))) by FUNCT_4:25; then A6: stop (if>0 (a,k1,I)) c= P +* (stop (if>0 (a,k1,I))) ; A7: (P +* (stop (if>0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if>0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; A8: card (if>0 (a,k1,I)) = (card I) + 1 by Th6; then (card I) + 1 in dom (stop (if>0 (a,k1,I))) by COMPOS_1:64; then (P +* (stop (if>0 (a,k1,I)))) . ((card I) + 1) = (stop (if>0 (a,k1,I))) . ((card I) + 1) by A6, GRFUNC_1:2 .= halt SCMPDS by A8, COMPOS_1:64 ; then A9: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1))) = halt SCMPDS by A5, A7; then A10: P +* (stop (if>0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A11: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) = (a,k1) <=0_goto ((card I) + 1) by Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_1_holds_ CurInstr_((P_+*_(stop_(if>0_(a,k1,I)))),(Comput_((P_+*_(stop_(if>0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < 1 implies CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS ) A12: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; assume l < 1 ; ::_thesis: CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS then l < 1 + 0 ; then l = 0 by NAT_1:13; then CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) by A12; hence CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A11; ::_thesis: verum end; then for l being Element of NAT st CurInstr ((P +* (stop (if>0 (a,k1,I)))),(Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds 1 <= l ; then LifeSpan ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) = 1 by A9, A10, EXTPRO_1:def_15; then A13: Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1) = Result ((P +* (stop (if>0 (a,k1,I)))),(Initialize s)) by A10, EXTPRO_1:23; A14: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if>0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if>0_(a,k1,I)),P,(Initialize_s)))_._x_=_(s_+*_(Start-At_(((card_I)_+_1),SCMPDS)))_._x A15: dom (Start-At (((card I) + 1),SCMPDS)) = {(IC )} by FUNCOP_1:13; let x be set ; ::_thesis: ( x in dom (IExec ((if>0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 ) assume A16: x in dom (IExec ((if>0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A16, SCMPDS_4:6; supposeA17: x is Int_position ; ::_thesis: (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A18: not x in dom (Start-At (((card I) + 1),SCMPDS)) by A15, TARSKI:def_1; A19: not x in dom (Start-At (0,SCMPDS)) by A17, SCMPDS_4:18; thus (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . x = (Comput ((P +* (stop (if>0 (a,k1,I)))),(Initialize s),1)) . x by A13 .= (Initialize s) . x by A4, A17, SCMPDS_2:56 .= s . x by A19, FUNCT_4:11 .= (s +* (Start-At (((card I) + 1),SCMPDS))) . x by A18, FUNCT_4:11 ; ::_thesis: verum end; supposeA20: x = IC ; ::_thesis: (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 hence (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . x = (card I) + 1 by A5, A13 .= (s +* (Start-At (((card I) + 1),SCMPDS))) . x by A20, FUNCT_4:113 ; ::_thesis: verum end; end; end; dom (IExec ((if>0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom (s +* (Start-At (((card I) + 1),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) by A14, FUNCT_1:2; ::_thesis: verum end; registration let I be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if>0 (a,k1,I) -> parahalting shiftable ; correctness coherence ( if>0 (a,k1,I) is shiftable & if>0 (a,k1,I) is parahalting ); proof set i = (a,k1) <=0_goto ((card I) + 1); set IF = if>0 (a,k1,I); set pIF = stop (if>0 (a,k1,I)); thus if>0 (a,k1,I) is shiftable ; ::_thesis: if>0 (a,k1,I) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if>0 (a,k1,I)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if>0 (a,k1,I)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if>0 (a,k1,I)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if>0 (a,k1,I))) by FUNCT_4:98; A3: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) > 0 or s . (DataLoc ((s . a),k1)) <= 0 ) ; suppose s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: P halts_on s then if>0 (a,k1,I) is_halting_on s,P by A3, Th78; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: P halts_on s then if>0 (a,k1,I) is_halting_on s,P by Th79; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; end; end; end; registration let I be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if>0 (a,k1,I) -> halt-free ; coherence if>0 (a,k1,I) is halt-free ; end; theorem :: SCMPDS_6:82 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 let k1 be Integer; ::_thesis: IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 set IF = if>0 (a,k1,I); A1: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; A2: Initialize s = s by MEMSTR_0:44; percases ( s . (DataLoc ((s . a),k1)) > 0 or s . (DataLoc ((s . a),k1)) <= 0 ) ; suppose s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 then IExec ((if>0 (a,k1,I)),P,s) = (IExec (I,P,s)) +* (Start-At (((card I) + 1),SCMPDS)) by A1, Th80, A2; hence IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 then IExec ((if>0 (a,k1,I)),P,s) = s +* (Start-At (((card I) + 1),SCMPDS)) by Th81, A2; hence IC (IExec ((if>0 (a,k1,I)),P,s)) = (card I) + 1 by FUNCT_4:113; ::_thesis: verum end; end; end; theorem :: SCMPDS_6:83 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let s be State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 implies (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b ) assume A1: s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b A2: not b in dom (Start-At (((card I) + 1),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if>0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) by A1, Th80; hence (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:84 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = s . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = s . b let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = s . b let I be Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = s . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = s . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 implies (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = s . b ) assume s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = s . b then A1: IExec ((if>0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) by Th81; not b in dom (Start-At (((card I) + 1),SCMPDS)) by SCMPDS_4:18; hence (IExec ((if>0 (a,k1,I)),P,(Initialize s))) . b = s . b by A1, FUNCT_4:11; ::_thesis: verum end; begin theorem :: SCMPDS_6:85 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds card (if<=0 (a,k1,I)) = (card I) + 2 by Lm8; theorem :: SCMPDS_6:86 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds ( 0 in dom (if<=0 (a,k1,I)) & 1 in dom (if<=0 (a,k1,I)) ) by Lm9; theorem :: SCMPDS_6:87 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds ( (if<=0 (a,k1,I)) . 0 = (a,k1) <=0_goto 2 & (if<=0 (a,k1,I)) . 1 = goto ((card I) + 1) ) by Lm10; theorem Th88: :: SCMPDS_6:88 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) let I be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set IF = if<=0 (a,k1,I); set pIF = stop (if<=0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if<=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if<=0 (a,k1,I))); set i = (a,k1) <=0_goto 2; set j = goto ((card I) + 1); A1: stop I c= P +* (stop I) by FUNCT_4:25; A2: if<=0 (a,k1,I) = ((a,k1) <=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A3: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto 2),(Initialize s)) by A2, Th11 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) . a by A3, SCMPDS_2:56; then A4: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; A5: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A6: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A5, FUNCT_4:11 ; A7: IC (Initialize s) = 0 by MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) ) then A8: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),2) by A3, A6, SCMPDS_2:56 .= 0 + 2 by A7, Th12 ; assume A9: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) ) then A10: I is_closed_on Initialize s,P +* (stop I) by Th24; assume I is_halting_on s,P ; ::_thesis: ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) then A11: P +* (stop I) halts_on Initialize s by Def3; A12: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),2) c= P +* (stop (if<=0 (a,k1,I))) ) by Lm7, FUNCT_4:25; A13: 0 in dom (stop (if<=0 (a,k1,I))) by COMPOS_1:36; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if<=0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if<=0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<=0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<=0 (a,k1,I))) then consider k1 being Nat such that A14: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop I)),(Initialize s),k1)) as Element of NAT ; A15: card (stop (if<=0 (a,k1,I))) = 1 + (card (if<=0 (a,k1,I))) by COMPOS_1:55 .= 1 + ((card I) + 2) by Lm8 .= (1 + (card I)) + 2 .= (card (stop I)) + 2 by COMPOS_1:55 ; m in dom (stop I) by A9, Def2; then m < card (stop I) by AFINSQ_1:66; then A16: m + 2 < card (stop (if<=0 (a,k1,I))) by A15, XREAL_1:6; IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),k1)) by A14, EXTPRO_1:4 .= m + 2 by A10, A12, A8, A4, Th31, A1 ; hence IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<=0 (a,k1,I))) by A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<=0 (a,k1,I))) hence IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<=0 (a,k1,I))) by A13, A7, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if<=0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if<=0 (a,k1,I) is_halting_on s,P A17: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A17 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A10, A12, A8, A4, Th31, A1 .= halt SCMPDS by A11, EXTPRO_1:def_15 ; then P +* (stop (if<=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; hence if<=0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th89: :: SCMPDS_6:89 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 implies ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: ( if<=0 (a,k1,I) is_closed_on s,P & if<=0 (a,k1,I) is_halting_on s,P ) set i = (a,k1) <=0_goto 2; set j = goto ((card I) + 1); set IF = if<=0 (a,k1,I); set pIF = stop (if<=0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if<=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1); set s5 = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2); set P4 = P +* (stop (if<=0 (a,k1,I))); set P5 = P +* (stop (if<=0 (a,k1,I))); A2: if<=0 (a,k1,I) = ((a,k1) <=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: IC (Initialize s) = 0 by MEMSTR_0:47; Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto 2),(Initialize s)) by A2, Th11 ; then A6: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A1, A4, SCMPDS_2:56 .= 0 + 1 by A5 ; A7: stop (if<=0 (a,k1,I)) c= P +* (stop (if<=0 (a,k1,I))) by FUNCT_4:25; then A8: stop (if<=0 (a,k1,I)) c= P +* (stop (if<=0 (a,k1,I))) ; A9: 1 in dom (if<=0 (a,k1,I)) by Lm9; then 1 in dom (stop (if<=0 (a,k1,I))) by COMPOS_1:62; then A10: (P +* (stop (if<=0 (a,k1,I)))) . 1 = (stop (if<=0 (a,k1,I))) . 1 by A8, GRFUNC_1:2 .= (if<=0 (a,k1,I)) . 1 by A9, COMPOS_1:63 .= goto ((card I) + 1) by Lm10 ; A11: card (if<=0 (a,k1,I)) = (card I) + 2 by Lm8; then A12: (card I) + 2 in dom (stop (if<=0 (a,k1,I))) by COMPOS_1:64; A13: (P +* (stop (if<=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if<=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),(1 + 1)) = Following ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1))) by EXTPRO_1:3 .= Exec ((goto ((card I) + 1)),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1))) by A6, A10, A13 ; then A14: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2)) = ICplusConst ((Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),((card I) + 1)) by SCMPDS_2:54 .= ((card I) + 1) + 1 by A6, Th12 .= (card I) + (1 + 1) ; A15: (P +* (stop (if<=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2))) = (P +* (stop (if<=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2))) by PBOOLE:143; stop (if<=0 (a,k1,I)) c= P +* (stop (if<=0 (a,k1,I))) by A7; then (P +* (stop (if<=0 (a,k1,I)))) . ((card I) + 2) = (stop (if<=0 (a,k1,I))) . ((card I) + 2) by A12, GRFUNC_1:2 .= halt SCMPDS by A11, COMPOS_1:64 ; then A16: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2))) = halt SCMPDS by A14, A15; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if<=0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if<=0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<=0 (a,k1,I))) A17: ( k = 0 or 0 + 1 <= k ) by INT_1:7; percases ( k = 0 or k = 1 or 1 < k ) by A17, XXREAL_0:1; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<=0 (a,k1,I))) then Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<=0 (a,k1,I))) by A5, COMPOS_1:36; ::_thesis: verum end; suppose k = 1 ; ::_thesis: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<=0 (a,k1,I))) hence IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<=0 (a,k1,I))) by A9, A6, COMPOS_1:62; ::_thesis: verum end; suppose 1 < k ; ::_thesis: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<=0 (a,k1,I))) then 1 + 1 <= k by INT_1:7; hence IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<=0 (a,k1,I))) by A12, A14, A16, EXTPRO_1:5; ::_thesis: verum end; end; end; hence if<=0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if<=0 (a,k1,I) is_halting_on s,P P +* (stop (if<=0 (a,k1,I))) halts_on Initialize s by A16, EXTPRO_1:29; hence if<=0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th90: :: SCMPDS_6:90 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if<=0 (a,k1,I); set pIF = stop (if<=0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if<=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if<=0 (a,k1,I))); set i = (a,k1) <=0_goto 2; set j = goto ((card I) + 1); set SAl = Start-At (((card I) + 2),SCMPDS); A1: stop I c= P +* (stop I) by FUNCT_4:25; A2: if<=0 (a,k1,I) = ((a,k1) <=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A3: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto 2),(Initialize s)) by A2, Th11 ; A4: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A5: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A4, FUNCT_4:11 ; A6: IC (Initialize s) = 0 by MEMSTR_0:47; A7: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),2) c= P +* (stop (if<=0 (a,k1,I))) ) by Lm7, FUNCT_4:25; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) . a by A3, SCMPDS_2:56; then A8: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; assume s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) then A9: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),2) by A3, A5, SCMPDS_2:56 .= 0 + 2 by A6, Th12 ; assume A10: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) then A11: I is_closed_on Initialize s,P +* (stop I) by Th24; assume A12: I is_halting_on s,P ; ::_thesis: IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) then A13: P +* (stop I) halts_on Initialize s by Def3; A14: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; A15: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A14 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A11, A7, A9, A8, Th31, A1 .= halt SCMPDS by A13, EXTPRO_1:def_15 ; then A16: P +* (stop (if<=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A17: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) = (a,k1) <=0_goto 2 by A2, Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_I)),(Initialize_s)))_+_1_holds_ CurInstr_((P_+*_(stop_(if<=0_(a,k1,I)))),(Comput_((P_+*_(stop_(if<=0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume A18: l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 ; ::_thesis: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS A19: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) by A19; hence CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A17; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1))) = halt SCMPDS then consider n being Nat such that A20: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A21: n < LifeSpan ((P +* (stop I)),(Initialize s)) by A18, A20, XREAL_1:6; assume A22: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS ; ::_thesis: contradiction A23: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),n))) = CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),n))) by A11, A7, A9, A8, Th31, A1 .= halt SCMPDS by A20, A22, A23 ; hence contradiction by A13, A21, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 <= l ; then A24: LifeSpan ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 by A15, A16, EXTPRO_1:def_15; A25: DataPart (Result ((P +* (stop I)),(Initialize s))) = DataPart (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A13, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A11, A7, A9, A8, Th31, A1 .= DataPart (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s))) by A16, A24, EXTPRO_1:23 ; A26: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if<=0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if<=0_(a,k1,I)),P,(Initialize_s)))_._x_=_((IExec_(I,P,(Initialize_s)))_+*_(Start-At_(((card_I)_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 ) A27: dom (Start-At (((card I) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A28: x in dom (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A28, SCMPDS_4:6; supposeA29: x is Int_position ; ::_thesis: (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A30: not x in dom (Start-At (((card I) + 2),SCMPDS)) by A27, TARSKI:def_1; thus (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s))) . x .= (Result ((P +* (stop I)),(Initialize s))) . x by A25, A29, SCMPDS_4:8 .= (IExec (I,P,(Initialize s))) . x .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . x by A30, FUNCT_4:11 ; ::_thesis: verum end; supposeA31: x = IC ; ::_thesis: (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 A32: IC (Result ((P +* (stop I)),(Initialize s))) = IC (IExec (I,P,(Initialize s))) .= card I by A10, A12, Th34 ; A33: x in dom (Start-At (((card I) + 2),SCMPDS)) by A27, A31, TARSKI:def_1; thus (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s))) . x .= (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) . x by A16, A24, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A31, EXTPRO_1:4 .= (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) + 2 by A11, A7, A9, A8, Th31, A1 .= (IC (Result ((P +* (stop I)),(Initialize s)))) + 2 by A13, EXTPRO_1:23 .= IC (Start-At (((card I) + 2),SCMPDS)) by A32, FUNCOP_1:72 .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . x by A31, A33, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) by A26, FUNCT_1:2; ::_thesis: verum end; theorem Th91: :: SCMPDS_6:91 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 implies IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if<=0 (a,k1,I); set pIF = stop (if<=0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if<=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1); set s5 = Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2); set P4 = P +* (stop (if<=0 (a,k1,I))); set P5 = P +* (stop (if<=0 (a,k1,I))); set i = (a,k1) <=0_goto 2; set j = goto ((card I) + 1); set SAl = Start-At (((card I) + 2),SCMPDS); A1: if<=0 (a,k1,I) = ((a,k1) <=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A2: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A3: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A2, FUNCT_4:11 ; A4: IC (Initialize s) = 0 by MEMSTR_0:47; A5: stop (if<=0 (a,k1,I)) c= P +* (stop (if<=0 (a,k1,I))) by FUNCT_4:25; then A6: stop (if<=0 (a,k1,I)) c= P +* (stop (if<=0 (a,k1,I))) ; A7: stop (if<=0 (a,k1,I)) c= P +* (stop (if<=0 (a,k1,I))) by A5; A8: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) <=0_goto 2),(Initialize s)) by A1, Th11 ; assume s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) then A9: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A8, A3, SCMPDS_2:56 .= 0 + 1 by A4 ; A10: 1 in dom (if<=0 (a,k1,I)) by Lm9; then 1 in dom (stop (if<=0 (a,k1,I))) by COMPOS_1:62; then A11: (P +* (stop (if<=0 (a,k1,I)))) . 1 = (stop (if<=0 (a,k1,I))) . 1 by A6, GRFUNC_1:2 .= (if<=0 (a,k1,I)) . 1 by A10, COMPOS_1:63 .= goto ((card I) + 1) by Lm10 ; A12: (P +* (stop (if<=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if<=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; A13: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),(1 + 1)) = Following ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1))) by EXTPRO_1:3 .= Exec ((goto ((card I) + 1)),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1))) by A9, A11, A12 ; then A14: IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2)) = ICplusConst ((Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)),((card I) + 1)) by SCMPDS_2:54 .= ((card I) + 1) + 1 by A9, Th12 .= (card I) + (1 + 1) ; A15: (P +* (stop (if<=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2))) = (P +* (stop (if<=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2))) by PBOOLE:143; A16: card (if<=0 (a,k1,I)) = (card I) + 2 by Lm8; then (card I) + 2 in dom (stop (if<=0 (a,k1,I))) by COMPOS_1:64; then (P +* (stop (if<=0 (a,k1,I)))) . ((card I) + 2) = (stop (if<=0 (a,k1,I))) . ((card I) + 2) by A7, GRFUNC_1:2 .= halt SCMPDS by A16, COMPOS_1:64 ; then A17: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2))) = halt SCMPDS by A14, A15; then A18: P +* (stop (if<=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A19: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) = (a,k1) <=0_goto 2 by A1, Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_1_+_1_holds_ CurInstr_((P_+*_(stop_(if<=0_(a,k1,I)))),(Comput_((P_+*_(stop_(if<=0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < 1 + 1 implies CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume l < 1 + 1 ; ::_thesis: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then A20: l <= 1 by NAT_1:13; A21: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; A22: (P +* (stop (if<=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) = (P +* (stop (if<=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) by PBOOLE:143; percases ( l = 0 or l = 1 ) by A20, NAT_1:25; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) by A21; hence CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A19; ::_thesis: verum end; suppose l = 1 ; ::_thesis: CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS hence CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A9, A11, A22; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if<=0 (a,k1,I)))),(Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds 2 <= l ; then LifeSpan ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) = 2 by A17, A18, EXTPRO_1:def_15; then A23: Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2) = Result ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s)) by A18, EXTPRO_1:23; A24: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if<=0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if<=0_(a,k1,I)),P,(Initialize_s)))_._x_=_(s_+*_(Start-At_(((card_I)_+_2),SCMPDS)))_._x A25: dom (Start-At (((card I) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; let x be set ; ::_thesis: ( x in dom (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 ) assume A26: x in dom (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A26, SCMPDS_4:6; supposeA27: x is Int_position ; ::_thesis: (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A28: not x in dom (Start-At (((card I) + 2),SCMPDS)) by A25, TARSKI:def_1; A29: not x in dom (Start-At (0,SCMPDS)) by A27, SCMPDS_4:18; thus (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . x = (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),2)) . x by A23 .= (Comput ((P +* (stop (if<=0 (a,k1,I)))),(Initialize s),1)) . x by A13, A27, SCMPDS_2:54 .= (Initialize s) . x by A8, A27, SCMPDS_2:56 .= s . x by A29, FUNCT_4:11 .= (s +* (Start-At (((card I) + 2),SCMPDS))) . x by A28, FUNCT_4:11 ; ::_thesis: verum end; supposeA30: x = IC ; ::_thesis: (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 hence (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . x = (card I) + 2 by A14, A23 .= (s +* (Start-At (((card I) + 2),SCMPDS))) . x by A30, FUNCT_4:113 ; ::_thesis: verum end; end; end; dom (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom (s +* (Start-At (((card I) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) by A24, FUNCT_1:2; ::_thesis: verum end; registration let I be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if<=0 (a,k1,I) -> parahalting shiftable ; correctness coherence ( if<=0 (a,k1,I) is shiftable & if<=0 (a,k1,I) is parahalting ); proof set i = (a,k1) <=0_goto 2; set j = goto ((card I) + 1); set IF = if<=0 (a,k1,I); set pIF = stop (if<=0 (a,k1,I)); thus if<=0 (a,k1,I) is shiftable ; ::_thesis: if<=0 (a,k1,I) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if<=0 (a,k1,I)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if<=0 (a,k1,I)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if<=0 (a,k1,I)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if<=0 (a,k1,I))) by FUNCT_4:98; A3: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) <= 0 or s . (DataLoc ((s . a),k1)) > 0 ) ; suppose s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: P halts_on s then if<=0 (a,k1,I) is_halting_on s,P by A3, Th88; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: P halts_on s then if<=0 (a,k1,I) is_halting_on s,P by Th89; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; end; end; end; registration let I be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if<=0 (a,k1,I) -> halt-free ; coherence if<=0 (a,k1,I) is halt-free ; end; theorem :: SCMPDS_6:92 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 let k1 be Integer; ::_thesis: IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 set IF = if<=0 (a,k1,I); A1: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; A2: Initialize s = s by MEMSTR_0:44; percases ( s . (DataLoc ((s . a),k1)) <= 0 or s . (DataLoc ((s . a),k1)) > 0 ) ; suppose s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 then IExec ((if<=0 (a,k1,I)),P,s) = (IExec (I,P,s)) +* (Start-At (((card I) + 2),SCMPDS)) by A1, Th90, A2; hence IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 then IExec ((if<=0 (a,k1,I)),P,s) = s +* (Start-At (((card I) + 2),SCMPDS)) by Th91, A2; hence IC (IExec ((if<=0 (a,k1,I)),P,s)) = (card I) + 2 by FUNCT_4:113; ::_thesis: verum end; end; end; theorem :: SCMPDS_6:93 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let s be State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) <= 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) <= 0 implies (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b ) assume A1: s . (DataLoc ((s . a),k1)) <= 0 ; ::_thesis: (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b A2: not b in dom (Start-At (((card I) + 2),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) by A1, Th90; hence (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:94 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = s . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = s . b let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = s . b let I be Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = s . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) > 0 holds (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = s . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) > 0 implies (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = s . b ) assume s . (DataLoc ((s . a),k1)) > 0 ; ::_thesis: (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = s . b then A1: IExec ((if<=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) by Th91; not b in dom (Start-At (((card I) + 2),SCMPDS)) by SCMPDS_4:18; hence (IExec ((if<=0 (a,k1,I)),P,(Initialize s))) . b = s . b by A1, FUNCT_4:11; ::_thesis: verum end; begin theorem :: SCMPDS_6:95 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds card (if<0 (a,k1,I,J)) = ((card I) + (card J)) + 2 by Lm4; theorem :: SCMPDS_6:96 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds ( 0 in dom (if<0 (a,k1,I,J)) & 1 in dom (if<0 (a,k1,I,J)) ) proof let a be Int_position; ::_thesis: for k1 being Integer for I, J being Program of SCMPDS holds ( 0 in dom (if<0 (a,k1,I,J)) & 1 in dom (if<0 (a,k1,I,J)) ) let k1 be Integer; ::_thesis: for I, J being Program of SCMPDS holds ( 0 in dom (if<0 (a,k1,I,J)) & 1 in dom (if<0 (a,k1,I,J)) ) let I, J be Program of SCMPDS; ::_thesis: ( 0 in dom (if<0 (a,k1,I,J)) & 1 in dom (if<0 (a,k1,I,J)) ) set ci = card (if<0 (a,k1,I,J)); card (if<0 (a,k1,I,J)) = ((card I) + (card J)) + 2 by Lm4; then 2 <= card (if<0 (a,k1,I,J)) by NAT_1:12; then 1 < card (if<0 (a,k1,I,J)) by XXREAL_0:2; hence ( 0 in dom (if<0 (a,k1,I,J)) & 1 in dom (if<0 (a,k1,I,J)) ) by AFINSQ_1:66; ::_thesis: verum end; theorem :: SCMPDS_6:97 for a being Int_position for k1 being Integer for I, J being Program of SCMPDS holds (if<0 (a,k1,I,J)) . 0 = (a,k1) >=0_goto ((card I) + 2) by Lm5; theorem Th98: :: SCMPDS_6:98 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let s be 0 -started State of SCMPDS; ::_thesis: for I, J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let I, J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set G = Goto ((card J) + 1); set I2 = (I ';' (Goto ((card J) + 1))) ';' J; set IF = if<0 (a,k1,I,J); set pIF = stop (if<0 (a,k1,I,J)); set pI2 = stop ((I ';' (Goto ((card J) + 1))) ';' J); set P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)); set P3 = P +* (stop (if<0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1); set P4 = P +* (stop (if<0 (a,k1,I,J))); set i = (a,k1) >=0_goto ((card I) + 2); A1: 0 in dom (stop (if<0 (a,k1,I,J))) by COMPOS_1:36; A2: Initialize s = s by MEMSTR_0:44; then A3: IC s = 0 by MEMSTR_0:47; A4: if<0 (a,k1,I,J) = (((a,k1) >=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) >=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; then A5: Shift ((stop ((I ';' (Goto ((card J) + 1))) ';' J)),1) c= P +* (stop (if<0 (a,k1,I,J))) by Lm6; A6: Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,(0 + 1)) = Following ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<0 (a,k1,I,J)))),s) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto ((card I) + 2)),s) by A4, Th11, A2 ; for a being Int_position holds s . a = (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)) . a by A6, SCMPDS_2:57; then A7: DataPart s = DataPart (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)) by SCMPDS_4:8; assume s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) ) then A8: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)) = succ (IC s) by A6, SCMPDS_2:57 .= 0 + 1 by A3 ; assume A9: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) ) assume A10: I is_halting_on s,P ; ::_thesis: ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) then A11: (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P by A9, Th30; then A12: ( Start-At (0,SCMPDS) c= s & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) ) by Th24, A2, FUNCT_4:25; A13: stop ((I ';' (Goto ((card J) + 1))) ';' J) c= P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by FUNCT_4:25; (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P by A9, A10, Th30; then A14: P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s by Def3, A2; A15: card (stop (if<0 (a,k1,I,J))) = (card (if<0 (a,k1,I,J))) + 1 by COMPOS_1:55 .= ((card ((I ';' (Goto ((card J) + 1))) ';' J)) + 1) + 1 by A4, Th6 ; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if<0_(a,k1,I,J)))),s,k))_in_dom_(stop_(if<0_(a,k1,I,J))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,b1)) in dom (stop (if<0 (a,k1,I,J))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,b1)) in dom (stop (if<0 (a,k1,I,J))) then consider k1 being Nat such that A16: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,k1)) as Element of NAT ; A17: card (stop (if<0 (a,k1,I,J))) = (card (stop ((I ';' (Goto ((card J) + 1))) ';' J))) + 1 by A15, COMPOS_1:55; m in dom (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by A11, Def2, A2; then m < card (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by AFINSQ_1:66; then A18: m + 1 < card (stop (if<0 (a,k1,I,J))) by A17, XREAL_1:6; IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,k)) = IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),k1)) by A16, EXTPRO_1:4 .= m + 1 by A12, A5, A8, A7, Th31, A13 ; hence IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,k)) in dom (stop (if<0 (a,k1,I,J))) by A18, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,b1)) in dom (stop (if<0 (a,k1,I,J))) hence IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,k)) in dom (stop (if<0 (a,k1,I,J))) by A1, A3, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if<0 (a,k1,I,J) is_closed_on s,P by Def2, A2; ::_thesis: if<0 (a,k1,I,J) is_halting_on s,P A19: Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)) = Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))) by EXTPRO_1:4; CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)))) = CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A19 .= CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A12, A5, A8, A7, Th31, A13 .= halt SCMPDS by A14, EXTPRO_1:def_15 ; then P +* (stop (if<0 (a,k1,I,J))) halts_on s by EXTPRO_1:29; hence if<0 (a,k1,I,J) is_halting_on s,P by Def3, A2; ::_thesis: verum end; theorem Th99: :: SCMPDS_6:99 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P implies ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set pJ = stop J; set s1 = Initialize s; set P1 = P +* (stop J); set IF = if<0 (a,k1,I,J); set pIF = stop (if<0 (a,k1,I,J)); set s3 = Initialize s; set P3 = P +* (stop (if<0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1); set P4 = P +* (stop (if<0 (a,k1,I,J))); set i = (a,k1) >=0_goto ((card I) + 2); set G = Goto ((card J) + 1); set iG = (((a,k1) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1)); A1: if<0 (a,k1,I,J) = (((a,k1) >=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) >=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; A2: Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto ((card I) + 2)),(Initialize s)) by A1, Th11 ; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: IC (Initialize s) = 0 by MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: ( not J is_closed_on s,P or not J is_halting_on s,P or ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) ) then A6: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 2)) by A2, A4, SCMPDS_2:57 .= 0 + ((card I) + 2) by A5, Th12 ; assume A7: J is_closed_on s,P ; ::_thesis: ( not J is_halting_on s,P or ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) ) then A8: ( Start-At (0,SCMPDS) c= Initialize s & J is_closed_on Initialize s,P +* (stop J) ) by Th24, FUNCT_4:25; A9: stop J c= P +* (stop J) by FUNCT_4:25; A10: stop (if<0 (a,k1,I,J)) c= P +* (stop (if<0 (a,k1,I,J))) by FUNCT_4:25; A11: card ((((a,k1) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) = (card (((a,k1) >=0_goto ((card I) + 2)) ';' I)) + (card (Goto ((card J) + 1))) by AFINSQ_1:17 .= (card (((a,k1) >=0_goto ((card I) + 2)) ';' I)) + 1 by COMPOS_1:54 .= ((card I) + 1) + 1 by Th6 .= (card I) + (1 + 1) ; then Shift ((stop J),((card I) + 2)) c= stop (if<0 (a,k1,I,J)) by Th13; then Shift ((stop J),((card I) + 2)) c= P +* (stop (if<0 (a,k1,I,J))) by A10, XBOOLE_1:1; then A12: Shift ((stop J),((card I) + 2)) c= P +* (stop (if<0 (a,k1,I,J))) ; assume J is_halting_on s,P ; ::_thesis: ( if<0 (a,k1,I,J) is_closed_on s,P & if<0 (a,k1,I,J) is_halting_on s,P ) then A13: P +* (stop J) halts_on Initialize s by Def3; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)) . a by A2, SCMPDS_2:57; then A14: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)) by SCMPDS_4:8; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if<0_(a,k1,I,J)))),(Initialize_s),k))_in_dom_(stop_(if<0_(a,k1,I,J))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I,J))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I,J))) then consider k1 being Nat such that A15: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop J)),(Initialize s),k1)) as Element of NAT ; m in dom (stop J) by A7, Def2; then m < card (stop J) by AFINSQ_1:66; then A16: m + ((card I) + 2) < (card (stop J)) + ((card I) + 2) by XREAL_1:6; A17: card (stop J) = (card J) + 1 by COMPOS_1:55; A18: card (stop (if<0 (a,k1,I,J))) = (card (if<0 (a,k1,I,J))) + 1 by COMPOS_1:55 .= (((card I) + 2) + (card J)) + 1 by A11, AFINSQ_1:17 .= ((card I) + 2) + (card (stop J)) by A17 ; IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),k1)) by A15, EXTPRO_1:4 .= m + ((card I) + 2) by A8, A14, A12, A6, Th31, A9 ; hence IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),k)) in dom (stop (if<0 (a,k1,I,J))) by A18, A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I,J))) then Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),k)) in dom (stop (if<0 (a,k1,I,J))) by A5, COMPOS_1:36; ::_thesis: verum end; end; end; hence if<0 (a,k1,I,J) is_closed_on s,P by Def2; ::_thesis: if<0 (a,k1,I,J) is_halting_on s,P A19: Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)) = Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A19 .= CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A8, A14, A12, A6, Th31, A9 .= halt SCMPDS by A13, EXTPRO_1:def_15 ; then P +* (stop (if<0 (a,k1,I,J))) halts_on Initialize s by EXTPRO_1:29; hence if<0 (a,k1,I,J) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th100: :: SCMPDS_6:100 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let J be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set G = Goto ((card J) + 1); set I2 = (I ';' (Goto ((card J) + 1))) ';' J; set IF = if<0 (a,k1,I,J); set pIF = stop (if<0 (a,k1,I,J)); set pI2 = stop ((I ';' (Goto ((card J) + 1))) ';' J); set P2 = P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)); set P3 = P +* (stop (if<0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1); set P4 = P +* (stop (if<0 (a,k1,I,J))); set i = (a,k1) >=0_goto ((card I) + 2); set SAl = Start-At ((((card I) + (card J)) + 2),SCMPDS); A1: Initialize s = s by MEMSTR_0:44; then A2: IC s = 0 by MEMSTR_0:47; A3: if<0 (a,k1,I,J) = (((a,k1) >=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) >=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; then A4: Shift ((stop ((I ';' (Goto ((card J) + 1))) ';' J)),1) c= P +* (stop (if<0 (a,k1,I,J))) by Lm6; A5: Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,(0 + 1)) = Following ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<0 (a,k1,I,J)))),s) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto ((card I) + 2)),s) by A3, Th11, A1 ; assume s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) then A6: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)) = succ (IC s) by A5, SCMPDS_2:57 .= 0 + 1 by A2 ; for a being Int_position holds s . a = (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)) . a by A5, SCMPDS_2:57; then A7: DataPart s = DataPart (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)) by SCMPDS_4:8; assume A8: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) assume A9: I is_halting_on s,P ; ::_thesis: IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) then (I ';' (Goto ((card J) + 1))) ';' J is_halting_on s,P by A8, Th30; then A10: P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) halts_on s by Def3, A1; (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P by A8, A9, Th30; then A11: ( Start-At (0,SCMPDS) c= s & (I ';' (Goto ((card J) + 1))) ';' J is_closed_on s,P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) ) by Th24, A1, FUNCT_4:25; A12: stop ((I ';' (Goto ((card J) + 1))) ';' J) c= P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J)) by FUNCT_4:25; A13: Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)) = Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))) by EXTPRO_1:4; A14: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1)))) = CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A13 .= CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) by A11, A4, A6, A7, Th31, A12 .= halt SCMPDS by A10, EXTPRO_1:def_15 ; then A15: P +* (stop (if<0 (a,k1,I,J))) halts_on s by EXTPRO_1:29; A16: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),s) = (a,k1) >=0_goto ((card I) + 2) by A3, Th11, A1; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_((I_';'_(Goto_((card_J)_+_1)))_';'_J))),s))_+_1_holds_ CurInstr_((P_+*_(stop_(if<0_(a,k1,I,J)))),(Comput_((P_+*_(stop_(if<0_(a,k1,I,J)))),s,l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 implies CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS ) assume A17: l < (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 ; ::_thesis: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS A18: Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,0) = s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,l))) = CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),s) by A18; hence CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,l))) <> halt SCMPDS by A16; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,b1))) = halt SCMPDS then consider n being Nat such that A19: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A20: n < LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s) by A17, A19, XREAL_1:6; assume A21: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,l))) = halt SCMPDS ; ::_thesis: contradiction A22: Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,(n + 1)) = Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),(Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,n))) = CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),n))) by A11, A4, A6, A7, Th31, A12 .= halt SCMPDS by A19, A21, A22 ; hence contradiction by A10, A20, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,l))) = halt SCMPDS holds (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 <= l ; then A23: LifeSpan ((P +* (stop (if<0 (a,k1,I,J)))),s) = (LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1 by A14, A15, EXTPRO_1:def_15; A24: DataPart (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = DataPart (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A10, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A11, A4, A6, A7, Th31, A12 .= DataPart (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if<0 (a,k1,I,J)))),s)) by A15, A23, EXTPRO_1:23 ; A25: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if<0_(a,k1,I,J)),P,s))_holds_ (IExec_((if<0_(a,k1,I,J)),P,s))_._x_=_((IExec_(((I_';'_(Goto_((card_J)_+_1)))_';'_J),P,s))_+*_(Start-At_((((card_I)_+_(card_J))_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if<0 (a,k1,I,J)),P,s)) implies (IExec ((if<0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 ) A26: dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A27: x in dom (IExec ((if<0 (a,k1,I,J)),P,s)) ; ::_thesis: (IExec ((if<0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A27, SCMPDS_4:6; supposeA28: x is Int_position ; ::_thesis: (IExec ((if<0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A29: not x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A26, TARSKI:def_1; thus (IExec ((if<0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if<0 (a,k1,I,J)))),s)) . x .= (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) . x by A24, A28, SCMPDS_4:8 .= (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) . x .= ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A29, FUNCT_4:11 ; ::_thesis: verum end; supposeA30: x = IC ; ::_thesis: (IExec ((if<0 (a,k1,I,J)),P,s)) . b1 = ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 A31: IC (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) = IC (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) .= ((card I) + (card J)) + 1 by A8, A9, Th32 ; A32: x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A26, A30, TARSKI:def_1; thus (IExec ((if<0 (a,k1,I,J)),P,s)) . x = (Result ((P +* (stop (if<0 (a,k1,I,J)))),s)) . x .= (Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,((LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)) + 1))) . x by A15, A23, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),s,1)),(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s)))) by A30, EXTPRO_1:4 .= (IC (Comput ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s,(LifeSpan ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))))) + 1 by A11, A4, A6, A7, Th31, A12 .= (IC (Result ((P +* (stop ((I ';' (Goto ((card J) + 1))) ';' J))),s))) + 1 by A10, EXTPRO_1:23 .= IC (Start-At (((((card I) + (card J)) + 1) + 1),SCMPDS)) by A31, FUNCOP_1:72 .= ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A30, A32, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if<0 (a,k1,I,J)),P,s)) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (((I ';' (Goto ((card J) + 1))) ';' J),P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A25, FUNCT_1:2 .= ((IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 1),SCMPDS))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A8, A9, Th33 .= (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by MEMSTR_0:36 ; ::_thesis: verum end; theorem Th101: :: SCMPDS_6:101 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for J being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let J be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P holds IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 & J is_closed_on s,P & J is_halting_on s,P implies IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set pJ = stop J; set s1 = Initialize s; set P1 = P +* (stop J); set IF = if<0 (a,k1,I,J); set pIF = stop (if<0 (a,k1,I,J)); set s3 = Initialize s; set P3 = P +* (stop (if<0 (a,k1,I,J))); set s4 = Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1); set P4 = P +* (stop (if<0 (a,k1,I,J))); set i = (a,k1) >=0_goto ((card I) + 2); set G = Goto ((card J) + 1); set iG = (((a,k1) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1)); set SAl = Start-At ((((card I) + (card J)) + 2),SCMPDS); A1: if<0 (a,k1,I,J) = (((a,k1) >=0_goto ((card I) + 2)) ';' (I ';' (Goto ((card J) + 1)))) ';' J by SCMPDS_4:14 .= ((a,k1) >=0_goto ((card I) + 2)) ';' ((I ';' (Goto ((card J) + 1))) ';' J) by SCMPDS_4:14 ; A2: Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto ((card I) + 2)),(Initialize s)) by A1, Th11 ; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: IC (Initialize s) = 0 by MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: ( not J is_closed_on s,P or not J is_halting_on s,P or IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) then A6: IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 2)) by A2, A4, SCMPDS_2:57 .= 0 + ((card I) + 2) by A5, Th12 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)) . a by A2, SCMPDS_2:57; then A7: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)) by SCMPDS_4:8; card ((((a,k1) >=0_goto ((card I) + 2)) ';' I) ';' (Goto ((card J) + 1))) = (card (((a,k1) >=0_goto ((card I) + 2)) ';' I)) + (card (Goto ((card J) + 1))) by AFINSQ_1:17 .= (card (((a,k1) >=0_goto ((card I) + 2)) ';' I)) + 1 by COMPOS_1:54 .= ((card I) + 1) + 1 by Th6 .= (card I) + (1 + 1) ; then A8: Shift ((stop J),((card I) + 2)) c= stop (if<0 (a,k1,I,J)) by Th13; stop (if<0 (a,k1,I,J)) c= P +* (stop (if<0 (a,k1,I,J))) by FUNCT_4:25; then Shift ((stop J),((card I) + 2)) c= P +* (stop (if<0 (a,k1,I,J))) by A8, XBOOLE_1:1; then A9: Shift ((stop J),((card I) + 2)) c= P +* (stop (if<0 (a,k1,I,J))) ; assume A10: J is_closed_on s,P ; ::_thesis: ( not J is_halting_on s,P or IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) ) then A11: ( Start-At (0,SCMPDS) c= Initialize s & J is_closed_on Initialize s,P +* (stop J) ) by Th24, FUNCT_4:25; A12: stop J c= P +* (stop J) by FUNCT_4:25; assume A13: J is_halting_on s,P ; ::_thesis: IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) then A14: P +* (stop J) halts_on Initialize s by Def3; A15: Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)) = Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))) by EXTPRO_1:4; A16: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A15 .= CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) by A11, A9, A6, A7, Th31, A12 .= halt SCMPDS by A14, EXTPRO_1:def_15 ; then A17: P +* (stop (if<0 (a,k1,I,J))) halts_on Initialize s by EXTPRO_1:29; A18: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s)) = (a,k1) >=0_goto ((card I) + 2) by A1, Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_J)),(Initialize_s)))_+_1_holds_ CurInstr_((P_+*_(stop_(if<0_(a,k1,I,J)))),(Comput_((P_+*_(stop_(if<0_(a,k1,I,J)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),b1))) <> halt SCMPDS ) assume A19: l < (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 ; ::_thesis: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),b1))) <> halt SCMPDS A20: Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),l))) = CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s)) by A20; hence CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),l))) <> halt SCMPDS by A18; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),b1))) = halt SCMPDS then consider n being Nat such that A21: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A22: n < LifeSpan ((P +* (stop J)),(Initialize s)) by A19, A21, XREAL_1:6; assume A23: CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),l))) = halt SCMPDS ; ::_thesis: contradiction A24: Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop J)),(Comput ((P +* (stop J)),(Initialize s),n))) = CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),n))) by A11, A9, A6, A7, Th31, A12 .= halt SCMPDS by A21, A23, A24 ; hence contradiction by A14, A22, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),l))) = halt SCMPDS holds (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 <= l ; then A25: LifeSpan ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s)) = (LifeSpan ((P +* (stop J)),(Initialize s))) + 1 by A16, A17, EXTPRO_1:def_15; A26: DataPart (Result ((P +* (stop J)),(Initialize s))) = DataPart (Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A14, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A11, A9, A6, A7, Th31, A12 .= DataPart (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s))) by A17, A25, EXTPRO_1:23 ; A27: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if<0_(a,k1,I,J)),P,(Initialize_s)))_holds_ (IExec_((if<0_(a,k1,I,J)),P,(Initialize_s)))_._x_=_((IExec_(J,P,(Initialize_s)))_+*_(Start-At_((((card_I)_+_(card_J))_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) implies (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 ) A28: dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A29: x in dom (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) ; ::_thesis: (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A29, SCMPDS_4:6; supposeA30: x is Int_position ; ::_thesis: (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A31: not x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A28, TARSKI:def_1; thus (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . x = (Result ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s))) . x .= (Result ((P +* (stop J)),(Initialize s))) . x by A26, A30, SCMPDS_4:8 .= (IExec (J,P,(Initialize s))) . x .= ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A31, FUNCT_4:11 ; ::_thesis: verum end; supposeA32: x = IC ; ::_thesis: (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b1 = ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . b1 A33: IC (Result ((P +* (stop J)),(Initialize s))) = IC (IExec (J,P,(Initialize s))) .= card J by A10, A13, Th34 ; A34: x in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A28, A32, TARSKI:def_1; thus (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . x = (Result ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s))) . x .= (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),((LifeSpan ((P +* (stop J)),(Initialize s))) + 1))) . x by A17, A25, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Comput ((P +* (stop (if<0 (a,k1,I,J)))),(Initialize s),1)),(LifeSpan ((P +* (stop J)),(Initialize s))))) by A32, EXTPRO_1:4 .= (IC (Comput ((P +* (stop J)),(Initialize s),(LifeSpan ((P +* (stop J)),(Initialize s)))))) + ((card I) + 2) by A11, A9, A6, A7, Th31, A12 .= (IC (Result ((P +* (stop J)),(Initialize s)))) + ((card I) + 2) by A14, EXTPRO_1:23 .= IC (Start-At (((card J) + ((card I) + 2)),SCMPDS)) by A33, FUNCOP_1:72 .= ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) . x by A32, A34, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A27, FUNCT_1:2; ::_thesis: verum end; registration let I, J be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if<0 (a,k1,I,J) -> parahalting shiftable ; correctness coherence ( if<0 (a,k1,I,J) is shiftable & if<0 (a,k1,I,J) is parahalting ); proof set i = (a,k1) >=0_goto ((card I) + 2); set G = Goto ((card J) + 1); set IF = if<0 (a,k1,I,J); set pIF = stop (if<0 (a,k1,I,J)); reconsider IJ = (I ';' (Goto ((card J) + 1))) ';' J as shiftable Program of SCMPDS ; thus if<0 (a,k1,I,J) is shiftable ; ::_thesis: if<0 (a,k1,I,J) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if<0 (a,k1,I,J)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if<0 (a,k1,I,J)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if<0 (a,k1,I,J)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if<0 (a,k1,I,J))) by FUNCT_4:98; A3: ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; A4: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) < 0 or s . (DataLoc ((s . a),k1)) >= 0 ) ; suppose s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: P halts_on s then if<0 (a,k1,I,J) is_halting_on s,P by A4, Th98; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: P halts_on s then if<0 (a,k1,I,J) is_halting_on s,P by A3, Th99; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; end; end; end; registration let I, J be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if<0 (a,k1,I,J) -> halt-free ; coherence if<0 (a,k1,I,J) is halt-free ; end; theorem :: SCMPDS_6:102 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let s be 0 -started State of SCMPDS; ::_thesis: for I, J being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let I, J be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 let k1 be Integer; ::_thesis: IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 set IF = if<0 (a,k1,I,J); A1: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; A2: ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; A3: Initialize s = s by MEMSTR_0:44; percases ( s . (DataLoc ((s . a),k1)) < 0 or s . (DataLoc ((s . a),k1)) >= 0 ) ; suppose s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 then IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th100; hence IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 then IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (J,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A2, Th101, A3; hence IC (IExec ((if<0 (a,k1,I,J)),P,s)) = ((card I) + (card J)) + 2 by FUNCT_4:113; ::_thesis: verum end; end; end; theorem :: SCMPDS_6:103 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for J being shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let J be shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 implies (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b ) assume A1: s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b A2: not b in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if<0 (a,k1,I,J)),P,s) = (IExec (I,P,s)) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th100; hence (IExec ((if<0 (a,k1,I,J)),P,s)) . b = (IExec (I,P,s)) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:104 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let I be Program of SCMPDS; ::_thesis: for J being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let J be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 implies (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b ) set IF = if<0 (a,k1,I,J); assume A1: s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b A2: not b in dom (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by SCMPDS_4:18; ( J is_closed_on s,P & J is_halting_on s,P ) by Th20, Th21; then IExec ((if<0 (a,k1,I,J)),P,(Initialize s)) = (IExec (J,P,(Initialize s))) +* (Start-At ((((card I) + (card J)) + 2),SCMPDS)) by A1, Th101; hence (IExec ((if<0 (a,k1,I,J)),P,(Initialize s))) . b = (IExec (J,P,(Initialize s))) . b by A2, FUNCT_4:11; ::_thesis: verum end; begin theorem :: SCMPDS_6:105 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds card (if<0 (a,k1,I)) = (card I) + 1 by Th6; theorem :: SCMPDS_6:106 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds 0 in dom (if<0 (a,k1,I)) proof let a be Int_position; ::_thesis: for k1 being Integer for I being Program of SCMPDS holds 0 in dom (if<0 (a,k1,I)) let k1 be Integer; ::_thesis: for I being Program of SCMPDS holds 0 in dom (if<0 (a,k1,I)) let I be Program of SCMPDS; ::_thesis: 0 in dom (if<0 (a,k1,I)) set ci = card (if<0 (a,k1,I)); card (if<0 (a,k1,I)) = (card I) + 1 by Th6; hence 0 in dom (if<0 (a,k1,I)) by AFINSQ_1:66; ::_thesis: verum end; theorem :: SCMPDS_6:107 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds (if<0 (a,k1,I)) . 0 = (a,k1) >=0_goto ((card I) + 1) by Th7; theorem Th108: :: SCMPDS_6:108 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) let I be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set IF = if<0 (a,k1,I); set pIF = stop (if<0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if<0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if<0 (a,k1,I))); set i = (a,k1) >=0_goto ((card I) + 1); A1: stop I c= P +* (stop I) by FUNCT_4:25; A2: 0 in dom (stop (if<0 (a,k1,I))) by COMPOS_1:36; A3: IC (Initialize s) = 0 by MEMSTR_0:47; A4: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A5: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A4, FUNCT_4:11 ; A6: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto ((card I) + 1)),(Initialize s)) by Th11 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) . a by A6, SCMPDS_2:57; then A7: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; assume s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) ) then A8: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A6, A5, SCMPDS_2:57 .= 0 + 1 by A3 ; assume A9: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) ) then A10: I is_closed_on Initialize s,P +* (stop I) by Th24; assume I is_halting_on s,P ; ::_thesis: ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) then A11: P +* (stop I) halts_on Initialize s by Def3; A12: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),1) c= P +* (stop (if<0 (a,k1,I))) ) by Lm6, FUNCT_4:25; A13: card (stop (if<0 (a,k1,I))) = (card (if<0 (a,k1,I))) + 1 by COMPOS_1:55 .= ((card I) + 1) + 1 by Th6 ; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if<0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if<0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I))) then consider k1 being Nat such that A14: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop I)),(Initialize s),k1)) as Element of NAT ; A15: card (stop (if<0 (a,k1,I))) = (card (stop I)) + 1 by A13, COMPOS_1:55; m in dom (stop I) by A9, Def2; then m < card (stop I) by AFINSQ_1:66; then A16: m + 1 < card (stop (if<0 (a,k1,I))) by A15, XREAL_1:6; IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),k1)) by A14, EXTPRO_1:4 .= m + 1 by A10, A12, A8, A7, Th31, A1 ; hence IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<0 (a,k1,I))) by A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I))) hence IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<0 (a,k1,I))) by A2, A3, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if<0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if<0 (a,k1,I) is_halting_on s,P A17: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A17 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A10, A12, A8, A7, Th31, A1 .= halt SCMPDS by A11, EXTPRO_1:def_15 ; then P +* (stop (if<0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; hence if<0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th109: :: SCMPDS_6:109 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 implies ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: ( if<0 (a,k1,I) is_closed_on s,P & if<0 (a,k1,I) is_halting_on s,P ) set i = (a,k1) >=0_goto ((card I) + 1); set IF = if<0 (a,k1,I); set pIF = stop (if<0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if<0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if<0 (a,k1,I))); A2: IC (Initialize s) = 0 by MEMSTR_0:47; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto ((card I) + 1)),(Initialize s)) by Th11 ; then A5: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 1)) by A1, A4, SCMPDS_2:57 .= 0 + ((card I) + 1) by A2, Th12 ; A6: card (if<0 (a,k1,I)) = (card I) + 1 by Th6; then A7: (card I) + 1 in dom (stop (if<0 (a,k1,I))) by COMPOS_1:64; A8: (P +* (stop (if<0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if<0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; stop (if<0 (a,k1,I)) c= P +* (stop (if<0 (a,k1,I))) by FUNCT_4:25; then stop (if<0 (a,k1,I)) c= P +* (stop (if<0 (a,k1,I))) ; then (P +* (stop (if<0 (a,k1,I)))) . ((card I) + 1) = (stop (if<0 (a,k1,I))) . ((card I) + 1) by A7, GRFUNC_1:2 .= halt SCMPDS by A6, COMPOS_1:64 ; then A9: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1))) = halt SCMPDS by A5, A8; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if<0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if<0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I))) then 1 + 0 <= k by INT_1:7; hence IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<0 (a,k1,I))) by A7, A5, A9, EXTPRO_1:5; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if<0 (a,k1,I))) then Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if<0 (a,k1,I))) by A2, COMPOS_1:36; ::_thesis: verum end; end; end; hence if<0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if<0 (a,k1,I) is_halting_on s,P P +* (stop (if<0 (a,k1,I))) halts_on Initialize s by A9, EXTPRO_1:29; hence if<0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th110: :: SCMPDS_6:110 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if<0 (a,k1,I); set pIF = stop (if<0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if<0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if<0 (a,k1,I))); set i = (a,k1) >=0_goto ((card I) + 1); set SAl = Start-At (((card I) + 1),SCMPDS); A1: stop I c= P +* (stop I) by FUNCT_4:25; A2: IC (Initialize s) = 0 by MEMSTR_0:47; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto ((card I) + 1)),(Initialize s)) by Th11 ; assume s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) then A6: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A5, A4, SCMPDS_2:57 .= 0 + 1 by A2 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) . a by A5, SCMPDS_2:57; then A7: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; assume A8: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) ) then A9: I is_closed_on Initialize s,P +* (stop I) by Th24; A10: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),1) c= P +* (stop (if<0 (a,k1,I))) ) by Lm6, FUNCT_4:25; assume A11: I is_halting_on s,P ; ::_thesis: IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) then A12: P +* (stop I) halts_on Initialize s by Def3; A13: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; A14: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A13 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A9, A10, A6, A7, Th31, A1 .= halt SCMPDS by A12, EXTPRO_1:def_15 ; then A15: P +* (stop (if<0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A16: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) = (a,k1) >=0_goto ((card I) + 1) by Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_I)),(Initialize_s)))_+_1_holds_ CurInstr_((P_+*_(stop_(if<0_(a,k1,I)))),(Comput_((P_+*_(stop_(if<0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume A17: l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 ; ::_thesis: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS A18: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) by A18; hence CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A16; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),b1))) = halt SCMPDS then consider n being Nat such that A19: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A20: n < LifeSpan ((P +* (stop I)),(Initialize s)) by A17, A19, XREAL_1:6; assume A21: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS ; ::_thesis: contradiction A22: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),n))) = CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),n))) by A9, A10, A6, A7, Th31, A1 .= halt SCMPDS by A19, A21, A22 ; hence contradiction by A12, A20, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 <= l ; then A23: LifeSpan ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 by A14, A15, EXTPRO_1:def_15; A24: DataPart (Result ((P +* (stop I)),(Initialize s))) = DataPart (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A12, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A9, A10, A6, A7, Th31, A1 .= DataPart (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if<0 (a,k1,I)))),(Initialize s))) by A15, A23, EXTPRO_1:23 ; A25: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if<0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if<0_(a,k1,I)),P,(Initialize_s)))_._x_=_((IExec_(I,P,(Initialize_s)))_+*_(Start-At_(((card_I)_+_1),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if<0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 ) A26: dom (Start-At (((card I) + 1),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A27: x in dom (IExec ((if<0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A27, SCMPDS_4:6; supposeA28: x is Int_position ; ::_thesis: (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A29: not x in dom (Start-At (((card I) + 1),SCMPDS)) by A26, TARSKI:def_1; thus (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if<0 (a,k1,I)))),(Initialize s))) . x .= (Result ((P +* (stop I)),(Initialize s))) . x by A24, A28, SCMPDS_4:8 .= (IExec (I,P,(Initialize s))) . x .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . x by A29, FUNCT_4:11 ; ::_thesis: verum end; supposeA30: x = IC ; ::_thesis: (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . b1 A31: IC (Result ((P +* (stop I)),(Initialize s))) = IC (IExec (I,P,(Initialize s))) .= card I by A8, A11, Th34 ; A32: x in dom (Start-At (((card I) + 1),SCMPDS)) by A26, A30, TARSKI:def_1; thus (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if<0 (a,k1,I)))),(Initialize s))) . x .= (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) . x by A15, A23, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A30, EXTPRO_1:4 .= (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) + 1 by A9, A10, A6, A7, Th31, A1 .= (IC (Result ((P +* (stop I)),(Initialize s)))) + 1 by A12, EXTPRO_1:23 .= IC (Start-At (((card I) + 1),SCMPDS)) by A31, FUNCOP_1:72 .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) . x by A30, A32, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) by A25, FUNCT_1:2; ::_thesis: verum end; theorem Th111: :: SCMPDS_6:111 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 implies IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if<0 (a,k1,I); set pIF = stop (if<0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if<0 (a,k1,I))); set s4 = Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if<0 (a,k1,I))); set i = (a,k1) >=0_goto ((card I) + 1); set SAl = Start-At (((card I) + 1),SCMPDS); A1: IC (Initialize s) = 0 by MEMSTR_0:47; A2: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A3: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A2, FUNCT_4:11 ; A4: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto ((card I) + 1)),(Initialize s)) by Th11 ; assume s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) then A5: IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),((card I) + 1)) by A4, A3, SCMPDS_2:57 .= 0 + ((card I) + 1) by A1, Th12 ; stop (if<0 (a,k1,I)) c= P +* (stop (if<0 (a,k1,I))) by FUNCT_4:25; then A6: stop (if<0 (a,k1,I)) c= P +* (stop (if<0 (a,k1,I))) ; A7: (P +* (stop (if<0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if<0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; A8: card (if<0 (a,k1,I)) = (card I) + 1 by Th6; then (card I) + 1 in dom (stop (if<0 (a,k1,I))) by COMPOS_1:64; then (P +* (stop (if<0 (a,k1,I)))) . ((card I) + 1) = (stop (if<0 (a,k1,I))) . ((card I) + 1) by A6, GRFUNC_1:2 .= halt SCMPDS by A8, COMPOS_1:64 ; then A9: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1))) = halt SCMPDS by A5, A7; then A10: P +* (stop (if<0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A11: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) = (a,k1) >=0_goto ((card I) + 1) by Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_1_holds_ CurInstr_((P_+*_(stop_(if<0_(a,k1,I)))),(Comput_((P_+*_(stop_(if<0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < 1 implies CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS ) A12: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; assume l < 1 ; ::_thesis: CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS then l < 1 + 0 ; then l = 0 by NAT_1:13; then CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) by A12; hence CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A11; ::_thesis: verum end; then for l being Element of NAT st CurInstr ((P +* (stop (if<0 (a,k1,I)))),(Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds 1 <= l ; then LifeSpan ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) = 1 by A9, A10, EXTPRO_1:def_15; then A13: Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1) = Result ((P +* (stop (if<0 (a,k1,I)))),(Initialize s)) by A10, EXTPRO_1:23; A14: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if<0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if<0_(a,k1,I)),P,(Initialize_s)))_._x_=_(s_+*_(Start-At_(((card_I)_+_1),SCMPDS)))_._x A15: dom (Start-At (((card I) + 1),SCMPDS)) = {(IC )} by FUNCOP_1:13; let x be set ; ::_thesis: ( x in dom (IExec ((if<0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 ) assume A16: x in dom (IExec ((if<0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A16, SCMPDS_4:6; supposeA17: x is Int_position ; ::_thesis: (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A18: not x in dom (Start-At (((card I) + 1),SCMPDS)) by A15, TARSKI:def_1; A19: not x in dom (Start-At (0,SCMPDS)) by A17, SCMPDS_4:18; thus (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . x = (Comput ((P +* (stop (if<0 (a,k1,I)))),(Initialize s),1)) . x by A13 .= (Initialize s) . x by A4, A17, SCMPDS_2:57 .= s . x by A19, FUNCT_4:11 .= (s +* (Start-At (((card I) + 1),SCMPDS))) . x by A18, FUNCT_4:11 ; ::_thesis: verum end; supposeA20: x = IC ; ::_thesis: (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 1),SCMPDS))) . b1 hence (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . x = (card I) + 1 by A5, A13 .= (s +* (Start-At (((card I) + 1),SCMPDS))) . x by A20, FUNCT_4:113 ; ::_thesis: verum end; end; end; dom (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom (s +* (Start-At (((card I) + 1),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) by A14, FUNCT_1:2; ::_thesis: verum end; registration let I be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if<0 (a,k1,I) -> parahalting shiftable ; correctness coherence ( if<0 (a,k1,I) is shiftable & if<0 (a,k1,I) is parahalting ); proof set i = (a,k1) >=0_goto ((card I) + 1); set IF = if<0 (a,k1,I); set pIF = stop (if<0 (a,k1,I)); thus if<0 (a,k1,I) is shiftable ; ::_thesis: if<0 (a,k1,I) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if<0 (a,k1,I)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if<0 (a,k1,I)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if<0 (a,k1,I)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if<0 (a,k1,I))) by FUNCT_4:98; A3: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) < 0 or s . (DataLoc ((s . a),k1)) >= 0 ) ; suppose s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: P halts_on s then if<0 (a,k1,I) is_halting_on s,P by A3, Th108; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: P halts_on s then if<0 (a,k1,I) is_halting_on s,P by Th109; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; end; end; end; registration let I be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if<0 (a,k1,I) -> halt-free ; coherence if<0 (a,k1,I) is halt-free ; end; theorem :: SCMPDS_6:112 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 let s be State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 let k1 be Integer; ::_thesis: IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 set IF = if<0 (a,k1,I); A1: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) < 0 or s . (DataLoc ((s . a),k1)) >= 0 ) ; suppose s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 then IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) by A1, Th110; hence IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 then IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) by Th111; hence IC (IExec ((if<0 (a,k1,I)),P,(Initialize s))) = (card I) + 1 by FUNCT_4:113; ::_thesis: verum end; end; end; theorem :: SCMPDS_6:113 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let s be State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 implies (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b ) assume A1: s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b A2: not b in dom (Start-At (((card I) + 1),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if<0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 1),SCMPDS)) by A1, Th110; hence (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:114 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = s . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = s . b let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = s . b let I be Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = s . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = s . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 implies (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = s . b ) assume s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = s . b then A1: IExec ((if<0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 1),SCMPDS)) by Th111; not b in dom (Start-At (((card I) + 1),SCMPDS)) by SCMPDS_4:18; hence (IExec ((if<0 (a,k1,I)),P,(Initialize s))) . b = s . b by A1, FUNCT_4:11; ::_thesis: verum end; begin theorem :: SCMPDS_6:115 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds card (if>=0 (a,k1,I)) = (card I) + 2 by Lm8; theorem :: SCMPDS_6:116 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds ( 0 in dom (if>=0 (a,k1,I)) & 1 in dom (if>=0 (a,k1,I)) ) by Lm9; theorem :: SCMPDS_6:117 for a being Int_position for k1 being Integer for I being Program of SCMPDS holds ( (if>=0 (a,k1,I)) . 0 = (a,k1) >=0_goto 2 & (if>=0 (a,k1,I)) . 1 = goto ((card I) + 1) ) by Lm10; theorem Th118: :: SCMPDS_6:118 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) let I be shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P implies ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); set IF = if>=0 (a,k1,I); set pIF = stop (if>=0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if>=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if>=0 (a,k1,I))); set i = (a,k1) >=0_goto 2; set j = goto ((card I) + 1); A1: stop I c= P +* (stop I) by FUNCT_4:25; A2: if>=0 (a,k1,I) = ((a,k1) >=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A3: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto 2),(Initialize s)) by A2, Th11 ; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) . a by A3, SCMPDS_2:57; then A4: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; A5: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A6: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A5, FUNCT_4:11 ; A7: IC (Initialize s) = 0 by MEMSTR_0:47; assume s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) ) then A8: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),2) by A3, A6, SCMPDS_2:57 .= 0 + 2 by A7, Th12 ; assume A9: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) ) then A10: I is_closed_on Initialize s,P +* (stop I) by Th24; assume I is_halting_on s,P ; ::_thesis: ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) then A11: P +* (stop I) halts_on Initialize s by Def3; A12: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),2) c= P +* (stop (if>=0 (a,k1,I))) ) by Lm7, FUNCT_4:25; A13: 0 in dom (stop (if>=0 (a,k1,I))) by COMPOS_1:36; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if>=0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if>=0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>=0 (a,k1,I))) percases ( 0 < k or k = 0 ) ; suppose 0 < k ; ::_thesis: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>=0 (a,k1,I))) then consider k1 being Nat such that A14: k1 + 1 = k by NAT_1:6; reconsider k1 = k1 as Element of NAT by ORDINAL1:def_12; reconsider m = IC (Comput ((P +* (stop I)),(Initialize s),k1)) as Element of NAT ; A15: card (stop (if>=0 (a,k1,I))) = 1 + (card (if>=0 (a,k1,I))) by COMPOS_1:55 .= 1 + ((card I) + 2) by Lm8 .= (1 + (card I)) + 2 .= (card (stop I)) + 2 by COMPOS_1:55 ; m in dom (stop I) by A9, Def2; then m < card (stop I) by AFINSQ_1:66; then A16: m + 2 < card (stop (if>=0 (a,k1,I))) by A15, XREAL_1:6; IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),k)) = IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),k1)) by A14, EXTPRO_1:4 .= m + 2 by A10, A12, A8, A4, Th31, A1 ; hence IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>=0 (a,k1,I))) by A16, AFINSQ_1:66; ::_thesis: verum end; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>=0 (a,k1,I))) hence IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>=0 (a,k1,I))) by A13, A7, EXTPRO_1:2; ::_thesis: verum end; end; end; hence if>=0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if>=0 (a,k1,I) is_halting_on s,P A17: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A17 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A10, A12, A8, A4, Th31, A1 .= halt SCMPDS by A11, EXTPRO_1:def_15 ; then P +* (stop (if>=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; hence if>=0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th119: :: SCMPDS_6:119 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 implies ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) ) set b = DataLoc ((s . a),k1); assume A1: s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: ( if>=0 (a,k1,I) is_closed_on s,P & if>=0 (a,k1,I) is_halting_on s,P ) set i = (a,k1) >=0_goto 2; set j = goto ((card I) + 1); set IF = if>=0 (a,k1,I); set pIF = stop (if>=0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if>=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1); set s5 = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2); set P4 = P +* (stop (if>=0 (a,k1,I))); set P5 = P +* (stop (if>=0 (a,k1,I))); A2: if>=0 (a,k1,I) = ((a,k1) >=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A3: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A4: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A3, FUNCT_4:11 ; A5: IC (Initialize s) = 0 by MEMSTR_0:47; Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto 2),(Initialize s)) by A2, Th11 ; then A6: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A1, A4, SCMPDS_2:57 .= 0 + 1 by A5 ; A7: stop (if>=0 (a,k1,I)) c= P +* (stop (if>=0 (a,k1,I))) by FUNCT_4:25; then A8: stop (if>=0 (a,k1,I)) c= P +* (stop (if>=0 (a,k1,I))) ; A9: 1 in dom (if>=0 (a,k1,I)) by Lm9; then 1 in dom (stop (if>=0 (a,k1,I))) by COMPOS_1:62; then A10: (P +* (stop (if>=0 (a,k1,I)))) . 1 = (stop (if>=0 (a,k1,I))) . 1 by A8, GRFUNC_1:2 .= (if>=0 (a,k1,I)) . 1 by A9, COMPOS_1:63 .= goto ((card I) + 1) by Lm10 ; A11: card (if>=0 (a,k1,I)) = (card I) + 2 by Lm8; then A12: (card I) + 2 in dom (stop (if>=0 (a,k1,I))) by COMPOS_1:64; A13: (P +* (stop (if>=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if>=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),(1 + 1)) = Following ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1))) by EXTPRO_1:3 .= Exec ((goto ((card I) + 1)),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1))) by A6, A10, A13 ; then A14: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2)) = ICplusConst ((Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),((card I) + 1)) by SCMPDS_2:54 .= ((card I) + 1) + 1 by A6, Th12 .= (card I) + (1 + 1) ; A15: (P +* (stop (if>=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2))) = (P +* (stop (if>=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2))) by PBOOLE:143; stop (if>=0 (a,k1,I)) c= P +* (stop (if>=0 (a,k1,I))) by A7; then (P +* (stop (if>=0 (a,k1,I)))) . ((card I) + 2) = (stop (if>=0 (a,k1,I))) . ((card I) + 2) by A12, GRFUNC_1:2 .= halt SCMPDS by A11, COMPOS_1:64 ; then A16: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2))) = halt SCMPDS by A14, A15; now__::_thesis:_for_k_being_Element_of_NAT_holds_IC_(Comput_((P_+*_(stop_(if>=0_(a,k1,I)))),(Initialize_s),k))_in_dom_(stop_(if>=0_(a,k1,I))) let k be Element of NAT ; ::_thesis: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>=0 (a,k1,I))) A17: ( k = 0 or 0 + 1 <= k ) by INT_1:7; percases ( k = 0 or k = 1 or 1 < k ) by A17, XXREAL_0:1; suppose k = 0 ; ::_thesis: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>=0 (a,k1,I))) then Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),k) = Initialize s by EXTPRO_1:2; hence IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>=0 (a,k1,I))) by A5, COMPOS_1:36; ::_thesis: verum end; suppose k = 1 ; ::_thesis: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>=0 (a,k1,I))) hence IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>=0 (a,k1,I))) by A9, A6, COMPOS_1:62; ::_thesis: verum end; suppose 1 < k ; ::_thesis: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1)) in dom (stop (if>=0 (a,k1,I))) then 1 + 1 <= k by INT_1:7; hence IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),k)) in dom (stop (if>=0 (a,k1,I))) by A12, A14, A16, EXTPRO_1:5; ::_thesis: verum end; end; end; hence if>=0 (a,k1,I) is_closed_on s,P by Def2; ::_thesis: if>=0 (a,k1,I) is_halting_on s,P P +* (stop (if>=0 (a,k1,I))) halts_on Initialize s by A16, EXTPRO_1:29; hence if>=0 (a,k1,I) is_halting_on s,P by Def3; ::_thesis: verum end; theorem Th120: :: SCMPDS_6:120 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being halt-free shiftable Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let I be halt-free shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 & I is_closed_on s,P & I is_halting_on s,P implies IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if>=0 (a,k1,I); set pIF = stop (if>=0 (a,k1,I)); set pI = stop I; set s2 = Initialize s; set s3 = Initialize s; set P2 = P +* (stop I); set P3 = P +* (stop (if>=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1); set P4 = P +* (stop (if>=0 (a,k1,I))); set i = (a,k1) >=0_goto 2; set j = goto ((card I) + 1); set SAl = Start-At (((card I) + 2),SCMPDS); A1: if>=0 (a,k1,I) = ((a,k1) >=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A2: stop I c= P +* (stop I) by FUNCT_4:25; A3: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto 2),(Initialize s)) by A1, Th11 ; A4: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A5: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A4, FUNCT_4:11 ; A6: IC (Initialize s) = 0 by MEMSTR_0:47; A7: ( Start-At (0,SCMPDS) c= Initialize s & Shift ((stop I),2) c= P +* (stop (if>=0 (a,k1,I))) ) by Lm7, FUNCT_4:25; for a being Int_position holds (Initialize s) . a = (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) . a by A3, SCMPDS_2:57; then A8: DataPart (Initialize s) = DataPart (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) by SCMPDS_4:8; assume s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: ( not I is_closed_on s,P or not I is_halting_on s,P or IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) then A9: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) = ICplusConst ((Initialize s),2) by A3, A5, SCMPDS_2:57 .= 0 + 2 by A6, Th12 ; assume A10: I is_closed_on s,P ; ::_thesis: ( not I is_halting_on s,P or IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) ) then A11: I is_closed_on Initialize s,P +* (stop I) by Th24; assume A12: I is_halting_on s,P ; ::_thesis: IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) then A13: P +* (stop I) halts_on Initialize s by Def3; A14: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)) = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))) by EXTPRO_1:4; A15: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1)))) = CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A14 .= CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) by A11, A7, A9, A8, Th31, A2 .= halt SCMPDS by A13, EXTPRO_1:def_15 ; then A16: P +* (stop (if>=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A17: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) = (a,k1) >=0_goto 2 by A1, Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_(LifeSpan_((P_+*_(stop_I)),(Initialize_s)))_+_1_holds_ CurInstr_((P_+*_(stop_(if>=0_(a,k1,I)))),(Comput_((P_+*_(stop_(if>=0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 implies CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume A18: l < (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 ; ::_thesis: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS A19: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; percases ( l = 0 or l <> 0 ) ; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) by A19; hence CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A17; ::_thesis: verum end; suppose l <> 0 ; ::_thesis: not CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1))) = halt SCMPDS then consider n being Nat such that A20: l = n + 1 by NAT_1:6; reconsider n = n as Element of NAT by ORDINAL1:def_12; A21: n < LifeSpan ((P +* (stop I)),(Initialize s)) by A18, A20, XREAL_1:6; assume A22: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS ; ::_thesis: contradiction A23: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),(n + 1)) = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),n) by EXTPRO_1:4; CurInstr ((P +* (stop I)),(Comput ((P +* (stop I)),(Initialize s),n))) = CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),n))) by A11, A7, A9, A8, Th31, A2 .= halt SCMPDS by A20, A22, A23 ; hence contradiction by A13, A21, EXTPRO_1:def_15; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 <= l ; then A24: LifeSpan ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) = (LifeSpan ((P +* (stop I)),(Initialize s))) + 1 by A15, A16, EXTPRO_1:def_15; A25: DataPart (Result ((P +* (stop I)),(Initialize s))) = DataPart (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A13, EXTPRO_1:23 .= DataPart (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A11, A7, A9, A8, Th31, A2 .= DataPart (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) by EXTPRO_1:4 .= DataPart (Result ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s))) by A16, A24, EXTPRO_1:23 ; A26: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if>=0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if>=0_(a,k1,I)),P,(Initialize_s)))_._x_=_((IExec_(I,P,(Initialize_s)))_+*_(Start-At_(((card_I)_+_2),SCMPDS)))_._x let x be set ; ::_thesis: ( x in dom (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 ) A27: dom (Start-At (((card I) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; assume A28: x in dom (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A28, SCMPDS_4:6; supposeA29: x is Int_position ; ::_thesis: (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A30: not x in dom (Start-At (((card I) + 2),SCMPDS)) by A27, TARSKI:def_1; thus (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s))) . x .= (Result ((P +* (stop I)),(Initialize s))) . x by A25, A29, SCMPDS_4:8 .= (IExec (I,P,(Initialize s))) . x .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . x by A30, FUNCT_4:11 ; ::_thesis: verum end; supposeA31: x = IC ; ::_thesis: (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b1 = ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . b1 A32: IC (Result ((P +* (stop I)),(Initialize s))) = IC (IExec (I,P,(Initialize s))) .= card I by A10, A12, Th34 ; A33: x in dom (Start-At (((card I) + 2),SCMPDS)) by A27, A31, TARSKI:def_1; thus (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . x = (Result ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s))) . x .= (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),((LifeSpan ((P +* (stop I)),(Initialize s))) + 1))) . x by A16, A24, EXTPRO_1:23 .= IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),(LifeSpan ((P +* (stop I)),(Initialize s))))) by A31, EXTPRO_1:4 .= (IC (Comput ((P +* (stop I)),(Initialize s),(LifeSpan ((P +* (stop I)),(Initialize s)))))) + 2 by A11, A7, A9, A8, Th31, A2 .= (IC (Result ((P +* (stop I)),(Initialize s)))) + 2 by A13, EXTPRO_1:23 .= IC (Start-At (((card I) + 2),SCMPDS)) by A32, FUNCOP_1:72 .= ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) . x by A31, A33, FUNCT_4:13 ; ::_thesis: verum end; end; end; dom (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom ((IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) by A26, FUNCT_1:2; ::_thesis: verum end; theorem Th121: :: SCMPDS_6:121 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let I be Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let a be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 implies IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) ) set b = DataLoc ((s . a),k1); set IF = if>=0 (a,k1,I); set pIF = stop (if>=0 (a,k1,I)); set s3 = Initialize s; set P3 = P +* (stop (if>=0 (a,k1,I))); set s4 = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1); set s5 = Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2); set P4 = P +* (stop (if>=0 (a,k1,I))); set P5 = P +* (stop (if>=0 (a,k1,I))); set i = (a,k1) >=0_goto 2; set j = goto ((card I) + 1); set SAl = Start-At (((card I) + 2),SCMPDS); A1: if>=0 (a,k1,I) = ((a,k1) >=0_goto 2) ';' ((goto ((card I) + 1)) ';' I) by SCMPDS_4:16; A2: not DataLoc ((s . a),k1) in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; not a in dom (Start-At (0,SCMPDS)) by SCMPDS_4:18; then A3: (Initialize s) . (DataLoc (((Initialize s) . a),k1)) = (Initialize s) . (DataLoc ((s . a),k1)) by FUNCT_4:11 .= s . (DataLoc ((s . a),k1)) by A2, FUNCT_4:11 ; A4: IC (Initialize s) = 0 by MEMSTR_0:47; A5: stop (if>=0 (a,k1,I)) c= P +* (stop (if>=0 (a,k1,I))) by FUNCT_4:25; then A6: stop (if>=0 (a,k1,I)) c= P +* (stop (if>=0 (a,k1,I))) ; A7: stop (if>=0 (a,k1,I)) c= P +* (stop (if>=0 (a,k1,I))) by A5; A8: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),(0 + 1)) = Following ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),0))) by EXTPRO_1:3 .= Following ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) by EXTPRO_1:2 .= Exec (((a,k1) >=0_goto 2),(Initialize s)) by A1, Th11 ; assume s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) then A9: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) = succ (IC (Initialize s)) by A8, A3, SCMPDS_2:57 .= 0 + 1 by A4 ; A10: 1 in dom (if>=0 (a,k1,I)) by Lm9; then 1 in dom (stop (if>=0 (a,k1,I))) by COMPOS_1:62; then A11: (P +* (stop (if>=0 (a,k1,I)))) . 1 = (stop (if>=0 (a,k1,I))) . 1 by A6, GRFUNC_1:2 .= (if>=0 (a,k1,I)) . 1 by A10, COMPOS_1:63 .= goto ((card I) + 1) by Lm10 ; A12: (P +* (stop (if>=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1))) = (P +* (stop (if>=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1))) by PBOOLE:143; A13: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),(1 + 1)) = Following ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1))) by EXTPRO_1:3 .= Exec ((goto ((card I) + 1)),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1))) by A9, A11, A12 ; then A14: IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2)) = ICplusConst ((Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)),((card I) + 1)) by SCMPDS_2:54 .= ((card I) + 1) + 1 by A9, Th12 .= (card I) + (1 + 1) ; A15: (P +* (stop (if>=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2))) = (P +* (stop (if>=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2))) by PBOOLE:143; A16: card (if>=0 (a,k1,I)) = (card I) + 2 by Lm8; then (card I) + 2 in dom (stop (if>=0 (a,k1,I))) by COMPOS_1:64; then (P +* (stop (if>=0 (a,k1,I)))) . ((card I) + 2) = (stop (if>=0 (a,k1,I))) . ((card I) + 2) by A7, GRFUNC_1:2 .= halt SCMPDS by A16, COMPOS_1:64 ; then A17: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2))) = halt SCMPDS by A14, A15; then A18: P +* (stop (if>=0 (a,k1,I))) halts_on Initialize s by EXTPRO_1:29; A19: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) = (a,k1) >=0_goto 2 by A1, Th11; now__::_thesis:_for_l_being_Element_of_NAT_st_l_<_1_+_1_holds_ CurInstr_((P_+*_(stop_(if>=0_(a,k1,I)))),(Comput_((P_+*_(stop_(if>=0_(a,k1,I)))),(Initialize_s),l)))_<>_halt_SCMPDS let l be Element of NAT ; ::_thesis: ( l < 1 + 1 implies CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS ) assume l < 1 + 1 ; ::_thesis: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then A20: l <= 1 by NAT_1:13; A21: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),0) = Initialize s by EXTPRO_1:2; A22: (P +* (stop (if>=0 (a,k1,I)))) /. (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) = (P +* (stop (if>=0 (a,k1,I)))) . (IC (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) by PBOOLE:143; percases ( l = 0 or l = 1 ) by A20, NAT_1:25; suppose l = 0 ; ::_thesis: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS then CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) = CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) by A21; hence CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A19; ::_thesis: verum end; suppose l = 1 ; ::_thesis: CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),b1))) <> halt SCMPDS hence CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) <> halt SCMPDS by A9, A11, A22; ::_thesis: verum end; end; end; then for l being Element of NAT st CurInstr ((P +* (stop (if>=0 (a,k1,I)))),(Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),l))) = halt SCMPDS holds 2 <= l ; then LifeSpan ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) = 2 by A17, A18, EXTPRO_1:def_15; then A23: Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2) = Result ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s)) by A18, EXTPRO_1:23; A24: now__::_thesis:_for_x_being_set_st_x_in_dom_(IExec_((if>=0_(a,k1,I)),P,(Initialize_s)))_holds_ (IExec_((if>=0_(a,k1,I)),P,(Initialize_s)))_._x_=_(s_+*_(Start-At_(((card_I)_+_2),SCMPDS)))_._x A25: dom (Start-At (((card I) + 2),SCMPDS)) = {(IC )} by FUNCOP_1:13; let x be set ; ::_thesis: ( x in dom (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) implies (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 ) assume A26: x in dom (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) ; ::_thesis: (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 percases ( x is Int_position or x = IC ) by A26, SCMPDS_4:6; supposeA27: x is Int_position ; ::_thesis: (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 then x <> IC by SCMPDS_2:43; then A28: not x in dom (Start-At (((card I) + 2),SCMPDS)) by A25, TARSKI:def_1; A29: not x in dom (Start-At (0,SCMPDS)) by A27, SCMPDS_4:18; thus (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . x = (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),2)) . x by A23 .= (Comput ((P +* (stop (if>=0 (a,k1,I)))),(Initialize s),1)) . x by A13, A27, SCMPDS_2:54 .= (Initialize s) . x by A8, A27, SCMPDS_2:57 .= s . x by A29, FUNCT_4:11 .= (s +* (Start-At (((card I) + 2),SCMPDS))) . x by A28, FUNCT_4:11 ; ::_thesis: verum end; supposeA30: x = IC ; ::_thesis: (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b1 = (s +* (Start-At (((card I) + 2),SCMPDS))) . b1 hence (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . x = (card I) + 2 by A14, A23 .= (s +* (Start-At (((card I) + 2),SCMPDS))) . x by A30, FUNCT_4:113 ; ::_thesis: verum end; end; end; dom (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) = the carrier of SCMPDS by PARTFUN1:def_2 .= dom (s +* (Start-At (((card I) + 2),SCMPDS))) by PARTFUN1:def_2 ; hence IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) by A24, FUNCT_1:2; ::_thesis: verum end; registration let I be parahalting shiftable Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if>=0 (a,k1,I) -> parahalting shiftable ; correctness coherence ( if>=0 (a,k1,I) is shiftable & if>=0 (a,k1,I) is parahalting ); proof set i = (a,k1) >=0_goto 2; set j = goto ((card I) + 1); set IF = if>=0 (a,k1,I); set pIF = stop (if>=0 (a,k1,I)); thus if>=0 (a,k1,I) is shiftable ; ::_thesis: if>=0 (a,k1,I) is parahalting let s be 0 -started State of SCMPDS; :: according to SCMPDS_4:def_7 ::_thesis: for b1 being set holds ( not stop (if>=0 (a,k1,I)) c= b1 or b1 halts_on s ) let P be Instruction-Sequence of SCMPDS; ::_thesis: ( not stop (if>=0 (a,k1,I)) c= P or P halts_on s ) A1: Initialize s = s by MEMSTR_0:44; assume stop (if>=0 (a,k1,I)) c= P ; ::_thesis: P halts_on s then A2: P = P +* (stop (if>=0 (a,k1,I))) by FUNCT_4:98; A3: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; percases ( s . (DataLoc ((s . a),k1)) >= 0 or s . (DataLoc ((s . a),k1)) < 0 ) ; suppose s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: P halts_on s then if>=0 (a,k1,I) is_halting_on s,P by A3, Th118; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: P halts_on s then if>=0 (a,k1,I) is_halting_on s,P by Th119; hence P halts_on s by A2, Def3, A1; ::_thesis: verum end; end; end; end; registration let I be halt-free Program of SCMPDS; let a be Int_position; let k1 be Integer; cluster if>=0 (a,k1,I) -> halt-free ; coherence if>=0 (a,k1,I) is halt-free ; end; theorem :: SCMPDS_6:122 for P being Instruction-Sequence of SCMPDS for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being 0 -started State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 let s be 0 -started State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a being Int_position for k1 being Integer holds IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a being Int_position for k1 being Integer holds IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 let a be Int_position; ::_thesis: for k1 being Integer holds IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 let k1 be Integer; ::_thesis: IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 set IF = if>=0 (a,k1,I); A1: ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; A2: Initialize s = s by MEMSTR_0:44; percases ( s . (DataLoc ((s . a),k1)) >= 0 or s . (DataLoc ((s . a),k1)) < 0 ) ; suppose s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 then IExec ((if>=0 (a,k1,I)),P,s) = (IExec (I,P,s)) +* (Start-At (((card I) + 2),SCMPDS)) by A1, Th120, A2; hence IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 by FUNCT_4:113; ::_thesis: verum end; suppose s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 then IExec ((if>=0 (a,k1,I)),P,s) = s +* (Start-At (((card I) + 2),SCMPDS)) by Th121, A2; hence IC (IExec ((if>=0 (a,k1,I)),P,s)) = (card I) + 2 by FUNCT_4:113; ::_thesis: verum end; end; end; theorem :: SCMPDS_6:123 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let s be State of SCMPDS; ::_thesis: for I being halt-free parahalting shiftable Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let I be halt-free parahalting shiftable Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) >= 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) >= 0 implies (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b ) assume A1: s . (DataLoc ((s . a),k1)) >= 0 ; ::_thesis: (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b A2: not b in dom (Start-At (((card I) + 2),SCMPDS)) by SCMPDS_4:18; ( I is_closed_on s,P & I is_halting_on s,P ) by Th20, Th21; then IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = (IExec (I,P,(Initialize s))) +* (Start-At (((card I) + 2),SCMPDS)) by A1, Th120; hence (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = (IExec (I,P,(Initialize s))) . b by A2, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:124 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = s . b proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = s . b let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = s . b let I be Program of SCMPDS; ::_thesis: for a, b being Int_position for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = s . b let a, b be Int_position; ::_thesis: for k1 being Integer st s . (DataLoc ((s . a),k1)) < 0 holds (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = s . b let k1 be Integer; ::_thesis: ( s . (DataLoc ((s . a),k1)) < 0 implies (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = s . b ) assume s . (DataLoc ((s . a),k1)) < 0 ; ::_thesis: (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = s . b then A1: IExec ((if>=0 (a,k1,I)),P,(Initialize s)) = s +* (Start-At (((card I) + 2),SCMPDS)) by Th121; not b in dom (Start-At (((card I) + 2),SCMPDS)) by SCMPDS_4:18; hence (IExec ((if>=0 (a,k1,I)),P,(Initialize s))) . b = s . b by A1, FUNCT_4:11; ::_thesis: verum end; theorem :: SCMPDS_6:125 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS holds ( I is_closed_on s,P iff I is_closed_on Initialize s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS holds ( I is_closed_on s,P iff I is_closed_on Initialize s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS holds ( I is_closed_on s,P iff I is_closed_on Initialize s,P ) let I be Program of SCMPDS; ::_thesis: ( I is_closed_on s,P iff I is_closed_on Initialize s,P ) thus ( I is_closed_on s,P implies I is_closed_on Initialize s,P ) ::_thesis: ( I is_closed_on Initialize s,P implies I is_closed_on s,P ) proof assume for k being Element of NAT holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom (stop I) ; :: according to SCMPDS_6:def_2 ::_thesis: I is_closed_on Initialize s,P hence for k being Element of NAT holds IC (Comput ((P +* (stop I)),(Initialize (Initialize s)),k)) in dom (stop I) ; :: according to SCMPDS_6:def_2 ::_thesis: verum end; assume for k being Element of NAT holds IC (Comput ((P +* (stop I)),(Initialize (Initialize s)),k)) in dom (stop I) ; :: according to SCMPDS_6:def_2 ::_thesis: I is_closed_on s,P hence for k being Element of NAT holds IC (Comput ((P +* (stop I)),(Initialize s),k)) in dom (stop I) ; :: according to SCMPDS_6:def_2 ::_thesis: verum end; theorem :: SCMPDS_6:126 for P being Instruction-Sequence of SCMPDS for s being State of SCMPDS for I being Program of SCMPDS holds ( I is_halting_on s,P iff I is_halting_on Initialize s,P ) proof let P be Instruction-Sequence of SCMPDS; ::_thesis: for s being State of SCMPDS for I being Program of SCMPDS holds ( I is_halting_on s,P iff I is_halting_on Initialize s,P ) let s be State of SCMPDS; ::_thesis: for I being Program of SCMPDS holds ( I is_halting_on s,P iff I is_halting_on Initialize s,P ) let I be Program of SCMPDS; ::_thesis: ( I is_halting_on s,P iff I is_halting_on Initialize s,P ) thus ( I is_halting_on s,P implies I is_halting_on Initialize s,P ) ::_thesis: ( I is_halting_on Initialize s,P implies I is_halting_on s,P ) proof assume P +* (stop I) halts_on Initialize s ; :: according to SCMPDS_6:def_3 ::_thesis: I is_halting_on Initialize s,P hence P +* (stop I) halts_on Initialize (Initialize s) ; :: according to SCMPDS_6:def_3 ::_thesis: verum end; assume P +* (stop I) halts_on Initialize (Initialize s) ; :: according to SCMPDS_6:def_3 ::_thesis: I is_halting_on s,P hence P +* (stop I) halts_on Initialize s ; :: according to SCMPDS_6:def_3 ::_thesis: verum end;