defpred S1[ set , set ] means ex b, c being Element of F1() st
( P1[$1,b,c] & $2 = [b,c] );
A2:
for e being set st e in F1() holds
ex u being set st
( u in [:F1(),F1():] & S1[e,u] )
proof
let e be
set ;
:: thesis: ( e in F1() implies ex u being set st
( u in [:F1(),F1():] & S1[e,u] ) )
assume
e in F1()
;
:: thesis: ex u being set st
( u in [:F1(),F1():] & S1[e,u] )
then consider b,
c being
Element of
F1()
such that A3:
P1[
e,
b,
c]
by A1;
take u =
[b,c];
:: thesis: ( u in [:F1(),F1():] & S1[e,u] )
thus
u in [:F1(),F1():]
;
:: thesis: S1[e,u]
thus
S1[
e,
u]
by A3;
:: thesis: verum
end;
consider f being Function such that
A4:
dom f = F1()
and
A5:
rng f c= [:F1(),F1():]
and
A6:
for e being set st e in F1() holds
S1[e,f . e]
from WELLORD2:sch 1(A2);
deffunc H1( set ) -> set = IFEQ ($1 `2 ),0 ,((f . ($1 `1 )) `1 ),((f . ($1 `1 )) `2 );
A7:
for x being set st x in [:F1(),NAT :] holds
H1(x) in F1()
consider F being Function of [:F1(),NAT :],F1() such that
A9:
for x being set st x in [:F1(),NAT :] holds
F . x = H1(x)
from FUNCT_2:sch 2(A7);
A10:
for e being set st e in F1() holds
P1[e,F . e,0 ,F . e,1]
proof
let e be
set ;
:: thesis: ( e in F1() implies P1[e,F . e,0 ,F . e,1] )
assume A11:
e in F1()
;
:: thesis: P1[e,F . e,0 ,F . e,1]
then consider b,
c being
Element of
F1()
such that A12:
P1[
e,
b,
c]
and A13:
f . e = [b,c]
by A6;
A14:
[e,0 ] `2 = 0
by MCART_1:7;
[e,0 ] in [:F1(),NAT :]
by A11, ZFMISC_1:106;
then A15:
F . [e,0 ] =
IFEQ ([e,0 ] `2 ),
0 ,
((f . ([e,0 ] `1 )) `1 ),
((f . ([e,0 ] `1 )) `2 )
by A9
.=
(f . ([e,0 ] `1 )) `1
by A14, FUNCOP_1:def 8
.=
(f . e) `1
by MCART_1:7
.=
b
by A13, MCART_1:7
;
A16:
(
[e,1] `2 = 1 & 1
<> 0 )
by MCART_1:7;
[e,1] in [:F1(),NAT :]
by A11, ZFMISC_1:106;
then F . [e,1] =
IFEQ ([e,1] `2 ),
0 ,
((f . ([e,1] `1 )) `1 ),
((f . ([e,1] `1 )) `2 )
by A9
.=
(f . ([e,1] `1 )) `2
by A16, FUNCOP_1:def 8
.=
(f . e) `2
by MCART_1:7
.=
c
by A13, MCART_1:7
;
hence
P1[
e,
F . e,
0 ,
F . e,1]
by A12, A15;
:: thesis: verum
end;
deffunc H2( set ) -> Element of NAT = 2;
consider D being DecoratedTree of such that
A17:
D . {} = F2()
and
A18:
for d being Element of dom D holds
( succ d = { (d ^ <*k*>) where k is Element of NAT : k < H2(D . d) } & ( for n being Element of NAT st n < H2(D . d) holds
D . (d ^ <*n*>) = F . (D . d),n ) )
from TREES_2:sch 9();
then
dom D is binary
by BINTREE1:def 2;
then reconsider D = D as binary DecoratedTree of by BINTREE1:def 3;
take
D
; :: thesis: ( dom D = {0 ,1} * & D . {} = F2() & ( for x being Node of D holds P1[D . x,D . (x ^ <*0 *>),D . (x ^ <*1*>)] ) )
hence
dom D = {0 ,1} *
by Th8; :: thesis: ( D . {} = F2() & ( for x being Node of D holds P1[D . x,D . (x ^ <*0 *>),D . (x ^ <*1*>)] ) )
thus
D . {} = F2()
by A17; :: thesis: for x being Node of D holds P1[D . x,D . (x ^ <*0 *>),D . (x ^ <*1*>)]
let x be Node of D; :: thesis: P1[D . x,D . (x ^ <*0 *>),D . (x ^ <*1*>)]
P1[D . x,F . (D . x),0 ,F . (D . x),1]
by A10;
then
P1[D . x,D . (x ^ <*0 *>),F . (D . x),1]
by A18;
hence
P1[D . x,D . (x ^ <*0 *>),D . (x ^ <*1*>)]
by A18; :: thesis: verum