Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Mizar/mml/     Datei vom 6.10.2026 mit Größe 153 kB image not shown  

Impressum fomodel3.miz   Interaktion und
PortierbarkeitMizar

 

:: Free interpretation, quotient interpretation and substitution of a letter
:: with a term for first order languages
::  by Marco B. Caminati
::
:: Received December 29, 2010
:: Copyright (c) 2010-2026 Association of Mizar Users
::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.

environ

 vocabularies TARSKI, XBOOLE_0, ZFMISC_1, SUBSET_1, NUMBERS, NAT_1, RELAT_1,
      FUNCT_2, FINSEQ_1, FUNCT_1, ARYTM_3, XCMPLX_0, CARD_1, MONOID_0,
      ORDINAL1, ARYTM_1, XXREAL_0, ORDINAL4, PARTFUN1, FINSEQ_2, EQREL_1,
      COMPLEX1, FUNCT_3, FINSET_1, FUNCT_4, FUNCOP_1, MARGREL1, PRE_POLY,
      RELAT_2, RELSET_2, MATROID0, XBOOLEAN, FOMODEL0, FOMODEL1, FOMODEL2,
      FOMODEL3;
 notations TARSKI, FINSET_1, MARGREL1, PRE_POLY, RELAT_2, MATROID0, MONOID_0,
      XBOOLE_0, ZFMISC_1, SUBSET_1, DOMAIN_1, RELSET_2, RELAT_1, RELSET_1,
      FUNCT_1, PARTFUN1, FUNCT_2, FUNCOP_1, FUNCT_4, ORDINAL1, CARD_1, NUMBERS,
      XCMPLX_0, XXREAL_0, NAT_1, INT_2, FINSEQ_1, EQREL_1, FINSEQ_2, FINSEQOP,
      XBOOLEAN, BVFUNC_1, FOMODEL0, FOMODEL1, FOMODEL2;
 constructors TARSKI, XBOOLE_0, ZFMISC_1, CARD_1, NAT_1, NUMBERS, INT_1,
      FINSEQ_1, XCMPLX_0, FUNCT_1, MONOID_0, XXREAL_0, RELAT_2, FUNCT_2,
      FUNCT_4, FUNCOP_1, FINSEQ_2, EQREL_1, RELSET_1, MCART_1, PARTFUN1,
      FINSEQOP, MATRIX_1, FUNCT_3, SETFAM_1, FINSET_1, MARGREL1, RELSET_2,
      MATROID0, LEXBFS, BINOP_1, XBOOLEAN, FUNCT_5, FOMODEL0, FOMODEL1,
      FOMODEL2, BVFUNC_1;
 registrations ORDINAL1, NAT_1, RELAT_1, FUNCT_1, INT_1, FINSEQ_1, XREAL_0,
      FUNCT_2, FINSEQ_2, SUBSET_1, FUNCOP_1, RELSET_1, PARTFUN1, EQREL_1,
      CARD_1, XBOOLE_0, XXREAL_0, SETFAM_1, MARGREL1, FINSET_1, RAMSEY_1,
      PRE_POLY, FOMODEL0, FOMODEL1, FOMODEL2;
 requirements ARITHM, BOOLE, NUMERALS, REAL, SUBSET;
 definitions RELAT_2;
 equalities XBOOLE_0, FUNCOP_1, EQREL_1, XBOOLEAN, FOMODEL0, FOMODEL1,
      FOMODEL2, ORDINAL1;
 expansions XBOOLE_0, RELAT_2, FOMODEL1, FOMODEL2;
 theorems TARSKI, XBOOLE_0, FUNCT_1, FINSEQ_1, RELAT_1, XBOOLE_1, ZFMISC_1,
      FUNCT_2, XXREAL_0, NAT_1, ORDINAL1, EQREL_1, PARTFUN1, FINSEQ_2, XREAL_1,
      FUNCT_4, FUNCOP_1, FUNCT_5, RELAT_2, RELSET_1, RELSET_2, GRFUNC_1,
      ORDERS_1, CARD_1, XTUPLE_0, FINSET_1, FOMODEL0, FOMODEL1, FOMODEL2,
      PRE_POLY;
 schemes NAT_1, FUNCT_1, FUNCT_2, FRAENKEL, FINSEQ_1, FINSEQ_4;

begin

reserve A,B,C,X,Y,Z,x,x1,x2,y,z for set, U,U1,U2,U3 for non empty set,
u,u1,u2 for (Element of U), P,Q,R for Relation, f,g for Function,
k,m,n for Nat, m1, n1 for non zero Nat, kk,mm,nn for (Element of NAT),
p, p1, p2 for FinSequence, q, q1, q2 for U-valued FinSequence;
reserve S, S1, S2 for Language, s,s1,s2 for Element of S,
l,l1,l2 for literal Element of S, a for ofAtomicFormula Element of S,
r for relational Element of S, w,w1,w2 for string of S,
t,t1,t2 for termal string of S;
reserve phi0 for 0wff string of S,
psi, psi1, psi2, phi,phi1,phi2 for wff string of S,
I for (S,U)-interpreter-like Function;
reserve tt,tt0,tt1,tt2 for Element of AllTermsOf S;

definition
let S,s;
let V be Element of ((AllSymbolsOf S)*\{{}})*;
func s-compound(V) -> string of S equals
 <*s*>^(S-multiCat.V);
coherence
proof
set SS=AllSymbolsOf S, C=S-multiCat;
reconsider header=<*s*> as Element of SS*;
reconsider tailer=C.V as FinSequence of SS by FINSEQ_1:def 11;
reconsider IT=header ^ tailer as FinSequence of SS;
IT in SS* & not IT in {{}};
hence <*s*>^(C.V) is string of S by XBOOLE_0:def 5;
end;
end;

registration
let S,mm; let s be termal Element of S;
let V be (|.ar s.|)-element Element of (S-termsOfMaxDepth.mm)*;
cluster s-compound(V) -> (mm+1)-termal for string of S;
coherence
proof
set C=S-multiCat, t=s-compound(V), T=S-termsOfMaxDepth, L=LettersOf S,
SS=AllSymbolsOf S,n=|.ar s.|,A=AtomicTermsOf S,fam={Compound(u,T.mm)
where u is ofAtomicFormula Element of S:u is operational};
A1: V is FinSequence of T.mm by FINSEQ_1:def 11;
reconsider Ss = SS*\{{}} as
Subset of SS*; V in Ss*; then reconsider VV=V as Element of SS**;
t=<*s*>^(C.VV) & rng VV c= T.mm by A1, FINSEQ_1:def 4; then
A2: t in Compound(s,T.mm);
per cases;
suppose s is literal; then reconsider v=s as literal Element of S;
reconsider vv=v as Element of L by FOMODEL1:def 14;
ar(v)=0; then n=0; then reconsider VVV=V as 0-element FinSequence;
t=<*s*>^VVV .= <*vv*>; then
t in AtomicTermsOf S by FINSEQ_2:98; then
T.0 c= T.(0+(mm+1)) & t in T.0 by FOMODEL1:def 30, FOMODEL1:4;
hence thesis;
end;
suppose not s is literal; then
Compound(s,T.mm) in fam;
then t in union fam by A2, TARSKI:def 4;
then t in union fam \/ (T.mm) by XBOOLE_0:def 3;
then t in T.(mm+1) by FOMODEL1:def 30;
hence thesis;
end;
end;
end;

Lm1: not x in S-termsOfMaxDepth.(m+n) implies not x in S-termsOfMaxDepth.m
proof
set T=S-termsOfMaxDepth; A1: T.m c= T.(m+n) by FOMODEL1:4; assume
not x in T.(m+n); hence thesis by A1;
end;

Lm2:
x in S-termsOfMaxDepth.n implies {mm: not x in S-termsOfMaxDepth.mm} c= n
proof
set T=S-termsOfMaxDepth, A={ mm: not x in T.mm };  assume
A1: x in T.n;
now
let y be object; assume y in A; then consider mm such that
A2: y=mm & not x in T.mm;
now
assume mm>=n; then consider k such that A3: mm=n+k by NAT_1:10;
thus contradiction by A1, A2, A3, Lm1;
end;
hence y in Segm n by A2, NAT_1:44;
end;
hence thesis by TARSKI:def 3;
end;

Lm3: for V being Element of (AllTermsOf S)* ex mm being
Element of NAT st V is Element of (S-termsOfMaxDepth.mm)*
proof
set TT=AllTermsOf S, T=S-termsOfMaxDepth; let V be Element of TT*;
deffunc F(object)={mm: not V.$1 in T.mm}; set B={ F(nn): nn in dom V};
A1: dom V is finite; reconsider TF=T as Function;
A2: now
let x; assume x in B; then consider nn such that
A3: x={mm: not V.nn in T.mm} & nn in dom V;
reconsider D=dom V as non empty set by A3; rng V c= TT by RELAT_1:def 19;
then reconsider VV=V as Function of D, TT by FUNCT_2:2;
reconsider nnn=nn as Element of D by A3;
consider kk being Element of NAT such that
A4: VV.nnn in TF.kk by FOMODEL1:5; x c= kk by Lm2, A3, A4; hence x is finite;
end;
B is finite from FRAENKEL:sch 21(A1); then reconsider BB=B as finite
finite-membered set by A2, FINSET_1:def 6;
reconsider C=union BB as finite set; consider x being object such that
A5: x in NAT\C by XBOOLE_0:def 1; reconsider mm=x as Element of NAT by A5;
now
let i be object; assume
A6: i in dom V; then reconsider ii=i as Element of NAT;
not V.i in T.mm implies mm in C
proof
assume not V.i in T.mm; then mm in F(i) & F(ii) in B by A6;
hence mm in C by TARSKI:def 4;
end;
hence V.i in T.mm by A5, XBOOLE_0:def 5;
end; then
V is Function of dom V, T.mm by FUNCT_2:3; then V is FinSequence of T.mm
by FOMODEL0:26; hence thesis;
end;

registration
let S; let s be termal Element of S;
let V be (|.ar s.|)-element Element of (AllTermsOf S)*;
cluster s-compound(V) -> termal for string of S;
coherence
proof
set T=S-termsOfMaxDepth, n=|.ar s.|;
consider mm such that A1: V is Element of (T.mm)* by Lm3;
reconsider VV=V as n-element Element of (T.mm)* by A1;
s-compound(VV) is (mm+1)-termal string of S; hence thesis;
end;
end;

registration
let S; let s be relational Element of S;
let V be (|.ar s.|)-element Element of (AllTermsOf S)*;
cluster s-compound(V) -> 0wff for string of S;
coherence;
end;

definition
let S,s;
func s-compound -> Function of ((AllSymbolsOf S)*\{{}})*,
(AllSymbolsOf S)*\{{}} means :Def2:
for V being Element of ((AllSymbolsOf S)*\{{}})* holds it.V = s-compound(V);
existence
proof
set SS=AllSymbolsOf S; deffunc F(Element of (SS*\{{}})*) = s-compound($1);
consider f being Function of (SS*\{{}})*,SS*\{{}} such that A1:
for x being Element of (SS*\{{}})* holds f.x=F(x) from FUNCT_2:sch 4;
take f; thus thesis by A1;
end;
uniqueness
proof
set SS=AllSymbolsOf S;
let IT1,IT2 be Function of (SS*\{{}})*, SS*\{{}}; assume that A2:
for V being Element of (SS*\{{}})* holds IT1.V = s-compound(V) and
A3: for V being Element of (SS*\{{}})* holds IT2.V = s-compound(V);
now
let V be Element of (SS*\{{}})*;
thus
IT1.V=s-compound(V) by A2 .= IT2.V by A3;
end;
hence IT1=IT2 by FUNCT_2:def 8;
end;
end;

registration
let S; let s be termal Element of S;
cluster s-compound | ((|.ar s.|)-tuples_on (AllTermsOf S)) ->
(AllTermsOf S)-valued;
coherence
proof
set SS=AllSymbolsOf S, A=AllTermsOf S, n=|.ar s.|, D=n-tuples_on A,
f=s-compound, IT=f|D;
now
let y be object; assume y in rng IT; then y in f.:D;
then consider x being object such that
A1: x in dom f & x in D & y=f.x by FUNCT_1:def 6;
reconsider V=x as n-element FinSequence of A by FOMODEL0:12, A1;
reconsider VV=V as n-element Element of A*;
reconsider Ss=SS*\{{}} as Subset of SS*; VV is Element of (Ss)*; then
s-compound(VV) is termal string of S & VV is Element of SS**; then f.VV
is termal string of S by Def2; hence y in A by FOMODEL1:def 32, A1;
end;
hence thesis by RELAT_1:def 19, TARSKI:def 3;
end;
end;

registration
let S; let s be relational Element of S;
cluster s-compound | ((|.ar s.|)-tuples_on (AllTermsOf S)) ->
(AtomicFormulasOf S)-valued;
coherence
proof
set SS=AllSymbolsOf S, A=AllTermsOf S, n=|.ar s.|, D=n-tuples_on A,
f=s-compound, IT=f|D, AF=AtomicFormulasOf S;
now
let y be object; assume y in rng IT; then y in f.:D;
then consider
x being object such that
A1: x in dom f & x in D & y=f.x by FUNCT_1:def 6;
reconsider V=x as n-element FinSequence of A by FOMODEL0:12, A1;
reconsider VV=V as n-element Element of A*;
reconsider Ss=SS*\{{}} as Subset of SS*; VV is Element of (Ss)*;then
s-compound(VV) is 0wff string of S & VV is Element of SS**; then
f.VV is 0wff string of S by Def2;
hence y in AF by A1;
end;
hence thesis by RELAT_1:def 19, TARSKI:def 3;
end;
end;

definition
let S; let s be ofAtomicFormula Element of S; let X be set;
func X-freeInterpreter(s) -> set equals :Def3:
s-compound | ((|.ar s.|)-tuples_on (AllTermsOf S)) if not s is relational
otherwise
(s-compound | ((|.ar s.|)-tuples_on (AllTermsOf S))) *
(chi(X,AtomicFormulasOf S) qua Relation);
coherence;
consistency;
end;

definition
let S; let s be ofAtomicFormula Element of S; let X be set;
redefine func X-freeInterpreter(s) -> Interpreter of s,(AllTermsOf S);
coherence
proof
set A=AllTermsOf S, n=|.ar s.|, SS=AllSymbolsOf S, XF=X-freeInterpreter(s),
AF=AtomicFormulasOf S;
reconsider Ss=SS*\{{}} as Subset of SS*;
n-tuples_on A c= A* by FINSEQ_2:142;
then n-tuples_on A c= Ss* by XBOOLE_1:1; then reconsider
f=s-compound | (n-tuples_on A) as Function of (n-tuples_on A), SS*\{{}}
by FUNCT_2:32;
per cases;
suppose A1: s is relational; then reconsider ss=s as relational Element of S;
ss-compound | (|.ar ss.|-tuples_on A) is AF-valued; then
rng f c= AF by RELAT_1:def 19; then reconsider
ff=f as Function of (n-tuples_on A), AF by RELSET_1:6;
reconsider g=chi(X,AF) as Function of AF,BOOLEAN;
g*ff is Function of n-tuples_on A,BOOLEAN; then
XF is Function of n-tuples_on A, BOOLEAN by A1, Def3;
hence thesis by A1, FOMODEL2:def 2;
end;
suppose A2: not s is relational; then reconsider
ss=s as non relational ofAtomicFormula Element of S;
ss-compound | (|.ar ss.|-tuples_on A) is A-valued; then rng f c= A by
RELAT_1:def 19; then f is Function of n-tuples_on A, A by RELSET_1:6;
then XF is Function of n-tuples_on A, A by A2, Def3;
hence thesis by A2, FOMODEL2:def 2;
end;
end;
end;

definition
let S,X;
func (S,X)-freeInterpreter -> Function means :Def4:
dom it=OwnSymbolsOf S &
for s being own Element of S holds it.s=X-freeInterpreter(s);
existence
proof
set O=OwnSymbolsOf S, SS=AllSymbolsOf S;
defpred P[object,object] means
  for s being own Element of S st $1=s holds $2=X-freeInterpreter(s);
A1: for x,y1,y2 being object st x in O & P[x,y1] & P[x,y2] holds y1=y2
proof
let x,y1,y2 be object; assume x in O; then
reconsider s=x as own Element of S by FOMODEL1:def 19;
assume P[x,y1]; then A2: y1=X-freeInterpreter(s); assume P[x,y2];
hence thesis by A2;
end;
A3: for x being object st x in O ex y being object st P[x,y]
proof
let x be object; assume x in O; then reconsider s=x as own Element of S
by FOMODEL1:def 19; take yy=X-freeInterpreter(s);
thus for ss being own Element of S st x=ss holds yy=X-freeInterpreter(ss);
end;
consider f being Function such that A4: dom f=O &
for x being object st x in O holds P[x,f.x] from FUNCT_1:sch 2(A1,A3);
take f; thus dom f=O by A4;
thus for s being own Element of S holds f.s=X-freeInterpreter(s)
by A4,FOMODEL1:def 19;
end;
uniqueness
proof
set O=OwnSymbolsOf S, SS=AllSymbolsOf S; let IT1,IT2 be Function;
assume A5: dom IT1=O & for s being own Element of S holds
IT1.s=X-freeInterpreter(s);
assume A6: dom IT2=O & for s being own Element of S holds
IT2.s=X-freeInterpreter(s);
now
thus dom IT1 = dom IT2 by A5, A6;
 let x be object; assume x in dom IT1; then
reconsider s=x as own Element of S by FOMODEL1:def 19, A5;
IT1.s=X-freeInterpreter(s) by A5 .= IT2.s by A6; hence IT1.x=IT2.x;
end;
hence thesis by FUNCT_1:2;
end;
end;

registration
let S,X;
cluster (S,X)-freeInterpreter -> Function-yielding for Function;
coherence
proof
set O=OwnSymbolsOf S, IT=(S,X)-freeInterpreter;
now
let x be object; assume x in dom IT; then x in O by Def4;
then reconsider
s=x as own Element of S by FOMODEL1:def 19;
X-freeInterpreter(s) is Function; hence IT.x is Function by Def4;
end;
hence thesis by FUNCOP_1:def 6;
end;
end;

definition
let S,X;
redefine func (S,X)-freeInterpreter -> Interpreter of S,AllTermsOf S;
coherence
proof
set IT=(S,X)-freeInterpreter, A=AllTermsOf S;
for s being own Element of S holds IT.s is Interpreter of s,A
proof
let s be own Element of S;
X-freeInterpreter(s) is Interpreter of s,A;
hence thesis by Def4;
end;
hence thesis by FOMODEL2:def 3;
end;
end;

registration
let S,X;
cluster (S,X)-freeInterpreter ->
(S,AllTermsOf S)-interpreter-like for Function;
coherence;
end;

definition
let S,X;
redefine func (S,X)-freeInterpreter ->
Element of (AllTermsOf S)-InterpretersOf S;
coherence
proof
set f=(S,X)-freeInterpreter, U=AllTermsOf S, O=OwnSymbolsOf S;
dom f c= O by Def4; then f|O = f by RELAT_1:68;
hence thesis by FOMODEL2:2;
end;
end;

definition
let X,Y be non empty set; let R be Relation of X,Y; let n be Nat;
func n-placesOf R -> Relation of n-tuples_on X,n-tuples_on Y
equals
{[p,q] where p is Element of n-tuples_on X, q is Element of n-tuples_on Y
: for j being set st j in Seg n holds [p.j,q.j] in R};
coherence
proof
set Xn= n-tuples_on X,  Yn= n-tuples_on Y, IT=
{[p,q] where p is Element of n-tuples_on X, q is Element of n-tuples_on Y
: for j being set st j in Seg n holds [p.j,q.j] in R};
now
let x be object;
assume  x in IT;
then consider p being Element of Xn, q being Element of Yn such that
A1: x=[p,q] & for j being set st j in Seg n holds [p.j , q.j] in R;
thus x in [: Xn, Yn :] by A1;
end;
hence thesis by TARSKI:def 3;
end;
end;

Lm4: for n being zero Nat, X,Y being non empty set,
R being Relation of X,Y holds n-placesOf R={[{},{}]}
proof
let n be zero Nat;
let X,Y be non empty set;
let R be Relation of X,Y;
set RR=n-placesOf R;
A1: [:n-tuples_on X, n-tuples_on Y:] =
[:{{}},0-tuples_on Y:] by FOMODEL0:10 .= [:{{}},{{}}:] by FOMODEL0:10 .=
{[{},{}]} by ZFMISC_1:29;
{} in {{}} by TARSKI:def 1; then
reconsider p={} as Element of n-tuples_on X by FOMODEL0:10;
{} in {{}} by TARSKI:def 1; then
reconsider q={} as Element of n-tuples_on Y by FOMODEL0:10;
for j being set st j in Seg 0 holds [p.j,q.j] in R;
then [p,q] in RR; then {[{},{}]} c= RR by ZFMISC_1:31;
hence RR={[{},{}]} by A1;
end;

registration
let X,Y be non empty set;
let R be total Relation of X,Y;
let n be non zero Nat;
cluster n-placesOf R -> total for Relation of n-tuples_on X,n-tuples_on Y;
coherence
proof
set RR=n-placesOf R, XX=n-tuples_on X;
A1: dom R=X by PARTFUN1:def 2;
reconsider nn=n as Element of NAT by ORDINAL1:def 12;
now
let x be object; assume x in XX; then reconsider xx=x as Element of XX;
reconsider xxx=xx as Element of Funcs(Seg n, X) by FOMODEL0:11;
defpred P[set,set] means [xx.$1,$2] in R;
A2: for m st m in Seg n ex d being Element of Y st P[m,d]
proof
let m; assume m in Seg n; then reconsider mm=m as Element of Seg n;
xxx.mm in dom R by A1; then
consider y being object such that
A3: [xx.m,y] in R by XTUPLE_0:def 12;
reconsider yy=y as Element of Y by ZFMISC_1:87, A3;
take yy; thus thesis by A3;
end;
consider f being FinSequence of Y such that A4: len f=n & for m st m in
Seg n holds P[m,f/.m] from FINSEQ_4:sch 1(A2);
reconsider ff=f as Element of nn-tuples_on Y by FINSEQ_2:133, A4;
reconsider fff=ff as Element of Funcs( Seg nn, Y) by FOMODEL0:11;
A5: dom fff=Seg nn by FUNCT_2:def 1;
now
let j be set; assume A6: j in Seg n; then
reconsider jj=j as Element of NAT;
jj in dom ff & P[jj,f/.jj] by A6, A4, A5;
hence [xx.j,ff.j] in R by PARTFUN1:def 6;
end;
then [xx,ff] in RR; hence x in dom RR by XTUPLE_0:def 12;
end;
then XX c= dom RR & dom RR c= XX by TARSKI:def 3;
hence thesis by PARTFUN1:def 2, XBOOLE_0:def 10;
end;
end;

registration
let X,Y be non empty set;
let R be total Relation of X,Y;
let n be Nat;
cluster n-placesOf R -> total for Relation of n-tuples_on X,n-tuples_on Y;
coherence
proof
set RR=n-placesOf R;
per cases;
suppose n is non zero; then reconsider nn=n as non zero Nat;
nn-placesOf R is total; hence thesis;
end;
suppose n is zero; then reconsider nn=n as zero Nat;
nn-placesOf R = {[{},{}]} by Lm4; then dom RR={{}} by RELAT_1:9 .=
nn-tuples_on X by FOMODEL0:10;
hence thesis by PARTFUN1:def 2;
end;
end;
end;

registration
let X,Y be non empty set; let R be Relation of X,Y; let n be zero Nat;
cluster n-placesOf R -> Function-like for
Relation of n-tuples_on X, n-tuples_on Y;
coherence
proof
set IT=n-placesOf R;
reconsider f={[{},{}]} as Function;
now
let x be object;
assume x in IT; then consider p being Element of n-tuples_on
X, q being Element of n-tuples_on Y such that A1: x=[p,q] & for j being set
st j in Seg n holds [p.j,q.j] in R; p={} & q={};
hence x in f by TARSKI:def 1, A1;
end;
then reconsider ITT=IT as Subset of f by TARSKI:def 3;
ITT is Function-like; hence thesis;
end;
end;

definition
let X be non empty set; let R be Relation of X; let n be Nat;
func n-placesOf R -> Relation of n-tuples_on X equals n-placesOf (R qua
Relation of X,X);
coherence;
end;

definition
let X be non empty set; let R be Relation of X; let n be zero Nat;
redefine func n-placesOf R -> Relation of n-tuples_on X equals
{[{},{}]};
coherence;
compatibility by Lm4;
end;

Lm5: for n being non zero Nat, X being non empty set,
x,y being Element of Funcs (Seg n, X), R being Relation of X holds
([x,y] in n-placesOf R iff for j being Element of Seg n holds [x.j,y.j] in R)
proof
let n be non zero Nat, X be non empty set, x,y being Element of Funcs (Seg n
,X), R be Relation of X;
reconsider xa=x as Element of n-tuples_on X by FINSEQ_2:93;
reconsider ya=y as Element of n-tuples_on X by FINSEQ_2:93;
thus [x,y] in n-placesOf R implies
for j being Element of Seg n holds [x.j,y.j] in R
proof
assume [x,y] in (n-placesOf R);
then consider p,q being Element of n-tuples_on X such that A1:
[x,y]=[p,q] & for j being set st j in Seg n holds [p.j,q.j] in R;
x=p & y=q by A1, XTUPLE_0:1;
hence thesis by A1;
end;
thus (for j being Element of Seg n holds [x.j,y.j] in R) implies
[x,y] in n-placesOf R
proof
assume for j being Element of Seg n holds [x.j, y.j] in R;
then for j being set st j in Seg n holds [xa.j, ya.j] in R;
hence thesis;
end;
end;

Lm6:for n being non zero Nat, X being non empty set,
r being total symmetric Relation of X holds
(n-placesOf r) is symmetric total Relation of n-tuples_on X
proof
let n be non zero Nat, X be non empty set,
r be total symmetric Relation of X;
A1: field r = X by ORDERS_1:12; set R=n-placesOf r;
A2: field R = n-tuples_on X by ORDERS_1:12;
now
let x,y be object;
assume x in n-tuples_on X;
then reconsider xa=x as Element of Funcs (Seg n, X) by FINSEQ_2:93;
assume y in n-tuples_on X;
then reconsider ya=y as Element of Funcs (Seg n, X) by FINSEQ_2:93;
assume
A3: [x,y] in R;
now
let j be Element of Seg n;
xa.j in X & ya.j in X & [xa.j, ya.j] in r by Lm5,A3;
hence [ya.j, xa.j] in r by RELAT_2:def 11, A1, RELAT_2:def 3;
end;
hence [y,x] in R by Lm5;
end;
hence thesis by RELAT_2:def 3, def 11, A2;
end;

