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;
reserve I for Element of U-InterpretersOf S;
reserve I for (S,U)-interpreter-like Function;

theorem Th23: (not phi is 0wff) implies
(phi=<*x*>^phi2^p2 iff (x=S-firstChar.phi & phi2=head phi & p2=tail phi))
proof
set Phi=SubWffsOf phi, F=S-firstChar, s=F.phi, SS=AllSymbolsOf S; assume
A1: not phi is 0wff; then consider phi1, p such that
A2: p is SS-valued & Phi=[phi1,p] & phi=<*s*>^phi1^p by Def34;
hereby
assume
A4: phi=<*x*>^phi2^p2; then
A5: phi.1 = (<*x*>^(phi2^p2)).1 by FINSEQ_1:32
.= x by FINSEQ_1:41; hence x=s by FOMODEL0:6;
rng p2 c= rng phi & rng phi c= SS
by A4, FINSEQ_1:30, RELAT_1:def 19; then
p2 is SS-valued & [phi2,p2]=[phi2,p2] & phi=<*s*>^phi2^p2
by XBOOLE_1:1, RELAT_1:def 19, A5, FOMODEL0:6, A4; then
Phi=[phi2,p2] by A1, Def34;
hence phi2=head phi & p2=tail phi;
end;
assume x=s & phi2=head phi & p2=tail phi; hence thesis by A2;
end;
