begin
Lm1:
for n being Element of NAT
for D being non empty set
for p being FinSequence of D st 1 <= n & n <= len p holds
p . n is Element of D
scheme
FinRecUn{
F1()
-> set ,
F2()
-> Nat,
F3()
-> FinSequence,
F4()
-> FinSequence,
P1[
set ,
set ,
set ] } :
provided
A1:
for
n being
Element of
NAT st 1
<= n &
n < F2() holds
for
x,
y1,
y2 being
set st
P1[
n,
x,
y1] &
P1[
n,
x,
y2] holds
y1 = y2
and A2:
(
len F3()
= F2() & (
F3()
. 1
= F1() or
F2()
= 0 ) & ( for
n being
Element of
NAT st 1
<= n &
n < F2() holds
P1[
n,
F3()
. n,
F3()
. (n + 1)] ) )
and A3:
(
len F4()
= F2() & (
F4()
. 1
= F1() or
F2()
= 0 ) & ( for
n being
Element of
NAT st 1
<= n &
n < F2() holds
P1[
n,
F4()
. n,
F4()
. (n + 1)] ) )
scheme
FinRecUnD{
F1()
-> non
empty set ,
F2()
-> Element of
F1(),
F3()
-> Nat,
F4()
-> FinSequence of
F1(),
F5()
-> FinSequence of
F1(),
P1[
set ,
set ,
set ] } :
provided
A1:
for
n being
Element of
NAT st 1
<= n &
n < F3() holds
for
x,
y1,
y2 being
Element of
F1() st
P1[
n,
x,
y1] &
P1[
n,
x,
y2] holds
y1 = y2
and A2:
(
len F4()
= F3() & (
F4()
. 1
= F2() or
F3()
= 0 ) & ( for
n being
Element of
NAT st 1
<= n &
n < F3() holds
P1[
n,
F4()
. n,
F4()
. (n + 1)] ) )
and A3:
(
len F5()
= F3() & (
F5()
. 1
= F2() or
F3()
= 0 ) & ( for
n being
Element of
NAT st 1
<= n &
n < F3() holds
P1[
n,
F5()
. n,
F5()
. (n + 1)] ) )
scheme
SeqBinOpUn{
F1()
-> FinSequence,
P1[
set ,
set ,
set ],
F2()
-> set ,
F3()
-> set } :
provided
A1:
for
k being
Element of
NAT for
x,
y1,
y2,
z being
set st 1
<= k &
k < len F1() &
z = F1()
. (k + 1) &
P1[
z,
x,
y1] &
P1[
z,
x,
y2] holds
y1 = y2
and A2:
ex
p being
FinSequence st
(
F2()
= p . (len p) &
len p = len F1() &
p . 1
= F1()
. 1 & ( for
k being
Element of
NAT st 1
<= k &
k < len F1() holds
P1[
F1()
. (k + 1),
p . k,
p . (k + 1)] ) )
and A3:
ex
p being
FinSequence st
(
F3()
= p . (len p) &
len p = len F1() &
p . 1
= F1()
. 1 & ( for
k being
Element of
NAT st 1
<= k &
k < len F1() holds
P1[
F1()
. (k + 1),
p . k,
p . (k + 1)] ) )
scheme
DefRec{
F1()
-> set ,
F2()
-> Nat,
P1[
set ,
set ,
set ] } :
provided
A1:
for
n being
Element of
NAT for
x being
set ex
y being
set st
P1[
n,
x,
y]
and A2:
for
n being
Element of
NAT for
x,
y1,
y2 being
set st
P1[
n,
x,
y1] &
P1[
n,
x,
y2] holds
y1 = y2
scheme
DefRecD{
F1()
-> non
empty set ,
F2()
-> Element of
F1(),
F3()
-> Nat,
P1[
set ,
set ,
set ] } :
( ex
y being
Element of
F1() ex
f being
Function of
NAT,
F1() st
(
y = f . F3() &
f . 0 = F2() & ( for
n being
Element of
NAT holds
P1[
n,
f . n,
f . (n + 1)] ) ) & ( for
y1,
y2 being
Element of
F1() st ex
f being
Function of
NAT,
F1() st
(
y1 = f . F3() &
f . 0 = F2() & ( for
n being
Element of
NAT holds
P1[
n,
f . n,
f . (n + 1)] ) ) & ex
f being
Function of
NAT,
F1() st
(
y2 = f . F3() &
f . 0 = F2() & ( for
n being
Element of
NAT holds
P1[
n,
f . n,
f . (n + 1)] ) ) holds
y1 = y2 ) )
provided
A1:
for
n being
Element of
NAT for
x being
Element of
F1() ex
y being
Element of
F1() st
P1[
n,
x,
y]
and A2:
for
n being
Element of
NAT for
x,
y1,
y2 being
Element of
F1() st
P1[
n,
x,
y1] &
P1[
n,
x,
y2] holds
y1 = y2
scheme
LambdaDefRecD{
F1()
-> non
empty set ,
F2()
-> Element of
F1(),
F3()
-> Nat,
F4(
set ,
set )
-> Element of
F1() } :
( ex
y being
Element of
F1() ex
f being
Function of
NAT,
F1() st
(
y = f . F3() &
f . 0 = F2() & ( for
n being
Nat holds
f . (n + 1) = F4(
n,
(f . n)) ) ) & ( for
y1,
y2 being
Element of
F1() st ex
f being
Function of
NAT,
F1() st
(
y1 = f . F3() &
f . 0 = F2() & ( for
n being
Nat holds
f . (n + 1) = F4(
n,
(f . n)) ) ) & ex
f being
Function of
NAT,
F1() st
(
y2 = f . F3() &
f . 0 = F2() & ( for
n being
Nat holds
f . (n + 1) = F4(
n,
(f . n)) ) ) holds
y1 = y2 ) )
scheme
SeqBinOpDef{
F1()
-> FinSequence,
P1[
set ,
set ,
set ] } :
provided
A1:
for
k being
Element of
NAT for
y being
set st 1
<= k &
k < len F1() holds
ex
z being
set st
P1[
F1()
. (k + 1),
y,
z]
and A2:
for
k being
Element of
NAT for
x,
y1,
y2,
z being
set st 1
<= k &
k < len F1() &
z = F1()
. (k + 1) &
P1[
z,
x,
y1] &
P1[
z,
x,
y2] holds
y1 = y2