Lm7:for n being non zero Nat, X being non empty set,
r being transitive total Relation of X holds
(n-placesOf r) is
transitive total Relation of n-tuples_on X
proof
let n be non zero Nat, X be non empty set,
r be transitive total Relation of X;
A1: field r = X by ORDERS_1:12; set R=n-placesOf r;
A2: field R = n-tuples_on X by ORDERS_1:12;
now
let x,y,z be object;
assume x in n-tuples_on X;
then reconsider xa=x as Element of Funcs (Seg n, X) by FINSEQ_2:93;
assume y in n-tuples_on X;
then reconsider ya=y as Element of Funcs (Seg n, X) by FINSEQ_2:93;
assume z in n-tuples_on X;
then reconsider za=z as Element of Funcs (Seg n, X) by FINSEQ_2:93;
assume A3: [x,y] in R;
assume A4: [y,z] in R;
now
let j be Element of Seg n;
xa.j in X & ya.j in X & za.j in X & [xa.j, ya.j] in r &
[ya.j, za.j] in r by Lm5,A3,A4;
hence [xa.j, za.j] in r by A1, RELAT_2:def 8, def 16;
end;
hence [x,z] in R by Lm5;
end;
hence thesis by RELAT_2:def 8, def 16, A2;
end;

Lm8:for n being zero Nat, X being non empty set, r being Relation of X holds
(n-placesOf r) is
total symmetric transitive
proof
let n be zero Nat;
let X be non empty set;
let r be Relation of X;
set R=n-placesOf r;
 now
let x be object;
assume x in n-tuples_on X;
then x = {};
then [x,x] in R by TARSKI:def 1;
hence ex y being object st [x,y] in R;
end; then
dom R = n-tuples_on X by RELSET_1:9;
hence R is total by PARTFUN1:def 2;
  then
A1: field R = n-tuples_on X by ORDERS_1:12;
 thus R is symmetric
 proof let x,y be object;
assume x in field R;
then A2: x={} by A1;
assume y in field R;
then A3: y={} by A1;
assume [x,y] in R;
thus [y,x] in R by TARSKI:def 1,A2,A3;
end;
A4: for x,y,z being object st x in n-tuples_on X & y in n-tuples_on X &
z in n-tuples_on X & [x,y] in R & [y,z] in R holds [x,z] in R;
thus thesis by A4,
A1,RELAT_2:def 8;
end;

registration
let X be non empty set; let R be symmetric total Relation of X; let n;
cluster n-placesOf R -> total for Relation of n-tuples_on X;
coherence;
end;

registration
let X be non empty set; let R be symmetric total Relation of X; let n;
cluster n-placesOf R -> symmetric for Relation of n-tuples_on X;
coherence
proof
per cases;
suppose n is zero; hence thesis by Lm8; end;
suppose not n is zero; hence thesis by Lm6; end;
end;
end;

registration
let X be non empty set; let R be symmetric total Relation of X; let n;
cluster n-placesOf R -> symmetric for total Relation of n-tuples_on X;
coherence;
end;

registration
let X be non empty set; let R be transitive total Relation of X; let n;
cluster n-placesOf R -> transitive for total Relation of n-tuples_on X;
coherence
proof
per cases;
suppose n is zero; hence thesis by Lm8; end;
suppose not n is zero; hence thesis by Lm7; end;
end;
end;

registration
let X be non empty set; let R be Equivalence_Relation of X; let n;
cluster n-placesOf R -> total for
symmetric transitive Relation of n-tuples_on X;
coherence;
end;

definition
let X,Y be non empty set; let E be Equivalence_Relation of X;
let F be Equivalence_Relation of Y; let R be Relation;
func R quotient (E,F) -> set equals
{[e,f] where e is Element of Class E, f is Element of Class F:
ex x, y being set st x in e & y in f & [x,y] in R};
coherence;
end;

definition
let X,Y be non empty set; let E be Equivalence_Relation of X;
let F be Equivalence_Relation of Y; let R be Relation;
redefine func R quotient (E,F) -> Relation of Class E, Class F;
coherence
proof
set IT=R quotient (E,F);
now
let x be object; assume x in IT; then consider e being Element of Class E,
f being Element of Class F such that A1: x=[e,f] &
ex x, y being set st x in e & y in f & [x,y] in R;
thus x in [: Class E, Class F :] by A1;
end;
hence thesis by TARSKI:def 3;
end;
end;

definition ::# cfr Congruence definition in alg_1
let E be Relation; let F be Relation; let f be Function;
attr f is (E,F)-respecting means :Def9:
for x1,x2 being set holds
([x1,x2] in E) implies [f.x1, f.x2] in F;
end;

definition
let S,U; let s be ofAtomicFormula Element of S;
let E be Relation of U; let f be Interpreter of s,U;
attr f is E-respecting means :Def10:
f is ((|.ar s.|)-placesOf E, E)-respecting if s is not relational
otherwise f is ((|.ar s.|)-placesOf E, id BOOLEAN)-respecting;
consistency;
end;

registration
let X,Y be non empty set; let E be Equivalence_Relation of X;
let F be Equivalence_Relation of Y;
cluster (E,F)-respecting for Function of X,Y;
existence
proof
consider y being object such that
A1: y in Y by XBOOLE_0:7; set R = X --> y;
{y} c= Y & dom R=X & rng R c= {y} by  ZFMISC_1:31, A1;
then reconsider f = R as Function of X, Y by FUNCT_2:2;
now
let x1, x2 be set;
assume [x1, x2] in E; then
x1 in X & x2 in X by ZFMISC_1:87; then
A2: f.x1=y & f.x2=y by FUNCOP_1:7;
thus [f.x1, f.x2] in F by A2, A1, EQREL_1:5;
end;
then f is (E,F)-respecting; hence thesis;
end;
end;

registration
let S,U; let s be ofAtomicFormula Element of S;
let E be Equivalence_Relation of U;
cluster E-respecting for Interpreter of s,U;
existence
proof
set n=|.ar s.|;
reconsider EE=n-placesOf E as Equivalence_Relation of n-tuples_on U;
set f = the (n-placesOf E,E)-respecting Function of n-tuples_on U,U;
set g = the
(n-placesOf E,id BOOLEAN)-respecting Function of n-tuples_on U, BOOLEAN;
per cases;
suppose A1:s is relational;
then reconsider gg=g as Interpreter of s, U by FOMODEL2:def 2;
gg is E-respecting by Def10, A1;
hence thesis;
end;
suppose A2: not s is relational; then reconsider ff=f as Interpreter of s,U by
FOMODEL2:def 2;
ff is E-respecting by Def10, A2; hence thesis; end;
end;
end;

registration
let X,Y be non empty set; let E be Equivalence_Relation of X;
let F be Equivalence_Relation of Y;
cluster (E,F)-respecting for Function;
existence
proof take the (E,F)-respecting Function of X,Y; thus thesis; end;
end;

definition
let X be non empty set; let E be Equivalence_Relation of X; let n;
redefine func n-placesOf E -> Equivalence_Relation of n-tuples_on X;
coherence;
end;

definition
let X be non empty set, x be Element of SmallestPartition X;
func DeTrivial(x) -> Element of X means :Def11: x={it};
existence
proof
set XX=SmallestPartition X; consider y being object such that
A1: x={y} & y in X by RELSET_2:1;
reconsider yy=y as Element of X by A1; take yy; thus thesis by A1;
end;
uniqueness by ZFMISC_1:3;
end;

definition
let X be non empty set;
func peeler(X) -> Function of SmallestPartition X,X means :Def12:
for x being Element of SmallestPartition X holds it.x=DeTrivial(x);
existence
proof
deffunc F(Element of SmallestPartition X)=DeTrivial($1);
consider f being Function of SmallestPartition X, X such that A1:
for x being Element of SmallestPartition X holds f.x=F(x)
  from FUNCT_2:sch 4;
take f; thus thesis by A1;
end;
uniqueness
proof
let IT1,IT2 be Function of SmallestPartition X,X;
assume that A2: for x being Element of SmallestPartition X holds
IT1.x=DeTrivial(x)
and A3: for x being Element of SmallestPartition X holds
IT2.x=DeTrivial(x);
now
let x be Element of SmallestPartition X;
thus IT1.x=DeTrivial(x) by A2 .= IT2.x by A3;
end;
hence thesis by FUNCT_2:63;
end;
end;

registration
let X be non empty set, EqR be Equivalence_Relation of X;
cluster -> non empty for Element of Class EqR;
coherence;
end;

Lm9: for X being non empty set, E being Equivalence_Relation of X,
x,y being set, C being Element of Class E st x in C & y in C holds [x,y] in E
proof
let X be non empty set, E be Equivalence_Relation of X, x,y be set,
C be Element of Class E; assume A1: x in C & y in C;
reconsider EE=E as transitive Tolerance of X;
consider xe being object such that
A2: xe in X & C=Class(E,xe) by EQREL_1:def 3;
thus thesis by EQREL_1:22, A1, A2;
end;

Lm10: for X being non empty set, E being Equivalence_Relation of X,
C1, C2 being Element of Class E, x1,x2 being set st x1 in C1 & x2 in C2 &
[x1,x2] in E holds C1=C2
proof
let X being non empty set, E being Equivalence_Relation of X,
C1, C2 being Element of Class E, x1,x2 being set;
reconsider EE=E as Tolerance of X;
assume A1: x1 in C1; then reconsider x11=x1 as Element of X;
x11 in X; then x1 in Class(EE,x1) by EQREL_1:20; then
A2: C1=EqClass(E,x11) by EQREL_1:def 4, A1, XBOOLE_0:3;
assume A3: x2 in C2; then reconsider x22=x2 as Element of X;
x22 in X; then x2 in Class(EE,x2) by EQREL_1:20; then
A4: C2=EqClass(E,x22)
by EQREL_1:def 4, A3, XBOOLE_0:3;
assume [x1,x2] in E;
hence thesis by A2, A4, EQREL_1:35;
end;

registration
let X,Y be non empty set; let E be Equivalence_Relation of X;
let F be Equivalence_Relation of Y; let f be (E,F)-respecting Function;
cluster f quotient (E,F) -> Function-like for Relation;
coherence
proof
set IT=f quotient (E,F);
reconsider P=Class E as a_partition of X;
reconsider EEE=E as Relation of X,X;
now
let e,f1,f2 be object; assume [e,f1] in IT; then consider
ee1 being Element of Class E, ff1 being Element of Class F such that A1:
[e,f1]=[ee1,ff1] & ex x1,y1 being set st
x1 in ee1 & y1 in ff1 & [x1,y1] in f;
consider x1,y1 being set such that
A2: x1 in ee1 & y1 in ff1 & [x1,y1] in f by A1;
assume [e,f2] in IT; then consider
ee2 being Element of Class E, ff2 being Element of Class F such that A3:
[e,f2]=[ee2,ff2] & ex x2,y2 being set st
x2 in ee2 & y2 in ff2 & [x2,y2] in f;
A4: ee1=e & ee2=e & ff1=f1 & ff2=f2 by A1, A3, XTUPLE_0:1;
consider x2,y2 being set such that
A5: x2 in ee2 & y2 in ff2 & [x2,y2] in f by A3;
A6: [x1,x2] in E by Lm9, A2, A5, A4;
y2=f.x2 & y1=f.x1 by A5, A2, FUNCT_1:1; then
[y1,y2] in F by Def9, A6;
hence f1=f2 by A4, A2, A5, Lm10;
end;
hence thesis by FUNCT_1:def 1;
end;
end;

registration
let X,Y be non empty set; let E be Equivalence_Relation of X;
let F be Equivalence_Relation of Y; let R be total Relation of X,Y;
cluster R quotient (E,F) -> total for Relation of Class E, Class F;
coherence
proof
set RR=R quotient (E,F);
reconsider Q=Class F as a_partition of Y;
now
let e be object;
 reconsider ee=e as set by TARSKI:1;
assume e in Class E; then
reconsider ee=e as Element of Class E;
set xx = the Element of ee; reconsider x=xx as Element of X;
dom R=X by PARTFUN1:def 2; then consider y being object such that
A1:[x,y] in R by XTUPLE_0:def 12;
reconsider yy=y as Element of Y by ZFMISC_1:87, A1;
reconsider f=EqClass(yy,Q) as Element of Class F;
[e,f]=[e,f] & x in ee & y in f & [x,y] in R by A1, EQREL_1:def 6;
then [e,f] in RR; hence e in dom RR by XTUPLE_0:def 12;
end;
then Class E c= dom RR by TARSKI:def 3;
hence thesis by PARTFUN1:def 2, XBOOLE_0:def 10;
end;
end;

definition
let X,Y be non empty set; let E be Equivalence_Relation of X;
let F be Equivalence_Relation of Y;
let f be (E,F)-respecting Function of X,Y;
redefine func f quotient (E,F) -> Function of Class E, Class F;
coherence proof thus f quotient (E,F) is Function of Class E, Class F; end;
end;

definition
let X be non empty set, E be Equivalence_Relation of X;
func E-class -> Function of X,Class E means :Def13:
for x being Element of X holds it.x=EqClass(E,x);
existence
proof
deffunc F(Element of X)=EqClass(E,$1);
consider f being Function of X, Class E such that A1:
for x being Element of X holds f.x=F(x) from FUNCT_2:sch 4;
take f; thus thesis by A1;
end;
uniqueness
proof
let IT1,IT2 be Function of X, Class E;
assume A2: for x being Element of X holds IT1.x=EqClass(E,x);
assume A3: for x being Element of X holds IT2.x=EqClass(E,x);
now
let x be Element of X; thus IT1.x=EqClass(E,x) by A2 .= IT2.x by A3;
end;
hence thesis by FUNCT_2:63;
end;
end;

registration
let X be non empty set, E be Equivalence_Relation of X;
cluster E-class -> onto for Function of X, Class E;
coherence
proof
set P=E-class;
now
let c be object; assume A1: c in Class E; then
reconsider cc=c as Subset of X; consider x being object such that
A2:x in X & cc=Class(E,x) by EQREL_1:def 3, A1;
reconsider xx=x as Element of X by A2; P.xx=cc by A2, Def13;
hence c in rng P by FUNCT_2:4;
end; then
Class E c= rng P & rng P c= Class E by RELAT_1:def 19, TARSKI:def 3;
hence thesis by FUNCT_2:def 3, XBOOLE_0:def 10;
end;
end;

registration
let X,Y be non empty set;
cluster onto for Relation of X,Y;
existence
proof
[:X,Y:] c= [:X,Y:]; then
reconsider R=[:X,Y:] as Relation of X,Y;rng R = Y;
then R is onto by FUNCT_2:def 3; hence thesis;
end;
end;

registration
let Y be non empty set;
cluster onto for Y-valued Relation;
existence
proof take the onto Relation of Y,Y; thus thesis; end;
end;

registration
let Y be non empty set, R be Y-valued Relation;
cluster R~ -> Y-defined for Relation;
coherence
proof
rng R c= Y & dom (R~)=rng R by RELAT_1:20; hence thesis by RELAT_1:def 18;
end;
end;

registration
let Y be non empty set, R be onto Y-valued Relation;
cluster R~ -> total for Y-defined Relation;
coherence
proof
dom(R~)=rng R by RELAT_1:20 .= Y by FUNCT_2:def 3;
hence thesis by PARTFUN1:def 2;
end;
end;

registration
let X,Y be non empty set, R be onto Relation of X,Y;
cluster R~ -> total for Relation of Y,X;
coherence;
end;

registration
let Y be non empty set; let R be onto Y-valued Relation;
cluster R~ -> total for Y-defined Relation;
coherence;
end;

Lm11: for E being Equivalence_Relation of U, n being non zero Nat holds
n-placesOf((E-class qua Relation of U, Class E)~)*((n-placesOf E)-class) is
Function-like
proof
let E be Equivalence_Relation of U, n be non zero Nat;
set En=n-placesOf E;
reconsider f1=E-class as Function of U,Class E;
reconsider r1=E-class as Relation of U,Class E;
reconsider r2=r1~ as Relation of Class E,U; reconsider
r3=n-placesOf r2 as Relation of n-tuples_on (Class E), n-tuples_on U;
reconsider f4=En-class as Function of n-tuples_on U, Class (n-placesOf E);
reconsider r4=f4 as Relation of n-tuples_on U, Class (n-placesOf E);
now
let x,z1,z2 be object; assume
A1: [x,z1] in r3*r4 & [x,z2] in r3*r4; consider y1 being object such that
A2: [x,y1] in r3 & [y1,z1] in r4 by A1, RELAT_1:def 8;
consider y2 being object such that
A3: [x,y2] in r3 & [y2,z2] in r4 by A1, RELAT_1:def 8;
A4: f4.y1=z1 & f4.y2=z2 by FUNCT_1:1, A2, A3;
reconsider y11=y1, y22=y2 as Element of n-tuples_on U by ZFMISC_1:87, A2, A3;
consider
p1 being Element of n-tuples_on (Class E), q1 being Element of n-tuples_on U
such that A5: [x,y1]=[p1,q1] &
for j being set st j in Seg n holds [p1.j,q1.j] in r2 by A2;
consider
p2 being Element of n-tuples_on (Class E), q2 being Element of n-tuples_on U
such that A6: [x,y2]=[p2,q2] &
for j being set st j in Seg n holds [p2.j,q2.j] in r2 by A3;
A7: x=p1 & y1=q1 & x=p2 & y2=q2 by XTUPLE_0:1, A5,A6;
reconsider q11=q1 as Element of Funcs(Seg n, U) by FOMODEL0:11;
reconsider q22=q2 as Element of Funcs(Seg n, U) by FOMODEL0:11;
now
let j be set; assume A8: j in Seg n;
then reconsider jj=j as Element of Seg n;
[p1.j, q1.j] in r2 &
[p2.j, q2.j] in r2 by A5, A6,A8; then
[q1.j, p1.j] in f1 &
[q2.j, p2.j] in f1 by RELAT_1:def 7;
then f1.(q1.jj)=p1.jj & f1.(q2.jj)=p2.jj by FUNCT_1:1; then
Class (E,q11.jj)=p1.jj & Class(E,q22.jj)=p2.jj by Def13;
hence [q1.j, q2.j] in E by A7, EQREL_1:35;
end; then
A9: [y1,y2] in n-placesOf E by A7;
En-class.y11=Class(En,y11) & En-class.y22=Class(En,y22) by Def13;
hence z1=z2 by A9, EQREL_1:35, A4;
end;
hence thesis by FUNCT_1:def 1;
end;

definition
let U,n; let E be Equivalence_Relation of U;
func n-tuple2Class E
-> Relation of n-tuples_on (Class E), Class (n-placesOf E) equals
n-placesOf ((E-class qua Relation of U, Class E)~)*((n-placesOf E)-class);
coherence;
end;

registration
let U,n; let E be Equivalence_Relation of U;
cluster n-tuple2Class E -> Function-like for
Relation of n-tuples_on (Class E), Class (n-placesOf E);
coherence
proof
per cases;
suppose n is non zero; hence thesis by Lm11; end;
suppose n is zero; then reconsider m=n as zero Nat;
set En=n-placesOf E;
reconsider f1=E-class as Function of U,Class E;
reconsider r1=E-class as Relation of U,Class E;
reconsider r2=r1~ as Relation of Class E,U; reconsider
f3=m-placesOf r2 as PartFunc of m-tuples_on (Class E), m-tuples_on U;
reconsider f4=En-class as Function of n-tuples_on U, Class (n-placesOf E);
f3*f4 is Function-like; hence thesis;
end;
end;
end;

registration
let U,n; let E be Equivalence_Relation of U;
cluster n-tuple2Class E -> total for Relation of n-tuples_on (Class E),
Class (n-placesOf E);
coherence;
end;

definition
let U,n; let E be Equivalence_Relation of U;
redefine func n-tuple2Class E ->
Function of n-tuples_on (Class E), Class (n-placesOf E);
coherence;
end;

definition
let S,U; let s be ofAtomicFormula Element of S;
let E be Equivalence_Relation of U; let f be Interpreter of s,U;
func f quotient E -> set equals :Def15:
 ((|.ar s.|)-tuple2Class E) *
(f quotient ((|.ar s.|)-placesOf E,E))
if not s is relational otherwise
((|.ar s.|)-tuple2Class E) *
(f quotient ((|.ar s.|)-placesOf E, id BOOLEAN))*(peeler(BOOLEAN));
::# Notice how f not being granted compatible, the quotient of f is
::# typed as a Relation here, so * is between Relations.
coherence;
consistency;
end;

definition
let S,U; let s be ofAtomicFormula Element of S; let E be
Equivalence_Relation of U; let f be E-respecting Interpreter of s,U;
redefine func f quotient E -> Interpreter of s,Class E;
coherence
proof
set n=|.ar s.|, D=n-tuples_on U, h=n-tuple2Class E, IT=f quotient E;
reconsider EE=n-placesOf E as Equivalence_Relation of D;
reconsider hr=h as Relation;
per cases;
suppose A1: not s is relational;
then reconsider g=f as
(EE,E)-respecting Function of D, U by Def10, FOMODEL2:def 2;
reconsider e=g quotient (EE,E) as Function of Class EE, Class E;
reconsider er=e as Relation;
reconsider gr=g as Relation;
IT = e*h by Def15, A1;
hence thesis by A1, FOMODEL2:def 2;
end;
suppose
A2: s is relational; then reconsider g=f as (EE,id BOOLEAN)-respecting
Function of D,BOOLEAN by Def10, FOMODEL2:def 2;
reconsider pr=peeler(BOOLEAN) as Relation; reconsider
e=g quotient (EE,id BOOLEAN) as Function of Class EE,{_{BOOLEAN}_};
reconsider er=e as Relation; reconsider gr=g as Relation;
IT = peeler(BOOLEAN)*(e*h) by A2,Def15;
hence thesis by A2, FOMODEL2:def 2;
end;
end;
end;

theorem for X being non empty set, E being Equivalence_Relation of X,
C1, C2 being Element of Class E st C1 meets C2 holds C1=C2 by EQREL_1:def 4;

registration
let S;
cluster -> own for Element of (OwnSymbolsOf S);
coherence;
cluster -> ofAtomicFormula for Element of (OwnSymbolsOf S);
coherence;
end;

registration
let S, U; let o be non relational ofAtomicFormula Element of S;
let E be Relation of U;
cluster E-respecting -> ((|.ar o.|)-placesOf E, E)-respecting for
Interpreter of o, U;
coherence by Def10;
end;

registration
let S, U; let r be relational Element of S; let E be Relation of U;
cluster E-respecting -> ((|.ar r.|)-placesOf E, id BOOLEAN)-respecting
for Interpreter of r, U;
coherence by Def10;
end;

registration
let n; let U1, U2 be non empty set;
let f be Function-like (Relation of U1, U2);
cluster n-placesOf f -> Function-like for Relation;
coherence
proof
set IT=n-placesOf f;
per cases;
suppose n=0; hence thesis; end;
suppose n<>0; then reconsider n as non zero Nat;
now
let x, y1, y2 be object; assume [x,y1] in IT; then consider p1 being
Element of n-tuples_on U1, q1 being Element of n-tuples_on U2 such that
A1: [x,y1]=[p1,q1] & for j being set st j in Seg n holds [p1.j,q1.j] in f;
assume [x,y2] in IT; then consider p2 being
Element of n-tuples_on U1, q2 being Element of n-tuples_on U2 such that
A2: [x,y2]=[p2,q2] & for j being set st j in Seg n holds [p2.j,q2.j] in f;
A3: x=p1 & y1=q1 & x=p2 & y2=q2 by A1, A2 ,XTUPLE_0:1;
reconsider xx=x as Function by A2, XTUPLE_0:1;
reconsider qq1=q1, qq2=q2 as Element of Funcs(Seg n, U2) by FOMODEL0:11;
now
let j be Element of Seg n;
[xx.j,q1.j] in f & [xx.j,q2.j] in f by A1, A2, A3;
hence qq1.j=qq2.j by FUNCT_1:def 1;
end;
hence y1=y2 by A3, FUNCT_2:63;
end;
hence thesis by FUNCT_1:def 1;
end;
end;
end;

registration
let U1, U2; let n be zero Nat, R be Relation of U1, U2;
cluster (n-placesOf R) \+\ (id {{}}) -> empty for set;
coherence
proof
set A={[{},{}]}; A\+\(id {{}})={} & n-placesOf R=A by Lm4; hence thesis;
end;
end;

registration
::# this is automatic thanks to
::# cluster -> functional Subset of (functional set) registration in FUNCT_1;
let X; let Y be functional set;
cluster X/\Y -> functional for set;
coherence;
end;

theorem for V being Element of (AllTermsOf S)* ex mm being
Element of NAT st V is Element of (S-termsOfMaxDepth.mm)* by Lm3;

definition
let S,U; let E be Equivalence_Relation of U;
let I be (S,U)-interpreter-like Function;
attr I is E-respecting means :Def16: for s being
own Element of S holds (I.s) qua Interpreter of s,U is E-respecting;
end;

definition
let S,U; let E be Equivalence_Relation of U;
let I be (S,U)-interpreter-like Function;
func I quotient E -> Function means :Def17:
dom it=OwnSymbolsOf S & for o being Element of OwnSymbolsOf S holds
it.o = (I.o) quotient E;
existence
proof
set O=OwnSymbolsOf S, AT=AllTermsOf S;
deffunc F(Element of O)=(I.$1) quotient E;
consider f be Function such that
A1: dom f = O & for d be Element of O holds f.d = F(d) from FUNCT_1:sch 4;
take f; thus dom f=O & for o being Element of O holds f.o=I.o quotient E
by A1;
end;
uniqueness
proof
set O=OwnSymbolsOf S, AT=AllTermsOf S; let IT1, IT2 be Function;
deffunc F(Element of O)=I.$1 quotient E; assume
A2: dom IT1=O & for o being Element of O holds IT1.o =F(o); assume
A3: dom IT2=O & for o being Element of O holds IT2.o =F(o);
dom IT1= dom IT2 & for x being object st x in dom IT1 holds IT1.x=IT2.x
proof
thus dom IT1 = dom IT2 by A2, A3;
let x be object; assume x in dom IT1; then
reconsider o=x as Element of O by A2; IT1.o=F(o) by A2 .= IT2.o by A3;
hence thesis;
end;
hence thesis by FUNCT_1:2;
end;
end;

