begin
:: deftheorem defines root-label BINTREE1:def 1 :
for D being non empty set
for t being DecoratedTree of D holds root-label t = t . {};
theorem
theorem
:: deftheorem Def2 defines binary BINTREE1:def 2 :
for IT being Tree holds
( IT is binary iff for t being Element of IT st not t in Leaves IT holds
succ t = {(t ^ <*0*>),(t ^ <*1*>)} );
theorem
canceled;
theorem
canceled;
theorem
theorem
theorem
:: deftheorem Def3 defines binary BINTREE1:def 3 :
for IT being DecoratedTree holds
( IT is binary iff dom IT is binary );
theorem Th8:
theorem Th9:
theorem Th10:
theorem Th11:
:: deftheorem Def4 defines binary BINTREE1:def 4 :
for IT being non empty DTConstrStr holds
( IT is binary iff for s being Symbol of IT
for p being FinSequence st s ==> p holds
ex x1, x2 being Symbol of IT st p = <*x1,x2*> );
theorem Th12:
scheme
BinDTConstrIndDef{
F1()
-> non
empty with_terminals with_nonterminals with_useful_nonterminals binary DTConstrStr ,
F2()
-> non
empty set ,
F3(
set )
-> Element of
F2(),
F4(
set ,
set ,
set ,
set ,
set )
-> Element of
F2() } :
ex
f being
Function of
(TS F1()),
F2() st
( ( for
t being
Terminal of
F1() holds
f . (root-tree t) = F3(
t) ) & ( for
nt being
NonTerminal of
F1()
for
tl,
tr being
Element of
TS F1()
for
rtl,
rtr being
Symbol of
F1() st
rtl = root-label tl &
rtr = root-label tr &
nt ==> <*rtl,rtr*> holds
for
xl,
xr being
Element of
F2() st
xl = f . tl &
xr = f . tr holds
f . (nt -tree (tl,tr)) = F4(
nt,
rtl,
rtr,
xl,
xr) ) )
scheme
BinDTConstrUniqDef{
F1()
-> non
empty with_terminals with_nonterminals with_useful_nonterminals binary DTConstrStr ,
F2()
-> non
empty set ,
F3()
-> Function of
(TS F1()),
F2(),
F4()
-> Function of
(TS F1()),
F2(),
F5(
set )
-> Element of
F2(),
F6(
set ,
set ,
set ,
set ,
set )
-> Element of
F2() } :
provided
A1:
( ( for
t being
Terminal of
F1() holds
F3()
. (root-tree t) = F5(
t) ) & ( for
nt being
NonTerminal of
F1()
for
tl,
tr being
Element of
TS F1()
for
rtl,
rtr being
Symbol of
F1() st
rtl = root-label tl &
rtr = root-label tr &
nt ==> <*rtl,rtr*> holds
for
xl,
xr being
Element of
F2() st
xl = F3()
. tl &
xr = F3()
. tr holds
F3()
. (nt -tree (tl,tr)) = F6(
nt,
rtl,
rtr,
xl,
xr) ) )
and A2:
( ( for
t being
Terminal of
F1() holds
F4()
. (root-tree t) = F5(
t) ) & ( for
nt being
NonTerminal of
F1()
for
tl,
tr being
Element of
TS F1()
for
rtl,
rtr being
Symbol of
F1() st
rtl = root-label tl &
rtr = root-label tr &
nt ==> <*rtl,rtr*> holds
for
xl,
xr being
Element of
F2() st
xl = F4()
. tl &
xr = F4()
. tr holds
F4()
. (nt -tree (tl,tr)) = F6(
nt,
rtl,
rtr,
xl,
xr) ) )
definition
let A,
B,
C be non
empty set ;
let a be
Element of
A;
let b be
Element of
B;
let c be
Element of
C;
[redefine func [a,b,c] -> Element of
[:A,B,C:];
coherence
[a,b,c] is Element of [:A,B,C:]
by MCART_1:73;
end;
scheme
BinDTCDefLambda{
F1()
-> non
empty with_terminals with_nonterminals with_useful_nonterminals binary DTConstrStr ,
F2()
-> non
empty set ,
F3()
-> non
empty set ,
F4(
set ,
set )
-> Element of
F3(),
F5(
set ,
set ,
set ,
set )
-> Element of
F3() } :
ex
f being
Function of
(TS F1()),
(Funcs (F2(),F3())) st
( ( for
t being
Terminal of
F1() ex
g being
Function of
F2(),
F3() st
(
g = f . (root-tree t) & ( for
a being
Element of
F2() holds
g . a = F4(
t,
a) ) ) ) & ( for
nt being
NonTerminal of
F1()
for
t1,
t2 being
Element of
TS F1()
for
rtl,
rtr being
Symbol of
F1() st
rtl = root-label t1 &
rtr = root-label t2 &
nt ==> <*rtl,rtr*> holds
ex
g,
f1,
f2 being
Function of
F2(),
F3() st
(
g = f . (nt -tree (t1,t2)) &
f1 = f . t1 &
f2 = f . t2 & ( for
a being
Element of
F2() holds
g . a = F5(
nt,
f1,
f2,
a) ) ) ) )
scheme
BinDTCDefLambdaUniq{
F1()
-> non
empty with_terminals with_nonterminals with_useful_nonterminals binary DTConstrStr ,
F2()
-> non
empty set ,
F3()
-> non
empty set ,
F4()
-> Function of
(TS F1()),
(Funcs (F2(),F3())),
F5()
-> Function of
(TS F1()),
(Funcs (F2(),F3())),
F6(
set ,
set )
-> Element of
F3(),
F7(
set ,
set ,
set ,
set )
-> Element of
F3() } :
provided
A1:
( ( for
t being
Terminal of
F1() ex
g being
Function of
F2(),
F3() st
(
g = F4()
. (root-tree t) & ( for
a being
Element of
F2() holds
g . a = F6(
t,
a) ) ) ) & ( for
nt being
NonTerminal of
F1()
for
t1,
t2 being
Element of
TS F1()
for
rtl,
rtr being
Symbol of
F1() st
rtl = root-label t1 &
rtr = root-label t2 &
nt ==> <*rtl,rtr*> holds
ex
g,
f1,
f2 being
Function of
F2(),
F3() st
(
g = F4()
. (nt -tree (t1,t2)) &
f1 = F4()
. t1 &
f2 = F4()
. t2 & ( for
a being
Element of
F2() holds
g . a = F7(
nt,
f1,
f2,
a) ) ) ) )
and A2:
( ( for
t being
Terminal of
F1() ex
g being
Function of
F2(),
F3() st
(
g = F5()
. (root-tree t) & ( for
a being
Element of
F2() holds
g . a = F6(
t,
a) ) ) ) & ( for
nt being
NonTerminal of
F1()
for
t1,
t2 being
Element of
TS F1()
for
rtl,
rtr being
Symbol of
F1() st
rtl = root-label t1 &
rtr = root-label t2 &
nt ==> <*rtl,rtr*> holds
ex
g,
f1,
f2 being
Function of
F2(),
F3() st
(
g = F5()
. (nt -tree (t1,t2)) &
f1 = F5()
. t1 &
f2 = F5()
. t2 & ( for
a being
Element of
F2() holds
g . a = F7(
nt,
f1,
f2,
a) ) ) ) )