set f = F1();
set G = F2();
set D = F3();
set SxD = [:the carrier of F2(),F3():];
deffunc H3( Symbol of F2(), FinSequence) -> Element of F3() = F5($1,(pr1 (roots $2)),(pr2 (roots $2)));
defpred S1[ Element of NAT ] means for dt being Element of FinTrees [:the carrier of F2(),F3():] st dt in Union F1() holds
( dt in F1() . $1 iff height (dom dt) <= $1 );
A4:
S1[ 0 ]
proof
let dt be
Element of
FinTrees [:the carrier of F2(),F3():];
:: thesis: ( dt in Union F1() implies ( dt in F1() . 0 iff height (dom dt) <= 0 ) )
assume A5:
dt in Union F1()
;
:: thesis: ( dt in F1() . 0 iff height (dom dt) <= 0 )
assume
height (dom dt) <= 0
;
:: thesis: dt in F1() . 0
then A6:
height (dom dt) = 0
;
defpred S2[
Element of
NAT ]
means not
dt in F1()
. $1;
assume A7:
S2[
0 ]
;
:: thesis: contradiction
A8:
now let n be
Element of
NAT ;
:: thesis: ( S2[n] implies S2[n + 1] )assume A9:
S2[
n]
;
:: thesis: S2[n + 1]thus
S2[
n + 1]
:: thesis: verumproof
assume
dt in F1()
. (n + 1)
;
:: thesis: contradiction
then
dt in (F1() . n) \/ { ([o,H3(o,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;
then
(
dt in F1()
. n or
dt in { ([o,H3(o,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 XBOOLE_0:def 3;
then consider o being
Symbol of
F2(),
p being
Element of
(F1() . n) * such that A10:
(
dt = [o,H3(o,p)] -tree p & ex
q being
FinSequence of
FinTrees [:the carrier of F2(),F3():] st
(
p = q &
o ==> pr1 (roots q) ) )
by A9;
A11:
dt = root-tree (dt . {} )
by A6, TREES_1:80, TREES_4:5;
then A12:
p = {}
by A10, TREES_4:17;
then
dt = root-tree [o,F5(o,{} ,{} )]
by A10, A11, Th3, Th7, TREES_4:def 4;
hence
contradiction
by A2, A7, A10, A12, Th3, Th7;
:: thesis: verum
end; end;
A13:
for
n being
Element of
NAT holds
S2[
n]
from NAT_1:sch 1(A7, A8);
ex
n being
set st
(
n in NAT &
dt in F1()
. n )
by A1, A5, CARD_5:10;
hence
contradiction
by A13;
:: thesis: verum
end;
A14:
now let n be
Element of
NAT ;
:: thesis: ( S1[n] implies S1[n + 1] )assume A15:
S1[
n]
;
:: thesis: S1[n + 1]thus
S1[
n + 1]
:: thesis: verumproof
let dt be
Element of
FinTrees [:the carrier of F2(),F3():];
:: thesis: ( dt in Union F1() implies ( dt in F1() . (n + 1) iff height (dom dt) <= n + 1 ) )
assume A16:
dt in Union F1()
;
:: thesis: ( dt in F1() . (n + 1) iff height (dom dt) <= n + 1 )
hereby :: thesis: ( height (dom dt) <= n + 1 implies dt in F1() . (n + 1) )
assume
dt in F1()
. (n + 1)
;
:: thesis: height (dom dt) <= n + 1then
dt in (F1() . n) \/ { ([o,H3(o,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;
then A17:
(
dt in F1()
. n or
dt in { ([o,H3(o,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 XBOOLE_0:def 3;
per cases
( dt in F1() . n or not dt in F1() . n )
;
suppose
not
dt in F1()
. n
;
:: thesis: height (dom dt) <= n + 1then consider o being
Symbol of
F2(),
p being
Element of
(F1() . n) * such that A18:
(
dt = [o,H3(o,p)] -tree p & ex
q being
FinSequence of
FinTrees [:the carrier of F2(),F3():] st
(
p = q &
o ==> pr1 (roots q) ) )
by A17;
reconsider p =
p as
FinSequence of
FinTrees [:the carrier of F2(),F3():] by A18;
A19:
dom dt = tree (doms p)
by A18, TREES_4:10;
now let t be
finite Tree;
:: thesis: ( t in rng (doms p) implies height t <= n )assume
t in rng (doms p)
;
:: thesis: height t <= nthen consider k being
set such that A20:
(
k in dom (doms p) &
t = (doms p) . k )
by FUNCT_1:def 5;
A21:
k in dom p
by A20, TREES_3:39;
then A22:
(
p . k in rng p &
rng p c= FinTrees [:the carrier of F2(),F3():] )
by FINSEQ_1:def 4, FUNCT_1:def 5;
then reconsider pk =
p . k as
Element of
FinTrees [:the carrier of F2(),F3():] ;
A23:
rng p c= F1()
. n
by FINSEQ_1:def 4;
then A24:
(
t = dom pk &
pk in F1()
. n )
by A20, A21, A22, FUNCT_6:31;
pk in Union F1()
by A1, A22, A23, CARD_5:10;
hence
height t <= n
by A15, A24;
:: thesis: verum end; hence
height (dom dt) <= n + 1
by A19, TREES_3:80;
:: thesis: verum end; end;
end;
assume A25:
height (dom dt) <= n + 1
;
:: thesis: dt in F1() . (n + 1)
defpred S2[
Nat]
means dt in F1()
. $1;
consider k being
set such that A26:
(
k in NAT &
dt in F1()
. k )
by A1, A16, CARD_5:10;
A27:
ex
k being
Nat st
S2[
k]
by A26;
consider mk being
Nat such that A28:
(
S2[
mk] & ( for
kk being
Nat st
S2[
kk] holds
mk <= kk ) )
from NAT_1:sch 5(A27);
deffunc H4(
set ,
set )
-> set =
{ ([o,F5(o,(pr1 (roots p)),(pr2 (roots p)))] -tree p) where o is Symbol of F2(), p is Element of (F1() . $1) * : ex q being FinSequence of FinTrees [:the carrier of F2(),F3():] st
( p = q & o ==> pr1 (roots q) ) } ;
A29:
for
n being
Element of
NAT holds
F1()
. n c= F1()
. (n + 1)
per cases
( mk = 0 or ex k being Nat st mk = k + 1 )
by NAT_1:6;
suppose
ex
k being
Nat st
mk = k + 1
;
:: thesis: dt in F1() . (n + 1)then consider k being
Nat such that A31:
mk = k + 1
;
reconsider k =
k as
Element of
NAT by ORDINAL1:def 13;
A32:
k < k + 1
by NAT_1:13;
F1()
. mk = (F1() . k) \/ { ([o,H3(o,p)] -tree p) where o is Symbol of F2(), p is Element of (F1() . k) * : ex q being FinSequence of FinTrees [:the carrier of F2(),F3():] st
( p = q & o ==> pr1 (roots q) ) }
by A3, A31;
then
(
dt in F1()
. k or
dt in { ([o,H3(o,p)] -tree p) where o is Symbol of F2(), p is Element of (F1() . k) * : ex q being FinSequence of FinTrees [:the carrier of F2(),F3():] st
( p = q & o ==> pr1 (roots q) ) } )
by A28, XBOOLE_0:def 3;
then consider o being
Symbol of
F2(),
p being
Element of
(F1() . k) * such that A33:
(
dt = [o,H3(o,p)] -tree p & ex
q being
FinSequence of
FinTrees [:the carrier of F2(),F3():] st
(
p = q &
o ==> pr1 (roots q) ) )
by A28, A31, A32;
reconsider p =
p as
FinSequence of
FinTrees [:the carrier of F2(),F3():] by A33;
A34:
dom dt = tree (doms p)
by A33, TREES_4:10;
rng p c= F1()
. n
proof
let x be
set ;
:: according to TARSKI:def 3 :: thesis: ( not x in rng p or x in F1() . n )
assume
x in rng p
;
:: thesis: x in F1() . n
then consider k' being
set such that A35:
(
k' in dom p &
x = p . k' )
by FUNCT_1:def 5;
(
x in rng p &
rng p c= FinTrees [:the carrier of F2(),F3():] )
by A35, FINSEQ_1:def 4, FUNCT_1:def 5;
then reconsider t =
x as
Element of
FinTrees [:the carrier of F2(),F3():] ;
t = x
;
then
(
k' in dom (doms p) &
dom t = (doms p) . k' )
by A35, FUNCT_6:31;
then
dom t in rng (doms p)
by FUNCT_1:def 5;
then
height (dom t) < n + 1
by A25, A34, TREES_3:81, XXREAL_0:2;
then A36:
height (dom t) <= n
by NAT_1:13;
(
rng p c= F1()
. k &
t in rng p )
by A35, FINSEQ_1:def 4, FUNCT_1:def 5;
then
t in Union F1()
by A1, CARD_5:10;
hence
x in F1()
. n
by A15, A36;
:: thesis: verum
end; then
p is
FinSequence of
F1()
. n
by FINSEQ_1:def 4;
then reconsider p =
p as
Element of
(F1() . n) * by FINSEQ_1:def 11;
[o,H3(o,p)] -tree p in { ([oo,H3(oo,pp)] -tree pp) where oo is Symbol of F2(), pp is Element of (F1() . n) * : ex q being FinSequence of FinTrees [:the carrier of F2(),F3():] st
( pp = q & oo ==> pr1 (roots q) ) }
by A33;
then
dt in (F1() . n) \/ { ([oo,H3(oo,pp)] -tree pp) where oo is Symbol of F2(), pp is Element of (F1() . n) * : ex q being FinSequence of FinTrees [:the carrier of F2(),F3():] st
( pp = q & oo ==> pr1 (roots q) ) }
by A33, XBOOLE_0:def 3;
hence
dt in F1()
. (n + 1)
by A3;
:: thesis: verum end; end;
end; end;
thus
for n being Element of NAT holds S1[n]
from NAT_1:sch 1(A4, A14); :: thesis: verum