definition
let S,U; let E be Equivalence_Relation of U;
let I be (S,U)-interpreter-like Function;
redefine func I quotient E  means :Def18:
dom it=OwnSymbolsOf S & for o being own Element of S holds
it.o = (I.o) quotient E;
compatibility
proof
set O=OwnSymbolsOf S, IT0=I quotient E;
defpred P[Function] means dom $1=O & for o being own Element of S holds
$1.o=(I.o) quotient E; let IT be Function;
thus IT=IT0 implies P[IT]
proof
assume A1: IT=IT0; hence dom IT=O by Def17;
now
let o be own Element of S; reconsider oo=o as Element of O by FOMODEL1:def 19;
IT0.oo=(I.oo) quotient E by Def17; hence IT.o=(I.o) quotient E by A1;
end;
hence thesis;
end;
assume A2: P[IT];
for o being Element of O holds IT.o=(I.o) quotient E by A2;
hence IT=IT0 by A2, Def17;
end;
end;

registration
let S,U; let I be (S,U)-interpreter-like Function;
let E be Equivalence_Relation of U;
cluster I quotient E -> (OwnSymbolsOf S)-defined;
coherence
proof
set II=I quotient E, O=OwnSymbolsOf S; dom II c= O
by Def17; hence thesis by RELAT_1:def 18;
end;
end;

registration
let S,U; let E be Equivalence_Relation of U;
cluster E-respecting for Element of U-InterpretersOf S;
existence
proof
set O=OwnSymbolsOf S, C=PFuncs(U*, U\/BOOLEAN), II=U-InterpretersOf S;
deffunc F(Element of O) = the E-respecting Interpreter of $1, U;
consider f be Function such that
A1: dom f = O & for d be Element of O holds f.d = F(d) from FUNCT_1:sch 4;
A2: now
let x be object;
 assume x in dom f; then reconsider o=x as Element of O by A1;
f.o=F(o) by A1; hence f.x is Function;
end;
for s being own Element of S holds f.s is Interpreter of s, U
proof
let s be own Element of S; reconsider o=s as Element of O by FOMODEL1:def 19;
f.o=F(o) by A1; hence thesis;
end;
then reconsider ff=f as Interpreter of S,U by FOMODEL2:def 3;
reconsider fff=ff as (S,U)-interpreter-like Function
by A2, FUNCOP_1:def 6, FOMODEL2:def 4;
reconsider ffff=fff as O-defined Function by A1, RELAT_1:def 18;
fff|O is C-valued & ffff|O = ffff null O; then
fff=fff & dom fff=O & rng fff c= C by RELAT_1:def 19, A1; then
reconsider IT=fff as Element of Funcs(O,C) by FUNCT_2:def 2;
IT in II;
then reconsider ITT=IT as Element of II; take ITT;
now
let s be own Element of S; reconsider o=s as Element of O by FOMODEL1:def 19;
fff.o=F(o) by A1;
hence ITT.s is E-respecting;
end;
hence thesis;
end;
end;

registration
let S,U; let E be Equivalence_Relation of U;
cluster E-respecting for (S,U)-interpreter-like Function;
existence
proof
take IT=the E-respecting Element of U-InterpretersOf S; thus thesis;
end;
end;

registration
let S,U; let E be Equivalence_Relation of U; let o be own Element of S;
let I be E-respecting (S,U)-interpreter-like Function;
cluster I.o -> E-respecting for Interpreter of o,U;
coherence by Def16;
end;

registration
let S,U; let E be Equivalence_Relation of U;
let I be E-respecting (S,U)-interpreter-like Function;
cluster I quotient E -> (S,Class E)-interpreter-like for Function;
coherence
proof
set IT=I quotient E, O=OwnSymbolsOf S;
A1: for o being Element of O holds IT.o is Interpreter of o, Class E &
IT.o is Function
proof
let o be Element of O;
reconsider i=I.o as E-respecting Interpreter of o, U;
A2: i quotient E is Interpreter of o, Class E;
hence IT.o is Interpreter of o, Class E by Def17;
thus IT.o is Function by A2, Def17;
end;
A3: for x being object st x in dom IT holds IT.x is Function by A1;
now
let o be own Element of S; reconsider oo=o as Element of O
by FOMODEL1:def 19; IT.oo is Interpreter of oo, Class E by A1;
hence IT.o is Interpreter of o, Class E;
end;
then IT is Interpreter of S, Class E by FOMODEL2:def 3;
hence thesis by  A3, FUNCOP_1:def 6;
end;
end;

definition
let S,U;let E be Equivalence_Relation of U;
let I be E-respecting (S,U)-interpreter-like Function;
redefine func I quotient E ->
Element of (Class E)-InterpretersOf S;
coherence
proof
set J=I quotient E, O=OwnSymbolsOf S, II=(Class E)-InterpretersOf S;
J null O in II by FOMODEL2:2; hence thesis;
end;
end;

Lm12: for R being Relation of U1, U2 holds n-placesOf R=
{[p,q] where p is Element of n-tuples_on U1, q is Element of n-tuples_on U2
: q c= p * R}
proof
let R being Relation of U1, U2; deffunc F(set,set)=[$1,$2];
defpred P[Function, Function] means
for j being set st j in Seg n holds [$1.j,$2.j] in R;
defpred Q[Relation, set] means $2 c= $1 * R; set N1=n-tuples_on U1,
N2=n-tuples_on U2, D=Seg n, LH=
{F(p,q) where p is Element of N1, q is Element of N2 : P[p,q]},
RH = {F(p,q) where p is Element of N1, q is Element of N2: Q[p,q]};
A1: for u being Element of N1, v being Element of N2 holds P[u,v] iff Q[u,v]
proof
let u be Element of N1, v be Element of N2;
A2: len u=n & len v=n by CARD_1:def 7; then
 dom u=D & dom v=D by FINSEQ_1:def 3; then
A3: u={[x,u.x] where x is Element of D: x in D} &
v={[x,v.x] where x is Element of D: x in D} by FOMODEL0:20;
thus P[u,v] implies Q[u,v]
proof
assume A4: P[u,v];
now
let z be object; assume z in v; then consider x being Element of D such that
A5: z=[x,v.x] & x in D by A3;
A6: [u.x, v.x] in R by A4, A5;
[x,u.x] in u by A3, A5;
hence z in u*R by A5, A6, RELAT_1:def 8;
end;
hence thesis by TARSKI:def 3;
end;
assume A7: Q[u,v];
now
let j be set; assume
A8: j in D; then reconsider x=j as Element of D;
[x,v.x] in v by A3, A8; then
consider z being object such that
A9: [x,z] in u & [z,v.x] in R by A7, RELAT_1:def 8;
A10: z is set by TARSKI:1;
x in dom u
by A2, FINSEQ_1:def 3, A8;
 then z = u.x by A9, FUNCT_1:def 2,A10;
hence [u.j, v.j] in R by A9;
end;
hence thesis;
end;
LH=RH from FRAENKEL:sch 4(A1); hence thesis;
end;

Lm13: for U being non empty Subset of U2,
P being Relation of U1,U, Q being Relation of U2,U3 holds
(n-placesOf P) * (n-placesOf Q) c= n-placesOf (P*Q)
proof
let U be non empty Subset of U2;
let P be Relation of U1,U, Q be Relation of U2,U3;
set R=P*Q, LH=n-placesOf R, Pn=n-placesOf P, Qn=n-placesOf Q, RH=Pn*Qn,
N=n-tuples_on U, N1=n-tuples_on U1, N2=n-tuples_on U2, N3=n-tuples_on U3;
A1: LH={[p,q] where p is Element of N1, q is Element of N3: q c= p * R} &
Pn={[p,q] where p is Element of N1, q is Element of N: q c= p * P} &
Qn={[p,q] where p is Element of N2, q is Element of N3: q c= p * Q} by Lm12;
now
let t be object; assume A2: t in RH; then consider x,z being object such that
A3: t=[x,z] by RELAT_1:def 1; consider y being object such that
A4: [x,y] in Pn & [y,z] in Qn by A3, A2, RELAT_1:def 8;
consider p1 being Element of N1, p2 being Element of N such that
A5: [p1,p2]=[x,y] & p2 c= p1 * P by A1, A4;
consider q1 being Element of N2, q2 being Element of N3 such that
A6: [q1,q2]=[y,z] & q2 c= q1 * Q by A1, A4;
A7: p2*Q c= (p1*P)*Q & p1=x & p2=y & q1=y & q2=z
by XTUPLE_0:1, RELAT_1:30,A5,A6; then
q2 c= (p1 * P) * Q by XBOOLE_1:1, A6; then
[p1,q2]=[p1,q2] & q2 c= p1*R by RELAT_1:36;
hence t in LH by A3, A7, A1;
end;
hence thesis by TARSKI:def 3;
end;

Lm14: for U being non empty Subset of U2,
P being Relation of U1,U, Q being Relation of U2,U3 holds
n-placesOf (P*Q) c= (n-placesOf P) * (n-placesOf Q)
proof
let U be non empty Subset of U2;
let P be Relation of U1,U, Q being Relation of U2,U3;
set R=P*Q, LH=n-placesOf R, Pn=n-placesOf P, Qn=n-placesOf Q, RH=Pn*Qn,
N=n-tuples_on U, N1=n-tuples_on U1, N2=n-tuples_on U2, N3=n-tuples_on U3;
reconsider nn=n as Element of NAT by ORDINAL1:def 12;
now
let x be object; assume x in LH; then
consider p being Element of N1, q being Element of N3 such that
A1: x=[p,q] & for j being set st j in Seg n holds [p.j, q.j] in R;
defpred Z[set, set] means [p.$1, $2] in P & [$2,q.$1] in Q;
A2: for k being Nat st k in Seg n ex y being Element of U st Z[k,y]
proof
let k be Nat; assume k in Seg n; then [p.k, q.k] in R by A1;
then consider y being object such that
A3: [p.k,y] in P & [y,q.k] in Q by RELAT_1:def 8;
y in rng P & rng P c= U by A3, XTUPLE_0:def 13; then
reconsider yy=y as Element of U; take yy;
thus thesis by A3;
end;
consider r being FinSequence of U such that
A4: dom r = Seg n & for k being Nat st k in Seg n holds Z[k,r.k]
from FINSEQ_1:sch 5(A2); len r=nn by FINSEQ_1:def 3, A4; then
reconsider rr=r as n-element FinSequence of U by CARD_1:def 7;
reconsider rrr=rr as Element of N by FOMODEL0:16;
reconsider rrrr=rrr as Element of N2 by FOMODEL0:16;
[p,rrr]=[p,rrr] & for j being set st j in Seg n holds [p.j,rrr.j] in P
by A4; then
A5: [p,rrr] in Pn; [rrrr,q]=[rrrr,q] & for j being set st j in Seg n holds
[rrrr.j,q.j] in Q by A4; then [rrrr,q] in Qn;
hence x in RH by A1, A5, RELAT_1:def 8;
end;
hence thesis by TARSKI:def 3;
end;

Lm15: for U being non empty Subset of U2,
P being Relation of U1,U, Q being Relation of U2,U3 holds
n-placesOf (P*Q) = (n-placesOf P) * (n-placesOf Q)
by Lm13,Lm14;

Lm16: for P being Relation of U1,U2, Q being Relation of U2,U3 holds
n-placesOf (P*Q) = (n-placesOf P) * (n-placesOf Q)
proof
reconsider U=U2/\U2 as non empty Subset of U2;
let P being Relation of U1,U2, Q being Relation of U2,U3;
reconsider PP=P as Relation of U1,U;
n-placesOf (PP*Q) = (n-placesOf PP) * (n-placesOf Q) by Lm15;
hence thesis;
end;

Lm17: for R being Relation of U1, U2 holds n-placesOf (R~)=(n-placesOf R)~
proof
let R be Relation of U1, U2; set N1=n-tuples_on U1, N2=n-tuples_on U2,
IT={[q,p] where p is Element of N1, q is Element of N2 :
for j being set st j in Seg n holds [p.j,q.j] in R};
reconsider Q=R~ as Relation of U2, U1;
reconsider Rn=n-placesOf R as Relation of n-tuples_on U1, n-tuples_on U2;
reconsider LH=n-placesOf Q as Relation of n-tuples_on U2, n-tuples_on U1;
reconsider RH=Rn~ as Relation of n-tuples_on U2, n-tuples_on U1;
now
let x be object; assume x in LH; then
consider p being Element of N2, q being Element of N1 such that
A1: x=[p,q] & for j being set st j in Seg n holds [p.j,q.j] in R~;
for j being set st j in Seg n holds [q.j,p.j] in R
proof
let j be set; assume j in Seg n; then [p.j, q.j] in R~ by A1;
hence thesis by RELAT_1:def 7;
end; then
[q,p] in Rn; hence x in RH by RELAT_1:def 7, A1;
end; then
A2: LH c= RH by TARSKI:def 3;
now
let x be object; assume x in RH~; then
consider p being Element of N1, q being Element of N2 such that
A3: x=[p,q] & for j being set st j in Seg n holds [p.j,q.j] in R;
for j being set st j in Seg n holds [q.j,p.j] in R~
proof
let j be set; assume j in Seg n; then [p.j, q.j] in R by A3;
hence thesis by RELAT_1:def 7;
end; then [q,p] in LH;
hence x in LH~ by A3, RELAT_1:def 7;
end;
then RH~ c= LH~ by TARSKI:def 3;then RH~\LH~ = {}; then
(RH\LH)~={} by RELAT_1:24; then (RH\LH)~~={};
then RH c= LH by XBOOLE_1:37; hence thesis by A2;
end;

Lm18: for X,Y being non empty set, E being Equivalence_Relation of X,
F being Equivalence_Relation of Y, g being (E,F)-respecting
Function of X,Y holds F-class*g=(g quotient (E,F))*(E-class)
proof
let X,Y be non empty set; let E be Equivalence_Relation of X; let F be
Equivalence_Relation of Y; let g be (E,F)-respecting Function of X,Y;
set G=g quotient (E,F); A1: dom G=Class E by FUNCT_2:def 1;
reconsider LH=F-class * g, RH=G*(E-class) as Function of X, Class F;
A2: dom LH=X & dom RH=X by FUNCT_2:def 1;
now
let x be Element of X; reconsider F1=LH.x, F2=RH.x as Element of Class F;
A3: F1=(F-class).(g.x) & F2=G.((E-class).x) by A2, FUNCT_1:12; then
F2 = G.EqClass(E,x) by Def13; then
[EqClass(E,x),F2] in G by A1, FUNCT_1:1; then consider
e being Element of Class E,f being Element of Class F such that
A4: [EqClass(E,x),F2]=[e,f] & ex a,b being set st a in e &
b in f & [a,b] in g; consider a,b being set such that
A5: a in e & b in f & [a,b] in g by A4;
A6: EqClass(E,x)=e & F2=f by A4, XTUPLE_0:1; then
A7: a in EqClass(E,x) & [a,x] in E & b in F2 by A5, EQREL_1:19;
a in X by A5; then a in dom g by FUNCT_2:def 1; then
b=g.a by A5, FUNCT_1:def 2; then [b,g.x] in F by A7, Def9; then
b in EqClass(F,g.x) by EQREL_1:19; then
b in F1 by A3, Def13;
hence LH.x=RH.x by EQREL_1:def 4, A5, A6, XBOOLE_0:3;
end;
hence thesis by FUNCT_2:63;
end;

Lm19: for p being m-element U1-valued FinSequence,
f being Function of U1,U2 holds f*p=(m-placesOf f).p
proof
let p be m-element U1-valued FinSequence; let f be Function of U1, U2;
set F=m-placesOf f;
A1: dom f=U1 & dom F=m-tuples_on U1 & p in m-tuples_on U1 &
f*p in m-tuples_on U2 by FUNCT_2:def 1, FOMODEL0: 16;
reconsider pp=p as Element of m-tuples_on U1 by FOMODEL0: 16;
pp is Element of Funcs (Seg m, U1) by FOMODEL0:11; then
reconsider ppp=pp as Function of Seg m, U1;
reconsider LH=f*p as Element of Funcs(Seg m, U2) by FOMODEL0:11, A1;
reconsider RH=F.pp as Element of Funcs(Seg m, U2) by FOMODEL0:11;
reconsider LHH=LH, RHH=RH as Function of Seg m, U2;
reconsider LHHH=LH, RHHH=RH as Element of m-tuples_on U2 by FOMODEL0:11;
A2: dom ppp=Seg m & rng ppp c= U1 & dom LH=Seg m &
dom LH=Seg m by FUNCT_2:def 1, RELAT_1:def 19;
[p,LH] in F
proof
for j being set st j in Seg m holds [pp.j,LHHH.j] in f
proof
let j be set; assume A3: j in Seg m; then
A4: LH.j=f.(p.j) by A2, FUNCT_1:12;
ppp.j in rng ppp by FUNCT_1:3, A3, A2;
hence thesis by A1, A2, A4, FUNCT_1:1;
end;
hence thesis;
end;
hence thesis by FUNCT_1:1;
end;

Lm20: for E being Equivalence_Relation of U holds
(n-placesOf E)-class = (n-tuple2Class E)*(n-placesOf (E-class))
proof
let E being Equivalence_Relation of U;
set UN=n-tuples_on U, A=n-tuple2Class E, RH=A*(n-placesOf (E-class)),
LH=(n-placesOf E)-class; reconsider RA=n-placesOf (E-class) as
Relation of n-tuples_on U, n-tuples_on (Class E); reconsider ER=E-class
as Relation of U, Class E; reconsider RB=n-placesOf (ER~) as Relation of
n-tuples_on(Class E), n-tuples_on U; reconsider RC=(n-placesOf ER)~ as
Relation of n-tuples_on(Class E), n-tuples_on U;
A1: dom LH=UN & dom RH=UN by FUNCT_2:def 1; reconsider FA=RA as
Function of UN, n-tuples_on (Class E);
reconsider RAA=RA as total UN-defined Relation;
RH = (RA*RB)*((n-placesOf E)-class) by RELAT_1:36 .= (RA*RC)*LH by Lm17;
then (id UN qua Relation)*LH c= RH by FOMODEL0:21, RELAT_1:30;
then LH|UN c= RH by RELAT_1:65;
hence thesis by GRFUNC_1:3, A1;
end;

Lm21: for E being Equivalence_Relation of U1, F being Equivalence_Relation
of U2, g being (n-placesOf E,F)-respecting Function of n-tuples_on U1,U2
holds (g quotient (n-placesOf E, F))*(n-tuple2Class E)=
(n-placesOf ((E-class qua Relation of U1, Class E)~))*(F-class*g)
proof
set X=U1, Y=U2;
let E be Equivalence_Relation of X, F be Equivalence_Relation of Y;
let g being (n-placesOf E,F)-respecting Function of n-tuples_on X,Y;
reconsider G=g quotient (n-placesOf E, F) as Function of
Class(n-placesOf E), Class F;
reconsider R=G as Relation of Class(n-placesOf E), Class F;
reconsider projector=E-class as Relation of X, Class E;
G*(n-tuple2Class E) = (n-placesOf (projector ~)) *
(((n-placesOf E)-class) * R) by RELAT_1:36 .=
(n-placesOf (projector ~)) * (F-class*g) by Lm18; hence thesis;
end;

Lm22: for R being total reflexive Relation of U st x in dom f &
f is U-valued holds f is (id {x},R)-respecting
proof
let R being total reflexive Relation of U; set E=id {x}; assume
A1: x in dom f;then reconsider D=dom f as non empty set;E\+\{[x,x]}={};then
A2: E={[x,x]} by FOMODEL0:29;
reconsider xx=x as Element of D by A1; assume
f is U-valued; then rng f c= U by RELAT_1:def 19; then
reconsider ff=f as Function of D, U by FUNCT_2:2;
now
let x1,x2 be set;assume [x1,x2] in E;then [x1,x2]=[x,x]
by A2, TARSKI:def 1;then A3: x1=x & x2=x by XTUPLE_0:1;
f.xx=f.xx & ff.xx in U; hence [f.x1,f.x2] in R by EQREL_1:5, A3;
end;
hence thesis;
end;

Lm23: (peeler U)*((id U)-class)=id U
proof
set X=U, P=peeler X, IX=id X, I=IX-class, IT=P*I;
reconsider Pf=P, If=I as Function;
A1: dom I=X & dom IX=X by FUNCT_2:def 1;
A2: {_{X}_}= the set of all {x} where x is Element of X by EQREL_1:37;
reconsider PP=P as Function of Class IX, X;
reconsider II=I as Function of X, Class IX;
reconsider LH=PP*II, RH=IX as Function of X, X;
now
let x be Element of X; set xx=x;
{x} in {_{X}_} by A2; then reconsider xton={x} as Element of {_{X}_};
(Pf*If).x=Pf.(If.xx) by A1, FUNCT_1:13 .= P.Class(id X, xx) by Def13 .=
P.xton by EQREL_1:25 .= DeTrivial(xton) by Def12 .= xx by Def11 .=
IX.x; hence IX.x = (PP*II).x;
end;
hence thesis by FUNCT_2:63;
end;

Lm24: for E being Equivalence_Relation of U,
I being E-respecting (S,U)-interpreter-like Function holds
(((I quotient E),(E-class).u)-TermEval).k=(E-class)*((I,u)-TermEval.k)
proof
let E be Equivalence_Relation of U; reconsider e=E-class.u as Element of
Class E; let I be E-respecting (S,U)-interpreter-like Function;
set te=(I,u)-TermEval, II=I quotient E, TE=(II,e)-TermEval, F=S-firstChar,
O=OwnSymbolsOf S, TT=AllTermsOf S;
defpred P[Nat] means TE.$1=(E-class)*(te.$1);
A1: P[0]
proof
A2: TE.0=TT --> e & te.0=TT --> u by FOMODEL2:def 8;
dom (E-class) = U by FUNCT_2:def 1;
hence thesis by A2, FUNCOP_1:17;
end;
A3: for m st P[m] holds P[m+1]
proof
let m; assume
A4: P[m]; reconsider mm=m, MM=m+1 as Element of NAT by ORDINAL1:def 12;
te.mm is Element of Funcs (TT,U) & te.MM is Element of Funcs (TT,U); then
reconsider tm=te.mm, tmm=te.MM as Function of TT, U; TE.mm is Element of
Funcs(TT,Class E) & TE.MM is Element of Funcs(TT,Class E);
then reconsider TM=TE.mm, TMM=TE.MM as Function of TT, Class E;
now
let tt; reconsider t=tt as termal string of S;
set s=F.t, g=I.s, G=II.s, sub=SubTerms t,  n=|.ar s.|; reconsider
gg = g as (n-placesOf E,E)-respecting Function of n-tuples_on U, U
by FOMODEL2:def 2;
A5: g quotient E=
(gg quotient (n-placesOf E,E))*(n-tuple2Class E) by Def15;
reconsider ggg=gg quotient (n-placesOf E,E) as Function;
A6: tm*sub is n-element U-valued FinSequence & dom (n-placesOf (E-class))
= n-tuples_on U & dom gg=n-tuples_on U & dom tmm=TT by FUNCT_2:def 1;
thus TMM.tt = G.((TE.m)*sub) by FOMODEL2:3 .= (g quotient E).((TE.m)*sub)
by Def18 .=
(g quotient E).((E-class)*(tm*sub)) by RELAT_1:36, A4 .=
(g quotient E).((n-placesOf (E-class)).(tm*sub)) by Lm19 .=
((ggg*(n-tuple2Class E))*(n-placesOf (E-class))).(tm*sub)
by A5, A6, FOMODEL0:16, FUNCT_1:13.=
(ggg*((n-tuple2Class E)*(n-placesOf (E-class)))).(tm*sub) by RELAT_1:36
.= (ggg*((n-placesOf E)-class)).(tm*sub) by Lm20 .=
((E-class)*gg).(tm*sub) by Lm18 .= (E-class).(gg.(tm*sub))
by A6, FOMODEL0:16, FUNCT_1:13 .= (E-class).((te.(m+1)).t) by FOMODEL2:3
.= ((E-class)*tmm).tt by A6, FUNCT_1:13;
end;
hence thesis by FUNCT_2:63;
end;
for n holds P[n] from NAT_1:sch 2(A1,A3); hence thesis;
end;

Lm25: for E being Equivalence_Relation of U,
I being E-respecting (S,U)-interpreter-like Function holds
(I quotient E)-TermEval=(E-class)*(I-TermEval)
proof
let E be Equivalence_Relation of U; set u = the Element of U;
let I be E-respecting (S,U)-interpreter-like Function;
reconsider e=E-class.u as Element of Class E; set F=S-firstChar,
II=I quotient E, te=(I,u)-TermEval, TE=(II,e)-TermEval, O=OwnSymbolsOf S,
TT=AllTermsOf S, tee=I-TermEval, TEE=II-TermEval, T=S-termsOfMaxDepth;
reconsider TF=T as Function;
::# otherwise theorem FOMODEL1:5 won't work due to subsequent T's
::#  redefinition as Function of NAT,bool((AllSymbolsOf S)*\{{}}).
now
let tt be Element of TT; consider mm such that
A1: tt in TF.mm by FOMODEL1:5; set v=I-TermEval tt, V=II-TermEval tt;
reconsider MM=mm+1 as Element of NAT;
te.MM is Element of Funcs (TT,U); then
A2: dom (te.MM) = TT & dom tee=TT by FUNCT_2:def 1;
thus TEE.tt = V by FOMODEL2:def 10 .= (TE.(mm+1)).tt by FOMODEL2:def 9, A1
.= ((E-class)*(te.(mm+1))).tt by Lm24 .= (E-class).((te.(mm+1)).tt)
by FUNCT_1:13, A2 .= (E-class).v by FOMODEL2:def 9, A1 .= (E-class).(tee.tt)
by FOMODEL2:def 10 .= ((E-class)*tee).tt by A2, FUNCT_1:13;
end;
hence thesis by FUNCT_2:63;
end;

