defpred S1[ set , set ] means ( ( len F3($1) = 0 & $2 = {} ) or ( len F3($1) <> 0 & ex m being Element of NAT st
( m + 1 = len F3($1) & $2 = {0} \/ (Seg m) ) ) );
A1:
for x being set st x in F1() holds
ex y being set st S1[x,y]
proof
let x be
set ;
( x in F1() implies ex y being set st S1[x,y] )
assume
x in F1()
;
ex y being set st S1[x,y]
end;
ex F being Function st
( dom F = F1() & ( for x being set st x in F1() holds
S1[x,F . x] ) )
from CLASSES1:sch 1(A1);
then consider F being Function such that
A3:
for x being set holds
( not x in F1() or ( len F3(x) = 0 & F . x = {} ) or ( len F3(x) <> 0 & ex m being Element of NAT st
( m + 1 = len F3(x) & F . x = {0} \/ (Seg m) ) ) )
;
deffunc H1( set ) -> set = F . $1;
A4:
for k being Element of NAT
for x being set st x in F1() holds
( k in H1(x) iff k + 1 in Seg (len F3(x)) )
A14:
for T being finite-branching DecoratedTree
for x being set
for t being Element of dom T st x in F1() holds
{ (t ^ <*k*>) where k is Element of NAT : k in H1(x) } = { (t ^ <*m*>) where m is Element of NAT : m + 1 in Seg (len F3(x)) }
defpred S2[ set , set ] means ex x being set ex n being Element of NAT st
( x in F1() & $1 = [x,n] & ( ( n in H1(x) & $2 = F3(x) . (n + 1) ) or ( not n in H1(x) & $2 = F2() ) ) );
A20:
for c being Element of [:F1(),NAT:] ex y being Element of F1() st S2[c,y]
ex S being Function of [:F1(),NAT:],F1() st
for c being Element of [:F1(),NAT:] holds S2[c,S . c]
from FUNCT_2:sch 3(A20);
then consider S being Function of [:F1(),NAT:],F1() such that
A25:
for c being Element of [:F1(),NAT:] holds S2[c,S . c]
;
A26:
for n being Element of NAT
for x being set
for m being Element of NAT st m + 1 = len F3(x) & x in F1() holds
( n in H1(x) iff ( 0 <= n & n <= m ) )
A34:
for d being Element of F1()
for k1, k2 being Element of NAT st k1 <= k2 & k2 in H1(d) holds
k1 in H1(d)
consider T being DecoratedTree of F1() such that
A38:
( T . {} = F2() & ( for t being Element of dom T holds
( succ t = { (t ^ <*k*>) where k is Element of NAT : k in H1(T . t) } & ( for n being Element of NAT st n in H1(T . t) holds
T . (t ^ <*n*>) = S . ((T . t),n) ) ) ) )
from TREES_2:sch 8(A34);
for t being Element of dom T holds succ t is finite
then
dom T is finite-branching
by Def2;
then reconsider T = T as finite-branching DecoratedTree of F1() by Def4;
A48:
for n being Element of NAT
for x being set st x in F1() & n in H1(x) holds
S . (x,n) = F3(x) . (n + 1)
proof
let n be
Element of
NAT ;
for x being set st x in F1() & n in H1(x) holds
S . (x,n) = F3(x) . (n + 1)let x be
set ;
( x in F1() & n in H1(x) implies S . (x,n) = F3(x) . (n + 1) )
assume that A49:
x in F1()
and A50:
n in H1(
x)
;
S . (x,n) = F3(x) . (n + 1)
(
[x,n] `1 = x &
[x,n] `2 = n )
by MCART_1:def 1, MCART_1:def 2;
then
[x,n] in [:F1(),NAT:]
by A49, MCART_1:11;
then consider c being
Element of
[:F1(),NAT:] such that A51:
c = [x,n]
;
consider x9 being
set ,
n9 being
Element of
NAT such that
x9 in F1()
and A52:
c = [x9,n9]
and A53:
( (
n9 in H1(
x9) &
S . c = F3(
x9)
. (n9 + 1) ) or ( not
n9 in H1(
x9) &
S . c = F2() ) )
by A25;
x9 = x
by A51, A52, ZFMISC_1:27;
hence
S . (
x,
n)
= F3(
x)
. (n + 1)
by A50, A51, A52, A53, ZFMISC_1:27;
verum
end;
now let t be
Element of
dom T;
for w being Element of F1() st w = T . t holds
succ (T,t) = F3(w)let w be
Element of
F1();
( w = T . t implies succ (T,t) = F3(w) )assume A54:
w = T . t
;
succ (T,t) = F3(w)
succ t = { (t ^ <*k*>) where k is Element of NAT : k in H1(w) }
by A38, A54;
then A55:
succ t = { (t ^ <*k*>) where k is Element of NAT : k + 1 in Seg (len F3(w)) }
by A14;
A56:
dom F3(
w)
= Seg (len F3(w))
by FINSEQ_1:def 3;
A57:
dom (t succ) = Seg (len (t succ))
by FINSEQ_1:def 3;
A58:
dom (t succ) c= dom F3(
w)
proof
let n9 be
set ;
TARSKI:def 3 ( not n9 in dom (t succ) or n9 in dom F3(w) )
A59:
Seg (len (t succ)) = { k where k is Element of NAT : ( 1 <= k & k <= len (t succ) ) }
by FINSEQ_1:def 1;
assume
n9 in dom (t succ)
;
n9 in dom F3(w)
then consider m being
Element of
NAT such that A60:
n9 = m
and A61:
1
<= m
and A62:
m <= len (t succ)
by A57, A59;
0 <> m
by A61;
then consider n being
Nat such that A63:
m = n + 1
by NAT_1:6;
reconsider n =
n as
Element of
NAT by ORDINAL1:def 12;
n + 1
in dom (t succ)
by A57, A59, A61, A62, A63;
then
t ^ <*n*> in dom T
by Th40;
then
t ^ <*n*> in succ t
;
then consider k being
Element of
NAT such that A64:
t ^ <*k*> = t ^ <*n*>
and A65:
k + 1
in Seg (len F3(w))
by A55;
<*k*> = <*n*>
by A64, FINSEQ_1:33;
hence
n9 in dom F3(
w)
by A56, A60, A63, A65, TREES_1:5;
verum
end;
dom F3(
w)
c= dom (t succ)
then A71:
dom F3(
w)
= dom (t succ)
by A58, XBOOLE_0:def 10;
then A72:
dom (succ (T,t)) = dom F3(
w)
by Th39;
for
m being
Nat st
m in dom (succ (T,t)) holds
(succ (T,t)) . m = F3(
w)
. m
proof
let m be
Nat;
( m in dom (succ (T,t)) implies (succ (T,t)) . m = F3(w) . m )
A73:
Seg (len F3(w)) = { k where k is Element of NAT : ( 1 <= k & k <= len F3(w) ) }
by FINSEQ_1:def 1;
assume A74:
m in dom (succ (T,t))
;
(succ (T,t)) . m = F3(w) . m
then A75:
m in Seg (len F3(w))
by A72, FINSEQ_1:def 3;
then
len F3(
w)
<> 0
;
then consider l being
Element of
NAT such that A76:
l + 1
= len F3(
(T . t))
and A77:
F . (T . t) = {0} \/ (Seg l)
by A3, A54;
consider k being
Element of
NAT such that A78:
m = k
and A79:
1
<= k
and A80:
k <= len F3(
w)
by A75, A73;
0 <> k
by A79;
then consider n being
Nat such that A81:
m = n + 1
by A78, NAT_1:6;
reconsider n =
n as
Element of
NAT by ORDINAL1:def 12;
A82:
n <= l
by A54, A78, A80, A81, A76, XREAL_1:6;
A83:
n in {0} \/ (Seg l)
n + 1
in dom (t succ)
by A74, A81, Th39;
then
t ^ <*n*> in dom T
by Th40;
then (succ (T,t)) . (n + 1) =
T . (t ^ <*n*>)
by Th41
.=
S . (
(T . t),
n)
by A38, A77, A83
.=
F3(
w)
. (n + 1)
by A48, A54, A77, A83
;
hence
(succ (T,t)) . m = F3(
w)
. m
by A81;
verum
end; hence
succ (
T,
t)
= F3(
w)
by A71, Th39, FINSEQ_1:13;
verum end;
hence
ex T being finite-branching DecoratedTree of F1() st
( T . {} = F2() & ( for t being Element of dom T
for w being Element of F1() st w = T . t holds
succ (T,t) = F3(w) ) )
by A38; verum