reserve k,m,n for Nat, kk,mm,nn for Element of NAT, A,B,X,Y,Z,x,y,z for set,
S, S1, S2 for Language, s for (Element of S), w,w1,w2 for (string of S),
U,U1,U2 for non empty set, f,g for Function, p,p1,p2 for FinSequence;
reserve u,u1,u2 for Element of U, t for termal string of S,
I for (S,U)-interpreter-like Function,
l, l1, l2 for literal (Element of S), m1, n1 for non zero Nat,
phi0 for 0wff string of S, psi,phi,phi1,phi2 for wff string of S;

theorem Th9: S-formulasOfMaxDepth(m+1) =
m-ExFormulasOf S \/ m-NorFormulasOf S \/ S-formulasOfMaxDepth m
proof
set U=the non empty set, n=m+1, II=U-InterpretersOf S, SS=AllSymbolsOf S,
N=TheNorSymbOf S, I = the Element of II;
reconsider mm=m, nn=n as Element of NAT by ORDINAL1:def 12;
set F=(S,U)-TruthEval, Fn=F.nn, Fc=(curry Fn), Dm=S-formulasOfMaxDepth m,
Dn=S-formulasOfMaxDepth n;
F.mm is Element of PFuncs( [:II, SS*\{{}}:], BOOLEAN ); then
reconsider Fm=F.mm as PartFunc of [:II, SS*\{{}}:], BOOLEAN;
A1: (S,U)-TruthEval n=Fn & (S,U)-TruthEval m=Fm by Def20;
reconsider Fcc=Fc as Function of II, Funcs(Dn, BOOLEAN)
by Lm17, A1;
reconsider fn=Fcc.I as Function of Dn, BOOLEAN;
Fm is Element of Funcs([:II, Dm:], BOOLEAN) by Th8;
then reconsider Fmm=Fm as Function of [:II, Dm:], BOOLEAN;
 dom fn=Dn & dom Fcc=II by FUNCT_2:def 1; then
A2: Dn=proj2 (dom Fn/\[:{I}, proj2 dom Fn:]) by FUNCT_5:31;
A3: Fn=ExIterator(F.mm) +* NorIterator(F.mm) +* Fm by Def19;
reconsider Em=ExIterator(F.mm) as PartFunc of [:II, SS*\{{}}:], BOOLEAN;
reconsider dEm=dom Em as Relation of II, SS*\{{}};
reconsider dNm=dom (NorIterator (F.mm)), dFm=dom(Fm) as
Relation of II, SS*\{{}};
A4: dFm = dom Fmm .= [:II, Dm:] by FUNCT_2:def 1;
A5: dom Fn = dom (ExIterator(F.mm) +* NorIterator (F.mm)) \/
dom (Fm) by A3, FUNCT_4:def 1 .= dEm\/dNm\/dFm by FUNCT_4:def 1;
set RNNN = m-NorFormulasOf S, REEE = m-ExFormulasOf S;
(S,U)-TruthEval m=Fm by Def20; then
dNm=[:II, RNNN:] & dEm=[:II, REEE:] by Lm18, Lm19; then
A6: dEm\/dNm\/dFm = [:II, REEE\/RNNN:]\/[:II, Dm:] by A4, ZFMISC_1:97 .=
[:II,REEE\/RNNN\/Dm:] by ZFMISC_1:97;
reconsider sub=[:{I}, REEE\/RNNN\/Dm:] as Subset of
[:II, REEE\/RNNN\/Dm:] by ZFMISC_1:96;
Dn = rng ([:II,REEE\/RNNN\/Dm:] /\ sub )
by A6, A2, A5 .=
REEE\/RNNN\/Dm; hence thesis;
end;