Lm26: for R being Equivalence_Relation of U1, phi being 0wff string of S,
i being R-respecting (S,U1)-interpreter-like Function st S-firstChar.phi
<> TheEqSymbOf S holds (i quotient R)-AtomicEval phi = i-AtomicEval phi
proof
let R be Equivalence_Relation of U1, phi be 0wff string of S,
i be R-respecting (S,U1)-interpreter-like Function;
set TT=AllTermsOf S, E=TheEqSymbOf S, p=SubTerms phi, F=S-firstChar, r=F.phi,
n=|.ar r.|, U=Class R, I=i quotient R, UV=I-TermEval, N1=n-tuples_on U1,
V=I-AtomicEval phi, uv=i-TermEval, v=i-AtomicEval phi, f=I===.r, G=I.r,
g=i.r, d=U-deltaInterpreter;
A1: p in n-tuples_on TT & dom (n-placesOf ((R-class)*uv))=n-tuples_on TT &
dom (n-placesOf uv)=n-tuples_on TT by FUNCT_2:def 1, FOMODEL0:16;
assume
A2: r <> E; then
A3: V=G.(UV*p) by FOMODEL2:14 .= G.((R-class)*uv*p) by Lm25 .=
G.((n-placesOf ((R-class)*uv)).p) by Lm19 .=
(G*(n-placesOf ((R-class)*uv))).p by FUNCT_1:13, A1; reconsider
o=r as Element of OwnSymbolsOf S by A2, FOMODEL1:15; set gg=i.o, GG=I.o;
reconsider ggg=gg as (n-placesOf R, id BOOLEAN)-respecting Function of
n-tuples_on U1, BOOLEAN by FOMODEL2:def 2, Def10;
set F=ggg quotient (n-placesOf R, id BOOLEAN);
reconsider P=(peeler BOOLEAN) as Function;
reconsider nuisance1=F, nuisance2=n-tuple2Class R, nuisance3=P as Relation;
reconsider RR=R-class as Relation of U1,Class R;
A4: GG = gg quotient R by Def18 .=
(peeler BOOLEAN)*(F*(n-tuple2Class R)) by Def15;
A5: (n-tuple2Class R)*(n-placesOf ((R-class)*uv)) =
((n-placesOf R)-class)*(n-placesOf uv)
proof
set x=n-placesOf ((R-class)*uv);
A6: (n-tuple2Class R)*(n-placesOf ((R-class)*uv)) =
((n-placesOf uv)*(n-placesOf RR)) *
((n-placesOf (RR~)*((n-placesOf R)-class))) by Lm16 .= (n-placesOf uv)*
((n-placesOf RR) * ((n-placesOf (RR~)*((n-placesOf R)-class))))
by RELAT_1:36 .= (n-placesOf uv)*
(((n-placesOf RR) * (n-placesOf (RR~)))*((n-placesOf R)-class))
by RELAT_1:36 .=  (n-placesOf uv)*
(((n-placesOf RR) * ((n-placesOf RR)~))*((n-placesOf R)-class)) by Lm17;
 (n-placesOf uv)*
(((n-placesOf RR) * ((n-placesOf RR)~))*((n-placesOf R)-class)) =
((n-placesOf uv)*((n-placesOf RR)*((n-placesOf RR)~)))*((n-placesOf R)-class)
by RELAT_1:36 .= (n-placesOf uv)*(n-placesOf RR)*((n-placesOf RR)~)*
((n-placesOf R)-class) by RELAT_1:36;
hence thesis by A6, FOMODEL0:27;
end;
(P*(F*(n-tuple2Class R)))*(n-placesOf ((R-class)*uv)) =
P*((F*(n-tuple2Class R))*(n-placesOf ((R-class)*uv))) by RELAT_1:36 .=
P*(F*(((n-placesOf R)-class)*(n-placesOf uv))) by A5, RELAT_1:36; then
V = (P*((F*((n-placesOf R)-class))*(n-placesOf uv))).p by A3, A4, RELAT_1:36
.= ((P*(F*((n-placesOf R)-class)))*(n-placesOf uv)).p by RELAT_1:36 .=
(P*(F*((n-placesOf R)-class))).((n-placesOf uv).p) by FUNCT_1:13, A1 .=
(P*(F*((n-placesOf R)-class))).(uv*p) by Lm19 .=
(P*(((id BOOLEAN)-class)*ggg)).(uv*p) by Lm18 .=
((P*((id BOOLEAN)-class))*ggg).(uv*p) by RELAT_1:36 .=
((id BOOLEAN)*ggg).(uv*p) by Lm23 .= ggg.(uv*p) by FUNCT_2:17 .=
i-AtomicEval phi by FOMODEL2:14; hence thesis;
end;

Lm27: for t being 0-termal string of S holds
(((S,X)-freeInterpreter,tt)-TermEval.(m+1)).t=t
proof
let t be 0-termal string of S;
set I=(S,X)-freeInterpreter,TT=AllTermsOf S,F=S-firstChar,v=F.t,
n=|.ar v.|, C=S-multiCat, II=(I,tt)-TermEval, SS=AllSymbolsOf S,
ff=v-compound | (n-tuples_on TT); reconsider
f=X-freeInterpreter(v) as Function of n-tuples_on TT,TT by FOMODEL2:def 2;
A1: ff=f by Def3;
reconsider E={} as Element of (SS*\{{}})* by FINSEQ_1:49;
dom f=0-tuples_on TT by FUNCT_2:def 1; then dom f={{}} by FOMODEL0:10; then
A2: {} in dom ff by A1, TARSKI:def 1;
thus (II.(m+1)).t = (I.v).{} by FOMODEL2:3 .= f.{} by Def4 .=
ff.{} by Def3 .= v-compound.{} by A2, FUNCT_1:47 .=
v-compound E by Def2 .=  <*v*> null {}
.= t by FOMODEL2:1;
end;

