reconsider FAB = Funcs F2(),F3() as non empty set ;
defpred S1[ set , set ] means for tv being Function of F2(),F3() st tv = $2 holds
for a being Element of F2() holds tv . a = F6($1,a);
consider TV being Function of Terminals F1(),FAB such that
A5:
for e being Element of Terminals F1() holds S1[e,TV . e]
from FUNCT_2:sch 3(A3);
defpred S2[ set , set , set , set ] means for a being Element of F2()
for ntv being Function of F2(),F3() st ntv = $4 holds
ntv . a = F7($1,$2,$3,a);
A6:
now let x be
Element of
NonTerminals F1();
:: thesis: for y, z being Element of FAB ex fab being Element of FAB st S2[x,y,z,fab]let y,
z be
Element of
FAB;
:: thesis: ex fab being Element of FAB st S2[x,y,z,fab]deffunc H1(
Element of
F2())
-> Element of
F3() =
F7(
x,
y,
z,$1);
consider fab being
Function of
F2(),
F3()
such that A7:
for
a being
Element of
F2() holds
fab . a = H1(
a)
from FUNCT_2:sch 4();
(
F2()
= dom fab &
rng fab c= F3() )
by FUNCT_2:def 1;
then reconsider fab =
fab as
Element of
FAB by FUNCT_2:def 2;
take fab =
fab;
:: thesis: S2[x,y,z,fab]thus
S2[
x,
y,
z,
fab]
by A7;
:: thesis: verum end;
consider NTV being Function of [:(NonTerminals F1()),FAB,FAB:],FAB such that
A8:
for x being Element of NonTerminals F1()
for y, z being Element of FAB holds S2[x,y,z,NTV . [x,y,z]]
from MULTOP_1:sch 1(A6);
reconsider f1' = F4() as Function of TS F1(),FAB ;
reconsider f2' = F5() as Function of TS F1(),FAB ;
deffunc H1( Terminal of F1()) -> Element of FAB = TV . $1;
deffunc H2( NonTerminal of F1(), set , set , Element of FAB, Element of FAB) -> Element of FAB = NTV . [$1,$4,$5];
A9:
now let nt be
NonTerminal of
F1();
:: thesis: 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 FAB st xl = f1' . tl & xr = f1' . tr holds
f1' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr)let tl,
tr be
Element of
TS F1();
:: thesis: 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 FAB st xl = f1' . tl & xr = f1' . tr holds
f1' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr)let rtl,
rtr be
Symbol of
F1();
:: thesis: ( rtl = root-label tl & rtr = root-label tr & nt ==> <*rtl,rtr*> implies for xl, xr being Element of FAB st xl = f1' . tl & xr = f1' . tr holds
f1' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr) )assume A12:
(
rtl = root-label tl &
rtr = root-label tr &
nt ==> <*rtl,rtr*> )
;
:: thesis: for xl, xr being Element of FAB st xl = f1' . tl & xr = f1' . tr holds
f1' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr)let xl,
xr be
Element of
FAB;
:: thesis: ( xl = f1' . tl & xr = f1' . tr implies f1' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr) )assume A13:
(
xl = f1' . tl &
xr = f1' . tr )
;
:: thesis: f1' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr)consider g,
ff1,
ff2 being
Function of
F2(),
F3()
such that A14:
(
g = F4()
. (nt -tree tl,tr) &
ff1 = F4()
. tl &
ff2 = F4()
. tr & ( for
a being
Element of
F2() holds
g . a = F7(
nt,
ff1,
ff2,
a) ) )
by A1, A12;
consider ntvnt being
Function such that A15:
(
ntvnt = NTV . [nt,xl,xr] &
dom ntvnt = F2() &
rng ntvnt c= F3() )
by FUNCT_2:def 2;
reconsider ntvnt =
ntvnt as
Function of
F2(),
F3()
by A15, FUNCT_2:def 1, RELSET_1:11;
hence
f1' . (nt -tree tl,tr) = H2(
nt,
rtl,
rtr,
xl,
xr)
by A14, A15, FUNCT_1:9;
:: thesis: verum end;
A16:
now let nt be
NonTerminal of
F1();
:: thesis: 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 FAB st xl = f2' . tl & xr = f2' . tr holds
f2' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr)let tl,
tr be
Element of
TS F1();
:: thesis: 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 FAB st xl = f2' . tl & xr = f2' . tr holds
f2' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr)let rtl,
rtr be
Symbol of
F1();
:: thesis: ( rtl = root-label tl & rtr = root-label tr & nt ==> <*rtl,rtr*> implies for xl, xr being Element of FAB st xl = f2' . tl & xr = f2' . tr holds
f2' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr) )assume A19:
(
rtl = root-label tl &
rtr = root-label tr &
nt ==> <*rtl,rtr*> )
;
:: thesis: for xl, xr being Element of FAB st xl = f2' . tl & xr = f2' . tr holds
f2' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr)let xl,
xr be
Element of
FAB;
:: thesis: ( xl = f2' . tl & xr = f2' . tr implies f2' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr) )assume A20:
(
xl = f2' . tl &
xr = f2' . tr )
;
:: thesis: f2' . (nt -tree tl,tr) = H2(nt,rtl,rtr,xl,xr)consider g,
ff1,
ff2 being
Function of
F2(),
F3()
such that A21:
(
g = F5()
. (nt -tree tl,tr) &
ff1 = F5()
. tl &
ff2 = F5()
. tr & ( for
a being
Element of
F2() holds
g . a = F7(
nt,
ff1,
ff2,
a) ) )
by A2, A19;
consider ntvnt being
Function such that A22:
(
ntvnt = NTV . [nt,xl,xr] &
dom ntvnt = F2() &
rng ntvnt c= F3() )
by FUNCT_2:def 2;
reconsider ntvnt =
ntvnt as
Function of
F2(),
F3()
by A22, FUNCT_2:def 1, RELSET_1:11;
hence
f2' . (nt -tree tl,tr) = H2(
nt,
rtl,
rtr,
xl,
xr)
by A21, A22, FUNCT_1:9;
:: thesis: verum end;
f1' = f2'
from BINTREE1:sch 4(A9, A16);
hence
F4() = F5()
; :: thesis: verum