let P be the InstructionsF of SCM+FSA -valued ManySortedSet of NAT ; :: thesis: for c0 being Nat
for s being b1 -started State of SCM+FSA st s . (intloc 0) = 1 holds
for a being Int-Location
for k being Integer st a <> intloc 0 & ( for c being Nat st c in dom (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ) holds
( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k )

let c0 be Nat; :: thesis: for s being c0 -started State of SCM+FSA st s . (intloc 0) = 1 holds
for a being Int-Location
for k being Integer st a <> intloc 0 & ( for c being Nat st c in dom (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ) holds
( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k )

let s be c0 -started State of SCM+FSA; :: thesis: ( s . (intloc 0) = 1 implies for a being Int-Location
for k being Integer st a <> intloc 0 & ( for c being Nat st c in dom (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ) holds
( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k ) )

assume A1: s . (intloc 0) = 1 ; :: thesis: for a being Int-Location
for k being Integer st a <> intloc 0 & ( for c being Nat st c in dom (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ) holds
( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k )

A2: IC s = c0 by MEMSTR_0:def 11;
let a be Int-Location; :: thesis: for k being Integer st a <> intloc 0 & ( for c being Nat st c in dom (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ) holds
( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k )

let k be Integer; :: thesis: ( a <> intloc 0 & ( for c being Nat st c in dom (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ) implies ( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k ) )

assume that
A3: a <> intloc 0 and
A4: for c being Nat st c in dom (aSeq (a,k)) holds
(aSeq (a,k)) . c = P . (c0 + c) ; :: thesis: ( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k )

per cases ( k > 0 or k <= 0 ) ;
suppose A5: k > 0 ; :: thesis: ( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k )

then reconsider k9 = k as Element of NAT by INT_1:3;
consider k1 being Nat such that
A6: k1 + 1 = k9 and
A7: aSeq (a,k9) = <%(a := (intloc 0))%> ^ (k1 --> (AddTo (a,(intloc 0)))) by A5, Def2;
defpred S1[ Nat] means ( $1 <= k9 implies ( IC (Comput (P,s,$1)) = c0 + $1 & ( 1 <= $1 implies (Comput (P,s,$1)) . a = $1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,$1)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,$1)) . f = s . f ) ) );
A8: len (aSeq (a,k9)) = (len <%(a := (intloc 0))%>) + (len (k1 --> (AddTo (a,(intloc 0))))) by A7, AFINSQ_1:17
.= 1 + (len (k1 --> (AddTo (a,(intloc 0))))) by AFINSQ_1:33
.= k9 by A6 ;
A9: for i being Nat st i <= len (aSeq (a,k9)) holds
( IC (Comput (P,s,i)) = c0 + i & ( 1 <= i implies (Comput (P,s,i)) . a = i ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) )
proof
A10: for i being Nat st i < k9 holds
i in dom (aSeq (a,k9)) by A8, AFINSQ_1:86;
A11: P . (c0 + 0) = (aSeq (a,k9)) . 0 by A5, A4, A10
.= a := (intloc 0) by A7, AFINSQ_1:35 ;
A12: now :: thesis: for n being Nat st n = 0 holds
( Comput (P,s,n) = s & CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) & Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s) )
let n be Nat; :: thesis: ( n = 0 implies ( Comput (P,s,n) = s & CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) & Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s) ) )
assume n = 0 ; :: thesis: ( Comput (P,s,n) = s & CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) & Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s) )
hence A13: Comput (P,s,n) = s by EXTPRO_1:2; :: thesis: ( CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) & Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s) )
hence CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) by A2, A11, PBOOLE:143; :: thesis: Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s)
thus Comput (P,s,(n + 1)) = Following (P,(Comput (P,s,n))) by EXTPRO_1:3
.= Exec ((a := (intloc 0)),s) by A2, A11, A13, PBOOLE:143 ; :: thesis: verum
end;
A14: now :: thesis: for i being Nat st 1 <= i & i < k9 holds
(aSeq (a,k9)) . i = AddTo (a,(intloc 0))
let i be Nat; :: thesis: ( 1 <= i & i < k9 implies (aSeq (a,k9)) . i = AddTo (a,(intloc 0)) )
assume that
A15: 1 <= i and
A16: i < k9 ; :: thesis: (aSeq (a,k9)) . i = AddTo (a,(intloc 0))
reconsider i1 = i - 1 as Element of NAT by A15, INT_1:5;
i = i1 + 1 ;
then i1 < k1 by A16, A6, XREAL_1:6;
then A17: i1 in Segm k1 by NAT_1:44;
A18: len (k1 --> (AddTo (a,(intloc 0)))) = k1 ;
len <%(a := (intloc 0))%> = 1 by AFINSQ_1:33;
hence (aSeq (a,k9)) . i = (k1 --> (AddTo (a,(intloc 0)))) . (i - 1) by A15, A7, A18, A6, A16, AFINSQ_1:18
.= AddTo (a,(intloc 0)) by A17, FUNCOP_1:7 ;
:: thesis: verum
end;
A19: now :: thesis: for i being Nat st 0 < i & i < k9 holds
P . (c0 + i) = AddTo (a,(intloc 0))
let i be Nat; :: thesis: ( 0 < i & i < k9 implies P . (c0 + i) = AddTo (a,(intloc 0)) )
assume that
A20: 0 < i and
A21: i < k9 ; :: thesis: P . (c0 + i) = AddTo (a,(intloc 0))
A22: 0 + 1 <= i by A20, NAT_1:13;
thus P . (c0 + i) = (aSeq (a,k9)) . i by A4, A10, A21
.= AddTo (a,(intloc 0)) by A14, A22, A21 ; :: thesis: verum
end;
A23: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A24: S1[n] ; :: thesis: S1[n + 1]
assume A25: n + 1 <= k9 ; :: thesis: ( IC (Comput (P,s,(n + 1))) = c0 + (n + 1) & ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

per cases ( n = 0 or n > 0 ) ;
suppose A26: n = 0 ; :: thesis: ( IC (Comput (P,s,(n + 1))) = c0 + (n + 1) & ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

hence IC (Comput (P,s,(n + 1))) = (Exec ((a := (intloc 0)),s)) . (IC ) by A12
.= c0 + (n + 1) by A2, A26, SCMFSA_2:63 ;
:: thesis: ( ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

hereby :: thesis: ( ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )
assume 1 <= n + 1 ; :: thesis: (Comput (P,s,(n + 1))) . a = n + 1
thus (Comput (P,s,(n + 1))) . a = (Exec ((a := (intloc 0)),s)) . a by A12, A26
.= n + 1 by A1, A26, SCMFSA_2:63 ; :: thesis: verum
end;
hereby :: thesis: for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f
let b be Int-Location; :: thesis: ( b <> a implies (Comput (P,s,(n + 1))) . b = s . b )
assume A27: b <> a ; :: thesis: (Comput (P,s,(n + 1))) . b = s . b
thus (Comput (P,s,(n + 1))) . b = (Exec ((a := (intloc 0)),s)) . b by A12, A26
.= s . b by A27, SCMFSA_2:63 ; :: thesis: verum
end;
let f be FinSeq-Location ; :: thesis: (Comput (P,s,(n + 1))) . f = s . f
thus (Comput (P,s,(n + 1))) . f = (Exec ((a := (intloc 0)),s)) . f by A12, A26
.= s . f by SCMFSA_2:63 ; :: thesis: verum
end;
suppose A28: n > 0 ; :: thesis: ( IC (Comput (P,s,(n + 1))) = c0 + (n + 1) & ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

A29: n < k9 by A25, NAT_1:13;
A30: n + 0 <= n + 1 by XREAL_1:7;
then A31: CurInstr (P,(Comput (P,s,n))) = P . (c0 + n) by A24, A25, PBOOLE:143, XXREAL_0:2
.= AddTo (a,(intloc 0)) by A19, A28, A29 ;
A32: Comput (P,s,(n + 1)) = Following (P,(Comput (P,s,n))) by EXTPRO_1:3
.= Exec ((AddTo (a,(intloc 0))),(Comput (P,s,n))) by A31 ;
hence IC (Comput (P,s,(n + 1))) = (IC (Comput (P,s,n))) + 1 by SCMFSA_2:64
.= c0 + (n + 1) by A24, A25, A30, XXREAL_0:2 ;
:: thesis: ( ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

A33: 0 + 1 <= n by A28, INT_1:7;
hereby :: thesis: ( ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )
assume 1 <= n + 1 ; :: thesis: (Comput (P,s,(n + 1))) . a = n + 1
thus (Comput (P,s,(n + 1))) . a = n + ((Comput (P,s,n)) . (intloc 0)) by A24, A25, A33, A30, A32, SCMFSA_2:64, XXREAL_0:2
.= n + 1 by A1, A3, A24, A25, A30, XXREAL_0:2 ; :: thesis: verum
end;
hereby :: thesis: for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f
let b be Int-Location; :: thesis: ( b <> a implies (Comput (P,s,(n + 1))) . b = s . b )
assume A34: b <> a ; :: thesis: (Comput (P,s,(n + 1))) . b = s . b
hence (Comput (P,s,(n + 1))) . b = (Comput (P,s,n)) . b by A32, SCMFSA_2:64
.= s . b by A24, A25, A30, A34, XXREAL_0:2 ;
:: thesis: verum
end;
let f be FinSeq-Location ; :: thesis: (Comput (P,s,(n + 1))) . f = s . f
thus (Comput (P,s,(n + 1))) . f = (Comput (P,s,n)) . f by A32, SCMFSA_2:64
.= s . f by A24, A25, A30, XXREAL_0:2 ; :: thesis: verum
end;
end;
end;
A35: S1[ 0 ] by A2, EXTPRO_1:2;
A36: for i being Nat holds S1[i] from NAT_1:sch 2(A35, A23);
let i be Nat; :: thesis: ( i <= len (aSeq (a,k9)) implies ( IC (Comput (P,s,i)) = c0 + i & ( 1 <= i implies (Comput (P,s,i)) . a = i ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) )

assume i <= len (aSeq (a,k9)) ; :: thesis: ( IC (Comput (P,s,i)) = c0 + i & ( 1 <= i implies (Comput (P,s,i)) . a = i ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) )

hence ( IC (Comput (P,s,i)) = c0 + i & ( 1 <= i implies (Comput (P,s,i)) . a = i ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) by A8, A36; :: thesis: verum
end;
hence for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ; :: thesis: (Comput (P,s,(len (aSeq (a,k))))) . a = k
1 <= len (aSeq (a,k)) by A6, A8, NAT_1:11;
hence (Comput (P,s,(len (aSeq (a,k))))) . a = k by A8, A9; :: thesis: verum
end;
suppose A37: k <= 0 ; :: thesis: ( ( for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ) & (Comput (P,s,(len (aSeq (a,k))))) . a = k )

then reconsider mk = - k as Element of NAT by INT_1:3;
defpred S1[ Nat] means ( $1 <= (mk + 1) + 1 implies ( IC (Comput (P,s,$1)) = c0 + $1 & ( 1 <= $1 implies (Comput (P,s,$1)) . a = ((- $1) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,$1)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,$1)) . f = s . f ) ) );
consider k1 being Nat such that
A38: k1 + k = 1 and
A39: aSeq (a,k) = <%(a := (intloc 0))%> ^ (k1 --> (SubFrom (a,(intloc 0)))) by A37, Def2;
A40: len (aSeq (a,k)) = (len <%(a := (intloc 0))%>) + (len (k1 --> (SubFrom (a,(intloc 0))))) by A39, AFINSQ_1:17
.= 1 + (len (k1 --> (SubFrom (a,(intloc 0))))) by AFINSQ_1:33
.= (mk + 1) + 1 by A38 ;
A41: for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( 1 <= i implies (Comput (P,s,i)) . a = ((- i) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) )
proof
A42: for i being Nat st i < (mk + 1) + 1 holds
i in dom (aSeq (a,k)) by A40, AFINSQ_1:86;
A43: P . (c0 + 0) = (aSeq (a,k)) . 0 by A4, A42
.= a := (intloc 0) by A39, AFINSQ_1:35 ;
A44: for n being Nat st n = 0 holds
( Comput (P,s,n) = s & CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) & Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s) )
proof
let n be Nat; :: thesis: ( n = 0 implies ( Comput (P,s,n) = s & CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) & Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s) ) )
assume n = 0 ; :: thesis: ( Comput (P,s,n) = s & CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) & Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s) )
hence A45: Comput (P,s,n) = s by EXTPRO_1:2; :: thesis: ( CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) & Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s) )
hence CurInstr (P,(Comput (P,s,n))) = a := (intloc 0) by A2, A43, PBOOLE:143; :: thesis: Comput (P,s,(n + 1)) = Exec ((a := (intloc 0)),s)
thus Comput (P,s,(n + 1)) = Following (P,(Comput (P,s,n))) by EXTPRO_1:3
.= Exec ((a := (intloc 0)),s) by A2, A43, A45, PBOOLE:143 ; :: thesis: verum
end;
A46: now :: thesis: for i being Nat st 1 <= i & i < (mk + 1) + 1 holds
(aSeq (a,k)) . i = SubFrom (a,(intloc 0))
let i be Nat; :: thesis: ( 1 <= i & i < (mk + 1) + 1 implies (aSeq (a,k)) . i = SubFrom (a,(intloc 0)) )
assume that
A47: 1 <= i and
A48: i < (mk + 1) + 1 ; :: thesis: (aSeq (a,k)) . i = SubFrom (a,(intloc 0))
A49: i - 1 < ((mk + 1) + 1) - 1 by A48, XREAL_1:9;
reconsider i1 = i - 1 as Element of NAT by A47, INT_1:5;
A50: i1 in Segm k1 by A38, A49, NAT_1:44;
A51: len (k1 --> (SubFrom (a,(intloc 0)))) = k1 ;
len <%(a := (intloc 0))%> = 1 by AFINSQ_1:33;
hence (aSeq (a,k)) . i = (k1 --> (SubFrom (a,(intloc 0)))) . (i - 1) by A39, A47, A51, A38, A48, AFINSQ_1:18
.= SubFrom (a,(intloc 0)) by A50, FUNCOP_1:7 ;
:: thesis: verum
end;
A52: now :: thesis: for i being Nat st 0 < i & i < (mk + 1) + 1 holds
P . (c0 + i) = SubFrom (a,(intloc 0))
let i be Nat; :: thesis: ( 0 < i & i < (mk + 1) + 1 implies P . (c0 + i) = SubFrom (a,(intloc 0)) )
assume that
A53: 0 < i and
A54: i < (mk + 1) + 1 ; :: thesis: P . (c0 + i) = SubFrom (a,(intloc 0))
A55: 0 + 1 <= i by A53, NAT_1:13;
thus P . (c0 + i) = (aSeq (a,k)) . i by A4, A42, A54
.= SubFrom (a,(intloc 0)) by A46, A55, A54 ; :: thesis: verum
end;
A56: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A57: S1[n] ; :: thesis: S1[n + 1]
assume A58: n + 1 <= (mk + 1) + 1 ; :: thesis: ( IC (Comput (P,s,(n + 1))) = c0 + (n + 1) & ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

per cases ( n = 0 or n > 0 ) ;
suppose A59: n = 0 ; :: thesis: ( IC (Comput (P,s,(n + 1))) = c0 + (n + 1) & ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

hence IC (Comput (P,s,(n + 1))) = (Exec ((a := (intloc 0)),s)) . (IC ) by A44
.= c0 + (n + 1) by A2, A59, SCMFSA_2:63 ;
:: thesis: ( ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

hereby :: thesis: ( ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )
assume 1 <= n + 1 ; :: thesis: (Comput (P,s,(n + 1))) . a = ((- (n + 1)) + 1) + 1
thus (Comput (P,s,(n + 1))) . a = (Exec ((a := (intloc 0)),s)) . a by A44, A59
.= ((- (n + 1)) + 1) + 1 by A1, A59, SCMFSA_2:63 ; :: thesis: verum
end;
hereby :: thesis: for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f
let b be Int-Location; :: thesis: ( b <> a implies (Comput (P,s,(n + 1))) . b = s . b )
assume A60: b <> a ; :: thesis: (Comput (P,s,(n + 1))) . b = s . b
thus (Comput (P,s,(n + 1))) . b = (Exec ((a := (intloc 0)),s)) . b by A44, A59
.= s . b by A60, SCMFSA_2:63 ; :: thesis: verum
end;
let f be FinSeq-Location ; :: thesis: (Comput (P,s,(n + 1))) . f = s . f
thus (Comput (P,s,(n + 1))) . f = (Exec ((a := (intloc 0)),s)) . f by A44, A59
.= s . f by SCMFSA_2:63 ; :: thesis: verum
end;
suppose A61: n > 0 ; :: thesis: ( IC (Comput (P,s,(n + 1))) = c0 + (n + 1) & ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

A62: n < (mk + 1) + 1 by A58, NAT_1:13;
A63: n + 0 <= n + 1 by XREAL_1:7;
then A64: CurInstr (P,(Comput (P,s,n))) = P . (c0 + n) by A57, A58, PBOOLE:143, XXREAL_0:2
.= SubFrom (a,(intloc 0)) by A52, A61, A62 ;
A65: Comput (P,s,(n + 1)) = Following (P,(Comput (P,s,n))) by EXTPRO_1:3
.= Exec ((SubFrom (a,(intloc 0))),(Comput (P,s,n))) by A64 ;
hence IC (Comput (P,s,(n + 1))) = (IC (Comput (P,s,n))) + 1 by SCMFSA_2:65
.= c0 + (n + 1) by A57, A58, A63, XXREAL_0:2 ;
:: thesis: ( ( 1 <= n + 1 implies (Comput (P,s,(n + 1))) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )

A66: 0 + 1 < n + 1 by A61, XREAL_1:6;
hereby :: thesis: ( ( for b being Int-Location st b <> a holds
(Comput (P,s,(n + 1))) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f ) )
assume 1 <= n + 1 ; :: thesis: (Comput (P,s,(n + 1))) . a = ((- (n + 1)) + 1) + 1
thus (Comput (P,s,(n + 1))) . a = (((- n) + 1) + 1) - ((Comput (P,s,n)) . (intloc 0)) by A57, A58, A66, A65, NAT_1:13, SCMFSA_2:65
.= (((- n) + 1) + 1) - (s . (intloc 0)) by A3, A57, A58, A63, XXREAL_0:2
.= ((- (n + 1)) + 1) + 1 by A1 ; :: thesis: verum
end;
hereby :: thesis: for f being FinSeq-Location holds (Comput (P,s,(n + 1))) . f = s . f
let b be Int-Location; :: thesis: ( b <> a implies (Comput (P,s,(n + 1))) . b = s . b )
assume A67: b <> a ; :: thesis: (Comput (P,s,(n + 1))) . b = s . b
hence (Comput (P,s,(n + 1))) . b = (Comput (P,s,n)) . b by A65, SCMFSA_2:65
.= s . b by A57, A58, A63, A67, XXREAL_0:2 ;
:: thesis: verum
end;
let f be FinSeq-Location ; :: thesis: (Comput (P,s,(n + 1))) . f = s . f
thus (Comput (P,s,(n + 1))) . f = (Comput (P,s,n)) . f by A65, SCMFSA_2:65
.= s . f by A57, A58, A63, XXREAL_0:2 ; :: thesis: verum
end;
end;
end;
A68: S1[ 0 ] by A2, EXTPRO_1:2;
A69: for i being Nat holds S1[i] from NAT_1:sch 2(A68, A56);
let i be Nat; :: thesis: ( i <= len (aSeq (a,k)) implies ( IC (Comput (P,s,i)) = c0 + i & ( 1 <= i implies (Comput (P,s,i)) . a = ((- i) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) )

assume i <= len (aSeq (a,k)) ; :: thesis: ( IC (Comput (P,s,i)) = c0 + i & ( 1 <= i implies (Comput (P,s,i)) . a = ((- i) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) )

hence ( IC (Comput (P,s,i)) = c0 + i & ( 1 <= i implies (Comput (P,s,i)) . a = ((- i) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) by A40, A69; :: thesis: verum
end;
hence for i being Nat st i <= len (aSeq (a,k)) holds
( IC (Comput (P,s,i)) = c0 + i & ( for b being Int-Location st b <> a holds
(Comput (P,s,i)) . b = s . b ) & ( for f being FinSeq-Location holds (Comput (P,s,i)) . f = s . f ) ) ; :: thesis: (Comput (P,s,(len (aSeq (a,k))))) . a = k
1 <= len (aSeq (a,k)) by A40, NAT_1:11;
hence (Comput (P,s,(len (aSeq (a,k))))) . a = ((- ((- k) + (1 + 1))) + 1) + 1 by A40, A41
.= k ;
:: thesis: verum
end;
end;