Lm28: (((S,X)-freeInterpreter, tt)-TermEval.(m+1))|(S-termsOfMaxDepth.m)=
id (S-termsOfMaxDepth.m)
proof
set I=(S,X)-freeInterpreter, TE=(I,tt)-TermEval, T=S-termsOfMaxDepth,
F=S-firstChar, SS=AllSymbolsOf S, TT=AllTermsOf S;
defpred P[Nat] means TE.($1+1)|(T.$1)=id (T.$1);
A1: P[0]
proof
reconsider Z=0, O=1 as Element of NAT;
TE.O is Element of Funcs (TT,TT); then
TE.O is Function of TT,TT & T.Z c= TT by FOMODEL1:2;
then reconsider f=(TE.1)|(T.0) as Function of T.0, TT by FUNCT_2:32;
A2: dom f=T.0 by FUNCT_2:def 1;
now
let x be object; assume
x in T.0; then reconsider xx=x as Element of T.Z;
reconsider t=xx as 0-termal string of S by FOMODEL1:def 33;
thus f.x = (TE.(0+1)).t by A2, FUNCT_1:47 .= x by Lm27;
end;
hence thesis by FUNCT_1:17, A2;
end;
A3: for n st P[n] holds P[n+1]
proof
let n; assume A4: P[n];
reconsider nn=n, NN=n+1, NNN=n+1+1 as Element of NAT by ORDINAL1:def 12;
TE.NNN is Element of Funcs (TT,TT); then
TE.NNN is Function of TT,TT & T.NN c= TT by FOMODEL1:2;
then reconsider f=(TE.NNN)|(T.NN) as Function of T.NN, TT by FUNCT_2:32;
A5: dom f =
dom (id (T.NN)) by FUNCT_2:def 1;
now
let x be object; assume
A6: x in dom f; then reconsider tt=x as Element of T.(nn+1);
reconsider t=tt as (nn+1)-termal string of S by FOMODEL1:def 33;
set s=F.t, p=|.ar s.|;
A7: dom (X-freeInterpreter s)=p-tuples_on TT by FUNCT_2:def 1;
reconsider subt=SubTerms(t) as (T.n)-valued Function; reconsider
subtt=subt as Element of (dom (X-freeInterpreter s)) by FOMODEL0:16, A7;
A8: subtt in dom (X-freeInterpreter s)
& X-freeInterpreter s = s-compound | (p-tuples_on TT) by Def3;
SubTerms t in TT*; then reconsider
subttt=SubTerms t as Element of (SS*\{{}})*;
reconsider temp=subt null T.n as Function;
thus f.x = (TE.NNN).x by A6, FUNCT_1:47 .=
(I.s).(TE.(n+1)*((T.n)|`subt)) by FOMODEL2:3 .=
(I.s).(TE.(n+1)*((id (T.n))*subt)) by RELAT_1:92 .=
(I.s).((TE.(n+1)*(id (T.n)))*subt) by RELAT_1:36.=
(I.s).(((TE.(n+1))|(T.n))*subt) by RELAT_1:65 .= (I.s).((T.n)|`subt)
by RELAT_1:92, A4 .= (X-freeInterpreter(s)).subt by Def4 .=
(s-compound).(subttt) by A8, FUNCT_1: 47 .= s-compound(subttt)
by Def2 .= (id (T.(n+1))).x by  FOMODEL1:def 37;
end;
hence thesis by A5, FUNCT_1:2;
end;
P[n] from NAT_1:sch 2(A1,A3); hence thesis;
end;

Lm29: ((S,X)-freeInterpreter-TermEval)=id(AllTermsOf S)
proof
set u=the Element of AllTermsOf S, I=(S,X)-freeInterpreter,
TE=(I,u)-TermEval, T=S-termsOfMaxDepth, F=S-firstChar,
SS=AllSymbolsOf S, TT=AllTermsOf S; reconsider Tf=T as Function;
reconsider LH=I-TermEval, RH=id TT as Function of TT, TT;
now
let tt be Element of TT;
consider mm such that
A1: tt in Tf.mm by FOMODEL1:5; reconsider ttt=tt as Element of T.mm by A1;
reconsider M=mm+1 as Element of NAT;
reconsider tttt=tt as Element of T.mm by A1;
set uv=I-TermEval tt; TE.M is Element of Funcs(TT,TT); then
reconsider f=TE.(mm+1) as Function of TT,TT; (f|(T.mm)).ttt\+\f.ttt={}; then
A2: (f|(T.mm)).ttt=f.ttt by FOMODEL0:29;
A3: (id (T.mm)).tttt=tttt & (id TT).tt=tt;
thus LH.tt=uv by FOMODEL2:def 10 .= f.tt by FOMODEL2:def 9, A1 .=
RH.tt by A3, A2, Lm28;
end;
hence thesis by FUNCT_2:63;
end;

Lm30: for R being Relation of U1, U2 holds 0-placesOf R = id {{}}
proof
let R be Relation of U1, U2; (0-placesOf R) \+\ (id {{}})={};
hence thesis by FOMODEL0:29;
end;

theorem for E being Equivalence_Relation of U,
I being E-respecting (S,U)-interpreter-like Function holds
(I quotient E)-TermEval=(E-class)*(I-TermEval) by Lm25;

theorem (S,X)-freeInterpreter-TermEval=id(AllTermsOf S) by Lm29;

theorem for R being Equivalence_Relation of U1, phi being 0wff
string of S, i being R-respecting (S,U1)-interpreter-like Function st
S-firstChar.phi <> TheEqSymbOf S holds
(i quotient R)-AtomicEval phi = i-AtomicEval phi by Lm26;

Lm31: (l1 SubstWith l2)|(S-termsOfMaxDepth.m) is Function of
S-termsOfMaxDepth.m, S-termsOfMaxDepth.m
proof
set T=S-termsOfMaxDepth, F=S-firstChar, C=S-multiCat, SS=AllSymbolsOf S;
set strings=SS*\{{}}, g=SS-concatenation, G=MultPlace g, e=l1 SubstWith l2;
A1: for t being 0-termal string of S holds e.t in T.0
proof
let t be 0-termal string of S; set l=F.t;
A2: t=<*l*> by FOMODEL2:1; l=l1 or l<>l1; then
e.<*l*>=<*l2*> or e.<*l*>=<*l*> by FOMODEL0:35;
hence thesis by A2, FOMODEL1:def 33;
end;
defpred P[Nat] means e|(T.$1) is Function of T.$1, T.$1;
A3: P[0]
proof
reconsider z=0 as Element of NAT;
reconsider T0=T.z as Subset of SS* by XBOOLE_1:1; set f=e|T0;
A4: dom f=T0 by PARTFUN1:def 2;
now
let x be object; assume A5: x in T0;
reconsider t=x as 0-termal string of S by A5, FOMODEL1:def 33; set l=F.t;
reconsider tt=t as Element of T0 by FOMODEL1:def 33; f.tt\+\e.tt={};
then f.x=e.x by FOMODEL0:29; then f.t in T0 by A1; hence f.x in T0;
end;
hence thesis by A4, FUNCT_2:3;
end;
A6: for m st P[m] holds P[m+1]
proof
let m; reconsider mm=m, MM=m+1 as Element of NAT by ORDINAL1:def 12; assume
A7: P[m]; reconsider Tm=T.mm, TM=T.MM as Subset of SS* by XBOOLE_1:1;
reconsider f=e|(T.m) as Function of T.mm, T.mm by A7; set ff=e|TM;
A8: dom ff=TM by PARTFUN1:def 2;
now
let tt be object; assume tt in TM; then
reconsider ttt=tt as Element of TM; reconsider t=ttt as
(mm+1)-termal string of S by TARSKI:def 3, FOMODEL1:def 33;
set ST=SubTerms t; dom f = T.mm by FUNCT_2:def 1;
then rng ST c= dom f by RELAT_1:def 19; then
A9: e*ST=f*ST by RELAT_1:165;
reconsider s=F.t as termal Element of S; set l=|.ar s.|;
f*ST is FinSequence of (T.mm) by FOMODEL0:26; then
reconsider newtt=f*ST as l-element Element of (T.mm)*; ff.ttt\+\e.ttt={}; then
A10: ff.tt=e.tt by FOMODEL0:29;
(s=l1 implies e.<*s*>=<*l2*> & ar s=ar l2) &
(s<>l1 implies e.<*s*>=<*s*> & ar s=ar s) by FOMODEL0:35; then
consider ss being termal Element of S such that
A11: e.<*s*>=<*ss*> & ar s=ar ss;
reconsider newttt=newtt as (|.ar ss.|)-element Element of ((T.mm)*) by A11;
e.t=e.(<*F.t*>^(C.ST)) by FOMODEL1:def 37 .= (e.<*s*>) ^ (e.(C.ST))
by FOMODEL0:36 .= ss-compound newttt by FOMODEL0:37, A9, A11;
hence ff.tt in T.(mm+1) by A10, FOMODEL1:def 33;
end;
hence thesis by A8, FUNCT_2:3;
end;
for n holds P[n] from NAT_1:sch 2(A3,A6); hence thesis;
end;

definition
let S, x, s, w;
redefine func (x,s)-SymbolSubstIn w -> string of S;
coherence
proof
(x,s)-SymbolSubstIn (w null w) is (len w + 0)-element;
hence thesis by FOMODEL0:30;
end;
end;

registration
let S,l1,l2,m; let t be m-termal string of S;
cluster (l1, l2)-SymbolSubstIn t -> m-termal for string of S;
coherence
proof
set e=l1 SubstWith l2, T=S-termsOfMaxDepth, SS=AllSymbolsOf S, IT=
(l1,l2)-SymbolSubstIn t;
reconsider mm=m as Element of NAT by ORDINAL1:def 12;
reconsider f=e|(T.m) as Function of T.m, T.m by Lm31;
reconsider tt=t as Element of T.m by FOMODEL1:def 33;
f.tt \+\ e.tt = {}; then
f.tt=e.tt by FOMODEL0:29; then e.t in T.mm; then
IT in T.mm by FOMODEL0:def 22; hence thesis;
end;
end;

registration
let S, t, l1, l2;
cluster (l1,l2)-SymbolSubstIn t -> termal for string of S;
coherence
proof
set IT=(l1, l2)-SymbolSubstIn t, TT=AllTermsOf S, T=S-termsOfMaxDepth;
reconsider TF=T as Function;
t in TT by FOMODEL1:def 32; then consider mm such that
A1: t in TF.mm by FOMODEL1:5; reconsider tm=t as mm-termal string of S
by A1, FOMODEL1:def 33; (l1,l2)-SymbolSubstIn tm is mm-termal; hence thesis;
end;
end;

Lm32:
(l1 SubstWith l2)|(AllTermsOf S) is Function of AllTermsOf S,AllTermsOf S
proof
set e=l1 SubstWith l2, SS=AllSymbolsOf S, TT=AllTermsOf S;
TT /\ (SS*\{{}}) = TT null (SS*\{{}}) .= TT; then
reconsider TTT=TT as non empty Subset of SS*; set f=e|TTT;
A1: dom f=TTT by PARTFUN1:def 2;
now
let x be object; assume
A2: x in TTT; then reconsider t=x as termal string of S;
reconsider xx=x as Element of TTT by A2; (f.xx)\+\(e.xx)={}; then
f.xx=e.xx by FOMODEL0:29 .= (l1,l2)-SymbolSubstIn t by FOMODEL0:def 22;
hence f.x in TTT by FOMODEL1:def 32;
end;
hence thesis by FUNCT_2:3, A1;
end;

registration
let S, l1, l2; let phi be 0wff string of S;
cluster (l1,l2)-SymbolSubstIn phi -> 0wff for string of S;
coherence
proof
set psi=(l1,l2)-SymbolSubstIn phi, e=l1 SubstWith l2, SS=AllSymbolsOf S,
TT=AllTermsOf S, C=S-multiCat; TT /\ (SS*\{{}}) = TT null (SS*\{{}}) .= TT;
then reconsider TTT=TT as non empty Subset of SS*;
reconsider f=e|TT as Function of TT, TT by Lm32; consider r being relational
Element of S, V being (|.ar r.|)-element Element of TT* such that
A1: phi=<*r*>^(C.V) by FOMODEL1:def 35; set m=|.ar r.|;
reconsider FV=V as m-element FinSequence of TT by FOMODEL0:26;
reconsider newstrings=f*FV as m-element FinSequence of TT;
V in TTT*; then
reconsider VV=V as Element of SS**;
A2: rng V c= TT & dom f = TT by FUNCT_2:def 1, RELAT_1:def 19;
psi = e.phi by FOMODEL0:def 22 .= (e.<*r*>)^(e.(C.VV))
by A1, FOMODEL0:36 .= <*r*>^(e.(C.VV)) by FOMODEL0:35 .= <*r*>^(C.(e*VV))
by FOMODEL0:37 .= <*r*>^(C.newstrings) by A2, RELAT_1:165;
hence thesis;
end;
end;

registration
let S; let m0 be zero number; let phi be m0-wff string of S;
cluster Depth phi -> zero for number;
coherence by FOMODEL2:def 31;
end;

Lm33: ex psi2 being wff string of S st
(Depth psi1=Depth psi2 & (l1 SubstWith l2).psi1=psi2)
proof
set e=l1 SubstWith l2, N=TheNorSymbOf S, L=LettersOf S;
defpred Q[wff string of S] means ex psi being wff string of S st
(Depth psi=Depth $1 & e.$1=psi);
defpred P[Nat] means Depth phi <= $1 implies Q[phi];
A1: P[0]
proof
thus Depth phi <=0 implies Q[phi]
proof
set D=Depth phi; assume
 D<=0; then
 D=0; then reconsider p0=phi as 0-wff string of S by FOMODEL2:def 31;
reconsider psi=(l1,l2)-SymbolSubstIn p0 as 0wff string of S; take psi;
thus Depth psi = D;
thus e.phi=psi by FOMODEL0:def 22;
end;
end;
A2: for n st P[n] holds P[n+1]
proof
let n; set Fn=S-formulasOfMaxDepth n; assume
A3: P[n];
thus Depth phi <= n+1 implies Q[phi]
proof
set D=Depth phi; assume
A4: D <= (n+1);
per cases;
suppose phi is 0wff;
then reconsider p0=phi as 0wff string of S;
reconsider psi=(l1, l2)-SymbolSubstIn p0 as 0wff string of S; take psi;
thus Depth psi = D;
thus e.phi = psi by FOMODEL0:def 22;
end;
suppose A5: phi is exal; then
consider m such that
A6: D=m+1 by NAT_1:6; phi in m-ExFormulasOf S by A6, A5, FOMODEL2:18;
then consider v being Element of L,
phi1 being Element of S-formulasOfMaxDepth m such that
A7: phi=<*v*>^phi1;
reconsider l=v as literal Element of S; reconsider
phi11 = phi1 as m-wff string of S by FOMODEL2:def 24; set m1=Depth phi11;
m1+1 <= n+1 by A4, A7, FOMODEL2:17; then
consider psi1 being wff string of S such that
A8: Depth psi1=Depth phi11 & e.phi11=psi1 by A3, XREAL_1:8;
l=l1 or l<>l1; then e.<*l*>=<*l2*> or e.<*l*>=<*l*> by FOMODEL0:35; then
consider s being literal Element of S such that
A9: e.<*l*>=<*s*>; take psi=<*s*>^psi1;
thus Depth psi= Depth psi1 + 1 by FOMODEL2:17 .= D by A8, A7, FOMODEL2:17;
thus e.phi = psi by A9, A8, A7, FOMODEL0:36;
end;
suppose A10: not (phi is exal or phi is 0wff); then
consider m such that
A11: D=m+1 by NAT_1:6; phi in m-NorFormulasOf S by FOMODEL2:18, A10, A11; then
consider phi1, phi2 being Element of S-formulasOfMaxDepth m such that
A12: phi = <*N*>^phi1^phi2; reconsider
phi11=phi1, phi22=phi2 as m-wff string of S by FOMODEL2:def 24;
set m1=Depth phi11, m2=Depth phi22, M=max(m1,m2);
A13: M-m1+m1>=0+m1 & M-m2+m2>=0+m2 by XREAL_1:6;
n+1 >= M + 1 by FOMODEL2:17, A4, A12; then n >= M by XREAL_1:8; then
Q[phi11] & Q[phi22] by A3, A13, XXREAL_0:2; then
consider psi1, psi2 being wff string of S such that
A14: Depth psi1=Depth phi11 & e.phi11=psi1 &
Depth psi2=Depth phi22 & e.phi22=psi2; take psi=<*N*>^psi1^psi2;
thus D = M+1 by A12, FOMODEL2:17 .= Depth psi by A14, FOMODEL2:17;
thus e.phi= e.(<*N*>^phi11)^(e.phi22) by A12, FOMODEL0:36 .=
(e.<*N*>^(e.phi11))^psi2 by A14, FOMODEL0:36 .= psi by FOMODEL0:35, A14;
end;
end;
end;
for n holds P[n] from NAT_1:sch 2(A1,A2); hence thesis;
end;

definition
let S,m,w;
redefine func w null m -> string of S;
coherence;
end;

registration
let S, phi, m;
cluster phi null m -> ((Depth phi) + m)-wff for string of S;
coherence
proof
set D=Depth phi; phi is (D+0*m)-wff by FOMODEL2:def 31; hence thesis;
end;
end;

registration
let S,m; let phi be m-wff string of S;
cluster m - (Depth phi) -> non negative for ExtReal;
coherence
proof
set D=Depth phi; D <= m by FOMODEL2:def 31; then D-D <= m-D by XREAL_1:9;
hence thesis;
end;
end;

registration
let S,l1,l2,m; let phi be m-wff string of S;
cluster (l1,l2)-SymbolSubstIn phi -> m-wff for string of S;
coherence
proof
set D=Depth phi, e= l1 SubstWith l2; reconsider d=m-D as Nat;
consider psi being wff string of S such that
A1: Depth psi=D & e.phi=psi by Lm33; set DD=Depth psi;
psi null d is (DD+d)-wff; hence thesis by A1, FOMODEL0:def 22;
end;
end;

registration
let S,l1,l2,phi;
cluster (l1, l2)-SymbolSubstIn phi -> wff for string of S;
coherence
proof
set psi=(l1, l2)-SymbolSubstIn phi; consider m such that
A1: phi is m-wff by FOMODEL2:def 25; thus thesis by A1;
end;
end;

Lm34: Depth psi1 = Depth ((l1,l2)-SymbolSubstIn psi1)
proof
set e=l1 SubstWith l2, psi=(l1,l2)-SymbolSubstIn psi1;
consider psi2 such that
A1: Depth psi2=Depth psi1 & psi2=e.psi1 by Lm33;
thus thesis by A1, FOMODEL0:def 22;
end;

registration
let S, l1, l2, phi;
cluster Depth (l1,l2)-SymbolSubstIn phi \+\ Depth phi -> empty for set;
coherence
proof
Depth (l1,l2)-SymbolSubstIn phi = Depth phi by Lm34; hence thesis;
end;
end;

theorem for T being |.ar a.|-element Element of (AllTermsOf S)* holds
(a is not relational implies (X-freeInterpreter(a)).T = a-compound T) &
(a is relational implies
(X-freeInterpreter(a)).T = (chi(X,AtomicFormulasOf S)).(a-compound T))
proof
set AT=AllTermsOf S,SS=AllSymbolsOf S,I=X-freeInterpreter(a),f=a-compound,
m=|.ar a.|, g=f|(m-tuples_on AT), AF=AtomicFormulasOf S, ch=chi(X,AF);
let T be m-element Element of AT*;
A1: dom f=(SS*\{{}})* by FUNCT_2:def 1;
A2: g.T = f.T & a-compound(T)=f.T by FOMODEL0:16, FUNCT_1:49, Def2;
thus a is not relational implies I.T=a-compound T
by A2, Def3; assume a is relational; then I=ch*g
by Def3 .= (ch*f)|(m-tuples_on AT) by RELAT_1:83;
then I.T=(ch*f).T by FUNCT_1:49, FOMODEL0:16 .= (ch.(f.T))
by FUNCT_1:13, A1; hence thesis by Def2;
end;

registration
let S be Language;
cluster termal for string of S;
existence proof take w=<*the literal Element of S*>; thus thesis; end;
cluster 0wff for string of S;
existence proof take the Element of AtomicFormulasOf S; thus thesis; end;
end;

theorem Th7: ((I-TermEval)*
((((l,tt0) ReassignIn ((S,X)-freeInterpreter),tt0)-TermEval).n))|
(S-termsOfMaxDepth.n)=
((((l,I-TermEval.tt0) ReassignIn I,I-TermEval.tt0)-TermEval).n)|
(S-termsOfMaxDepth.n) ::# to be replaced by Th11
proof
set II=U-InterpretersOf S;
reconsider u=(I-TermEval).tt0 as Element of U;
set F=S-firstChar, FI=(S,X)-freeInterpreter, H=(l,tt0) ReassignIn FI,
TT=AllTermsOf S, TI=(I,u)-TermEval, TF=(FI,tt0)-TermEval,
TH=(H,tt0)-TermEval,TII=I-TermEval, J=(l,TII.tt0) ReassignIn I,
TJ=(J,u)-TermEval, C=S-multiCat, SS=AllSymbolsOf S, T=S-termsOfMaxDepth;
reconsider t0=tt0 as termal string of S; set k=Depth t0;
reconsider t00=t0 as k-termal string of S by FOMODEL1:def 40;
A1: l in {l} & dom (l.-->({}.-->tt0))={l} & dom (l.-->({}.-->(TII.tt0)))={l}
by TARSKI:def 1; then H.l=(l.-->({}.-->tt0)).l &
J.l=(l.-->({}.-->(TII.tt0))).l by FUNCT_4:13; then
A2: H.l = {}.-->tt0 & J.l={}.-->(TII.tt0) by A1, FUNCOP_1:7;
defpred P[Nat] means (TII*(TH.$1)) | (T.$1) = (TJ.$1)|(T.$1);
A3: P[0]
proof
A4: dom (TT -->u)=TT & dom (TT-->tt0) = TT & dom TII=TT by FUNCT_2:def 1;
TI.0=TT-->u & TH.0=TT-->tt0 by FOMODEL2:def 8; then (TII*(TH.0)) =
 TT --> (TII.tt0) by FUNCOP_1:17,A4
.= TJ.0 by FOMODEL2:def 8; hence thesis;
end;
A5: for m st P[m] holds P[m+1]
proof
let m; reconsider mm=m, MM=m+1 as Element of NAT by ORDINAL1:def 12; assume
A6: P[m];
reconsider TM=T.MM, Tm=T.mm as Subset of TT by FOMODEL1:2;
TJ.mm is Element of Funcs(TT,U) & TI.MM is Element of Funcs(TT,U)
& TJ.MM is Element of Funcs(TT,U) & TI.mm is Element of Funcs(TT,U); then
reconsider Jm=TJ.mm, JM=TJ.MM, IM=TI.MM, Imm=TI.mm as Function of TT,U;
TH.mm is Element of Funcs(TT,TT) & TH.MM is Element of Funcs(TT,TT); then
reconsider Hm=TH.mm, HM=TH.MM as Function of TT,TT;
set LH=(TII*HM)|TM, RH=JM|TM;
A7: dom LH=TM & dom RH=TM by PARTFUN1:def 2;
now
let x be object; assume
A8: x in dom LH; then reconsider tt=x as Element of TT by A7;
reconsider t=x as (mm+1)-termal string of S
by A7,  FOMODEL1:def 33, A8; reconsider ttt=x as Element of TM
by A8; set ST=SubTerms t, o=F.t, n=|.ar o.|;
((IM*HM)|TM).ttt \+\ (IM*HM).ttt = {} & (JM|TM).ttt \+\ JM.ttt={}
& ((TII*HM)|TM).ttt \+\ (TII*HM).ttt={}; then
A9:((IM*HM)|TM).x= (IM*HM).x & (JM|TM).x=JM.x &
((TII*HM)|TM).x = (TII*HM).x by FOMODEL0:29; (IM*HM).tt \+\ IM.(HM.tt)={}
& (TII*HM).tt\+\ TII.(HM.tt)={}; then
A10: (IM*HM).t=IM.(HM.t) & (TII*HM).tt=TII.(HM.tt)  by FOMODEL0:29;
reconsider newterms=Hm*ST as n-element FinSequence of TT by FOMODEL0:26;
reconsider newtermss=newterms as Element of n-tuples_on TT by FOMODEL0:16;
reconsider newtermsss=newterms as FinSequence of SS*\{{}} by FOMODEL0:26;
(o-compound|(n-tuples_on TT)).newtermss \+\ (o-compound.newtermss) = {};
then
A11: (o-compound|(n-tuples_on TT)).newterms = o-compound.newterms
by FOMODEL0:29;
per cases;
suppose o=l; then o=l & t is 0-termal by FOMODEL1:16; then
(TII*HM).t=TII.(({}.-->tt0).{}) & JM.t=({}.-->(TII.tt0)).{} & {} in {{}}
by FOMODEL2:3, TARSKI:def 1, A10, A2; then
(TII*HM).t=TII.tt0 & JM.t=TII.tt0 by FUNCOP_1:7;
hence LH.x=RH.x by A9;
end;
suppose o<>l; then
A12: not o in dom (l .--> ({}.-->tt0)) &
not o in dom (l.-->({}.-->(TII.tt0))) by TARSKI:def 1;
then FI.o = H.o by FUNCT_4:11; then
H.o = X-freeInterpreter o by Def4 .=
o-compound|(n-tuples_on TT) by Def3; then
A13: (H.o).newterms = o-compound newtermsss by A11, Def2;
reconsider newtermssss=newterms as n-element Element of TT*;
reconsider t1=o-compound newtermssss as termal string of S;
set p=Depth t1;
reconsider pp=p as Element of NAT by ORDINAL1:def 12;
reconsider t111=t1 as p-termal string of S by FOMODEL1:def 40;
reconsider t11=t1 as Element of TT by FOMODEL1:def 32;
TI.pp is Element of Funcs(TT,U); then
reconsider Ip=TI.pp as Function of TT,U;
A14: F.t1 = t1.1 by FOMODEL0:6 .= o by FINSEQ_1:41; then
A15: SubTerms t1=newtermssss by FOMODEL1:def 37;
A16: dom (Hm|Tm)=Tm & dom (Jm|Tm)=Tm & rng ST c= Tm by
RELAT_1:def 19, PARTFUN1:def 2;
(TII*HM).t = TII.t1 by A13, FOMODEL2:3, A10
.= (I.o).(TII*(SubTerms t1)) by A14, FOMODEL2:21
.= (I.o).(TII*((Hm|Tm)*ST)) by A16, RELAT_1:165, A15
.= (I.o).((TII*(Hm|Tm))*ST) by RELAT_1:36 .=
(I.o) . (((TII*Hm)|Tm)*ST) by RELAT_1:83 .=
(I.o).(Jm*ST) by A6, A16, RELAT_1:165 .= (J.o).(Jm*ST) by FUNCT_4:11, A12
.= JM.t by FOMODEL2:3;
hence LH.x=RH.x by A9;
end;
end;
hence thesis by A7, FUNCT_1:2;
end;
for m holds P[m] from NAT_1:sch 2(A3,A5); hence thesis;
end;

definition
let S,l,tt,phi0;
func (l,tt) AtomicSubst phi0 -> FinSequence equals
<*S-firstChar.phi0*>^(S-multiCat.
(((l,tt) ReassignIn (S,{})-freeInterpreter)-TermEval*(SubTerms phi0)));
coherence;
end;

Lm35: (l,tt) AtomicSubst phi0 is 0wff string of S
proof
set ST=SubTerms phi0, FI=(S,{})-freeInterpreter, I=(l,tt) ReassignIn FI,
C=S-multiCat, F=S-firstChar, r=F.phi0, n=|.ar r.|, TT=AllTermsOf S,
TE=I-TermEval, SS=AllSymbolsOf S;
reconsider STT=ST as FinSequence of TT by FOMODEL0:26;
reconsider newterms=TE*STT as FinSequence of TT;
reconsider newtermss=newterms as Element of SS** by TARSKI:def 3;
reconsider IT=<*F.phi0*>^(C.newtermss) as string of S by FOMODEL0:30;
IT is 0wff; hence thesis;
end;

definition
let S,l,tt,phi0;
redefine func (l,tt) AtomicSubst phi0 -> string of S;
coherence by Lm35;
end;

registration
let S,l,tt,phi0;
cluster (l,tt) AtomicSubst phi0 -> 0wff for string of S;
coherence by Lm35;
end;

Lm36: S-firstChar.((l,tt) AtomicSubst phi0)=S-firstChar.phi0 &
SubTerms (l,tt) AtomicSubst phi0 =
((l,tt) ReassignIn ((S,{})-freeInterpreter))-TermEval*(SubTerms phi0)
proof
set psi0=(l,tt) AtomicSubst phi0, F=S-firstChar, C=S-multiCat,
TT=AllTermsOf S, FI=(S,{})-freeInterpreter, I=(l,tt) ReassignIn FI,
s1=F.phi0, s2=F.psi0, n1=|.ar s1.|, n2=|.ar s2.|; thus
A1: F.psi0=psi0.1 by FOMODEL0:6 .= F.phi0 by FINSEQ_1:41;
reconsider ST=SubTerms phi0 as n1-element FinSequence of TT by FOMODEL0:26;
reconsider newST=I-TermEval*ST as n2-element FinSequence of TT by A1;
newST=SubTerms psi0 by A1, FOMODEL1:def 38; hence thesis;
end;

Lm37: (I-TermEval)*(((l,tt) ReassignIn ((S,X)-freeInterpreter))-TermEval)
= ((l,I-TermEval.tt) ReassignIn I)-TermEval
proof
set TI=I-TermEval, u=TI.tt, J=(l,u) ReassignIn I,TJ=J-TermEval,
F=S-firstChar,C=S-multiCat,FI=(S,X)-freeInterpreter,FJ=(l,tt) ReassignIn FI,
TF=FJ-TermEval, TT=AllTermsOf S, T=S-termsOfMaxDepth;
reconsider LH=TI*TF, RH=TJ as Function of TT,U;
now
let tt0 be Element of TT; reconsider t=tt0 as termal string of S;
set n=Depth t;
reconsider nn=n, NN=n+1 as Element of NAT by ORDINAL1:def 12;
reconsider tn=t as n-termal string of S by FOMODEL1:def 40;
tn is (n+0*1)-termal; then reconsider tN=tn as NN-termal string of S;
reconsider TN=T.NN, Tn=T.nn as Subset of TT by FOMODEL1:2;
reconsider tnn=tn as Element of Tn by FOMODEL1:def 33;
reconsider tNN=tN as Element of TN by FOMODEL1:def 33;
(FJ,tt)-TermEval.NN is Element of Funcs(TT,TT); then
reconsider FJN=(FJ,tt)-TermEval.NN as Function of TT,TT;
(J,u)-TermEval.NN is Element of Funcs(TT,U); then reconsider
JN=(J,u)-TermEval.NN as Function of TT,U;
TI.(FJN.tt0) \+\ (TI*FJN).tt0={} & ((TI*FJN)|TN).tNN \+\ (TI*FJN).tNN={} &
(JN|TN).tNN \+\ JN.tNN ={}; then
A1: (TI*FJN).tt0=TI.(FJN.tt0) & ((TI*FJN)|TN).tt0 = (TI*FJN).tt0 &
(JN|TN).tt0 = JN.tt0 by FOMODEL0:29;
LH.tt0 \+\ TI.(TF.tt0)={}; then
LH.tt0 = TI.(TF.tt0) by FOMODEL0:29 .= TI.(FJ-TermEval tt0)
by FOMODEL2:def 10 .= TI.(FJN.tnn) by FOMODEL2:def 9
.= ((J,u)-TermEval.NN).tnn by A1, Th7 .= J-TermEval tt0
by FOMODEL2:def 9 .= TJ.tt0 by FOMODEL2:def 10; hence LH.tt0=RH.tt0;
end;
hence thesis by FUNCT_2:63;
end;

theorem Th8: I-AtomicEval ((l,tt) AtomicSubst phi0) =
((l,I-TermEval.tt) ReassignIn I)-AtomicEval phi0
proof
set psi0=(l,tt) AtomicSubst phi0, u=I-TermEval.tt, J=(l,u) ReassignIn I,
F=S-firstChar, C=S-multiCat, FI=(S,{})-freeInterpreter, s1=F.phi0, s2=F.psi0,
n1=|.ar s1.|, n2=|.ar s2.|, TI=I-TermEval, TJ=J-TermEval, E=TheEqSymbOf S,
FJ=(l,tt) ReassignIn FI, d=U-deltaInterpreter;
not s1 in dom (l.-->({}.-->u)) by TARSKI:def 1; then
A1: s1=s2 & J.s1=I.s1 by FUNCT_4:11, Lm36;
A2: TI*(SubTerms psi0) = (TI*(FJ-TermEval*(SubTerms phi0))) by Lm36 .=
((TI*(FJ-TermEval))*(SubTerms phi0)) by RELAT_1:36 .=
(TJ*(SubTerms phi0)) by Lm37;
per cases;
suppose A3: s2<>E; then I-AtomicEval psi0 =
(J.s1).(TJ*(SubTerms phi0)) by FOMODEL2:14, A1, A2
.= J-AtomicEval phi0 by FOMODEL2:14, A3, A1; hence thesis;
end;
suppose A4: s2=E; then I-AtomicEval psi0= d.(TI*(SubTerms psi0))
by FOMODEL2:14 .= J-AtomicEval phi0 by FOMODEL2:14, A4, A1, A2;
hence thesis;
end;
end;

registration
let S, l1, l2, m;
cluster (l1 SubstWith l2)|(S-termsOfMaxDepth.m) ->
(S-termsOfMaxDepth.m)-valued for Relation;
coherence
proof
set s=l1 SubstWith l2, T=S-termsOfMaxDepth, SS=AllSymbolsOf S;
reconsider Tm=T.m as Subset of SS* by XBOOLE_1:1; set f=s|Tm;
A1: dom f=Tm by PARTFUN1:def 2;
now
let x be object; assume x in Tm; then reconsider xx=x as Element of Tm;
reconsider t=xx as m-termal string of S by
TARSKI:def 3, FOMODEL1:def 33; f.xx \+\ s.xx={}; then
f.x = s.t by FOMODEL0:29 .= (l1, l2)-SymbolSubstIn t by FOMODEL0:def 22;
hence f.x in T.m by FOMODEL1:def 33;
end;
hence thesis by FUNCT_2:3, A1;
end;
end;

registration
let S, l1, l2;
cluster (l1 SubstWith l2)|(AllTermsOf S) -> (AllTermsOf S)-valued
for Relation;
coherence
proof
set f=l1 SubstWith l2, SS=AllSymbolsOf S, TT=AllTermsOf S; reconsider
TTT=TT as non empty Subset of SS* by XBOOLE_1:1;
A1: dom (f|TTT)=TTT by PARTFUN1:def 2;
now
let x be object; assume x in TTT; then reconsider tt=x as Element of TTT;
reconsider t=tt as termal string of S by TARSKI:def 3;
(f|TTT).tt \+\ f.tt={}; then (f|TTT).x = f.t by FOMODEL0:29 .=
(l1,l2)-SymbolSubstIn t by FOMODEL0:def 22;
hence (f|TTT).x in TTT by FOMODEL1:def 32;
end;
hence thesis by A1, FUNCT_2:3;
end;
end;

Lm38: SubTerms ((l1,l2)-SymbolSubstIn t) = (l1 SubstWith l2)*(SubTerms t)
proof
set s=l1 SubstWith l2, newt=(l1,l2)-SymbolSubstIn t, ST=SubTerms t,
F=S-firstChar, C=S-multiCat, ST2=SubTerms newt, SS=AllSymbolsOf S,
TT=AllTermsOf S;
reconsider TTT=TT as Subset of SS* by XBOOLE_1:1;
A1: rng ST c= TT & dom (s|TTT)=TTT & rng (s|TT) c= TT
by RELAT_1:def 19, PARTFUN1:def 2; then reconsider ss=s|TT as
Function of TT, TT by FUNCT_2:2;
per cases;
suppose not t is 0-termal; then reconsider
s1=F.t as non literal ofAtomicFormula Element of S by FOMODEL1:16;
reconsider h=(l1,l2)-SymbolSubstIn <*s1*> as 1-element SS-valued FinSequence;
set s2=F.newt, n1=|.ar s1.|, n2=|.ar s2.|;
ss*ST = s*ST by RELAT_1:165, A1; then reconsider
p=s*ST as n1-element FinSequence of TT by FOMODEL0:26;
A2: newt=<*s2*>^(C.ST2) by FOMODEL1:def 37;
t=<*s1*>^(C.ST) by FOMODEL1:def 37; then
 s.t=(s.<*s1*>)^(s.(C.ST)) by FOMODEL0:36 .=
h^(s.(C.ST)) by FOMODEL0:def 22 .= h^(C.(s*ST)) by FOMODEL0:37; then
A3: newt=h^(C.p) by FOMODEL0:def 22; then
 h=<*s2*> & h=<*s1*> by A2,FOMODEL0:41, 34;
then h.1=s1 & h.1=s2 by FINSEQ_1:40; then
reconsider pp=p as n2-element Element of TT*;
newt=<*s2*>^(C.pp) by A3, A2,FOMODEL0:41;
hence thesis by FOMODEL1:def 37;
end;
suppose t is 0-termal; then reconsider t0=t as 0-termal string of S;
reconsider newt=(l1,l2)-SymbolSubstIn t0 as 0-termal string of S;
SubTerms newt={} & SubTerms t0={}; hence thesis;
end;
end;

Lm39:
SubTerms ((l1,l2)-SymbolSubstIn phi0) = (l1 SubstWith l2)*(SubTerms phi0)
proof
set s=l1 SubstWith l2, psi0=(l1,l2)-SymbolSubstIn phi0, ST1=SubTerms phi0,
F=S-firstChar, C=S-multiCat, ST2=SubTerms psi0, SS=AllSymbolsOf S,
TT=AllTermsOf S;
reconsider TTT=TT as Subset of SS* by XBOOLE_1:1;
A1: rng ST1 c= TT & dom (s|TTT)=TTT & rng (s|TT) c= TT
by RELAT_1:def 19, PARTFUN1:def 2; then reconsider ss=s|TT as
Function of TT, TT by FUNCT_2:2;
reconsider r1=F.phi0, r2=F.psi0 as relational Element of S; phi0.1 = r1
by FOMODEL0:6; then r1=phi0.1 & psi0.1 = phi0.1 by FUNCT_4:105; then
A2: r1=r2 by FOMODEL0:6; set n1=|.ar r1.|, n2=|.ar r2.|; s*ST1 =
ss*ST1 by RELAT_1:165, A1; then s*ST1 is n2-element FinSequence of TT
by FOMODEL0:26, A2; then reconsider ST22=s*ST1 as n2-element Element of TT*;
reconsider ST11=ST1 as SS*-valued FinSequence; phi0=<*r1*>^(C.ST1)
by FOMODEL1:def 38; then s.phi0=s.<*r1*>^(s.(C.ST1)) by FOMODEL0:36
.= <*r1*> ^ (s.(C.ST1)) by FOMODEL0:35 .= <*r2*>^(C.ST22)
by FOMODEL0:37, A2; then psi0=<*r2*>^(C.ST22) by FOMODEL0:def 22;
hence thesis by FOMODEL1:def 38;
end;

Lm40: ((l1,u) ReassignIn I)-TermEval |
(((AllSymbolsOf S)\{l2})*/\(S-termsOfMaxDepth.m)) =
(((l2,u) ReassignIn I)-TermEval * (l1 SubstWith l2)) |
(((AllSymbolsOf S)\{l2})*/\(S-termsOfMaxDepth.m))
proof
set I1=(l1,u) ReassignIn I, I2=(l2,u) ReassignIn I, s=l1 SubstWith l2,
E1=I1-TermEval, E2=I2-TermEval, T=S-termsOfMaxDepth, TT=AllTermsOf S,
SS=AllSymbolsOf S, F=S-firstChar, C=S-multiCat, g1=l1.-->({}.-->u),
g2=l2.-->({}.-->u), L=LettersOf S;
reconsider SSS=SS\{l2} as non empty Subset of SS; set D=SSS*;
l1 in {l1} & l2 in {l2} by TARSKI:def 1; then l1 in dom g1 & l2 in dom g2; then
I1.l1=g1.l1 & I2.l2=g2.l2 by FUNCT_4:13; then
A1: I1.l1={}.-->u & I2.l2={}.-->u by FUNCOP_1:72;
defpred P[Nat] means E1|((T.$1)/\D)=(E2*s)|((T.$1)/\D);
A2: P[0]
proof
reconsider T0=T.0 as non empty Subset of TT by FOMODEL1:2;
reconsider T00=T0 as non empty Subset of SS* by XBOOLE_1:1;
reconsider ss=s|(T.0) as (T.0)-valued Function;
reconsider X0=T0/\D as Subset of T0;
reconsider X=T0/\D as Subset of TT by XBOOLE_1:1;
ss|D is T0-valued; then reconsider sss=s|(T0/\D) as T00-valued Function
by RELAT_1:71;
A3: dom (E2*sss)=X & dom (E1|X)=X by PARTFUN1:def 2;
rng (E2*sss) c= U & rng (E1|X) c= U by RELAT_1:def 19; then reconsider
f1=E1|X, f2=E2*sss as Function of X, U by FUNCT_2:2, A3;
now
let x be object; assume
A4: x in X; then reconsider X00=X0 as non empty Subset of D;
dom sss=X & rng sss c= T0 by PARTFUN1:def 2, RELAT_1:def 19;
then reconsider ssss=sss as Function of X00, T0 by FUNCT_2:2;
reconsider xx=x as Element of X00 by A4; reconsider xd=xx as
Element of D; reconsider t0=x as 0-termal string of S
by TARSKI:def 3, FOMODEL1:def 33, A4; reconsider t00=t0 as
Element of T0 by FOMODEL1:def 33; T0=AtomicTermsOf S by FOMODEL1:def 30;
then reconsider tl=t00 as 1-element FinSequence of L by FOMODEL0:12;
reconsider LL=L\{l2} as non empty Subset of L;
rng tl c= L & rng xd c= (SS\{l2}) by RELAT_1:def 19; then
rng xx c= L/\(SS\{l2}) by XBOOLE_1:19; then
rng xx c= (L null SS)\{l2} by XBOOLE_1:49;
then reconsider xxx=tl as 1-element LL-valued FinSequence by RELAT_1:def 19;
{xxx.1} \ LL={}; then reconsider lx=xxx.1 as Element of LL by ZFMISC_1:60;
not lx in {l2} by XBOOLE_0:def 5; then
A5: lx<>l2 & not lx in dom g2 by TARSKI:def 1;
A6: len xxx=1 by CARD_1:def 7;
reconsider newt=(l1,l2)-SymbolSubstIn t0 as 0-termal string of S;
reconsider s1=F.t0, s2=F.newt as literal Element of S;
A7: s1=lx & s2=newt.1 by FOMODEL0:6; (E2*ssss).xx \+\ E2.(ssss.xx) ={} &
sss.xx\+\s.xx={} & f1.xx\+\E1.xx={};then
A8: (E2*sss).x=E2.(sss.x) & sss.x=s.x & f1.x=E1.x by FOMODEL0:29;
A9: f2.x = E2.newt by A8, FOMODEL0:def 22 .=
I2.s2.(E2*(SubTerms newt)) by FOMODEL2:21 .= I2.s2.{};
A10: f1.x = I1.s1.(E1*(SubTerms t0)) by A8, FOMODEL2:21 .= I1.s1.{};
per cases;
suppose A11: lx=l1;
t0=<*l1*> by A6, FINSEQ_1:40, A11; then newt=<*l2*> by FOMODEL0:34;
hence f1.x=f2.x by A11, A10, A1, A9, A7;
end;
suppose lx<>l1; then newt.1=lx & not lx in {l1} by FUNCT_4:105,
TARSKI:def 1; then s2=lx & not lx in dom g1 by FOMODEL0:6;
then f2.x=I.lx.{} & f1.x=I.lx.{} by A7, A9, A10, FUNCT_4:11, A5;
hence f1.x=f2.x;
end;
end;
then f1=f2 by FUNCT_2:12; hence thesis by RELAT_1:83;
end;
A12: for n st P[n] holds P[n+1]
proof
let n; reconsider nn=n,NN=n+1 as Element of NAT by ORDINAL1:def 12; assume
A13: P[n]; reconsider Tnn=T.nn, TNN=T.NN as non empty Subset of TT
by FOMODEL1:2; reconsider Xn= Tnn/\D, X= TNN/\D as Subset of TT
by XBOOLE_1:1; (s|(T.NN))|D is TNN-valued; then
reconsider sX=s|X as TT-valued Function by RELAT_1:71;
dom (s|X)=X & rng sX c= TT by PARTFUN1:def 2, RELAT_1:def 19; then
reconsider sXX=sX as Function of X,TT by FUNCT_2:2;
(s|(T.nn))|D is Tnn-valued; then reconsider
sXn=s|Xn as TT-valued Function by RELAT_1:71;
A14: dom (E1|X)=X & dom (E2*sX)=X & dom (E2*sXn)=Xn by PARTFUN1:def 2;
rng (E1|X) c= U & rng (E2*sX) c= U by RELAT_1:def 19; then
reconsider f1=E1|X, f2=E2*sX as Function of X, U by FUNCT_2:2, A14;
now
let x be object; assume
A15: x in X; then reconsider XX=X as non empty Subset of TNN;
reconsider xxx=x as Element of XX by A15;
reconsider xx=xxx as Element of D by A15;
reconsider tN=x as Element of TNN by A15; reconsider
t=tN as NN-termal string of S by TARSKI:def 3, FOMODEL1:def 33;
reconsider ttt=t as Element of TT; set d=Depth t;
reconsider aux=rng xx as Subset of SS\{l2} by RELAT_1:def 19;
aux* c= D & rng (SubTerms t) c= (rng t)* by RELAT_1:def 19; then
A16: rng (SubTerms t) c= D by XBOOLE_1:1;
reconsider tt=t as (nn+1)-termal string of S;
reconsider newt=(l1,l2)-SymbolSubstIn t as NN-termal string of S;
A17: rng (SubTerms tt) c= T.nn by RELAT_1:def 19;
A18: dom (E1|Xn)=Xn & dom ((E2*s)|Xn)=Xn by A14, RELAT_1:83, PARTFUN1:def 2;
f1.xxx\+\E1.xxx={} & s|XX.xxx \+\ s.xxx={} &
(E2*sXX).xxx \+\ E2.(sXX.xxx)={}; then
A19: f1.x=E1.x & sX.x=s.x & f2.x=E2.(sX.x) by FOMODEL0:29;
per cases;
suppose d=0; then reconsider t0=t as 0-termal string of S
by FOMODEL1:def 40; reconsider l=F.t0 as literal Element of S;
A20: t0=<*l*>^(C.(SubTerms t0)) by FOMODEL1:def 37 .= <*l*> null {};
{xx.1} \ SSS = {}; then t0.1 in SSS by ZFMISC_1:60; then
l in SSS by FOMODEL0:6;
then not l in dom g2 by XBOOLE_0:def 5; then
A21: I2.l = I.l by FUNCT_4:11;
A22: f1.t0=I1.l.(E1*(SubTerms t0)) by FOMODEL2:21, A19 .= I1.l.{};
per cases;
suppose
A23: l in dom g1;
l=l1 by A23, TARSKI:def 1; then
 f1.t0=I1.l1.{} & s.t0=<*l2*> by A22, FOMODEL0:35, A20; then
f2.t0 = I2.(F.<*l2*>).(E2*(SubTerms <*l2*>)) by FOMODEL2:21, A19
.= I2.(<*l2*>.1).{} by FOMODEL0:6 .= I2.l2.{};
hence f2.x=f1.x by A23, TARSKI:def 1, A22, A1;
end;
suppose
A24: not l in dom g1; then
 f1.t0=I.l.{} & not l in {l1} by A22, FUNCT_4:11; then
l<>l1 by TARSKI:def 1; then s.t0=t0 by A20, FOMODEL0:35; then f2.t0 =
I2.l.(E2*(SubTerms t0)) by A19, FOMODEL2:21 .= I2.l.{};
hence f2.x=f1.x by A24, A22, FUNCT_4:11, A21;
end;
end;
suppose d<>0;
then A25: not t is 0-termal; then reconsider
s1=F.t as non literal ofAtomicFormula Element of S by FOMODEL1:16;
t.1 = F.t & F.t is non literal by FOMODEL1:16, A25, FOMODEL0:6; then
newt.1 = s1 by FUNCT_4:105; then reconsider s2=F.newt as
non literal ofAtomicFormula Element of S by FOMODEL0:6;
(not s1 in dom g1) & (not s2 in dom g2) by TARSKI:def 1; then
A26: I1.s1=I.s1 & I2.s2=I.s2 by FUNCT_4:11; s1<>l1; then t.1<>l1
by FOMODEL0:6; then newt.1 = t.1 by FUNCT_4:105 .= s1 by FOMODEL0:6; then
A27: s1=s2 by FOMODEL0:6; thus
f2.x = E2.newt by A19, FOMODEL0:def 22 .=
I2.s2.(E2*(SubTerms newt)) by FOMODEL2:21 .=
I2.s2.(E2*(s*(SubTerms t))) by Lm38 .= I.s2.(E2*s*(SubTerms t))
by A26, RELAT_1:36 .= I.s2.(((E2*s)|(T.n/\D))*(SubTerms t))
by RELAT_1:165, A17, A16, XBOOLE_1:19, A18 .=
I.s2.(E1*(SubTerms t)) by RELAT_1:165, A17,A16, XBOOLE_1:19, A18, A13 .=
f1.x by A19, A26, A27, FOMODEL2:21;
end;
end;
then f1=f2 by FUNCT_2:12; hence thesis by RELAT_1:83;
end;
for m holds P[m] from NAT_1:sch 2(A2,A12);
hence thesis;
end;

Lm41: phi0 is ((AllSymbolsOf S)\{l2})-valued implies
((l1,u) ReassignIn I)-AtomicEval phi0 =
((l2,u) ReassignIn I)-AtomicEval ((l1,l2)-SymbolSubstIn phi0)
proof
set I1=(l1,u) ReassignIn I, I2=(l2,u) ReassignIn I, s=l1 SubstWith l2,
E1=I1-TermEval, E2=I2-TermEval, T=S-termsOfMaxDepth, TT=AllTermsOf S,
SS=AllSymbolsOf S, F=S-firstChar, C=S-multiCat, g1=l1 .--> ({}.-->u),
g2=l2.-->({}.-->u), L=LettersOf S, E=TheEqSymbOf S, d=U-deltaInterpreter,
SSS=SS\{l2}; reconsider SSSS=SSS as non empty Subset of SS;
reconsider psi0=(l1,l2)-SymbolSubstIn phi0 as 0wff string of S;
reconsider r=F.phi0, r2=F.psi0 as relational Element of S;
phi0.1=r by FOMODEL0:6; then
A1: r = psi0.1 by FUNCT_4:105 .= r2 by FOMODEL0:6;
not r in dom g1 & not r in dom g2 by TARSKI:def 1; then
A2: I1.r=I.r & I2.r=I.r by FUNCT_4:11;
dom E1=TT & dom E2=TT by FUNCT_2:def 1; then
A3: dom (E1|(SSS*))=TT/\(SSS*) & dom (s|(SSSS*))=SSSS*
by PARTFUN1:def 2, RELAT_1:61; reconsider
ST1=SubTerms phi0 as Element of TT*; consider mm such that
A4: SubTerms phi0 is Element of (T.mm)* by Lm3; reconsider Tm=T.mm as
non empty Subset of TT by FOMODEL1:2;
A5: dom (E1|(SSS*/\Tm)) = dom (E1|(SSS*)|Tm) by RELAT_1:71 .=
(dom (E1|(SSS*))) /\ Tm by RELAT_1:61 .=
(Tm null TT) /\ (SSS*) by A3, XBOOLE_1:16 .= SSS*/\Tm;
A6: dom (s|(SSS*/\Tm))=dom(s|(SSS*)|Tm) by RELAT_1:71 .=
SSS*/\Tm by A3, RELAT_1:61;
assume phi0 is SSS-valued; then reconsider R=rng phi0 as
non empty Subset of SSSS by RELAT_1:def 19;
rng (SubTerms phi0) c= R* & R* c= SSS* by RELAT_1:def 19; then
A7: rng (SubTerms phi0) c= SSS* & rng (SubTerms phi0) c= Tm by
RELAT_1:def 19, A4;
A8: E1*(SubTerms phi0) = (E1|(SSS*/\Tm))*(SubTerms phi0) by
A7, XBOOLE_1:19, A5, RELAT_1:165 .=
((E2*s)|(SSS*/\Tm))*(SubTerms phi0) by Lm40 .=
(E2*(s|(SSS*/\Tm)))*(SubTerms phi0) by RELAT_1:83 .=
E2*((s|(SSS*/\Tm))*(SubTerms phi0)) by RELAT_1:36 .=
E2*(s*(SubTerms phi0)) by A7, XBOOLE_1:19,  A6, RELAT_1:165 .=
E2*(SubTerms psi0) by Lm39;
per cases;
suppose
A9: r<>E; then I1-AtomicEval phi0 = I2.r2.(E2*(SubTerms psi0))
by FOMODEL2:14, A8, A1, A2 .= I2-AtomicEval psi0
by FOMODEL2:14, A9, A1; hence thesis;
end;
suppose
A10: r=E; then I1-AtomicEval phi0= d.(E1*(SubTerms phi0)) by FOMODEL2:14 .=
I2-AtomicEval psi0 by A10, A1, FOMODEL2:14, A8;
hence thesis;
end;
end;

theorem Th9: (not l2 in rng psi) implies for I being Element of
U-InterpretersOf S holds (l1,u1) ReassignIn I-TruthEval psi=
(l2,u1) ReassignIn I-TruthEval (l1,l2)-SymbolSubstIn psi
proof
set II=U-InterpretersOf S,s=l1 SubstWith l2, SS=AllSymbolsOf S,SSS=SS\{l2},
TT=AllTermsOf S, T=S-termsOfMaxDepth, F=S-firstChar, N=TheNorSymbOf S;
reconsider SSSS=SSS as non empty Subset of SS;
defpred P[Nat] means for I being (Element of II), u, phi st
phi is $1-wff & phi is SSS-valued holds
((l1,u) ReassignIn I)-TruthEval phi =
((l2,u) ReassignIn I)-TruthEval ((l1,l2)-SymbolSubstIn phi);
A1: P[0]
proof
let I be Element of II; let u, phi;
set I1=(l1,u) ReassignIn I, I2=(l2,u) ReassignIn I;
assume phi is 0-wff; then reconsider phi0=phi as
0wff string of S; assume phi is SSS-valued; then
I1-TruthEval phi0 =
I2-TruthEval ((l1,l2)-SymbolSubstIn phi0) by Lm41; hence thesis;
end;
A2: for n st P[n] holds P[n+1]
proof
let n; assume
A3: P[n]; let I be Element of II; let u, phi;
set I1=(l1,u) ReassignIn I, I2=(l2,u) ReassignIn I; assume
A4: phi is (n+1)-wff & phi is SSS-valued; then reconsider
phii=phi as (n+1)-wff string of S;
reconsider x=phi as non empty SSSS-valued FinSequence by A4; {x.1} \ SSS={};
then phii.1 in SSS by ZFMISC_1:60; then F.phii in SSS by FOMODEL0:6; then
not F.phii in {l2} by XBOOLE_0:def 5; then
A5: F.phii <> l2 by TARSKI:def 1;
reconsider psi=(l1,l2)-SymbolSubstIn phii as (n+1)-wff string of S;
reconsider phi1=head phii as n-wff string of S;
reconsider psi1=(l1,l2)-SymbolSubstIn phi1 as n-wff string of S;
per cases;
suppose phi is exal & not phi is 0wff; then reconsider phii as
non 0wff exal (n+1)-wff string of S; set l=F.phii, phi2=tail phii;
A6: phii= <*l*>^phi1^phi2 by FOMODEL2:23 .= <*l*>^phi1; then
s.phii=s.<*l*>^(s.phi1) by FOMODEL0:36 .=
s.<*l*>^psi1 by FOMODEL0:def 22; then
A7: psi=s.<*l*>^psi1 by FOMODEL0:def 22;
x=<*l*>^phi1^{} by A6; then
A8: phi1 is SSSS-valued by FOMODEL0:44;
I1-TruthEval phii=1 iff I2-TruthEval psi=1
proof
per cases;
suppose A9: l=l1; then
A10: psi=<*l2*>^psi1 by A7, FOMODEL0:35;
hereby
assume I1-TruthEval phii=1; then consider u1 such that
A11: ((l,u1) ReassignIn I1)-TruthEval phi1=1 by A6, FOMODEL2:19;
1= ((l1,u1) ReassignIn I)-TruthEval phi1 by A11, A9, FOMODEL0:43 .=
((l2,u1) ReassignIn I)-TruthEval psi1 by A8, A3 .=
((l2,u1) ReassignIn I2)-TruthEval psi1 by FOMODEL0:43;
hence I2-TruthEval psi=1 by A10, FOMODEL2:19;
end;
assume I2-TruthEval psi=1; then consider u2 such that
A12: ((l2,u2) ReassignIn I2)-TruthEval psi1=1 by A10, FOMODEL2:19;
1 = ((l2,u2) ReassignIn I)-TruthEval psi1 by A12, FOMODEL0:43 .=
((l1,u2) ReassignIn I)-TruthEval phi1 by A8, A3 .=
((l,u2) ReassignIn I1)-TruthEval phi1 by A9, FOMODEL0:43;
hence I1-TruthEval phii=1 by A6, FOMODEL2:19;
end;
suppose A13: l<>l1; then
A14: psi=<*l*>^psi1 by A7, FOMODEL0:35;
hereby
assume I1-TruthEval phii=1; then consider u1 such that
A15: ((l,u1) ReassignIn I1)-TruthEval phi1=1 by A6, FOMODEL2:19;
1 = ((l1,u) ReassignIn (l,u1) ReassignIn I)-TruthEval phi1
by A15, A13, FOMODEL0:43
.= ((l2,u) ReassignIn (l,u1) ReassignIn I)-TruthEval psi1 by A3, A8
.= ((l,u1) ReassignIn (l2,u) ReassignIn I)-TruthEval psi1
by A5, FOMODEL0:43;
hence I2-TruthEval psi=1 by A14, FOMODEL2:19;
end;
assume I2-TruthEval psi=1; then consider u2 such that
A16: ((l,u2) ReassignIn I2)-TruthEval psi1=1 by A14, FOMODEL2:19;
1 = ((l2,u) ReassignIn (l,u2) ReassignIn I)-TruthEval psi1
by A5, A16, FOMODEL0:43 .=
((l1,u) ReassignIn (l,u2) ReassignIn I)-TruthEval phi1 by A3, A8
.= ((l,u2) ReassignIn (l1,u) ReassignIn I)-TruthEval phi1
by A13, FOMODEL0:43; hence I1-TruthEval phii=1 by A6, FOMODEL2:19;
end;
end;
then I1-TruthEval phii=1 iff not I2-TruthEval psi=0 by FOMODEL0:39;
hence thesis by FOMODEL0:39;
end;
suppose
not phi is exal & not phi is 0wff; then reconsider phii
as (n+1)-wff non exal non 0wff string of S;
reconsider phi2=tail phii as n-wff string of S;
reconsider psi2=(l1,l2)-SymbolSubstIn phi2
as n-wff string of S; F.phii \+\ N={}; then F.phii=N by FOMODEL0:29; then
A17: phii=<*N*>^phi1^phi2 by FOMODEL2:23;then phi1 is SSS-valued &
phi2 is SSS-valued & (I1-TruthEval phii=1 iff
(I1-TruthEval phi1=0 & I1-TruthEval phi2=0))
by A4, FOMODEL0:44, FOMODEL2:19; then
A18:(I1-TruthEval phii=1 iff (I2-TruthEval psi1=0 & I2-TruthEval psi2=0))
by A3;
A19: s.phii=psi & s.phi1=psi1 & s.phi2=psi2
by FOMODEL0:def 22; then psi=s.(<*N*>^phi1) ^ (s.phi2)
by A17, FOMODEL0:36 .= s.<*N*>^(s.phi1)^(s.phi2) by FOMODEL0:36
.= <*N*>^psi1^psi2 by FOMODEL0:35, A19; then
I2-TruthEval psi=1 iff not I1-TruthEval phi=0
by FOMODEL0:39, FOMODEL2:19, A18; hence thesis by FOMODEL0:39;
end;
suppose phi is 0-wff; hence thesis by A1, A4;
end;
end;
A20: for m holds P[m] from NAT_1:sch 2(A1, A2);
set m=Depth psi; assume not l2 in rng psi; then
{l2} misses rng psi & rng psi c= SS by RELAT_1:def 19, ZFMISC_1:50; then
A21: psi is m-wff & psi is SSS-valued
by XBOOLE_1:86, FOMODEL2:def 31, RELAT_1:def 19;
let I be Element of II; thus thesis by A20, A21;
end;

definition
let S; let l, t, n; let f be FinSequence-yielding Function; let phi;
func (l,t,n,f) Subst2 phi -> FinSequence equals :Def20:
<*TheNorSymbOf S*>^(f.(head phi))^(f.(tail phi))
if Depth phi=n+1 & not phi is exal,
<* the Element of (LettersOf S\(rng t \/ (rng head phi)\/{l}))*>^(f.(
((S-firstChar.phi, the Element of
(LettersOf S\(rng t\/(rng head phi)\/{l})))-SymbolSubstIn (head phi))))
if Depth phi=n+1 & phi is exal & S-firstChar.phi<>l
otherwise f.phi;
coherence; consistency;
end;

registration
let S;
cluster -> FinSequence-yielding
for Element of Funcs(AllFormulasOf S, AllFormulasOf S);
coherence;
end;

Lm42: for f being Element of Funcs( AllFormulasOf S, AllFormulasOf S) holds
(l,t,n,f) Subst2 phi is wff string of S
proof
set FF=AllFormulasOf S, h=head phi, d=Depth phi, F=S-firstChar; let f be
Element of Funcs(FF,FF); reconsider ff=f as Function of FF, FF;
set IT=(l,t,n,f) Subst2 phi,
N=TheNorSymbOf S, L=LettersOf S, X=L\(rng t \/ (rng h) \/ {l}),
ll1=the Element of X;
reconsider hh=h, phii=phi as Element of FF by FOMODEL2:16;
reconsider newhead=ff.hh as wff string of S by TARSKI:def 3;
reconsider XX=X as non empty Subset of L; ll1 is Element of XX;
then reconsider l1=ll1 as literal Element of S;
per cases;
suppose A1: d=n+1 & not phi is exal; then
not phi is 0-wff; then reconsider phiii=phi as non 0wff
non exal wff string of S by A1; reconsider
ttt=tail phiii as wff string of S;
reconsider tt=ttt as Element of FF by FOMODEL2:16;
reconsider newtail=ff.tt as wff string of S by TARSKI:def 3;
IT=<*N*>^newhead^newtail by A1, Def20; hence thesis;
end;
suppose A2: d=n+1 & phi is exal & F.phi<>l;
reconsider phiii=phi as non 0wff exal wff string of S by A2;
reconsider l=F.phiii as literal Element of S;
reconsider newhead=(l,l1)-SymbolSubstIn h as wff string of S;
reconsider newheadd=newhead as Element of FF by FOMODEL2:16;
reconsider newesthead=ff.newheadd as wff string of S by TARSKI:def 3;
IT = <*l1*>^newesthead by A2, Def20; hence thesis;
end;
suppose d<>n+1; then IT=ff.phii by Def20;
hence thesis by TARSKI:def 3; end;
suppose F.phi=l; then F.phi=l & phi is exal; then
IT=ff.phii by Def20; hence thesis by TARSKI:def 3;
end;
end;

definition
let S; let l, t, n;
let f be Element of Funcs(AllFormulasOf S, AllFormulasOf S); let phi;
redefine func (l,t,n,f) Subst2 phi -> wff string of S;
coherence by Lm42;
end;

registration
let S; let l, t, n;
let f be Element of Funcs(AllFormulasOf S, AllFormulasOf S); let phi;
cluster (l,t,n,f) Subst2 phi -> wff for string of S;
coherence;
end;

definition
let S; let l, t, nn;
let f be Element of Funcs(AllFormulasOf S, AllFormulasOf S); let phi;
redefine func (l,t,nn,f) Subst2 phi -> Element of (AllFormulasOf S);
coherence
proof
(l,t,nn,f) Subst2 phi in AllFormulasOf S by FOMODEL2:16; hence thesis;
end;
end;

definition
let S,l,t,n; let f be Element of Funcs(AllFormulasOf S, AllFormulasOf S);
set FF=AllFormulasOf S, D=Funcs(FF,FF);
func (l,t,n,f) Subst3 -> Element of Funcs (AllFormulasOf S, AllFormulasOf S)
means :Def21: for phi holds it.phi=(l,t,n,f) Subst2 phi;
existence
proof
reconsider nn=n as Element of NAT by ORDINAL1:def 12;
deffunc F(Element of FF)=(l,t,nn,f) Subst2 $1 qua Element of FF;
consider g being Function of FF, FF such that
A1: for x being Element of FF holds g.x=F(x) from FUNCT_2:sch 4;
reconsider gg=g as Element of Funcs(FF,FF) by FUNCT_2:8; take gg;
now
let phi; reconsider phii=phi as Element of FF by FOMODEL2:16;
g.phii=F(phii) by A1; hence gg.phi=(l,t,nn,f) Subst2 phi;
end;
hence thesis;
end;
uniqueness
proof
let IT1, IT2 be Element of D; reconsider IT11=IT1, IT22=IT2 as
Function of FF, FF; assume
A2: for phi holds IT1.phi=(l,t,n,f) Subst2 phi; assume
A3: for phi holds IT2.phi=(l,t,n,f) Subst2 phi;
now
let x be object; assume x in FF; then reconsider phi=x as wff string of S;
IT1.phi= (l,t,n,f) Subst2 phi by A2 .= IT2.phi by A3;
hence IT11.x=IT22.x;
end;
hence thesis by FUNCT_2:12;
end;
end;

definition
let S,l,t; let f be Element of Funcs(AllFormulasOf S, AllFormulasOf S);
set FF=AllFormulasOf S, D=Funcs(FF,FF);
deffunc F(Nat, Element of D)=(l,t,$1,$2) Subst3;
func (l,t) Subst4 f ->
sequence of  Funcs(AllFormulasOf S, AllFormulasOf S) means :Def22:
it.0=f & for m holds it.(m+1)=(l,t,m,it.m) Subst3;
existence
proof
consider g being sequence of  D such that
A1: g.0=f & for m holds g.(m+1)=F(m,g.m qua Element of D) from NAT_1:sch 12;
take g; thus thesis by A1;
end;
uniqueness
proof
let IT1, IT2 be sequence of  D;
assume that
A2: IT1.0=f and
A3: for m holds IT1.(m+1)= F(m,IT1.m qua Element of D) and
A4: IT2.0=f and
A5: for m holds IT2.(m+1)= F(m,IT2.m qua Element of D);
IT1=IT2 from NAT_1:sch 16(A2,A3,A4,A5); hence thesis;
end;
end;

definition
let S,l,t; set AF=AtomicFormulasOf S, TT=AllTermsOf S;
func l AtomicSubst t -> Function of AtomicFormulasOf S, AtomicFormulasOf S
means :Def23:
for phi0, tt st tt=t holds it.phi0=(l,tt) AtomicSubst phi0;
existence
proof
reconsider tt=t as Element of TT by FOMODEL1:def 32; deffunc
F(Element of AF) = (l, tt) AtomicSubst $1; consider f such that
A1:dom f=AF & for x being Element of AF holds f.x=F(x) from FUNCT_1:sch 4;
now
let x be object; assume x in AF; then reconsider tt=x as Element of AF;
f.tt=F(tt) by A1; then reconsider y=f.x as 0wff string of S;
y in AF; hence f.x in AF;
end; then
reconsider ff=f as Function of AF, AF by A1, FUNCT_2:3; take ff;
hereby
let phi0, tt1; phi0 in AF; then
reconsider phi=phi0 as Element of AF; assume tt1=t;
then tt1=tt & f.phi=(l,tt) AtomicSubst phi by A1; hence
ff.phi0=(l,tt1) AtomicSubst phi0;
end;
end;
uniqueness
proof
reconsider tt=t as Element of TT by FOMODEL1:def 32;
let IT1,IT2 be Function of AF,AF; assume that
A2: for phi0, tt st tt=t holds IT1.phi0=(l,tt) AtomicSubst phi0 and
A3: for phi0, tt st tt=t holds IT2.phi0=(l,tt) AtomicSubst phi0;
now
let x be Element of AF;
consider w such that
A4: x=w & w is 0wff; reconsider phi0=w as 0wff string of S by A4;
IT1.phi0=(l,tt) AtomicSubst phi0 by A2 .= IT2.phi0 by A3;
hence IT1.x=IT2.x by A4;
end;
hence thesis by FUNCT_2:63;
end;
end;

definition
let S,l,t;
func l Subst1 t ->  Function equals
id (AllFormulasOf S) +* (l AtomicSubst t);
:: Linear Combinations in Real Unitary::  by Noboru Endou , Takashi Mitsuishi and Yasunari Shidama
end;

Lm43 l Subst1 t in Funcs(llFormulasOf S, AllFormulasOf Sjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
proof
set  S, E=
he Element of FF, f=dFF,IT= +*g,SS=llSymbolsOf ;
reconsider FFF=FF as Subset of SS      FINSEQ_1,STRUCT_0, ,BHSP_1, RUSUB_1,CARD_1,RLVECT_2, REAL_0java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
theorems FUNCT_1, FUNCT_2,FINSEQ_1,FINSEQ_2 ,FINSET_1 ,
dom f=FF  XBOOLE_0,XBOOLE_1,RUSUB_1,RUSUB_2, ,ENUMSET1,RLVECT_4,
A1:       X
  let V be;
reconsider ff=f as FF-valued Function;
  l Linear_Combination A
hence thesis by FUNCT_2:def 2;
end;

definition
let ,,;
 func l Subst1 t -  of
Funcs(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
coherence
proof
set FF=AllFormulasOf S, SS=AllSymbolsOf S, ITv+ u =Sum()by A4,5,LVECT_3:;
FFassume v in A1;
IT in Funcs(FFA6:   v =Sum()
hence thesis;
end;
end;

definition
let S,l,t  let object;
efunc lS t >
Element of Funcs(then x in the carrierLin(A) by STRUCT_0:def5;
coherence     Def1
nd

definition
let S,l,t,phi;
func (l,t)   x in A holds xin  holds  inLin(A)
(lt Subst4 (l  t).Depth )phi;
coherence
proof
 FF=llFormulasOf S, D=uncs(F,FF)java.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
reconsiderd=phias   NAT by ORDINAL1:ef 12;
reconsider F      inTjava.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
Fd ElementofD reconsiderFunction of ,FFjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
reconsider phii=    consideru  VECTORofVsuchthat
java.lang.StringIndexOutOfBoundsException: Range [35, 1) out of bounds for length 56
end;
endjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4

registration
letS,,,phi
  x in ()V implies  0.V
coherence;
    hence thesis TARSKI:ef 1;

Lm44: for
l,) Subst4 f.m+)phi =(,,,(,)Subst4f.)Subst2 

, D=uncs(F,FF)  f   ofD
reconsider mm= as Element ofNAT yORDINAL1:ef12
set f4=(l,t) Subst4 f, f3=(l,t,m,f4.        ;
f3.assume in0.;
hence ;
end

Lm45: for f being Element of Funcs(AllFormulasOf S, AllFormulasOf S) holds
(A1: Lin()=()V and
(S-firstChar.phithen  in Lin() Th2;
proof
set TT=llTermsOf S,FF=AllFormulasOf S,F=-firstChar;
F, FF)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
reconsider tt= as Element of TT by FOMODEL1:ef 32;
set f0=l Subst1 t, f4=(l,)Subst4 f0 =heNorSymbOf S, L=ettersOf ,
h=head phijava.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 5
f5(,) Subst4f;
defpred P[Nat] means f5.(Depth phi      A  linearly-losed by A1,RUSUB_1:8;
(.hi= implies f4.1.hi=hi);
A1: P[0]
proof
end;
reconsider phii=hi asnon0wff wffstringof S;
reconsider phiii=hii as Element ofFF byFOMODEL216java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
F.phi \. byRUSUB_1d ;
 phii exalnon0wff wff string of S;
A3:(d};
 phii indom (l AtomicSubstt);then
A4:f0.hii=id )phii FUNCT_4:1 .= phii by A3;
reconsider tt=tail phii as empty set;
thus thesis by Def22, A4;
end;
A5: for n st P[n] holds P[n+1]
proof
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
A6: P[n]; java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 8
 d<>d+n+) &Pn;then
A7: d<>d+n+1 &hence v in W2 / W3 by RUSUB_2:3;
thus f5hence thesisRUSUB_123
by Lm44 .= f5.d.phi by A7, Def20; assume
let,2,3 be SubspaceofV
phi is non 0wff & not phi is  thesis by A1,USUB_1:1;
reconsider phii=phi as non 0wff exal wff string of SSubspace of
f4.(n+1).phi assume
end;
for n holds P[]  : (A1,A5) hencethesis;
end;

Lm46:
 is m-wff implies (,t) SubstIn phi=((l,t) Subst4 (l Subst1)..
proof
set d=Depthphi,FF=llFormulasOf S;reconsider flSubst1tas
Element of Funcs(FF,FF);
 phi is m-wff;then reconsider k=- as Natjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
(reconsiderl Linear_Combination of BbyA1,LVECT_22;
end;

registration
 S,l,t,hi0java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
identify (l,t)SubstIn phi0 with (,t AtomicSubst phi0;
bility
proof
(l,t)SubstIn phi0, RH=l,tt)AtomicSubst phi0,f1=  ttjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
f4= lbeing Linear_Combination A \ B suchthat
phi0 inAF &dom f0=AF by FUNCT_2:def 1; then reconsider
phi00=phi0 as ElementdefpredD[] eans$ in ;
by Def22 .= f0.      thenreconsider v =x as VECTORofV;
end;
 (,t)AtomicSubst phi0  (,t)SubstInphi0java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
compatibility;
end;

 Th10:Depth (tt SubstIn psiD psi&
 IbeingElemento U-nterpretersOf S holds
psi=lI-ermEval.t) ReassignIn ITruthEval psi
proof
 S, AF=tomicFormulasOf
S,F=-firstChar,L=ettersOf S;
 AtomicSubst tt,f1=  tt,=ltt Subst4 f1,FF=AllFormulasOf
S    endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
defpred P[Nat] means for phi st Depth phi<=$1 holds
(Depth ((l,tt) SubstIn phi)=Depth phi &
for I being Element of II holds I-TruthEval ((l,tt) SubstIn phi)=
((l, I-TermEval.tt) ReassignIn I)-TruthEval phi);
java.lang.StringIndexOutOfBoundsException: Range [22, 2) out of bounds for length 51
; then
reconsider ttt=tt      xin D;
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 8
proof
l,t) phi;assume
A2: d<=0; reconsider phii=phi as  =F()&(ot []impliesgx  G() from FUNCT_2:ch5(6);
;
set u=I-TermEval.tt,J=l,u)ReassignIn;
I-TruthEval ((l,tt) AtomicSubst phii) = J-TruthEvalA8 D c=B
hence thesis;
;
A3:     Carrier(g)c= 
proof
let n; assume
A4  phi reconsider X=\rng tt l}
as infinite Subset of L;     endjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
onempty of L;set ll2=the Element of Xjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
reconsiderassume  D
C0            hence contradictionby ,BOOLE_0:ef;
by XBOOLE_0:ef; then not l2 in   /rngheadphi &not l2 in{}
by XBOOLE_0:def 3; then
A5: suppose
by XBOOLE_0:def 3, TARSKI            suppose
per ;
suppose phi is exal; then reconsider phii=phi as
                hencecontradiction by A13,A14XBOOLE_0:ef 4;
A6: Depth phii=m+1 by NAT_1:6;                 =0 +g. byA3A
2
D1: m<=        =   A7Ajava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
non 0wff exal       end
set IT=l,t) SubstIn phii,, d= phii;
reconsider l1=F.phii as literal Element of S; reconsider
phi1=head phii as Element of FF by FOMODEL2:16; set d1=Depth phi1;
reconsider phi2=tail phii as empty set;
+1)-wff of S;
reconsider psi1=(l1,l2)-SymbolSubstIn (head phii) as m-wff string of S;
 \\1=} then
A7: Depth psi1=Depth phi1 by FOMODEL0:29;
reconsider Phi1=(l,tt) SubstIn psi1 as java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 11
A8: phii=<*l1*>^phi1^phi2 by FOMODEL2:23 .= <*l1*>^phi1;
d1 <= m by FOMODEL2:def 31; then
A9: d1<=n by XXREAL_0:2,D1; then
A10: Depth Phi1=Depth (head phii) by A4, A7;
reconsider m1=m-d1 as Nat; reconsider
new1=((l,tt) SubstIn phi1) as wff string of S; set d11=Depth new1;
A11: IT= (l,tt,m,f4.mm) Subst2 phii by A6, Lm44;
per cases;
suppose l1<>l; then
A12: IT=<*l2*>^(f4.mm.((l1,l2)-SymbolSubstIn phi1))
by A6, Def20, A11 .= <*l2*>^(l,tt) SubstIn psi1 by Lm46; then
Depth IT=Depth phi1+1 by A10, FOMODEL2:17 .= Depth phi by A8, FOMODEL2:17;
hence Depth ((l,tt) SubstIn phi)=Depth phi; let I be Element of II;
set tu=I-TermEval.tt, It=(l,tu) ReassignIn I;
I-TruthEval IT=1 iff (l,tu) ReassignIn I-TruthEval phii=1
proof
hereby
assume java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
A13endjava.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
 I2=(2,)ReassignIn I;
1=(java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
.= ((l,tu) ReassignIn I2)-TruthEval ubset of st B =$ & A c= B &Bis
  linearly-independent)
=(1,)ReassignIn(,)  I-ruthEval (ead phii)byA5, Th9
hence 1 = (l,hence 1 = (l,tu
end;
assume l,tu)ReassignIn I-ruthEval hii1    such 
A6:ex B beingSubset ofV B = x  A c=B &B islinearly-ndependent by ;
A8, FOMODEL2:19;
1= (l2,u1) ReassignInthen consider X   that
=ltu)ReassignIn (2,1)ReassignIn TruthEval psi1 by FOMODEL0:3A5
.      hence thesis by A7;
-TruthEval psi1 by FOMODEL2A9: Wis -
(l2,u1) ReassignIn I-TruthEval Phi1 by A7, A9, A4; hence
I-ruthEval IT= by A12 :;
end; then
I-TruthEval IT=1 iff not (l,tu) ReassignIn I-TruthEval phii=0
by FOMODEL0:39; hence thesis by FOMODEL0:39;
end;
suppose
A15: l1=l; then
A16: phi = IT by Lm45;
thus Depth (l,tt) SubstIn phi = Depth phi by A15, Lm45;
let I be Element of II;
set tu=I-TermEval.tt, It=(l,tu) ReassignIn I;
It-TruthEval phii=1 iff I-TruthEval phii=1
proof
hereby
assume It-TruthEval phii=1; then consider u such that
A17: (l1,u) ReassignIn It-TruthEval phi1=1 by A8, FOMODEL2:19;
1=(l1,u) ReassignIn I-TruthEval phi1 by A17, A15, FOMODEL0:43;
hence I-TruthEval phii=1 by A8, FOMODEL2:19;
end;
java.lang.StringIndexOutOfBoundsException: Range [18, 6) out of bounds for length 31
     S= rngF
A18: (l1,u1) ReassignIn I-TruthEval phi1        Carrier()c= WbyRLVECT_2:def6;
(l1,u1) ReassignIn It-TruthEval phi1A18:   X in Z by A12,A15,ARSKI:ef 4;
 -ruthEval phii= by , :;
      end;
then It-      then dom F is finite by A12,INSET_1:;
hence thesis by A16, FOMODEL0:
end;

java.lang.StringIndexOutOfBoundsException: Range [33, 7) out of bounds for length 42
then reconsider phii=phi
as non 0wff non exal wff string ofthen exCjava.lang.StringIndexOutOfBoundsException: Range [23, 18) out of bounds for length 70
d=Depth phii; A26 now
A19:d=+1 by :;
W1: m+1+(-1)<=n+1-1 by XREAL_1:8, C0, A19;
reconsidermm  Element of NAT by ORDINAL1:ef12;
reconsider phii as
non 0ffexal(+)wff string ofS byA19,FOMODEL2:ef 31;
reconsider phi1=head phii, phi2=tail phii Element  java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
by FOMODEL2:16; set d1=Depth phi1, d2=java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 27
F.phii \+assume
A20: phii=<*N*>^phi1^A30:    f.x = {C where C Subset V xin &C in Z}byA13java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
        then
reconsider m1=m-d1, m2=m-d2 as Nat; reconsider new1 =
(l,t)SubstIn ) new2=l,)  phi2 as wff   S
set d11=epth new1 d22=epthnew2java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
:d1<=  d2<n byW1D2,XREAL_0:;
A22: IT = (l,tt    then A c=W by A6;
<N*>(4.d1+).phi1)(4.d2+2).phi2) by ,A19.java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
<*N*>^new1^(f4.(d2+m2).phi2A34:Xin Q and
Depth IT=1+max(d11, d22) by FOMODEL2:17 .= 1+max(d1, d22) by A21, A4 .=
1+max(d1,d2) by : B is linearly-independent,A34;
hence Depth (l,tt) SubstIn phi=Depth   ()<>theUNITSTRofVjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
set TE=I-TermEval, u=TE.tt, J=(A40:B \ {}is -independent
RH=J-TruthEval
I-TruthEvalsuppose
 A21, A4;thenJTruthEvalphii= iff
(I-TruthEval new1=0 & I-TruthEval new2        considerf being Function of thecarrierof V,REAL such 
LH=1 iff not:   for being  of V st u <vholdsf =F)from
  FOMODEL0:java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
end;
upposephi is 0wff;
hencethesis by A1;
end;
end;
java.lang.StringIndexOutOfBoundsException: Range [30, 16) out of bounds for length 33
setf. =l.  A43,44,47;
 II thus thesis by ;
end;

registration
letmS,;let phi be m--wffstring of;
(,) SubstIn phi -> m-wff for ofS
coherence
proof
set dhenceg.=0 byA49java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
by java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
Depth psi=d by Th10; then reconsider psii=          ex u being VECTOR of Vst x=u&.u < 0java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
FOMODEL2:def 31; psii is (d+0*k)        end;
end;
end;

Lm47: for 
I2 being Element of U-InterpretersOf S2                . l. by A43,48,51;
I1|X = I2|X & (the adicity of S1)|X = (the adicity of S2)|X holds
I1-TermEval|(X*) c= I2-TermEval|(X*)
proof
set T1=S1-termsOfMaxDepth, O1=OwnSymbolsOf S1, TT1=AllTermsOf S1,
            end;
AT1=AtomicTermsOf  then 0. = Sum(f  Sum()by A41,LVECT_3:4;
strings1=SS1*\{{}};
set T2=S2-termsOfMaxDepth, O2A53:   (- lv * in() byTh1java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
SS2=AllSymbolsOf S2, L2=LettersOf S2, F2=S2-firstChar, C2=S2-multiCat,
AT2=AtomicTermsOf S2, II2=U-InterpretersOf S2, a2=the adicity of S2,
strings2=SS2*\{{}} hence A39,RLVECT_1:RUSUB_115java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
let I1 be Element of java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 13
A1: dom I1=O1 &           Carrier(l)c=B\ {v  RLVECT_2:ef 6;
etE1I1-ermEval,E2=2TermEval, I11=1|,I22=2|;assume
A2: I11=I22; then
A3: dom E1=TT1 & dom E2=TT2 & I11=I22 by FUNCT_2:def 1;
A4: X/\dom I1 = dom I22 by RELAT_1:61, A2 .=
X/\ dom I2 by RELAT_1:61;
= E2|X/(2.1);
deffunc F(set      end;
A5: P[0]
proof
A6:T2. c=   . c=TT1 by FOMODEL1:;
reconsider =*\T1.)asSubsetofTT1by , XBOOLE_1:;
reconsider D2=X*/\(T2.0) as Subset of TT2 by A6, XBOOLE_1:1;
set f1=E1|D1, f2=E2|D2;
A7:   V RealUnitarySpace, beingbeingSubsetofV st Lin() 
now
let x; assume
A8  let A be Subset of V;
:xin X*\T1 by ,FOMODEL1:ef 30; hen
A10: x in 1-tuples_on (X/\L1) byA2: for Z being setholdsZ in Q  iffZ in bool(the carrier of V)& ;P]
Y1 = X/\L1    let Z beset;
    assume
reconsider xxA5:Z is c-inear;
x in F(Y1xproof
then consider y1 being       then consider  being  such 
A11: x=<*y1*>; y1 in Y1; then
reconsider l1=y1 as literal Element of S1;
l1 in X & l1 in O1 by XBOOLE_0:def 4, FOMODEL1:def 19; then
l1 in X/\O2 by A4, A1, XBOOLE_0:def 4;
then reconsider s2=l1 as own Element of S2;
    thenthen  W as Subset ofV;
2XXs22\\2.22=}&I1|X.11\\1.11=; then
s2=I2 &I11.1=1.  FOMODEL0:9; then
0-tuples_on U = dom (I2.s2) by A2, FUNCT_2:def 1 .=
(.ar s2.)tuples_on U by FUNCT_2:ef1;then
not s2 is relational  not s2 is operational;then
reconsider l2=2 as iteralElement of S2;
x in AT1 by A9; then         then consider objectsuch that
t1= as 0-termal stringofS1 by FOMODEL1:ef 33;
reconsider D11=D1 as non empty Subset  then consider beingsetsuch 
onsider x1=1  Elementof   A8;
A12: l11 in XX & l2 in L2 by         inC whereC  :xinC&C inZ byA16Ajava.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
reconsider Y2=XX/\A20: now
= asElement of Y2 by , XBOOLE_0:ef4;
<*ll2*> in F(Y2); then
<*ll2*> in 1-tuples_on:    x
A13: x in X*/\AT2 A13: x in X*/\AT2 by. =x by A18,A21,UNCT_1:ef3;
non empty Subset of TT2 by FOMODEL1:def 30, A13;
reconsider x2=x          x A13,18,A21,22,RDERS_1:9;
A14:t1.=y1 by A11;then java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 62
by XBOOLE_0:def 4; I1|XX.A25: now
E2|D22.x2 \+\ E2.x2={}; E2|D22.x2 \+\ E2.x2={}; thenjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
A15:end
      then union Sin  A25A19,ARD_2:2java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
f1.x=E1.t1 byA27:B is -independent by A2;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
I2.<l2*.){ =
2*).(2*SubTerms<*2*>)byFOMODEL06.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
f2.x by FOMODEL2:21, A11, A15;
hence x in dom f2 & f2.x=f1.x by A7, A13,then F . in Xb ,RDERS_1:9;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 4
hence thesis by FOMODEL0:51;
end;
assume
A16: a1|X=a2|X;
::# this hypothesis could be derived by I11=I22 as soon as U misses BOOLEAN
A32: x in and
proof
let n; assume
n]
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
A19:  thenQ< }by ;
 =X*\(1.)d1=/\(T1.n) as Subset of TT1 by A19XBOOLE_1
 A19,XBOOLE_1:;
f1=1|1,f2=2|2;
A20: dom f1=D1 & dom f2=A38:Bis linearly-ndependent A2,34;
 by PARTFUN1:def 2; then
A21now
reconsiderd12=1 as Subset of   A18,GRFUNC_1:2, A20;
reconsider d21=d12 as Subset of TT2 by XBOOLE_1:1;
now
let y; assume A22: y in dom f1; then reconsider D11=D1 as non empty set;
reconsider y1=y as Element of D11 by A22;
y1 in T1.NN by XBOOLE_0:def 4; then
reconsider t1=y1 as (nn+1)-termal string of S1 by FOMODEL1:def 33;
reconsider o1=F1.t1 as termal Element of S1; set m1=|.ar o1.|;
A23: t1 in X* & t1 is non empty by TARSKI:def 3; then reconsider
XX=X as non empty set;
A24: y1 in XX* by TARSKI:def 3; {t1.1}\XX={} by A24; then
A25: t1.1 in XX & o1=t1.1 by ZFMISC_1:60, FOMODEL0:6; then
o1 in XX & o1 in O1 by FOMODEL1:def 19; then
o1 in XX/\O2 by A4, A1, XBOOLE_0:def 4; then
reconsider o2=o1 as own Element of S2;
reconsider o22=o2 as ofAtomicFormula Element of S2;
reconsider ox=o1 as Elementassume   LinA)
a1.ox \+\ a1|XX.ox={} & a2.ox \+\ a2|XX.ox={}; then
A26: a1.o1=a1|X.o1 & a2.o2      proof
 ar o1 = A42:   x in Carrier(l)
        java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
