let s be State of SCM+FSA ; :: thesis: ( s . (intloc 0 ) = 1 implies for c0 being Element of NAT st IC s = insloc c0 holds
for a being Int-Location
for k being Integer st a <> intloc 0 & ( for c being Element of NAT st c in dom (aSeq a,k) holds
(aSeq a,k) . c = s . (insloc ((c0 + c) -' 1)) ) holds
( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k ) )
assume A1:
s . (intloc 0 ) = 1
; :: thesis: for c0 being Element of NAT st IC s = insloc c0 holds
for a being Int-Location
for k being Integer st a <> intloc 0 & ( for c being Element of NAT st c in dom (aSeq a,k) holds
(aSeq a,k) . c = s . (insloc ((c0 + c) -' 1)) ) holds
( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k )
let c0 be Element of NAT ; :: thesis: ( IC s = insloc c0 implies for a being Int-Location
for k being Integer st a <> intloc 0 & ( for c being Element of NAT st c in dom (aSeq a,k) holds
(aSeq a,k) . c = s . (insloc ((c0 + c) -' 1)) ) holds
( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k ) )
assume A2:
IC s = insloc c0
; :: thesis: for a being Int-Location
for k being Integer st a <> intloc 0 & ( for c being Element of NAT st c in dom (aSeq a,k) holds
(aSeq a,k) . c = s . (insloc ((c0 + c) -' 1)) ) holds
( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k )
let a be Int-Location ; :: thesis: for k being Integer st a <> intloc 0 & ( for c being Element of NAT st c in dom (aSeq a,k) holds
(aSeq a,k) . c = s . (insloc ((c0 + c) -' 1)) ) holds
( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k )
let k be Integer; :: thesis: ( a <> intloc 0 & ( for c being Element of NAT st c in dom (aSeq a,k) holds
(aSeq a,k) . c = s . (insloc ((c0 + c) -' 1)) ) implies ( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k ) )
assume that
A3:
a <> intloc 0
and
A4:
for c being Element of NAT st c in dom (aSeq a,k) holds
(aSeq a,k) . c = s . (insloc ((c0 + c) -' 1))
; :: thesis: ( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k )
per cases
( k > 0 or k <= 0 )
;
suppose A5:
k > 0
;
:: thesis: ( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k )then reconsider k' =
k as
Element of
NAT by INT_1:16;
consider k1 being
Element of
NAT such that A6:
k1 + 1
= k'
and A7:
aSeq a,
k' = <*(a := (intloc 0 ))*> ^ (k1 |-> (AddTo a,(intloc 0 )))
by A5, Def3;
A8:
len (aSeq a,k') =
(len <*(a := (intloc 0 ))*>) + (len (k1 |-> (AddTo a,(intloc 0 ))))
by A7, FINSEQ_1:35
.=
1
+ (len (k1 |-> (AddTo a,(intloc 0 ))))
by FINSEQ_1:56
.=
k'
by A6, FINSEQ_1:def 18
;
defpred S1[
Element of
NAT ]
means ( $1
<= k' implies (
IC (Computation s,$1) = insloc (c0 + $1) & ( 1
<= $1 implies
(Computation s,$1) . a = $1 ) & ( for
b being
Int-Location st
b <> a holds
(Computation s,$1) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Computation s,$1) . f = s . f ) ) );
A9:
for
i being
Element of
NAT st
i <= len (aSeq a,k') holds
(
IC (Computation s,i) = insloc (c0 + i) & ( 1
<= i implies
(Computation s,i) . a = i ) & ( for
b being
Int-Location st
b <> a holds
(Computation s,i) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Computation s,i) . f = s . f ) )
proof
let i be
Element of
NAT ;
:: thesis: ( i <= len (aSeq a,k') implies ( IC (Computation s,i) = insloc (c0 + i) & ( 1 <= i implies (Computation s,i) . a = i ) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) )
assume A10:
i <= len (aSeq a,k')
;
:: thesis: ( IC (Computation s,i) = insloc (c0 + i) & ( 1 <= i implies (Computation s,i) . a = i ) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) )
then A14:
s . (insloc (c0 + 0 )) =
(aSeq a,k') . (0 + 1)
by A5
.=
a := (intloc 0 )
by A7, FINSEQ_1:58
;
A15:
now let i be
Element of
NAT ;
:: thesis: ( 1 < i & i <= k' implies (aSeq a,k') . i = AddTo a,(intloc 0 ) )assume A16:
( 1
< i &
i <= k' )
;
:: thesis: (aSeq a,k') . i = AddTo a,(intloc 0 )then A17:
1
<= i - 1
by INT_1:79;
then reconsider i1 =
i - 1 as
Element of
NAT by INT_1:16;
i - 1
<= k' - 1
by A16, XREAL_1:11;
then A18:
i1 in Seg k1
by A6, A17, FINSEQ_1:3;
len <*(a := (intloc 0 ))*> = 1
by FINSEQ_1:56;
hence (aSeq a,k') . i =
(k1 |-> (AddTo a,(intloc 0 ))) . (i - 1)
by A7, A8, A16, FINSEQ_1:37
.=
AddTo a,
(intloc 0 )
by A18, FUNCOP_1:13
;
:: thesis: verum end;
A23:
now let n be
Element of
NAT ;
:: thesis: ( n = 0 implies ( Computation s,n = s & CurInstr (Computation s,n) = a := (intloc 0 ) & Computation s,(n + 1) = Exec (a := (intloc 0 )),s ) )assume
n = 0
;
:: thesis: ( Computation s,n = s & CurInstr (Computation s,n) = a := (intloc 0 ) & Computation s,(n + 1) = Exec (a := (intloc 0 )),s )hence A24:
Computation s,
n = s
by AMI_1:13;
:: thesis: ( CurInstr (Computation s,n) = a := (intloc 0 ) & Computation s,(n + 1) = Exec (a := (intloc 0 )),s )hence
CurInstr (Computation s,n) = a := (intloc 0 )
by A2, A14;
:: thesis: Computation s,(n + 1) = Exec (a := (intloc 0 )),sthus Computation s,
(n + 1) =
Following (Computation s,n)
by AMI_1:14
.=
Exec (a := (intloc 0 )),
s
by A2, A14, A24
;
:: thesis: verum end;
A25:
S1[
0 ]
by A2, AMI_1:13;
A26:
for
n being
Element of
NAT st
S1[
n] holds
S1[
n + 1]
proof
let n be
Element of
NAT ;
:: thesis: ( S1[n] implies S1[n + 1] )
assume A27:
S1[
n]
;
:: thesis: S1[n + 1]
assume A28:
n + 1
<= k'
;
:: thesis: ( IC (Computation s,(n + 1)) = insloc (c0 + (n + 1)) & ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )
per cases
( n = 0 or n > 0 )
;
suppose A29:
n = 0
;
:: thesis: ( IC (Computation s,(n + 1)) = insloc (c0 + (n + 1)) & ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )hence IC (Computation s,(n + 1)) =
(Exec (a := (intloc 0 )),s) . (IC SCM+FSA )
by A23
.=
Next (insloc (c0 + n))
by A2, A29, SCMFSA_2:89
.=
insloc ((c0 + n) + 1)
by NAT_1:39
.=
insloc (c0 + (n + 1))
;
:: thesis: ( ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )let f be
FinSeq-Location ;
:: thesis: (Computation s,(n + 1)) . f = s . fthus (Computation s,(n + 1)) . f =
(Exec (a := (intloc 0 )),s) . f
by A23, A29
.=
s . f
by SCMFSA_2:89
;
:: thesis: verum end; suppose A31:
n > 0
;
:: thesis: ( IC (Computation s,(n + 1)) = insloc (c0 + (n + 1)) & ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )then A32:
0 + 1
<= n
by INT_1:20;
A33:
n + 0 <= n + 1
by XREAL_1:9;
A34:
(
0 < n &
n < k' )
by A28, A31, NAT_1:13;
A35:
CurInstr (Computation s,n) =
s . (insloc (c0 + n))
by A27, A28, A33, AMI_1:54, XXREAL_0:2
.=
AddTo a,
(intloc 0 )
by A19, A34
;
A36:
Computation s,
(n + 1) =
Following (Computation s,n)
by AMI_1:14
.=
Exec (AddTo a,(intloc 0 )),
(Computation s,n)
by A35
;
hence IC (Computation s,(n + 1)) =
Next (IC (Computation s,n))
by SCMFSA_2:90
.=
insloc ((c0 + n) + 1)
by A27, A28, A33, NAT_1:39, XXREAL_0:2
.=
insloc (c0 + (n + 1))
;
:: thesis: ( ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = n + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )hereby :: thesis: ( ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )
assume
1
<= n + 1
;
:: thesis: (Computation s,(n + 1)) . a = n + 1thus (Computation s,(n + 1)) . a =
n + ((Computation s,n) . (intloc 0 ))
by A27, A28, A32, A33, A36, SCMFSA_2:90, XXREAL_0:2
.=
n + 1
by A1, A3, A27, A28, A33, XXREAL_0:2
;
:: thesis: verum
end; let f be
FinSeq-Location ;
:: thesis: (Computation s,(n + 1)) . f = s . fthus (Computation s,(n + 1)) . f =
(Computation s,n) . f
by A36, SCMFSA_2:90
.=
s . f
by A27, A28, A33, XXREAL_0:2
;
:: thesis: verum end; end;
end;
for
i being
Element of
NAT holds
S1[
i]
from NAT_1:sch 1(A25, A26);
hence
(
IC (Computation s,i) = insloc (c0 + i) & ( 1
<= i implies
(Computation s,i) . a = i ) & ( for
b being
Int-Location st
b <> a holds
(Computation s,i) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Computation s,i) . f = s . f ) )
by A8, A10;
:: thesis: verum
end; hence
for
i being
Element of
NAT st
i <= len (aSeq a,k) holds
(
IC (Computation s,i) = insloc (c0 + i) & ( for
b being
Int-Location st
b <> a holds
(Computation s,i) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Computation s,i) . f = s . f ) )
;
:: thesis: (Computation s,(len (aSeq a,k))) . a = k
1
<= len (aSeq a,k)
by A6, A8, NAT_1:11;
hence
(Computation s,(len (aSeq a,k))) . a = k
by A8, A9;
:: thesis: verum end; suppose A38:
k <= 0
;
:: thesis: ( ( for i being Element of NAT st i <= len (aSeq a,k) holds
( IC (Computation s,i) = insloc (c0 + i) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) ) & (Computation s,(len (aSeq a,k))) . a = k )then
- 0 <= - k
;
then reconsider mk =
- k as
Element of
NAT by INT_1:16;
consider k1 being
Element of
NAT such that A39:
k1 + k = 1
and A40:
aSeq a,
k = <*(a := (intloc 0 ))*> ^ (k1 |-> (SubFrom a,(intloc 0 )))
by A38, Def3;
A41:
len (aSeq a,k) =
(len <*(a := (intloc 0 ))*>) + (len (k1 |-> (SubFrom a,(intloc 0 ))))
by A40, FINSEQ_1:35
.=
1
+ (len (k1 |-> (SubFrom a,(intloc 0 ))))
by FINSEQ_1:56
.=
(mk + 1) + 1
by A39, FINSEQ_1:def 18
;
defpred S1[
Element of
NAT ]
means ( $1
<= (mk + 1) + 1 implies (
IC (Computation s,$1) = insloc (c0 + $1) & ( 1
<= $1 implies
(Computation s,$1) . a = ((- $1) + 1) + 1 ) & ( for
b being
Int-Location st
b <> a holds
(Computation s,$1) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Computation s,$1) . f = s . f ) ) );
A42:
for
i being
Element of
NAT st
i <= len (aSeq a,k) holds
(
IC (Computation s,i) = insloc (c0 + i) & ( 1
<= i implies
(Computation s,i) . a = ((- i) + 1) + 1 ) & ( for
b being
Int-Location st
b <> a holds
(Computation s,i) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Computation s,i) . f = s . f ) )
proof
let i be
Element of
NAT ;
:: thesis: ( i <= len (aSeq a,k) implies ( IC (Computation s,i) = insloc (c0 + i) & ( 1 <= i implies (Computation s,i) . a = ((- i) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) ) )
assume A43:
i <= len (aSeq a,k)
;
:: thesis: ( IC (Computation s,i) = insloc (c0 + i) & ( 1 <= i implies (Computation s,i) . a = ((- i) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,i) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,i) . f = s . f ) )
then A47:
s . (insloc (c0 + 0 )) =
(aSeq a,k) . (0 + 1)
.=
a := (intloc 0 )
by A40, FINSEQ_1:58
;
A48:
now let i be
Element of
NAT ;
:: thesis: ( 1 < i & i <= (mk + 1) + 1 implies (aSeq a,k) . i = SubFrom a,(intloc 0 ) )assume A49:
( 1
< i &
i <= (mk + 1) + 1 )
;
:: thesis: (aSeq a,k) . i = SubFrom a,(intloc 0 )then A50:
1
- 1
< i - 1
by XREAL_1:11;
then A51:
(1 - 1) + 1
<= i - 1
by INT_1:20;
reconsider i1 =
i - 1 as
Element of
NAT by A50, INT_1:16;
i - 1
<= ((mk + 1) + 1) - 1
by A49, XREAL_1:11;
then A52:
i1 in Seg k1
by A39, A51, FINSEQ_1:3;
len <*(a := (intloc 0 ))*> = 1
by FINSEQ_1:56;
hence (aSeq a,k) . i =
(k1 |-> (SubFrom a,(intloc 0 ))) . (i - 1)
by A40, A41, A49, FINSEQ_1:37
.=
SubFrom a,
(intloc 0 )
by A52, FUNCOP_1:13
;
:: thesis: verum end;
A57:
for
n being
Element of
NAT st
n = 0 holds
(
Computation s,
n = s &
CurInstr (Computation s,n) = a := (intloc 0 ) &
Computation s,
(n + 1) = Exec (a := (intloc 0 )),
s )
proof
let n be
Element of
NAT ;
:: thesis: ( n = 0 implies ( Computation s,n = s & CurInstr (Computation s,n) = a := (intloc 0 ) & Computation s,(n + 1) = Exec (a := (intloc 0 )),s ) )
assume
n = 0
;
:: thesis: ( Computation s,n = s & CurInstr (Computation s,n) = a := (intloc 0 ) & Computation s,(n + 1) = Exec (a := (intloc 0 )),s )
hence A58:
Computation s,
n = s
by AMI_1:13;
:: thesis: ( CurInstr (Computation s,n) = a := (intloc 0 ) & Computation s,(n + 1) = Exec (a := (intloc 0 )),s )
hence
CurInstr (Computation s,n) = a := (intloc 0 )
by A2, A47;
:: thesis: Computation s,(n + 1) = Exec (a := (intloc 0 )),s
thus Computation s,
(n + 1) =
Following (Computation s,n)
by AMI_1:14
.=
Exec (a := (intloc 0 )),
s
by A2, A47, A58
;
:: thesis: verum
end;
A59:
S1[
0 ]
by A2, AMI_1:13;
A60:
for
n being
Element of
NAT st
S1[
n] holds
S1[
n + 1]
proof
let n be
Element of
NAT ;
:: thesis: ( S1[n] implies S1[n + 1] )
assume A61:
S1[
n]
;
:: thesis: S1[n + 1]
assume A62:
n + 1
<= (mk + 1) + 1
;
:: thesis: ( IC (Computation s,(n + 1)) = insloc (c0 + (n + 1)) & ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )
per cases
( n = 0 or n > 0 )
;
suppose A63:
n = 0
;
:: thesis: ( IC (Computation s,(n + 1)) = insloc (c0 + (n + 1)) & ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )hence IC (Computation s,(n + 1)) =
(Exec (a := (intloc 0 )),s) . (IC SCM+FSA )
by A57
.=
Next (insloc (c0 + n))
by A2, A63, SCMFSA_2:89
.=
insloc ((c0 + n) + 1)
by NAT_1:39
.=
insloc (c0 + (n + 1))
;
:: thesis: ( ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )let f be
FinSeq-Location ;
:: thesis: (Computation s,(n + 1)) . f = s . fthus (Computation s,(n + 1)) . f =
(Exec (a := (intloc 0 )),s) . f
by A57, A63
.=
s . f
by SCMFSA_2:89
;
:: thesis: verum end; suppose A65:
n > 0
;
:: thesis: ( IC (Computation s,(n + 1)) = insloc (c0 + (n + 1)) & ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )then A66:
0 + 1
< n + 1
by XREAL_1:8;
A67:
n + 0 <= n + 1
by XREAL_1:9;
A68:
(
0 < n &
n < (mk + 1) + 1 )
by A62, A65, NAT_1:13;
A69:
CurInstr (Computation s,n) =
s . (insloc (c0 + n))
by A61, A62, A67, AMI_1:54, XXREAL_0:2
.=
SubFrom a,
(intloc 0 )
by A53, A68
;
A70:
Computation s,
(n + 1) =
Following (Computation s,n)
by AMI_1:14
.=
Exec (SubFrom a,(intloc 0 )),
(Computation s,n)
by A69
;
hence IC (Computation s,(n + 1)) =
Next (IC (Computation s,n))
by SCMFSA_2:91
.=
insloc ((c0 + n) + 1)
by A61, A62, A67, NAT_1:39, XXREAL_0:2
.=
insloc (c0 + (n + 1))
;
:: thesis: ( ( 1 <= n + 1 implies (Computation s,(n + 1)) . a = ((- (n + 1)) + 1) + 1 ) & ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )hereby :: thesis: ( ( for b being Int-Location st b <> a holds
(Computation s,(n + 1)) . b = s . b ) & ( for f being FinSeq-Location holds (Computation s,(n + 1)) . f = s . f ) )
assume
1
<= n + 1
;
:: thesis: (Computation s,(n + 1)) . a = ((- (n + 1)) + 1) + 1thus (Computation s,(n + 1)) . a =
(((- n) + 1) + 1) - ((Computation s,n) . (intloc 0 ))
by A61, A62, A66, A70, NAT_1:13, SCMFSA_2:91
.=
(((- n) + 1) + 1) - (s . (intloc 0 ))
by A3, A61, A62, A67, XXREAL_0:2
.=
((- (n + 1)) + 1) + 1
by A1
;
:: thesis: verum
end; let f be
FinSeq-Location ;
:: thesis: (Computation s,(n + 1)) . f = s . fthus (Computation s,(n + 1)) . f =
(Computation s,n) . f
by A70, SCMFSA_2:91
.=
s . f
by A61, A62, A67, XXREAL_0:2
;
:: thesis: verum end; end;
end;
for
i being
Element of
NAT holds
S1[
i]
from NAT_1:sch 1(A59, A60);
hence
(
IC (Computation s,i) = insloc (c0 + i) & ( 1
<= i implies
(Computation s,i) . a = ((- i) + 1) + 1 ) & ( for
b being
Int-Location st
b <> a holds
(Computation s,i) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Computation s,i) . f = s . f ) )
by A41, A43;
:: thesis: verum
end; hence
for
i being
Element of
NAT st
i <= len (aSeq a,k) holds
(
IC (Computation s,i) = insloc (c0 + i) & ( for
b being
Int-Location st
b <> a holds
(Computation s,i) . b = s . b ) & ( for
f being
FinSeq-Location holds
(Computation s,i) . f = s . f ) )
;
:: thesis: (Computation s,(len (aSeq a,k))) . a = k
1
<= len (aSeq a,k)
by A41, NAT_1:11;
hence (Computation s,(len (aSeq a,k))) . a =
((- ((- k) + (1 + 1))) + 1) + 1
by A41, A42
.=
k
;
:: thesis: verum end; end;