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) ) ) );
A2:
for x being set st x in F1() holds
ex y being set st S1[x,y]
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(A2);
then consider F being Function such that
A4:
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;
A5:
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)) )
A12:
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() ) ) );
A16:
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(A16);
then consider S being Function of [:F1(),NAT :],F1() such that
A22:
for c being Element of [:F1(),NAT :] holds S2[c,S . c]
;
A23:
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 ;
:: thesis: for x being set st x in F1() & n in H1(x) holds
S . x,n = F3(x) . (n + 1)let x be
set ;
:: thesis: ( x in F1() & n in H1(x) implies S . x,n = F3(x) . (n + 1) )
assume A24:
(
x in F1() &
n in H1(
x) )
;
:: thesis: S . x,n = F3(x) . (n + 1)
A25:
[x,n] `1 = x
by MCART_1:def 1;
[x,n] `2 = n
by MCART_1:def 2;
then
[x,n] in [:F1(),NAT :]
by A24, A25, MCART_1:11;
then consider c being
Element of
[:F1(),NAT :] such that A26:
c = [x,n]
;
consider x' being
set ,
n' being
Element of
NAT such that A27:
(
x' in F1() &
c = [x',n'] & ( (
n' in H1(
x') &
S . c = F3(
x')
. (n' + 1) ) or ( not
n' in H1(
x') &
S . c = F2() ) ) )
by A22;
(
x' = x &
n' = n )
by A26, A27, ZFMISC_1:33;
hence
S . x,
n = F3(
x)
. (n + 1)
by A24, A27;
:: thesis: verum
end;
A28:
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 such that
A37:
( 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);
T is finite-branching
then reconsider T = T as finite-branching DecoratedTree of ;
now let t be
Element of
dom T;
:: thesis: for w being Element of F1() st w = T . t holds
succ T,t = F3(w)let w be
Element of
F1();
:: thesis: ( w = T . t implies succ T,t = F3(w) )assume A51:
w = T . t
;
:: thesis: succ T,t = F3(w)A52:
dom (succ T,t) = dom F3(
w)
for
m being
Nat st
m in dom (succ T,t) holds
(succ T,t) . m = F3(
w)
. m
proof
let m be
Nat;
:: thesis: ( m in dom (succ T,t) implies (succ T,t) . m = F3(w) . m )
assume A65:
m in dom (succ T,t)
;
:: thesis: (succ T,t) . m = F3(w) . m
then A66:
m in Seg (len F3(w))
by A52, FINSEQ_1:def 3;
Seg (len F3(w)) = { k where k is Element of NAT : ( 1 <= k & k <= len F3(w) ) }
by FINSEQ_1:def 1;
then consider k being
Element of
NAT such that A67:
(
m = k & 1
<= k &
k <= len F3(
w) )
by A66;
0 <> k
by A67;
then consider n being
Nat such that A68:
m = n + 1
by A67, NAT_1:6;
reconsider n =
n as
Element of
NAT by ORDINAL1:def 13;
n + 1
in dom (t succ )
by A65, A68, Th11;
then A69:
t ^ <*n*> in dom T
by Th12;
consider l being
Element of
NAT such that A70:
(
l + 1
= len F3(
(T . t)) &
F . (T . t) = {0 } \/ (Seg l) )
by A4, A51, A66, FINSEQ_1:4;
(
0 + 1
<= n + 1 &
n + 1
<= l + 1 )
by A51, A67, A68, A70;
then A71:
(
0 <= n &
n <= l )
by XREAL_1:8;
A72:
n in {0 } \/ (Seg l)
(succ T,t) . (n + 1) =
T . (t ^ <*n*>)
by A69, Th13
.=
S . (T . t),
n
by A37, A70, A72
.=
F3(
w)
. (n + 1)
by A23, A51, A70, A72
;
hence
(succ T,t) . m = F3(
w)
. m
by A68;
:: thesis: verum
end; hence
succ T,
t = F3(
w)
by A52, FINSEQ_1:17;
:: thesis: verum end;
hence
ex T being finite-branching DecoratedTree of 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 A37; :: thesis: verum