deffunc H3( set , set ) -> set = $2 \/ { ([o,0] -tree p) where o is Symbol of F1(), p is Element of $2 * : ex q being FinSequence of FinTrees [: the carrier of F1(),NAT:] st
( p = q & o ==> pr1 (roots q) ) } ;
consider f being Function such that
A3:
dom f = NAT
and
A4:
f . 0 = { (root-tree [t,d]) where t is Symbol of F1(), d is Element of NAT : ( ( t in Terminals F1() & d = H1(t) ) or ( t ==> {} & d = H2(t, {} , {} ) ) ) }
and
A5:
for n being Nat holds f . (n + 1) = H3(n,f . n)
from NAT_1:sch 11();
A6:
for n being Nat holds f . (n + 1) = (f . n) \/ { ([o,H2(o, pr1 (roots p), pr2 (roots p))] -tree p) where o is Symbol of F1(), p is Element of (f . n) * : ex q being FinSequence of FinTrees [: the carrier of F1(),NAT:] st
( p = q & o ==> pr1 (roots q) ) }
by A5;
A7:
ex X being Subset of (FinTrees [: the carrier of F1(),NAT:]) st
( X = Union f & ( for d being Symbol of F1() st d in Terminals F1() holds
root-tree [d,H1(d)] in X ) & ( for o being Symbol of F1()
for p being FinSequence of X st o ==> pr1 (roots p) holds
[o,H2(o, pr1 (roots p), pr2 (roots p))] -tree p in X ) & ( for F being Subset of (FinTrees [: the carrier of F1(),NAT:]) st ( for d being Symbol of F1() st d in Terminals F1() holds
root-tree [d,H1(d)] in F ) & ( for o being Symbol of F1()
for p being FinSequence of F st o ==> pr1 (roots p) holds
[o,H2(o, pr1 (roots p), pr2 (roots p))] -tree p in F ) holds
X c= F ) )
from DTCONSTR:sch 3(A3, A4, A6);
consider TSG being Subset of (FinTrees the carrier of F1()) such that
A8:
TSG = { (t `1) where t is Element of FinTrees [: the carrier of F1(),NAT:] : t in Union f }
and
A9:
for d being Symbol of F1() st d in Terminals F1() holds
root-tree d in TSG
and
A10:
for o being Symbol of F1()
for p being FinSequence of TSG st o ==> roots p holds
o -tree p in TSG
and
A11:
for F being Subset of (FinTrees the carrier of F1()) st ( for d being Symbol of F1() st d in Terminals F1() holds
root-tree d in F ) & ( for o being Symbol of F1()
for p being FinSequence of F st o ==> roots p holds
o -tree p in F ) holds
TSG c= F
from DTCONSTR:sch 4(A3, A4, A6);
A12:
TSG = TS F1()
by A9, A10, A11, Def1;
defpred S1[ Nat] means for t being DecoratedTree of [: the carrier of F1(),NAT:] st t in f . $1 holds
P1[t `1 ];
A13:
S1[ 0 ]
A18:
now for n being Nat st S1[n] holds
S1[n + 1]let n be
Nat;
( S1[n] implies S1[n + 1] )assume A19:
S1[
n]
;
S1[n + 1]thus
S1[
n + 1]
verumproof
let x be
DecoratedTree of
[: the carrier of F1(),NAT:];
( x in f . (n + 1) implies P1[x `1 ] )
assume that A20:
x in f . (n + 1)
and A21:
P1[
x `1 ]
;
contradiction
x in (f . n) \/ { ([o,0] -tree p) where o is Symbol of F1(), p is Element of (f . n) * : ex q being FinSequence of FinTrees [: the carrier of F1(),NAT:] st
( p = q & o ==> pr1 (roots q) ) }
by A5, A20;
then
(
x in f . n or
x in { ([o,0] -tree p) where o is Symbol of F1(), p is Element of (f . n) * : ex q being FinSequence of FinTrees [: the carrier of F1(),NAT:] st
( p = q & o ==> pr1 (roots q) ) } )
by XBOOLE_0:def 3;
then consider o being
Symbol of
F1(),
p being
Element of
(f . n) * such that A22:
x = [o,0] -tree p
and A23:
ex
q being
FinSequence of
FinTrees [: the carrier of F1(),NAT:] st
(
p = q &
o ==> pr1 (roots q) )
by A19, A21;
A24:
Union f = union (rng f)
by CARD_3:def 4;
n in NAT
by ORDINAL1:def 12;
then A25:
f . n in rng f
by A3, FUNCT_1:def 3;
A26:
rng p c= f . n
by FINSEQ_1:def 4;
A27:
f . n c= Union f
by A24, A25, ZFMISC_1:74;
A28:
dom p = Seg (len p)
by FINSEQ_1:def 3;
defpred S2[
set ,
set ]
means ex
dt being
Element of
FinTrees [: the carrier of F1(),NAT:] st
(
dt = p . $1 &
dt `1 = $2 &
dt in Union f );
A29:
for
k being
Nat st
k in Seg (len p) holds
ex
x being
Element of
FinTrees the
carrier of
F1() st
S2[
k,
x]
proof
let k be
Nat;
( k in Seg (len p) implies ex x being Element of FinTrees the carrier of F1() st S2[k,x] )
assume
k in Seg (len p)
;
ex x being Element of FinTrees the carrier of F1() st S2[k,x]
then A30:
p . k in rng p
by A28, FUNCT_1:def 3;
A31:
rng p c= Union f
by A26, A27;
then
p . k in Union f
by A30;
then reconsider dt =
p . k as
Element of
FinTrees [: the carrier of F1(),NAT:] by A7;
A32:
dt `1 = (pr1 ( the carrier of F1(),NAT)) * dt
by TREES_3:def 12;
A33:
rng dt c= [: the carrier of F1(),NAT:]
by RELAT_1:def 19;
dom (pr1 ( the carrier of F1(),NAT)) = [: the carrier of F1(),NAT:]
by FUNCT_2:def 1;
then
dom (dt `1) = dom dt
by A32, A33, RELAT_1:27;
then reconsider x =
dt `1 as
Element of
FinTrees the
carrier of
F1()
by TREES_3:def 8;
take
x
;
S2[k,x]
take
dt
;
( dt = p . k & dt `1 = x & dt in Union f )
thus
(
dt = p . k &
dt `1 = x &
dt in Union f )
by A30, A31;
verum
end;
consider p1 being
FinSequence of
FinTrees the
carrier of
F1()
such that A34:
dom p1 = Seg (len p)
and A35:
for
k being
Nat st
k in Seg (len p) holds
S2[
k,
p1 . k]
from FINSEQ_1:sch 5(A29);
reconsider p =
p as
FinSequence of
Trees [: the carrier of F1(),NAT:] by A23, Th1;
A36:
dom (roots p1) = dom p1
by TREES_3:def 18;
A37:
dom (pr1 (roots p)) = dom (roots p)
by MCART_1:def 12;
then A38:
dom (pr1 (roots p)) = dom p1
by A28, A34, TREES_3:def 18;
now for k being Nat st k in dom p1 holds
(roots p1) . k = (pr1 (roots p)) . klet k be
Nat;
( k in dom p1 implies (roots p1) . k = (pr1 (roots p)) . k )assume A39:
k in dom p1
;
(roots p1) . k = (pr1 (roots p)) . kthen consider dt being
Element of
FinTrees [: the carrier of F1(),NAT:] such that A40:
dt = p . k
and A41:
dt `1 = p1 . k
and
dt in Union f
by A34, A35;
reconsider r =
{} as
Node of
dt by TREES_1:22;
ex
T being
DecoratedTree st
(
T = p1 . k &
(roots p1) . k = T . {} )
by A39, TREES_3:def 18;
then A42:
(roots p1) . k = (dt . r) `1
by A41, TREES_3:39;
ex
T being
DecoratedTree st
(
T = p . k &
(roots p) . k = T . {} )
by A28, A34, A39, TREES_3:def 18;
hence
(roots p1) . k = (pr1 (roots p)) . k
by A37, A38, A39, A40, A42, MCART_1:def 12;
verum end;
then A43:
roots p1 = pr1 (roots p)
by A36, A38, FINSEQ_1:13;
rng p1 c= TS F1()
then reconsider p1 =
p1 as
FinSequence of
TS F1()
by FINSEQ_1:def 4;
then A49:
P1[
o -tree p1]
by A2, A23, A43;
reconsider p1 =
p1 as
FinSequence of
Trees the
carrier of
F1()
by Th1;
hence
contradiction
by A21, A22, A28, A34, A49, TREES_4:27;
verum
end; end;
A50:
for n being Nat holds S1[n]
from NAT_1:sch 2(A13, A18);
let t be DecoratedTree of the carrier of F1(); ( t in TS F1() implies P1[t] )
assume
t in TS F1()
; P1[t]
then consider tt being Element of FinTrees [: the carrier of F1(),NAT:] such that
A51:
t = tt `1
and
A52:
tt in Union f
by A8, A12;
ex n being object st
( n in NAT & tt in f . n )
by A3, A52, CARD_5:2;
hence
P1[t]
by A50, A51; verum