set f = F1();
set G = F2();
set D = F3();
set S = the carrier of F2();
set SxD = [:the carrier of F2(),F3():];
deffunc H3( Symbol of F2(), FinSequence) -> Element of F3() = F5($1,(pr1 (roots $2)),(pr2 (roots $2)));
A4:
F1() . 0 = { (root-tree [t,d]) where t is Symbol of F2(), d is Element of F3() : ( ( t in Terminals F2() & d = F4(t) ) or ( t ==> {} & d = F5(t,{} ,{} ) ) ) }
by A2;
A5:
for n being Element of NAT holds F1() . (n + 1) = (F1() . n) \/ { ([o,F5(o,(pr1 (roots p)),(pr2 (roots p)))] -tree p) where o is Symbol of F2(), p is Element of (F1() . n) * : ex q being FinSequence of FinTrees [:the carrier of F2(),F3():] st
( p = q & o ==> pr1 (roots q) ) }
by A3;
consider X being Subset of (FinTrees [:the carrier of F2(),F3():]) such that
A6:
( X = Union F1() & ( for d being Symbol of F2() st d in Terminals F2() holds
root-tree [d,F4(d)] in X ) & ( for o being Symbol of F2()
for p being FinSequence of X st o ==> pr1 (roots p) holds
[o,F5(o,(pr1 (roots p)),(pr2 (roots p)))] -tree p in X ) & ( for F being Subset of (FinTrees [:the carrier of F2(),F3():]) st ( for d being Symbol of F2() st d in Terminals F2() holds
root-tree [d,F4(d)] in F ) & ( for o being Symbol of F2()
for p being FinSequence of F st o ==> pr1 (roots p) holds
[o,F5(o,(pr1 (roots p)),(pr2 (roots p)))] -tree p in F ) holds
X c= F ) )
from DTCONSTR:sch 3(A1, A4, A5);
set X' = { (t `1 ) where t is Element of FinTrees [:the carrier of F2(),F3():] : t in Union F1() } ;
{ (t `1 ) where t is Element of FinTrees [:the carrier of F2(),F3():] : t in Union F1() } c= FinTrees the carrier of F2()
proof
let x be
set ;
:: according to TARSKI:def 3 :: thesis: ( not x in { (t `1 ) where t is Element of FinTrees [:the carrier of F2(),F3():] : t in Union F1() } or x in FinTrees the carrier of F2() )
assume
x in { (t `1 ) where t is Element of FinTrees [:the carrier of F2(),F3():] : t in Union F1() }
;
:: thesis: x in FinTrees the carrier of F2()
then consider tt being
Element of
FinTrees [:the carrier of F2(),F3():] such that A7:
(
x = tt `1 &
tt in Union F1() )
;
(
tt `1 = (pr1 the carrier of F2(),F3()) * tt &
rng tt c= [:the carrier of F2(),F3():] &
dom (pr1 the carrier of F2(),F3()) = [:the carrier of F2(),F3():] )
by FUNCT_2:def 1, RELAT_1:def 19, TREES_3:def 12;
then
(
dom (tt `1 ) = dom tt &
dom tt is
finite )
by RELAT_1:46;
hence
x in FinTrees the
carrier of
F2()
by A7, TREES_3:def 8;
:: thesis: verum
end;
then reconsider X' = { (t `1 ) where t is Element of FinTrees [:the carrier of F2(),F3():] : t in Union F1() } as Subset of (FinTrees the carrier of F2()) ;
take X1 = X'; :: thesis: ( X1 = { (t `1 ) where t is Element of FinTrees [:the carrier of F2(),F3():] : t in Union F1() } & ( for d being Symbol of F2() st d in Terminals F2() holds
root-tree d in X1 ) & ( for o being Symbol of F2()
for p being FinSequence of X1 st o ==> roots p holds
o -tree p in X1 ) & ( for F being Subset of (FinTrees the carrier of F2()) st ( for d being Symbol of F2() st d in Terminals F2() holds
root-tree d in F ) & ( for o being Symbol of F2()
for p being FinSequence of F st o ==> roots p holds
o -tree p in F ) holds
X1 c= F ) )
thus
X1 = { (t `1 ) where t is Element of FinTrees [:the carrier of F2(),F3():] : t in Union F1() }
; :: thesis: ( ( for d being Symbol of F2() st d in Terminals F2() holds
root-tree d in X1 ) & ( for o being Symbol of F2()
for p being FinSequence of X1 st o ==> roots p holds
o -tree p in X1 ) & ( for F being Subset of (FinTrees the carrier of F2()) st ( for d being Symbol of F2() st d in Terminals F2() holds
root-tree d in F ) & ( for o being Symbol of F2()
for p being FinSequence of F st o ==> roots p holds
o -tree p in F ) holds
X1 c= F ) )
hereby :: thesis: for F being Subset of (FinTrees the carrier of F2()) st ( for d being Symbol of F2() st d in Terminals F2() holds
root-tree d in F ) & ( for o being Symbol of F2()
for p being FinSequence of F st o ==> roots p holds
o -tree p in F ) holds
X1 c= F
let nt be
Symbol of
F2();
:: thesis: for ts being FinSequence of X1 st nt ==> roots ts holds
nt -tree ts in X1let ts be
FinSequence of
X1;
:: thesis: ( nt ==> roots ts implies nt -tree ts in X1 )assume A10:
nt ==> roots ts
;
:: thesis: nt -tree ts in X1A11:
dom ts = Seg (len ts)
by FINSEQ_1:def 3;
defpred S1[
set ,
set ]
means ex
dt being
DecoratedTree of st
(
dt = $2 &
dt `1 = ts . $1 &
dt in Union F1() );
A12:
for
k being
Nat st
k in Seg (len ts) holds
ex
x being
Element of
FinTrees [:the carrier of F2(),F3():] st
S1[
k,
x]
consider dts being
FinSequence of
FinTrees [:the carrier of F2(),F3():] such that A13:
dom dts = Seg (len ts)
and A14:
for
k being
Nat st
k in Seg (len ts) holds
S1[
k,
dts . k]
from FINSEQ_1:sch 5(A12);
rng dts c= Union F1()
then reconsider dts =
dts as
FinSequence of
X by A6, FINSEQ_1:def 4;
A16:
dom (roots ts) = dom ts
by TREES_3:def 18;
A17:
(
dom (pr1 (roots dts)) = dom (roots dts) &
dom (pr2 (roots dts)) = dom (roots dts) )
by MCART_1:def 12, MCART_1:def 13;
then A18:
(
dom (pr1 (roots dts)) = dom ts &
dom (pr2 (roots dts)) = dom ts )
by A11, A13, TREES_3:def 18;
now let k be
Nat;
:: thesis: ( k in dom ts implies (roots ts) . k = (pr1 (roots dts)) . k )assume A19:
k in dom ts
;
:: thesis: (roots ts) . k = (pr1 (roots dts)) . kthen consider dt being
DecoratedTree of
such that A20:
(
dt = dts . k &
dt `1 = ts . k &
dt in Union F1() )
by A11, A14;
reconsider r =
{} as
Node of
dt by TREES_1:47;
ex
T being
DecoratedTree st
(
T = ts . k &
(roots ts) . k = T . {} )
by A19, TREES_3:def 18;
then A21:
(roots ts) . k = (dt . r) `1
by A20, TREES_3:41;
ex
T being
DecoratedTree st
(
T = dts . k &
(roots dts) . k = T . {} )
by A11, A13, A19, TREES_3:def 18;
hence
(roots ts) . k = (pr1 (roots dts)) . k
by A17, A18, A19, A20, A21, MCART_1:def 12;
:: thesis: verum end; then
roots ts = pr1 (roots dts)
by A16, A18, FINSEQ_1:17;
then A22:
[nt,H3(nt,dts)] -tree dts in X
by A6, A10;
A23:
rng dts c= FinTrees [:the carrier of F2(),F3():]
by FINSEQ_1:def 4;
FinTrees [:the carrier of F2(),F3():] c= Trees [:the carrier of F2(),F3():]
by TREES_3:22;
then
rng dts c= Trees [:the carrier of F2(),F3():]
by A23, XBOOLE_1:1;
then reconsider dts' =
dts as
FinSequence of
Trees [:the carrier of F2(),F3():] by FINSEQ_1:def 4;
A24:
rng ts c= FinTrees the
carrier of
F2()
by FINSEQ_1:def 4;
FinTrees the
carrier of
F2()
c= Trees the
carrier of
F2()
by TREES_3:22;
then
rng ts c= Trees the
carrier of
F2()
by A24, XBOOLE_1:1;
then reconsider ts' =
ts as
FinSequence of
Trees the
carrier of
F2()
by FINSEQ_1:def 4;
then
([nt,H3(nt,dts)] -tree dts') `1 = nt -tree ts'
by A11, A13, TREES_4:27;
hence
nt -tree ts in X1
by A6, A22;
:: thesis: verum
end;
let F be Subset of (FinTrees the carrier of F2()); :: thesis: ( ( for d being Symbol of F2() st d in Terminals F2() holds
root-tree d in F ) & ( for o being Symbol of F2()
for p being FinSequence of F st o ==> roots p holds
o -tree p in F ) implies X1 c= F )
assume that
A26:
for d being Symbol of F2() st d in Terminals F2() holds
root-tree d in F
and
A27:
for o being Symbol of F2()
for p being FinSequence of F st o ==> roots p holds
o -tree p in F
; :: thesis: X1 c= F
thus
X1 c= F
:: thesis: verumproof
let x be
set ;
:: according to TARSKI:def 3 :: thesis: ( not x in X1 or x in F )
assume
x in X1
;
:: thesis: x in F
then consider tt being
Element of
FinTrees [:the carrier of F2(),F3():] such that A28:
(
x = tt `1 &
tt in Union F1() )
;
set FF =
{ dt where dt is Element of FinTrees [:the carrier of F2(),F3():] : dt `1 in F } ;
{ dt where dt is Element of FinTrees [:the carrier of F2(),F3():] : dt `1 in F } c= FinTrees [:the carrier of F2(),F3():]
then reconsider FF =
{ dt where dt is Element of FinTrees [:the carrier of F2(),F3():] : dt `1 in F } as
Subset of
(FinTrees [:the carrier of F2(),F3():]) ;
now let o be
Symbol of
F2();
:: thesis: for p being FinSequence of FF st o ==> pr1 (roots p) holds
[o,H3(o,p)] -tree p in FFlet p be
FinSequence of
FF;
:: thesis: ( o ==> pr1 (roots p) implies [o,H3(o,p)] -tree p in FF )assume A31:
o ==> pr1 (roots p)
;
:: thesis: [o,H3(o,p)] -tree p in FFconsider p1 being
FinSequence of
FinTrees the
carrier of
F2()
such that A32:
dom p1 = dom p
and A33:
for
i being
Element of
NAT st
i in dom p holds
ex
T being
Element of
FinTrees [:the carrier of F2(),F3():] st
(
T = p . i &
p1 . i = T `1 )
and A34:
([o,F5(o,(pr1 (roots p)),(pr2 (roots p)))] -tree p) `1 = o -tree p1
by TREES_4:31;
rng p1 c= F
then reconsider p1 =
p1 as
FinSequence of
F by FINSEQ_1:def 4;
A38:
dom (roots p1) = dom p1
by TREES_3:def 18;
A39:
dom (pr1 (roots p)) = dom (roots p)
by MCART_1:def 12;
then A40:
dom (pr1 (roots p)) = dom p1
by A32, TREES_3:def 18;
now let k be
Nat;
:: thesis: ( k in dom p1 implies (roots p1) . k = (pr1 (roots p)) . k )assume A41:
k in dom p1
;
:: thesis: (roots p1) . k = (pr1 (roots p)) . kthen A42:
p . k in rng p
by A32, FUNCT_1:def 5;
consider dt being
Element of
FinTrees [:the carrier of F2(),F3():] such that A43:
(
dt = p . k &
p1 . k = dt `1 )
by A32, A33, A41;
rng p c= FF
by FINSEQ_1:def 4;
then
p . k in FF
by A42;
then consider dt being
Element of
FinTrees [:the carrier of F2(),F3():] such that A44:
(
p . k = dt &
dt `1 in F )
;
reconsider r =
{} as
Node of
dt by TREES_1:47;
ex
T being
DecoratedTree st
(
T = p1 . k &
(roots p1) . k = T . {} )
by A41, TREES_3:def 18;
then A45:
(roots p1) . k = (dt . r) `1
by A43, A44, TREES_3:41;
ex
T being
DecoratedTree st
(
T = p . k &
(roots p) . k = T . {} )
by A32, A41, TREES_3:def 18;
hence
(roots p1) . k = (pr1 (roots p)) . k
by A39, A40, A41, A44, A45, MCART_1:def 12;
:: thesis: verum end; then
pr1 (roots p) = roots p1
by A38, A40, FINSEQ_1:17;
then
([o,F5(o,(pr1 (roots p)),(pr2 (roots p)))] -tree p) `1 in F
by A27, A31, A34;
hence
[o,H3(o,p)] -tree p in FF
;
:: thesis: verum end;
then
X c= FF
by A6, A29;
then
tt in FF
by A6, A28;
then
ex
dt being
Element of
FinTrees [:the carrier of F2(),F3():] st
(
tt = dt &
dt `1 in F )
;
hence
x in F
by A28;
:: thesis: verum
end;