. o2.;
A27: I1    hencecontradiction by,A39,USUB_1:0;
A28: I1.ox = I1|XX.o1 by FOMODEL0:29 .=  I2.ox : vin  and
 st1=ubTerms t1;reconsider B=ng t1XX
 A24, RELAT_1:def19;
 rng:Sum(l  .V;
A29:per;
A30:rng st1 c=T1.  RELAT_1: 19; then
rng  c=d1 by ,XBOOLE_1:19; then
A31: rng st1 c= SS1*\{{}} & rng st1 c= d2 by XBOOLE_1:A       deffunc F(VECTORof V  l.1;
A32: rngs = SS1*{}   st1 c= SS2*{{} XBOOLE_1:;
t1  T2nn- by A31,XBOOLE_1:1 RELAT_1:ef19 
  -element FinSequence of T2.n
by FOMODEL0:26, A16, A26; then
reconsider st2=st1 as m2-element Element of (T2.nn)*;
reconsider T2n=T2.nn as non empty Subset of TT2 by java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 43
st2 in T2n*; then
reconsiderst22=st2 asm2-lement ElementofTT2;
reconsider t2=o2-compound st2 as (nn+1)-termal string of S2;
per cases;
java.lang.StringIndexOutOfBoundsException: Range [15, 7) out of bounds for length 23
then reconsider t11=1 as - string of S1;
A33: t11 in X* & t11 in T1.0 by FOMODEL1:def A:      . < ;
          thenu Carrier() byA52java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
A35: T2.0 c= TT2 &  hencethesisby A48A51,52,ARSKId ;
reconsider A1=X*\T1.0)asSubsetofTT1by A35, XBOOLE_1:;
reconsider A2=X*/\(T2.0) as Subset of TT2 by A35, XBOOLE_1:1;
set g1=E1|,g2=2|2
dom g2=2 by PARTFUN1:def2;then
A37:A1 c:2;then
t11 in A2 & t11 in A1 by A34; then
        now
t2 is (+0*NN)-ermal;thent2 (+)-termal then
A38: t2 in XX*            .  0 by A54;
yin    A20 : , A38;
reconsider D22=D2 as non empty set by XBOOLE_0:def 4, A38;
reconsider A11=A1, A22=A2 as non empty set by
A36,thenexu beingVECTORofV stx=u&g. > 0;
Element of A11            thesis byTARSKI:ef 1;
02= asElement of A22 by ,java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
reconsider t20=t2 as Element of             beVECTOR  ;
E1|D11.y1 \+\ E1.y1={} & E1|(X*/\(T1.0)).t111 \+\ E1.t111={} &
E2|A2.t02 \+\ E2.t02={} & E2|D22.t20 \+\ E2.t20={}; then
A39: f1.y=E1.y & E1|(X*/\(T1.0)).y=E1.y & E2|(X*/\(T2.0)).y=E2.y &
f2.y=E2.y by FOMODEL0:29; thus
f1.y = f2.y by A39, A5, A36, GRFUNC_1:2, A34;
end;
suppose not t1 is 0-termal; then o1 is operational by FOMODEL1:16;
then consider n1 being Nat such that
A40: m1=n1+1 by NAT_1:6; reconsider nn1=n1 as Element of NAT by ORDINAL1
:def 12; reconsider st11=st1 as (nn1+1)-element Element of TT1* by A40;
A41: not st11 is {}*-valued;
st11 is SS2*-valued by XBOOLE_1:1, A32, RELAT_1:def 19; then
C2.st11<>{} by FOMODEL0:52, A41; then
A42: C1.st1=C2.st1 by FOMODEL0:52;
A43: t1 = t2 by FOMODEL1:def 37, A42; then t1 in X* & t1 in
T2.NN by FOMODEL1:def 33, TARSKI:def 3;
hence y in dom f2 by A20, XBOOLE_0:def 4;
A44: t2 in T2.NN & t2 in X* by FOMODEL1:def 37, A42, A23, FOMODEL1:def 33;
reconsider D22=D2 as non empty set by A44, XBOOLE_0:def 4;
reconsider tt2=t2 as Element of D22 by A44, XBOOLE_0:def 4;
A45: F2.t2 = t2.1 by FOMODEL0:6 .= o2 by FINSEQ_1:41; then
A46: st22=SubTerms t2 by FOMODEL1:def 37;
A47: E1|d1 = E2|d2|d1 by A18, GRFUNC_1:34, A20 .= E2|(d12 null d2)
by RELAT_1:71; E1|D11.y1 \+\ E1.y1 ={} & E2|D22.tt2 \+\ E2.tt2={}; then
A48: E1|D1.y1=E1.y1 & E2|D2.t2=E2.t2 by FOMODEL0:29; hence
f1.y = I1.o1.(E1*st1) by FOMODEL2:21 .= I1.o1.(E1|d1*st1)
by RELAT_1:165, A20,  A30, A29, XBOOLE_1:19 .=
I1.o1.(E2*st1) by RELAT_1:165,    A20,  A30,  A29, XBOOLE_1:19, A47
.= f2.y by A43, A48, FOMODEL2:21, A45, A46, A28;
end;
end;
hence thesis by FOMODEL0:51;
end;
A49: for n holds P[n] from NAT_1:sch 2(A5, A17);
now
set g1=E1|(X*), g2=E2|(X*);
A50: dom g1=X*/\TT1 & dom g2=X*/\TT2 by RELAT_1:61, A3;
let x; assume
A51: x in dom g1; then
x in X*/\TT1 by RELAT_1:61, A3; then
reconsider t1=x as termal string of S1; set m1=Depth t1;
reconsider mm1=m1 as Element of NAT by ORDINAL1:def 12;
reconsider t11=t1 as m1-termal string of S1 by FOMODEL1:def 40;
A52: t11 in T1.m1 & x in X* by A51, FOMODEL1:def 33; then
A53: x in X*/\T1.m1 & T1.mm1 c= TT1 & T2.mm1 c= TT2 by XBOOLE_0:def 4,
FOMODEL1:2; then reconsider D1=X*/\T1.m1 as non empty Subset of TT1
by XBOOLE_1:1; reconsider D2=X*/\T2.m1 as  Subset of TT2 by XBOOLE_1:1, A53;
reconsider t111=t1 as Element of D1 by A52, XBOOLE_0:def 4;
set f1=E1|D1,f2=E2|D2;
A54: dom (E1|D1)=D1 & dom (E2|D2)=D2 by PARTFUN1:def 2;
 x in dom f1 & f1 c= f2 by A49, A53, PARTFUN1:def 2; then
A55: x in dom f2 & f1.x=f2.x by FOMODEL0:51; then
A56: x in X*/\TT2 & x in D2 by XBOOLE_0:def 4,   A54; hence
 x in dom g2 by RELAT_1:61, A3; thus
g1.x=E1.t111 by A51, FUNCT_1:47 .= f1.t111 by A54, FUNCT_1:47 .=
E2.t111 by A55, FUNCT_1:E2.t111 by A55, FUNCT_1:49 
end;
ence thesis by :51;


theorem Th11=lu;
I2 being Element of U-InterpretersOf S2 st
I1|X = I2|X & (the adicity of S1)|X = (the adicity of S2)|X holds
I1-TermEval|(X*) = I2-TermEval|(X*)hence thesis
by Lm47;

Lm48: for phi1 being 0wff java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 12
I1 being Element of U-InterpretersOf S1,
I2 being . by:ef8;
      end;
(the adicity of S1)|(rng phi1/\OwnSymbolsOf S1) =
(the adicity of S2)|(rng phi1/\OwnSymbolsOf S1) &
heEqSymbOf S1 =TheEqSymbOfS2 ex
phi2 being 0wff string of S2 st (phi2=phi1 & I2-AtomicEval phi2=
I1-AtomicEval phi1)
proof        hence thesis A38,A46;
II1=-InterpretersOf S1, UInterpretersOfS2, a2=theadicity of ,
F2=S2-firstChar, E1=TheEqSymbOf S1, E2=TheEqSymbOf S2, TT1=AllTermsOf S1,
TT2=AllTermsOf S2, O1=OwnSymbolsOf S1, O2=OwnSymbolsOf S2, C2=S2-multiCat,
olsOfS1,TS2=ermSymbolsOf,
a1=the adicity of S1, C1=S1-multiCat,  
AS2=v{}byTARSKI: ;
reconsider TS1=TermSymbolsOf S1as nonemptySubset of O1 by FOMODEL1:;
reconsider TS2=TermSymbolsOf S2 as non empty Subset of O2 by FOMODEL1:1;
let phi1 be 0wff string of S1;
let I1 be Element of II1  hence contradiction byA35,36,A61XBOOLE_1:7;
set TE1=I1-TermEval, TE2=I2-TermEval, Xbegin : Definition of the basis of real unitay space
A1: I1|X   Vbe RealUnitarySpace;
A2: TE1|(X*)    D:
A3: dom (TE1|(X*)) = X* /\ dom TE2 by RELAT_1:61
.= X*/ TT2 by FUNCT_2:def 1;then
proof
reconsider r1=1.hi1 as relational Element of S1 set m=.r r1|java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
set Y1=X\/{E1}, Y2=X\/{E2};
{(phi1 null {}).1} \ (rng phi1 \/{})={}; then
phi1.1 in rng phi1 by ZFMISC_1:60; then
A5: r1 in (rng phi1) by FOMODEL0:6;
r1 in {E1} or not r1 in RR1\O1 by FOMODEL1:1; then
A6: r1 in {E1} or not r1 in RR1 or r1 in O1 by XBOOLE_0:def 5; then
r1 in {E1} or r1 in X by A5, FOMODEL1:def 17, XBOOLE_0:def 4; then
A7: r1 in Y1 by XBOOLE_0:def 3; reconsider
t1=SubTerms phi1 as (m+0)-element FinSequence of TT1 by FOMODEL0:26;
t1 is TS1*-valued; then t1 in m-tuples_on (O1*) &
t1 in m-tuples_on ((rng phi1)*) by FOMODEL0:16; then
t1 in (m-tuples_on ((rng phi1)*)) /\ m-tuples_on (O1*)  by XBOOLE_0:def 4;
then t1 in m-tuples_on ((rng phi1)*/\((O1)*)) by FOMODEL0:3; then
t1 in m-tuples_on (X*) by FOMODEL0:55; then
A8: t1 is X*-valued & rng t1 c= TT1 by FOMODEL0:12, RELAT_1:def 19; then
A9: rng t1 c= X* & rng t1 c= TT1 by RELAT_1:def 19; then
A10: rng t1 c= X*/\TT1 by XBOOLE_1:19;
rng t1 c= X*/\TT2 by XBOOLE_1:19, A9, A4; then
reconsider X2=X*/\TT2 as non empty Subset of TT2;
reconsider X1=X*/\TT1 as non empty Subset of TT1 by A10;
t1 is m-element X2-valued FinSequence
by RELAT_1:def 19, A9, A4, XBOOLE_1:19; then
reconsider t2=t1 as m-element FinSequence of X2 by FOMODEL0:26;
t2 is Element of X2*; then
tt2=2 m-element  of(T2*java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
L1:def 20;
reconsider EE1={E11} as non empty Subset of AS1;
 E22E2asE of AS2by FOMODEL1:def 20;
reconsider EE2={E22} as non empty Subset of AS2;
set Y1=X\/EE1, Y2= linearly-independent &Lin()=V Th11;
: =E1 &dom f2=E2 by PARTFUN1:def 2;
now
let x be object;    thesisby ;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
TARSKI:def 1; then f1.x  exI  Basis ofV I=A
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 28
end; then f1=f2 by FUNCT_1: assume Lin(  ;
|X + f2 =a1Y1  A1, FUNCT_4:78; then
A13: Y1=Y2 & a1|Y1=a2|Y2 by FUNCT_4:78, A1;
A14: ar r1 = a1|Y1.r1A2 B is linearly-independent & Lin(B) = V by Th12;
r1 dom a2by FUNCT_1:def 2; thenr1 in AS2;then 
r2=r1 as ofAtomicFormula Element  S2FOMODEL1: 20;
A15: ar r1=arr2  A14;then reconsiderr2 relational of ;
reconsider phi2=r2-compound tt2 as 0  for V being RealUnitarySpace,A being Subset of V st A is
phi2; java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 5
A16 thenconsider Bbeing Subsetof V suchthat
 (F2.hi2)|elementElement  (T2) by A14;
A17: tt22=SubTerms phi2 by FOMODEL1:def 38,  takeB
A18: java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
.= theoremTh16:
 A17,A2, A8,RELAT_1: , A3,:;
per cases;
suppose
A19: r1<>E1; then
A20:r1 in X by A6,A5, FOMODEL1:def 17,XBOOLE_0: 4,TARSKI:def 1;
 I1r1 =I1|.r1 by FUNCT_1: .I2.2 by FUNCT_1:9,A1 ;
then (I1-AtomicEval phi1 = I1.r1.(TE1*t1)
&I2-AtomicEval phi2=1r1.(E2*(ubTerms phi2)))by A1,A19,A16,
:4;hence I1-AtomicEval phi1=I2AtomicEvalphi2 by A18;
  let F be FinSequence of V;
suppose r1=E1; then (1-tomicEval phi1 = d.(TE1*t1)
& I2-AtomicEval A3:for n being Nats P[] holds P[ + 1]
hence I1-AtomicEval
end;
end;

theorem Th12: TheNorSymbOf S1 = TheNorSymbOf S2 &
TheEqSymbOf S1 = TheEqSymbOf S2 &
(the adicity of S1)|(OwnSymbolsOf S1) =
(the adicity of S2)|(OwnSymbolsOf S1) implies
for I1 being Element of U-java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 38
I2 being Element of U-InterpretersOf S2, phi1 being wff string of S1
st (OwnSymbolsOf S1)=I2|OwnSymbolsOf S1)ex
phi2 being wff string f st
((phi2=phi1 & I2-TruthEval phi2=I1-TruthEval phi1))
proof
set II1=U-InterpretersOfthen {x} c= the carrierof Lin() by A5;
N1=TheNorSymbOf S1, N2=TheNorSymbOf S2,  inx   in the carrier of Lin(A;
the adicity of S1,a2=he adicity ofS2,=wnSymbolsOf S1java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
O2=OwnSymbolsOf     x VECTOR V A11STRUCT_0def5;
    len(G^<*)=len G  <x*  FINSEQ_1:22
AS2thenconsiderLA2being Linear_Combination of A such that
assume
A1: N1=N2; assume
;
defpred P[at]  forI1 being Element  II1I2 being ElementofII2,
phi1 being 1wffstringo S1 stI1|1
$1-wff string of S2 st (phi1=phi2 & I1-TruthEval      =Sum(A2) +L  Sum(LA1)byA12,LVECT_144
A3: P[0]
proof
 I1 be Element of II1,I2 be  II2, phi1 be 0-wff string S1;
set TE1=I1-TermEval, TE2=I2-TermEval, X=rng phi1; reconsider
XX=X/\O1 as Subset of O1; reconsider r1=F1.phi1 as
relational Element of S1;
A4: a1|XX = a1|O1|X by RELAT_1:71 .= a2|XX by A2, RELAT_1:71;
assume I1|O1 = I2|O1; then
I2|O1|X = I1|XX by RELAT_1:71; then
I1|XX = I2|XX by RELAT_1:71; then
consider  being 0wffstringof S2 such that
AtomicEvalphi1
by A4, ,A2 reconsider  0-wffstringofS2;take phi2java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
set st1=ubTerms , st2=ubTerms hi2java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
ent ofS2;
thus thesis by java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 6
end;
A6: for n st P[n] holds P[n+1]
proof
let n; assume
A7:P[] let I1 be  II1,I2be ElementofII2,
phi1 be (n+1)-wff string of S1; set X=rng phi1; assume
A8: I1|1=2|1;
reconsider h1=head phi1 as n-wff string of S1 assumeCarrier()c=the carrierof ()java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
consider h2 being n-wff string
of S2 such that
    ,3java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
per cases;
suppose
phi1 is exal; then reconsider phi11=phi1 asLinear_Combinationof K=L|he carrier W holds Carrier(L)= Carrier()
reconsider l1  V RealUnitarySpace
A10  let   Linear_Combination of V such that
l1    be of W such 
l1 in O2;3:  =the carrier of W byFUNCT_2def1;
|.ar java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
0tuples_onU by A10, FUNCT_2:def 1; then
not l2 is relational & not l2 is operational; then reconsider
l2  wis  of VbRUSUB_13java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
reconsider phi2=<*l2*>^h2 as (n+1)-wff exal string of S2; takeendjava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
A11: phi1    beingFinSequence of W suchthat
hence phi1=phi2 by A9;
I1-TruthEval phi11=1 iff consider F being FinSequenceV suchthat
proof
hereby
 I1-ruthEval phi111 then u  that
A12: (l1,u) ReassignIn I1-TruthEval h1=1 by FOMODEL2:19,     v  VECTOR ofV  that
A14: x= vand
 I22(l2,)ReassignIn  as Element of II2;
I11|O1 = I1|O1 +* ((l1.-->
I22|  ,FUNCT_471 then
java.lang.StringIndexOutOfBoundsException: Range [24, 8) out of bounds for length 47
Evalh1=I22-ruthEval h22 java.lang.StringIndexOutOfBoundsException: Range [55, 56) out of bounds for length 55
 I2-ruthEval phi2= FOMODEL219 , A9 ;
end;
assume   then re q =( # )Pas FinSequence of Wby:;
A14: (l2,u2) ReassignIn I2-TruthEval h2=1 by FOMODEL2:19;
reconsider I11=(l1,u2A21:dom q =domG :java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
I22=l2u2 ReassignIn I2 asElementofII2;
I11| =-({.-u2))|O1  FUNCT_4:71 .=
 I22|O1 by A8, FUNCT_4:71; then
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 58
A15: h222=h1 & I11-TruthEval:f0=0Wand
thus I1-TruthEval phi11=1 by FOMODEL2:19, A11, A14, A15, A9;
end;then I1-ruthEval phi1= iff not I2-TruthEval phi2=0 by FOMODEL0:39;
hence I1-TruthEval phi1=I2-TruthEval phi2 by FOMODEL0:39;
end;
suppose
not phi1 is 0wff & not phi1 is exal; then reconsider phi11=phi1 as
non 0wffassumethat
n-wff string of S1A28:  q9.i+1;
java.lang.StringIndexOutOfBoundsException: Range [41, 3) out of bounds for length 66
phi2=<*N2*>^h2^t2 as (n+1)-wff non exal non 0wff string of    reconsider = vasVECTOR ofW A28,INSEQ_2:1;
take phi2then
A17: F1.phi1=A17: F1.phi1=N1  #  A29,RLVECT_2:ef 7;
& phi2byFOMODEL223 :29;
hence phi1=phi2 by A16, A9, A1;
set setv =F/i;
c2=2-ruthEval t2,A1=1-ruthEval phi11,A2I2- phi2;
A1 \+\ (I1-TruthEval (head phi11) 'nor' (I1-TruthEval (tail phi11A33:i in  p;
A2 \+\ (I2-A34: F/.i = F.i by,PARTFUN1def6
then A1=b1 'nor' c1     then reconsider w = v as VECTOR W by A17,11;
hence thesis by A9, A16;
end;
suppose
phi1:G/j =G(.) by A35,ARTFUN1:ef 6
A18: phi1=phi2 &     q.i = (K (#) G)byA31:12
phi2 is (0+0*(n+1))-wff; .= L.v * w by A2,A3,FUNCT_1
reconsider phi22=phi2 as (n+1)-wff string of java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 42
 phi22 thus thesis by ;
end;
end;
A19: for n holds P[n] from NAT_1:java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 18
let I1 be Element of II1, A39: f9.len q9 is Element of
set d=epth phi1;reconsider phi11=phi1 null 0 as d0)wffstringof S1java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
assume I1|O1=I2|O1; then
exLinear_Combination of Wholds ex beingLinear_Combination ofVst Carrier()
((phi2=  =Carrier(L  ()=SumLjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
hencethesisjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
end;

Lm49 S1,
2 being  of - S2 S2  S1- &
X c= AllFormulasOf S1 & I1|(OwnSymbolsOf S1)=I2|(OwnSymbolsOf S1)
holds (X is I1-satisfied iff X is I2-satisfied)
proof
set II1=U-InterpretersOf S1,per cases;
a2=the adicity of A3:x java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
2=heEqSymbOf S2,N1=heNorSymbOf S1,N2TheNorSymbOf S2java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
FF1=AllFormulasOf S1, AS1=AtomicFormulaSymbolsOf S1;
dom a1=      in REAL byXREAL_0:ef ;
O11=O1 as Subset of dom a1;
let I1 be Element of II1, I2 be Element of II2; assume
A1: S2 is S1-extending; then
a1|O1 = a2|(dom a1)|O1 by  GRFUNC_1:34
.= a2|(O11 null (dom a1))  by RELAT_1:71; then
A2: a1|O1=a2|O1 & N1=N2 & E1=E2 by A1; assume
A3: X c= FF1 & I1|O1=I2|O1;
hereby
assume
A4: X is I1-satisfied;
now
let phi2 be wff string of S2; assume A5: phi2 in X; then phi2 in FF1
A3; then reconsiderp as wff string ofS1java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
phi22 beingwff string of S2 such that
A6: phi1=phi22 & I1-TruthEval phi1= I2-TruthEval phi22
by Th12, A2, A3;
thus I2-TruthEval phi2=1 by A6, A5, A4;
end; hence X is I2-satisfied;
end;
assume
A7: X is I2-satisfied;
now
let phi1 be wff string of S1; assume
: phi1 in X;
consider phi2 being wff string of S2 such that
A9: phi1=phi2 & I1-TruthEval phi1= I2-TruthEval phi2 by Th12,
A2, A3; thus I1-TruthEval phi1 = 1 by A9, A8, A7;
end; hence thesis;
end;

theorem Th13: for I1, I2 being Element of U-InterpretersOf S st
I1|(rng phi/\OwnSymbolsOf S)=I2|(rng phi/\OwnSymbolsOf S) holds
I1-TruthEval phi=I2-TruthEval phi
proof[, K.] & .v 0 orP,0;
set O=OwnSymbolsOf S, II=U-InterpretersOf S, a=the adicity of S,
E=TheEqSymbOf S, F=S-firstChar, C=S-multiCat;
defpred P[at]means for I1,I2 being Element of II,
phi being $-ff stringof S st I1|rng phi/O)I2|rngphi/O) holds
I1-ruthEval phi=2-ruthEval phi;
A1: P[0]
proof
let I1, I2 be Element of II; let phi be 0-wff string  then (x v being VECTOR of st x = v & L.v <  &tyle='color:red'>notxin  
reconsider phi1=phi java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 6
assume I1|(assume
I1|(rng phi1/\     P[,L.x] byA5,1;
then consider phi2 being 0wff string of S such that
A2: phi2=  hence thesis by A7,h18;
thus thesis by A2;
end;
A3: for n st P[n] holds P[n+1]
proof
let n; assumeLinear_Combinationof W st Carrier()= Carrier(L) &Sum()=Sum ()
A4: P[n]; let I1, I2 be Element of II;  let Wbeing Subspaceof ;
let phi be (n+1)-wff string of S; assume
A5:I1|rng phi/O  I2|rng phi/\)
 cases;
suppose not phi is 0wff & not phi is exalK =|he carrier W  Function ofthecarrierofW REAL by FUNCT_2:;
non 0 onexal (n+)wff string of S; set X=ng phii\, s=Fphiijava.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
reconsider h    letwbe VECTOR  W;
phii=<*s*>^h    assume not winC
rng (h^t) c= rng phii      Kw =0 by A3,UNCT_1:7;
 c=  phii &rngt=rng phii
by XBOOLE_1thusthesis byA1,Th18;
by XBOOLE_1:26; java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
h1=I1-TruthEval h, h2=I2-TruthEval h, t1=I1
A6: I1|rh=I1|(rh null X) .= I1|Xlet  be Basis of V;
I2|(rh null X) by A5, RELAT_1:71;
I1|rt = I1|(rt null X) .= I1|X|rt by RELAT_1:71 .=
I2|(
A7:t1 =t2  A4;
v1 \+\ (h1 'nor' t1) = {} & v2 \+\   of V
&:29;
hence thesis by A4, A6, A7;
end;
suppose phi is exal & not phi is 0wff; then reconsider phii=phi
asexal  string of S;set l=.hii;reconsider
h=head phii as n-wff string of S;
A8: =**^^(tail phii  :23 . *l*^; then
reconsider rhCarrier(L) c= A by RLVECT_2:def 6;
now
hereby
assume I1-TruthEval phii=1; then consider u such that
A9: (l,u) ReassignIn I1-TruthEval h=1 by A8, FOMODEL2:19    LW as Linear_Combination of A by A4,RLVECT_2:def 6java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
etf.-(}->;reconsider
I1u=(l,u) ReassignIn I1, I2ujava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
( h/\)  I1|rh null(phii/\)+ |(h/O)byFUNCT_471.java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
I1|(rh/\(rng phii/\O)) +* f|(rh  linearly- Subset of W
ii\)| *f|rh/\)byRELAT_171 =
I2|(rng phii/\O/aletW Subspace ;
I2|(rng phii/: Alinearly-independent and
I2u|(rng h/\O) by FUNCT_4:71; then I2u-TruthEval h=1 by A9, A4;
hence I2-TruthEvalassume A9linearly-ependent;
end;
assume I2-TruthEval phii=1; then consider u such that
A6: Sum()=Sum(  Th19;
set f=l.-->({}.-->u); reconsider
I1u=(l,u) ReassignIn I1, I2u=(l,u) ReassignIn I2 as Element    hence contradiction by,4,A5;
I1u|(rng h/\O) = I1|(rh null (rng phii)/\O)end;
I1|(rh/\(rng phii/\O)) +* f|(rh/\O) by   for V being RealUnitarySpace, W being Subspac, A being  of
I1|(rng phii/\O)|rh +* f|(rh/\O) by RELAT_1:71 .=
I2|rng /O/rh) + |rh\)by RELAT_1:1,A5 .=
I2|(rng phii/\rh/\O) +* f|(rh/\O) by java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 28
I2u|(rng h/\O) by FUNCT_4:71; then
I1u-TruthEval h=1 by A10, A4; hence I1-TruthEval phii=1 by A8, FOMODEL2:19;
en
I1-TruthEval phii=1 iff not I2-TruthEval phii=0    B = A as linearly-ndependent   V byTh22java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
hence thesis by FOMODEL0:39take Ijava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
end;
suppose phi is  for Vbeing RealUnitarySpace,A being Subset ofV Ajava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
end;
end;
A11: for n holds P[n] from NAT_1:sch 2(A1A Subset of such 
set d=Depth phi; phi null 0 is ( vbe VECTOR of V;
reconsider phii=phi as d-wff string of S;
assume I1|(rng phi/\O)  let B be Subset of V suchthat
|(ng phii/O)=I2|rng phii/O;hence thesis by A11java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
end;

theorem for I being Element of U-InterpretersOf S st l is X-absent &
X is I-satisfied holds X is (l,u) ReassignIn I-satisfied
proof
set II=U-InterpretersOf S;  then vin ({v}) by Th2;
I2=(l,u    K being   v such that
A1: l is X-absent & X is I-A8: Carrier(L) c= B & Carrier(K {} byRLVECT_2def ;
now
let phi; reconsider no=rng phi/\O as Subset of rng phi; assume
A2: phi in X; then reconsiderjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
A3: I-TruthEval phi=1 by A1, A2;
l is (X/\Phi)-absent by A1; then not l    then not  inCarrierK  A3,A8XBOOLE_0:def 5;
{l} misses no by ZFMISC_1:50;  end;
I|no  xbeobject 
I2|no=I|no by FUNCT_4:71; hence I2-TruthEval phi=1 by A3, Th13;
end; hence thesis;
endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

theorem for E being Equivalence_Relation of   0.V = Sum(L) + (- Sum(K)) by A5,A7,RLVECT_1
i being    . Sum( - K) RLVECT_31
(l,E-class.u) ReassignIn (java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 4
proof
set II=U-InterpretersOf SA1
   ErespectingElement ofII;set =;
   then considery  objectsuch that
reconsider X=(E-class).x as Element of UU;
nsider I=i quotient E as   ;
reconsider j=(l,x) ReassignIn i as Element of II;
reconsider Jj=(l,X) ReassignIn (I qua java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 30
reconsider jJ= quotient  Function;
A1: dom Jj=O & dom jJ=O by Def17, PARTFUN1:def 2;
set jJ=(j qua Element of II) quotient E, g=l .--> ({{}} --> x),
h={{  let V be RealUnitarySpace
A2: {{}}= (0-let A be non empty Subsetsuch 
; then reconsider Ennid{} asEquivalence_Relationof
0-tuples_on U; set En  let B be Subset of suchthat
A4: A c= B by by A3XBOOLE_17
A4: En=Enn & dom ( reconsider Bv=  {}as Subset  ;
dom h={{}} & (id {{}}) \+\ ({} .--> {}) = {} bynot   I by,2XBOOLE_0:3java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
A5: En=Enn & x in dom (E-classA7: B is linearly-;
id    contradiction by A7,2,A4,A6,h25,USUB_1:1java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
{} in dom h by  TARSKI  for V being RealUnitarySpace,W being Subspace of V, A being Subset of
reconsider hh= as (nn,)-especting Functionby Lm22
reconsider hhh=hh as (En,E  letV RealUnitarySpacejava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
A4;
now
ect assumesin O;
then reconsider ss=s as own Element of S;
per cases;
suppose A6: s in dom G;
A7:s= byA6,TARSKI: 1; then
A8:jJs = (.l quotient  byDef18 .=(ntuple2ClassE)*(.l)quotient
(n-placesOf E,E)) by Def15 .= nE*((    hence w  carrier  W  A2;
A3: =nE*(h  (n,) qua Relation) by FUNCOP_1:72 .=
(n-placesOf (((E-class) qua Relation of U, Class E)~))*((E-class)*hhh)
by Lm21 .=
(id {{}} qua Relation)*((E-class)*hhh) by Lm30 .=
({{}} --> (E-java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{} -> ({ .->(-lass.).{)byFUNCOP_117,A5 =
{{} - X by FUNCOP_1:2;
Jj.s = G.l by A6, A7, FUNCT_4:13 .= {{}} --> X by FUNCOP_1:72;
hence Jj.s=jJ.s by A8;
end;
suppose A9: not s in dom G; then Jj.s = I.s by FUNCT_4:11 .=
(i.ss) quotient E by Def18 .=
(j.ss) quotient E by A9, FUNCT_4:11 .= jJ.ss by Def18;
hence Jj.s=jJ.s;
end;
end;
hence thesis by A1, FUNCT_1:2;
end;

theorem (TheEqSymbOf S1=TheEqSymbOf S2 & TheNorSymbOf S1=TheNorSymbOf S2)
implies for I1 being Element of U-InterpretersOf  assume
I2 being Element of U-    let x be object
 S1)( /\OwnSymbolsOf S1)=
(the adicity of S2)|(rng phi1    Carrier()c=Aby RLVECT_2:def 6;
I1|rng phi1/OwnSymbolsOf S1)= I2( phi1/OwnSymbolsOfS1))
ex phi2 being wff string of S2 st phi1=phi2
proof
, O2=wnSymbolsOf S2,a1=he adicityof S1,
a2=he adicity of S2, E1=TheEqSymbOf S1, =  F1=1-firstChar,
F2=2-irstChar, AS1=tomicFormulaSymbolsOf S1,AS2=tomicFormulaSymbolsOf,
N1=TheNorSymbOf S1, N2=TheNorSymbOf S2, II1=U-InterpretersOf S1,
II2=U-InterpretersOf S2; assume
A1: E1=E2 & N1=N2;
g Elementof II1,I2 being ElementoII2java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
phi1 being $1-wff string of S1 st a1|(rng phi1/\O1) = a2|(    considerK   ofBsuchthat
I1) ex being 1wff stringof  
phi1=phi2;
A2: P[0]
proof
let I1 be Element of II1, I2 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 28
let phi1 be 0-wff string of S1; reconsider
phi11=phi1 as 0wff string of S1; set x1=rng phi1, x11=x1/\O1; assume
a1|x11 = a2|x11 & I1|x11=I2|x11; then
consider phi2 being 0wff string of S2 such that
A3: phi11=phi2 & I1-AtomicEval phi11=2-tomicEvalphi2byLm48,A1;
thus thesis by A3;
end    hence  inthe carrierof Lin(A) STRUCT_0:ef;
A4: ofLinB c=the carrier ofLin()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
proof
let n; set N=n+1; assume ::Subspaces of real unitary space generated by one, two, or three vectors
A5: P[n]; let I1 be Element of II1, I2 be Element   for V being RealUnitarySpace, v being VECTOR of V,
let phi1 be N-wff string of S1; set x1=rng phi1, x11=x1/\O1; assume
A6: a1|x11 = a2|x11 & I1|x11=I2|x11;
per cases;
suppose phi1 is 0wff; then
reconsider phi11=phi1 as 0-wff string of S1;
consider phi2 being 0-wff string of S2 such that
A7 phi11=phi2 by A2,A6;phi2 is (0+*)wff;then phi2 is (+)wff;then
reconsider phi22=phi2 as N-wff string of S2; take phi22; thus thesis by A7;
end;
suppose not phi1 is 0wff; then reconsider phi11=phi1 as
non v be VECTORbeVECTOR  V;
n-wff string of S1; set t11=tail phi11, l11=F1.phi11;
A8: phi11=<*l11*>^h1^t11 by FOMODEL2:23; then
rng h1 c= rng (<*l11*>^h1) & rng (<*l11*>^h1) c= x1 by FINSEQ_1:30, 29;
then reconsider y1=rng h1 as non empty Subset of x1 by XBOOLE_1:1;
reconsider y11=/O1 Subset of by :;
A9: I1|(y11 null x11) = I1|x11|y11 by RELAT_1:71 .=
I2|(y11 null x11) by RELAT_1:71, A6;
a1|(y11 null x11) = a1|x11|y11 by RELAT_1:71 .=
a2|(y11 null x11) by RELAT_1:71, A6; then
consider h2 being n-wff string of S2 such that
A10: h1=h2 by A5, A9;
per cases;
suppose phi11 is exal; then     then consider l being Linear_Combiof {  that
of S1; reconsider    (l  .v * v byRLVECT_232;
phi1 null {} is (x1\/{})-valued; then {phi1.1} \ x1 = {}; then
phi1.1 in x1 by ZFMISC_1:60; then l1 in x1 & l1 in O1 &
dom a1=AS1 by FOMODEL0:6, FOMODEL1:def 19, FUNCT_2:def 1; then
A11: l1 in x11 & dom (a1|x11) = AS1/\x11 & l1 in AS1
by RELAT_1:61, XBOOLE_0:def 4, FOMODEL1:def 20; then
l1 in dom (a2|x11) & dom (a2|x11) = x11/\dom a2
by XBOOLE_0:def 4, RELAT_1:61, A6; then
l1 in dom a2 & dom a2=AS2 by FUNCT_2:def 1; then
reconsider l2=l1 as ofAtomicFormula Element of S2 by FOMODEL1:def 20;
l2 in O2 by A1, FOMODEL1:15; then
reconsider l2 as own Element of S2;
ar l1 =
a1|x11.l1 by A11, FUNCT_1:49 .=
ar l2 by A6, A11, FUNCT_1:49; then not l2 is low-compounding; then
reconsider l2 as literal Element of S2;
take phi2=<*l2*>^h2; phi11=<*l2*>^h1^(tail phi11) by FOMODEL2:23;
hence phi1=phi2 by A10;
reconsider l2 as literal Element of S2;
end;
suppose not phi11 is exal; then reconsider phi11 as non exal non 0wff
N-wff string of S1;
reconsider t1=tail phi11 as n-wff string of S1;
reconsider z1=rng t1 as non empty Subset of x1 by A8, FINSEQ_1:30;
reconsider z11=z1/\O1 as Subset of x11 by XBOOLE_1:26;
A12: I1|(z11 null x11) =
I2|x11|z11 by A6, RELAT_1:71 .= I2|(z11 null x11) by RELAT_1:71;
a1|(z11 null x11) = a1|x11|z11 by RELAT_1:71 .=
a2|(z11 null x11) by RELAT_1:71, A6; then
consider t2 being n-wff string of S2 such that
A13: t1=t2 by A5, A12; take phi2=<*N2*>^h2^t2;
F1.phi11 \+\ N1={};
hence phi1=phi2 by A1, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
end;
end;
end;
A14: for n holds P[n] from NAT_1:sch 2(A2, A4);
let I1 be Element of II1, I2 be Element of II2, phi1 be wff string of S1;
set d=Depth phi1; phi1 null 0 is (d+0)-wff; then
reconsider phi11=phi1 as d-wff string of S1;
set x1=rng phi1, x11=x1/\O1; assume a1|x11=a2|x11 & I1|x11=I2|x11; then
consider phi2 being d-wff string of S2 such that
A15: phi2=phi11a  as  of  by :def1;
end;

theorem for I1 being Element of U-InterpretersOf S1,
I2 being Element of U-InterpretersOf S2 st S2 is S1-extending &
X c= AllFormulasOf S1 & I1:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
 (X  -  X I2-atisfied  ;

   totalreflexive R of java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 notations TARSKI,SUBSET_1, ENUMSET1,PROOFS_1 ,ORDINAL1
holds f is ({xx],)respecting

 R reflexive RelationofU letf FunctionofXUjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
E{xx} ;
assume A1: x in X; then reconsider XX=X as non empty set;
reconsider ff=f as   ,;
now
let, be setjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
ssume [1,2  ;then
A2: [x1,x2
A3: x1=x  java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
reconsiderx11=1, x22=2 as Element of   A1, A2,XTUPLE_01;
ff  vin {v}by  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
[.x1, f.x2 in R byEQREL_15
end;
hence thesis;
end;

Lm51: for E being total reflexive (Relation of U),
f being Interpreter of l,U holds f is E-respecting
proof
let E being total reflexive Relation of U;
reconsider m=|.ar l.| as zero Nat; let f be Interpreter of l,U;
m-tuples_on U={{}} by FOMODEL0:10;
then reconsider ff=f as Function of {{}},U by FOMODEL2:def 2;
{} in {java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
f is (m-respecting; hencethesis  Def10;
end;

theorem for E being total reflexive (Relation f U,
f being Interpreter of l,U holds f is E-java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 15


Messung
CHZG
8110010093

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.149Angebot  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-11-24) ¤

*Eine klare Vorstellung vom Zielzustand