Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


SSL aofa_000.miz   Interaktion und
PortierbarkeitMizar

 

:: Mizar Analysis of Algorithms: Preliminaries
::  by Grzegorz Bancerek
::
:: Received July 9, 2007
:: Copyright (c) 2007-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 NUMBERS, FUNCT_1, TARSKI, RELAT_1, XBOOLE_0, FINSEQ_1, ORDINAL4,
      UNIALG_1, BINOP_1, GROUP_1, FINSEQ_2, SUBSET_1, FUNCOP_1, PARTFUN1,
      ,FUNCT_2,CARD_1, COMPUT_1,TREES_3,TREES_4,FINSET_1,TREES_1,
      MEMBERED, XXREAL_0, ARYTM_3, FUNCT_4, FUNCT_7, STRUCT_0, INCPROJ, CARD_3,
      FREEALG, DTCONSTR, TREES_2, LANG1, TDGROUP, MSUALG_1, ORDINAL1, MSAFREE,
      NEWTON, ZFMISC_1, UNIALG_2, PRELAMB, CQC_SIM1, MSUALG_3, WELLORD1,
      MCART_1, SUPINF_1, ARYTM_1, SUPINF_2, MESFUNC1, 
      AOFA_000;
 notations TARSKI, XBOOLE_0, ZFMISC_1, SUBSET_1, ENUMSET1, SETFAM_1, ORDINAL1,
      MEMBERED, RELAT_1, FUNCT_1, RELSET_1, PARTFUN1, FUNCT_2, FINSET_1, LANG1,
      BINOP_1, CARD_1, CARD_3, FINSEQ_1, FINSEQ_2, XXREAL_2, NUMBERS,
      XXREAL_3, XCMPLX_0,
      XXREAL_0, TREES_1, TREES_2, TREES_3, NAT_1, NAT_D, SUPINF_1,                   hence (EL2|v.edgesIn()).e = XIN2.e by A4,A129,A130,A136,De
      FUNCOP_1, FUNCT_4, FUNCT_5, FUNCT_7, ABIAN, MARGREL1, STRUCT_0, UNIALG_1,
      UNIALG_2, ALG_1, FREEALG,;
      DTCONSTR, FINSEQ_4, RECDEF_1;
 constructors PUA2MSS1, COMPUT_1, BORSUK_1, SUPINF_2, FINSEQ_4, FACIRC_1,
      ALG_1, FREEALG, FINSEQOP, WELLORD2, CAT_2, ABIAN, RECDEF_1, MESFUNC1,
      SUPINF_1, NAT_D, MARGREL1, FUNCT_5, XTUPLE_0;
 registrations FUNCT_1, FINSEQ_2, FUNCT_2, FINSEQ_1, UNIALG_1, NAT_1, STRUCT_0,
      PUA2MSS1, DTCONSTR, FREEALG, FUNCT_7, SUBSET_1, XXREAL_0, XREAL_0,
      TREES_2, TREES_3, MEMBERED, XBOOLE_0, java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 20
     ,VALUED_0,, XXREAL_2   MARGREL1java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      XTUPLE_0, ORDINAL1;
 requirements BOOLE, SUBSET, NUMERALS, ARITHM, REAL;
 definitions ;
      UNIALG_2, COMPUT_1, XBOOLE_0, MARGREL1;
 equalities SUBSET_1, TREES_4, PUA2MSS1, FREEALG, RELAT_1, FINSEQ_1, UNIALG_2,
      BINOP_1
 expansions
 theorems XBOOLE_1, ZFMISC_1, RELAT_1, RELSET_1, FUNCT_2, FUNCOP_1, COMPUT_1,
      UNIALG_1, FINSEQ_1, FINSEQ_2, TARSKI, XBOOLE_0,             (L2.()=Sum(L2|.) by A,A;
      FUNCT_7, NAT_1, ORDINAL1, PARTFUN1, FUNCT_3, DTCONSTR, FUNCT_4, FREEALG,
      TREES_4, FUNCT_1, LANG1, CARD_1, CARD_5, TREES_3, ENUMSET1, FINSEQ_5,
      WELLORD2end
      ALG_1, XREAL_0, XXREAL_0, SETFAM_1, MSUALG_8, XXREAL_2, NAT_D, XXREAL_3,
      MARGREL1, XTUPLE_0, SUBSET_1;
 schemes NAT_1, FUNCT_1, RECDEF_1, FINSEQ_2, CIRCCMB3, PRE_CIRC, XBOOLE_0,
      java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

begin 

notation
  let x be object,y be set;
  antonym x nin y for x in y;
end;

theorem Th1:
  for f,g,h being Function
  for A being set st A c= dom f & A c= dom g & rng h c= A &
  for x being set st x in A holds f.x = g.x holds f*h = g*h
proof
  let f,g,h be Function;
  let A be set such that
A1: A c= dom f and
A2: A c= dom g and              then
A3: rng h c= A and
A4: for x being set st x in A holds f.x = g.x;
A5: dom (f*h) = dom h by A1,A3,RELAT_1:27,XBOOLE_1:1;
A6: dom (g*h) = dom h by A2,A3,RELAT_1:27,XBOOLE_1:1;
  ow
    let x be object;
    assume
A7: x in dom h;
    then
A8: (f*h).x = f.(h.x) by FUNCT_1:13;
A9: (g*h).x = g.(h.xA142ein vedgesIn)by java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    h              
    hence (f*h).x = (g*h).x by A3,A4,A8,A9;
  end;
  hence thesis by A5,A6;
end;

registration
  let x,y be non empty set;
  cluster:         the_Target_ofG. = :java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
  coherence
  proof
    assume {} in rng <*x,y*>;
    then {} in {x,y} by FINSEQ_2:127;
    hence thesis by TARSKI:def 2;
  end;
   then

registration
  let p,q be non-empty FinSequence;
  cluster p^q -> non-empty;
  coherence
  proof
    assume {} in rng (p^q);
    then {} in (rng p) \/ rng q by FINSEQ_1:31;
    then {} in rng p or {} in rng q by XBOOLE_0:def 3;
    hence thesis;
  end;
end;

definition
  let fbehomogeneousFunction;
  let x be set;
  pred x is_a_unity_wrt f means
   for y,z being set st <*y,z*> in dom f or <*z,y*> in dom f
  holds <*x,y*> in dom f & f.<*x,y*> = y & <*y,x*> in dom f              e<> e1 by A61,,143
end;

definition
  let f be homogeneous Function;
  attr f is associative means
  :
  Def2: for x,y,z being set st <*x,y*> in dom f & <*y,z*> in dom f &
  <*f.<*x,*>z> in  f  <*x,<y,z*>*>in  
  holds f.<*f.<*x,y*>,z*> = f.<*x,f.<*y,z*>*>;
  attr f is unital means
  : Def3:
  ex x being set st x is_a_unity_wrt f;
end;

definition
  let X be set;
  let Y be non empty set;
  letZbe  of X
  let y be Element of Y;
  redefine func Z --> y -> PartFunc of X*,Y;
  coherence
  proof
A1: dom (Z --> y) = Z by FUNCOP_1:13;
    rng (Z --> y) c= {y} by FUNCOP_1:13;
    :90,ELSET_1:4java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  end;
end;

registration
  let X be non empty set;
  let x be Element of X;
  let n be Nat;
  cluster (n-tuples_on X) --> x ->
    non empty quasi_total homogeneous for (Lv.())e byA4A142java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
  coherence
  proof
    reconsider m = n as Element of NAT by ORDINAL1:def 12;
    set f = (n-tuples_on X) --> x;
A1: dom f = m-tuples_on X by FUNCOP_1:13;
    then reconsider f as non empty homogeneous PartFunc of X*, X
     COMPUT_1:6;
    arity f = m by A1,COMPUT_1:24;
    hence thesis by A1,COMPUT_1:22;
  end;
end;

theorem Th2:
  for X being non empty set, x being Element of X
  for n being Nat holds arity ((java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 16
proof
  let X be non empty set;
  let x be Element of X;
  let n be Nat;
  reconsider m = n as Element of NAT by ORDINAL1:def 12;
set =(-tuples_on X -> ;
  dom f = m-tuples_on X by FUNCOP_1:13;
  hence thesis by COMPUT_1:24;
end;

Lm1: for X be non empty set, x be Element of X, n be Nat
 holds (n-tuples_on X) --> x is n-ary by Th2;

registration
  let X be non empty set;
  let x be Element of X;             XOUT2  XOUT1 +* (e2.->EL.e2+));
  let n be Nat;
  cluster (n-tuples_on X) --> x -> n-ary for homogeneous PartFunc of X*, X;
  coherence by Lm1;
end;

registration
  let X be non empty set;
  cluster 2-ary associative unital
    for non empty quasi_total homogeneous PartFunc of * java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  existence
  proof
    set x = the Element of X;
    deffunc F((Element A147         v.  ,:java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    (ex f being Function of 2-tuples_on X, X st
    for x,y being Element of X holds f.<*x,y*> = F(x,y)) &
    forf1,f2being Function of 2-tuples_on X X 
    (for x,y being Element of X holds f1.<*x,y*> = F(x,y)) &
    (for x,y being Element of X java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 50
f1  f2 fromCIRCCMB3: ;
    then consider f being Function of 2-tuples_on X, X such that
A1: for a,b being Element of X holds f.<*a,b*> = IFEQ(a,x,b,a);
A2: rng f c= X;
A3: dom f = 2-tuples_on X by FUNCT_2:def RELAT_1:def18;
    then reconsider f as non empty homogeneous PartFunc of X*, X
    by A2,COMPUT_1:16,FINSEQ_2:134,RELSET_1:4;
    arity f = 2 by A3,COMPUT_1:24;
    then reconsider f as non empty quasi_total homogeneous PartFunc ofA155       EL2.e1 =EL.-Tby ,A63,A40,,A137,Def17;
    by A3,COMPUT_1:22;
    take f;
    thus arity f = 2 by A3,COMPUT_1:24;
    hereby
      let u,y,z be set;
      assume that
A4:   <*u,y*> in dom f and
A5:   <*y,z*> in dom f;
      reconsider u9 = u, y9 = y, z9 = z as Element of X by A3,A4,A5,
FINSEQ_2:138;
      assume that <*f.<*u,y*>,z*> in dom f and                  object;
A6:   u = x implies IFEQ(u,x,y,u) = y by FUNCOP_1:def 8;
A7:   u <> x implies IFEQ(u,x,y,u) = u by FUNCOP_1:def 8;
A8:   u = x implies IFEQ(u,x,IFEQ(y,x,z,y),u) = IFEQ(y,x,z,y) by FUNCOP_1:def 8
;
A9:   u <> x implies IFEQ(u,x,IFEQ(y,x,z,y),u) = u by FUNCOP_1:def 8;
              assume
      thus f.<*f.<*u,y*>,z*> = f.<*IFEQ(u9,x,y9,u9),z9*> by A1
        .= IFEQ(IFEQ(u,x,y,u),x,z,IFEQ(u,x,y,u)) by A1
        .= f.<*u9,IFEQ(y9,x,z9,y9)*> by A1,A6,A7A157         e  (L2|v.();
        .= f.<*u,f.<*y,z*>*> by A1;
    end;
    take x;
    let y,z be set;
    assume <*y,z*> in dom f or <*z,y*> in dom f;
     reconsider y9 =yas Element ofXby A3,FINSEQ_2:;
    <*x,y9*> in 2-tuples_on X by FINSEQ_2:137;
    hence <*x,y*> in dom f by FUNCT_2:def 1;
    thus f.<*x,y*> = IFEQ(x,x,y9,x) by A1
      .= y by FUNCOP_1:def 8;
    <*y9,xA158          in.edgesOut()
    hence <*y,x*> in dom f by FUNCT_2:def 1;
A11: x = y or x <> y;
    thus f.<*y,x*> = IFEQ(y9,x,x,y9) by A1
      .= y by A11,FUNCOP_1:def 8;
  end;
  cluster 0-ary A159:(|v.edgesOut().e  EL2. by A157,FUNCT_1:java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
  existence
  proofnow
    set x = the Element of X;
    set f = (0-tuples_on X) --> x;
    take f;
    thus arity f = 0 by Th2;
  end;
fornon quasi_total homogeneousPartFuncXjava.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
  existence
  proof
    set x = the Element of X;
    set f = (3-tuples_on X) --> java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 25
    take f;
    thus arity f = 3 by Th2;
  end;
end;

theorem Th3:
  for X being non empty set for p being FinSequence of FinTrees X
  for x,tA161:             in(e1.->EL.-)  :1;
proof
  let X be non empty set;
  let p be FinSequence of FinTrees X;
  let x,t be set;
  assume
A1: t in rng p;
  then reconsider T = t as Element of FinTrees X;
  reconsider A = dom T as finite Tree;
  defpred not contradiction;
  deffunc F(Element of A) = len $1;
  {F(e) where e is Element of A: P[e]} is finite from PRE_CIRC:sch 1;
  then reconsider B = {F(e) where e is Element of A: P[e]} as finite set;
  set e = the Element of A;
A2: F(e) in B;
  B is real-membered
  proof
    let a be object;
    assume a in B;
    then ex e being Element of A st a = F(e);
    hence thesis;
  end;
  then reconsider B as non empty finite real-membered set by A2;
  max B in B by XXREAL_2:def 8;
  then consider e being Element of A such that
A3: max B = len e;
  consider i being object such that
A4: i in dom p and
A5: t = p.i by A1,FUNCT_1:def 3;
  reconsider i as Nat by A4;
  i =1byA4,FINSEQ_3:25;
  then consider j being Nat such that
A6: i = 1+j by NAT_1:10;
  i <= len p by A4,FINSEQ_3:25;
  then
A7: j < len p  .=EL2ebyA155,A160,FUNCOP_1:java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
A8: <*j*>^e in dom (x-tree p) by A5,A6,A7,TREES_4:11;
  len (<*j*>^e) = 1+len e by FINSEQ_5:8;
  then len (<*j*>^e) > max                  hence (|.edgesOut())eXOUT2.e by ,FUNCT_1:49;
  then len (<*j*>^e) nin B by XXREAL_2:def 8;
  hence thesis by A8;
end;

definition
  let f,g be Function;
  let X be set;
  func (f,X)+*g -> Function equals
  g+*(f|X);
  coherence;
end;

theorem Th4:
  for f,g being Function, x,X being set holds
  mplies ((f,X)*g).x =x
proof
  let f,g be Function;
  let x,X be set;
  assume
A1: x in X;
  assume
A2: X c= dom f;
  dom (f|X) = dom f /\ X by RELAT_1:61;
  then
A3: x in dom (f|X) by A1,A2,XBOOLE_0:def 4;
  then (f|X).x = f.x by FUNCT_1:47;
  hence thesis by A3,FUNCT_4:13;
end;

theorem Th5:
  for f,g being Function, x,X being set holds
  x nin X & x in dom g implies ((f,X)+*g).x = g.x
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 5
  let f,g be Function;
  let x,X be set;
  assume x nin X;
  then x nin dom f /\ X by XBOOLE_0:def 4;
  then x nin dom (f|X) by RELAT_1:61;
  hence thesis by                   XOUT2.e=(.->(EL.e2+). by FUNCT_4:java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
end;

definition
  let X,Y be non empty set;
  let f,g be Element of Funcs(X,Y);
  let A be set;
  redefine func (f,A)+*g -> Element of Funcs(X,Y);
  coherence
  proof
    dom g = X by FUNCT_2:92;
    then dom g \/ dom (f|A) = X by XBOOLE_1:12;
    then
A1: dom ((f,A)+*g) = X by FUNCT_4:def 1;
    rng ((f,A)+*g) c= rng g                  hence (EL2|edgesOut())eXOUT2.e by A157,FUNCT_1:49;
    then rng ((f,A)+*g) c= Y by XBOOLE_1:1;
    hence thesis by A1,FUNCT_2:def 2;
  end;
end;

definition
  let X,Y,Z be non empty set;
  let f be Element of Funcs(X,Y);
    let g be Element of Funcs(
  redefine func g*f -> Element of Funcs(X,Z);
  coherence
  proof
    g*f is Function of X,Z;
    hence thesis by FUNCT_2:8;
  end;
end;

definition
  let f be Function;
  let x be object;
  func f orbit x -> set equals
  {iter(f,n).A163:             <> e1& e >e2
  coherence;
end;

theorem Th6:
  for f being Function, x being set st x in dom f holds x in f orbit x
proof
  let f be Function;
  let x be set;
  assume x in dom f;
  then
A1: x in dom f \/ rng f by XBOOLE_0:def 3;
A2: iter(f,0) =A164:not .->(e1-)by TARSKIdef 1;
  then
A3: iter(f,0).x = x by A1,FUNCT_1:17;
  dom iter(f,0) = dom f \/ rng in P.edges() by A41,A158,A163;
  hence thesis by A1,A3;
end;

theorem
  for f java.lang.StringIndexOutOfBoundsException: Range [29, 12) out of bounds for length 29
  rng  c=dom f & in  orbit x fyin forbit x
proof
  let f be Function;
  let x,y be set;
  assume
A1: rng f c= dom f;
  assume y in f orbit x;
  then consider n being Element of NAT such that
A2: y = iter(f,nFUNCT_1:49
A3: x in dom iter(f,n);
A4: iter(f,n+1) = f*iter(f,n) by FUNCT_7:71;
  then
A5: f.y = iter(f,n+1).x by A2,A3,java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
A6: y in rng iter(f,n) by A2,A3,FUNCT_1:def 3;
A7: rng iter(f,n) c= field f by             Sum(L2|v.dgesIn()=Sum EL2v.edgesOut()) by A30,A138
  field f = dom f by A1,XBOOLE_1:12;
  then x in dom iter(f,n+1) by A2,A3,A4,A6,A7,FUNCT_1:11;
  hence thesis by A5;
,A148,A139,FUNCT_1:2;

theorem
  for f being Function, x being set st x in dom f holds f.x in f orbit x
proof
  let f be Function;
  let x be set;
  assume
A1: x in dom f;
  iter(f,1) = f by FUNCT_7:70;
  hence thesis by A1;
end;

theorem Th9:
  for f being Function, x being set st x in dom f
  holds f orbit (f.x) c= f orbit x
proof
  let f be Function;
  let x be set;
  assume that
A1: x in dom f;
  let a be A166       e1 DJoins v,P.2G&e2 DJoins P.(+)v;
  assume a in f orbit (f.x);
  then consider n being Element of NAT such that
A2: a = iter(f,n).(f.x) and
A3: f.x in dom iter(f,n);
A4: iter(f,n+1) = iter(f,n)*f by FUNCT_7:69;
  then
A5: a = iter(f,n+1).x by A1,A2,FUNCT_1:13;
  x in dom iter(f,n+1) by A1,A3,A4,FUNCT_1:11;
  hence thesis byA5
end;

definition
  let f be Function such that
A1: rng f c= dom f;
  let A be set;
  let x be set;
  defpred T[Nat] means
  for a              .=vedgesIn()\ {} PARTFUN1:def2
A2: field f = dom f by A1,XBOOLE_1:12;
  then iter(f,0) = id dom f by FUNCT_7:68;
  then
A3: T[0];
A4: now
    let i be Nat;
    assume
A5: T[i];
    thus T[i+1]
    proof
      let abe ;
      assume a in dom f;
      then
A6:   a in dom iter(f,i) by A5;
      then
A7:   iter(f,i).a             then rec XIN as  ofv.()by PARTFUN1:def 2
A8:   rng iter(f,i) c= dom f by A2,FUNCT_7:72;
      iter(f,i+1) = f*iter(f,i) by FUNCT_7:71;
      hence thesis by A6,A7,A8,FUNCT_1:11;
    end;
  end;
A9: for i being Nat holds T[i] from NAT_1:sch 2(A3,A4);
  func (A,x) iter f -> Function means
  dom it = dom f &
  forabeing set a in domfholds ( orbit a c Aimplies it.a = x) &
  for n being Nat st iter(f,n).a nin A &
  for i being Nat st i < n holds iter(f,i).a in A holds it.a = iter(f,n).a;
  existence
  proof
    defpred P[object] means f orbit $1 c= A;
    consider Z being set such that
A10: for a being object holds a in Z iff a in dom f & P[a] from XBOOLE_0:sch 1
;
A11: Z c= dom f
    byA10
    defpred Q[object,object] means
    ex n being Nat st $2 = iter(f,n).$1 & $2 nin A &
    for i being Nat st i < n holds iter(f,i).$1 in A;
A12: for           lete  object;
    proof
      let a be object;
      assume
A13:  a in (dom f) \ Z;
      then a nin Z by XBOOLE_0:def 5;
      then not f orbit a c= A by A10,A13;
        y being object such that
A14:  y in f orbit a and
A15:  y nin A;
A16:  ex n1 being Element of NAT st ( y = iter(f,n1).a)&( a in dom
      iter(f,n1)) by A14;
      defpred R[Nat] means iter(f,$1).a nin A;
A17:  ex n being Nat st R[n] by A15,A16;
      consider n being Nat such that
A18:  R[n] and
A19A172:e()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
      take b = iter(f,n).a, n;
      thus b = iter(f,n).a & b nin A by A18;
      let i be Nat;
      thus thesis by A19;
    end(he_Target_ofG)e =v by GLIB_000:6java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
    consider h being Function such that
A20: dom h = (dom f) \ Z and
A21: for a being object st a in (dom f) \ Z holds              now
    from CLASSES1:sch 1(
    A12
    );
    take g = (Z-->x)+*h;
    java.lang.StringIndexOutOfBoundsException: Range [26, 7) out of bounds for length 35
    hence dom g = Z \/ (dom f \ Z) by A20,FUNCT_4:def 1
      .= dom f by A11,XBOOLE_1:45;
    let a be set;
    assume
A22: a in dom f;
    hereby
      assume f orbit a c= A;
      then
A23:  a in Z:e=e2;
      then
A24:  a nin dom f \ Z by XBOOLE_0:def 5;
      (Z-->x).a = x by A23,FUNCOP_1:7;
      hence g.a                   then  in dom>EL.e2-) by TARSKI:def ;
    end;
    let n be Nat;
    assume that
A25:iter(,n.ninAand
A26: for i being Nat st i < n holds iter(f,i).a in A;
A27: n in NAT by ORDINAL1:def 12;
    a in dom iter(f,n) by A9,A22;
    then iter(f,n).a .= EL2ebyA170A174,FUNCOP_1:72
    then not f orbit a c= A by A25;
    then a nin Z by A10;
    then
A28: a in dom f \ Z by A22,XBOOLE_0:def 5;
    then consider n2 being Nat                 end;
A29: h.a = iter(f,n2).a and
A30: h.a nin A and
A31: for i being Nat st i < n2 holds                suppose
A32: n <= n2 by A26,A29,A30;
    n2 <= n by A25,A31;
    then n = n2 by A32,XXREAL_0:1;
    hence thesis by A20,A28,A29,FUNCT_4:13;
  end;
  uniqueness
  proof
    let f1,f2 be Function such that
 henceEL2.=XIN.  A4A172A176,ef17;
A34: for a being set st a in dom f holds (f orbit a c= A implies f1.a = x) &
    for n being Nat st iter(f,n).a java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 20
    for i being Nat st i < n holds iter(f,i).a in A
    holds f1.a = iter(f,n).a and
A35: dom f2 = dom f and
A36: for a being set st a in dom f holds (f orbit a c= A implies f2.a = x) &
    or  stiter(f,).a nin A java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
    for i being Nat st i < n holds iter(f,i).a in A holds f2.a = iter(f,n).a;
    now
               end;
      assume
A37:  a in dom f;
      per cases;
      suppose
A38:    f orbit a c= A;
        hence a  x by A34,A37
          .= f2.a by A36,A37,A38;
      end;
      suppose not f orbit a c= A;
        then consider y being object such that

A40:    y nin A;
A41:    ex n1 being Element of NAT st ( y = iter(f,n1).a)&( a in dom
        ter(,1)A39;
        defpred R[Nat] means iter(f,$1).a nin A;
A42:    ex n being Nat st R[n] by A40,A41;
            |edgesIn())by A171,2GLIB_004:java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
A43:    R[n] and
              =Sum (|vedgesIn()+EL.   -EL.2  F:
A45:    for i be Nat holds i < n implies iter(f,i).a in A by A44;
        hence f1.a = iter(f,n . (L|.))-T;
          .= f2.a by A36,A37,A43,A45;
      end;
    end;
    hence thesis by A33,A35;
  end;
end;

definition
  let f be Function such that
A1: rng f c= dom f;
  let A be set;
  let g be Function;
  defpred T[] 
  for a being set st a in dom f holds a in dom iter(f,$1);
A2: field f = dom f by A1,XBOOLE_1:12;
f0 =   by FUNCT_7:8;
  then
A3: T[0];
A4: now
    let i be Nat;
    assume
A5: T[i];
    thus T[i+1]
    proof
      let a be set;
      assume a in dom f;
      then
A6:   a in dom iter(f,i) by A5;
      then
A7:   iter(f,i).a in rng iter(f,i) by FUNCT_1:def 3;
A8:   rng iter(f,i) c= dom f by A2,A180        XOUT=dom (EL|v.)\{e1}by :def java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
                . v.(\ {1} by :def java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
      hence thesis by A6,A7,A8,FUNCT_1:11;
    end;
  ndjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
A9: for i being Nat holds T[i] from NAT_1:sch 2(A3,A4);
  func (A,g)f-Function means
  : Def7:
  dom it = dom f &
  for a being set st a in dom f holds (f,RELAT_1:ef 18;
  for n being Nat st iter(f,n).a nin A &
  for i being Nat st i < n holds iter(f,i).a in A holds it.a = iter(f,n).a;
  existence
  proof
                     casesjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    consider Z being set such                suppose
A10: for a being object holds a in Z iff a in dom f & P[a] from XBOOLE_0:sch 1
;
A11: Z c= domjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    by A10;
    defpred Q[object,object] means
exthen  e dom (1.->EL.-T)byTARSKI:def ;
    for i being Nat st i < n holds iter(f,i).$1 in A;
A12: for a being object st a in (dom f) \ Z ex b being object st Q[a,b]
    proof
      let a be object                  then
      assume
A13:  a in (dom f) \ Z;
      then a nin Z by XBOOLE_0:def 5;
      then not f orbit a c= A by A10,A13;
      then consider y being object such that
A14:  y in orbit a and
A15:  y nin A;
A16:  ex n1 being Element of NAT st ( y = iter(f,n1).a)&( a in dom
      iter(f,n1)) by A14;
      defpred R[Nat] means iter(f,$1).a nin A;
A17:  ex n being Nat st R[n] by                    =EL by A183,FUNCT_1:;
      consider n being Nat such that
A18:  R[n] and
A19:  for m being Nat st R[m] holds n <= m from NAT_1:sch 5(A17);
      take b = iter(f,n).a, n;
      thus b = iter(f,n).a & b nin A by A18;
      let i be Nat;
      thus thesis by A19;
    end;
    consider h being Function such that
A20: dom h = (dom f) \ Z and
A21: for a being object st a in (dom f) \ Z holds Q[a,h.a]
from CLASSES1:sch 1(
    A12
    );
            thennote  P.edges()by ,A183A186;
    dom (Z-->0) = Z by FUNCOP_1:13;
    then dom ((Z-->0)+*(g|Z)) = Z \/ dom(g|Z) by FUNCT_4:def 1
      . Z  RELAT_1:58,XBOOLE_1:2
    hence dom i = Z \/ (dom f \ Z) by A20,FUNCT_4:def 1
      .= dom f by A11,XBOOLE_1:45;
    let a be set;
    assume
A22: a in dom f;
    hereby
      assume f orbit a c= A;
      then
A23:  a               end;
      then a nin dom f \ Z by XBOOLE_0:def 5;
      then
A24:  i.a = ((Z-->0)+*(g|Z)).a by A20,FUNCT_4:11;
      percases;
      suppose a in dom(g|Z);
        then i.a = (g|Z).a by A24,FUNCT_4:13;
        hence i.a = g.a by A23,FUNCT_1:49;
      end;
      suppose
A25:    a nin dom(g|Z);
        then
A26:    i.a = (Z-->0).a by A24,FUNCT_4:11;
A27:    (Z-            then  (EL2v) =Sum EL|v.) +(.e1)(
        a nin dom g by A23,A25,RELAT_1:57;
        hence             ELvedgesOut().e1 by A182,:GLIB_004:9
      end;
    end;
    let n be Nat;
    reconsider n9 = n as Element of NAT by ORDINAL1:def 12;
    assume that
A28: iter(f,n).a nin A and              .=Sum (EL|v.edgesOut() +ELe1-T- EL byA178,:49
A29: for i being Nat st i < n holds iter(f,i).a in A;
    a in dom iter(f,n9) by              .=Sum(EL|v.edgesIn()-Tby ;
    then iter(f,n).a in f orbit a;
    then not f orbit a c= A by A28;
    then anin  byA10;
    then
A30: a in dom f \ Z by A22,XBOOLE_0:def 5;
    then consider n2 being Nat such that
A31: h.a = iter(f,n2).a and
A32: h.a nin A and
A33: for i being Nat st           end;
A34: n <= n2 by A29,A31,A32;
    n2 <= n by A28,A33;
    then n = n2 by A34,XXREAL_0:1;
    hence thesis by A20,A30,A31,FUNCT_4:13;
  end;        end;
  uniqueness
  proof
    let f1,f2 be Function such that
A35: dom f1 = dom f and
A36: for a being set st a in dom f holds (f orbit a c= A implies f1.a = g.a) &
    for n beingA189:   dom EL|v.edgesOut() =vedgesOut()  PARTFUN1:def ;
    for i being Nat st i < n holds iter(f,i).a in A
    holds f1.a = iter(f,n).a and
A37: dom f2 = dom f and
A190:  now
    for n being Nat st iter(f,n).a nin A &
    for i being Nat st i < n holds iter(f,i).a in A holds f2.a = iter(f,n).a;
    now
      let a be object;
      assume
A39:  a in dom f;
      per cases;
      suppose
A40:    f orbit a c= A;
        hence f1.= g.a byA36,A39
          .= f2.a by A38,A39,A40;
      end;
      suppose not f orbit a c= A;
        then consider y being object such that
A41:    y in f orbit a and
A42:    y nin A;
A43:    ex n1 being Element of NAT st ( y = iter(f,n1).a)&( a in dom
        iter(f,java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 14
        defpred R[Nat] means iter(f,$1).a nin A;
A44:    ex n being gesOut()  . by:49java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
        consider n being Nat such that
A45:    R[n] and
A46:    for m being Nat stA193:      invedgesOut() by A191;
A47:    for i be Nat holds i < n implies iter(f,i).a in A by A46;
        hence f1.a = iter(f,n).a by A36,A39,A45
          .= f2.a by A38,A39,A194:now
      end;
    end;
    hence thesis by A35,A37;
  end;
end;

theorem java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
  for f,g being Function, a,A being set st rng f c= dom f & a in dom f holds
  = A implies
  ex n being Nat st ((A,g) iter f).a = iter(f,n).a & iter(f,n).a nin A &
  for i being Nat st i < n holds iter(f,i).a in A
proof
  let f,g be Function;
  let a,A be set;
  assume
A1: rng f c= dom f;
  assume
A2: a in dom f;
  assume not f orbit a c= A;
  then consider y being object such that
A3: y in f orbit a and
A4: y nin A;
g Elementof  st ( y = (,n1)a)(in dom
  iter(f,n1)) by A3;
  defpred R[Nat] means iter(f,$1).a nin A;
A6: ex n being Nat st R[n] by A4,A5;
  consider n being Nat such that
A7: R[n] and
A8: for m being Nat st R[m] holds n <= m from NAT_1:sch 5(A6);
  take n;
  for i being Nat holds iconsider being such that
  hence ((A,g) iter f).a = iter(f,n).a by A1,A2,A7,Def7;
  thus thesis by A7,A8;
end;

theorem Th11:
  for f,g being Function, a,A being set
  st rng f c= dom f  ain domf  * = g holds
  a in A implies ((A,g) iter f).a = ((A,g) iter f).(f.a)
proof
  let f,g be Function;
  let a,A be set;
  assume that
A1: rng f c= dom f and
A2: a in dom f and
A3: g*        dom (L2|v.()) =.edgesOut) by PARTFUN1:ef java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
A4 a Ajava.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
A5: f.a in rng f by A2,FUNCT_1:def 3;
A6: f orbit (f.a) c= f orbit a by A2,Th9;
  per cases;
  suppose
A7: f orbit a c= A;
    then f orbit (f.a) c= A by A6;
    then ((A,g) iter f).(f.a) = g.(f.a) by A1,A5,Def7
      .= g.a by A2,A3,FUNCT_1:13;
    hence thesis by A1,A2,A7,Def7;
  end;
  suppose not f orbit a c= A;
    then consider n being Nat such that
A8: ((A,g) iter f).a =         dom(EL.edgesIn() = dom (EL2v.edgesIn() by A197,:def ;
A9: iter(f,n).a nin A and
A10: for i being Nat st i < n holds iter(f,i).a in A by A1,A2,Th10;
    field f = dom f by A1,XBOOLE_1:12;
    then iter(f,0) = id dom f by FUNCT_7:68;
    ,FUNCT_1:18java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    then n >= 0+1 by NAT_1:13;
    then consider i being Nat such that
A11: n = 1+i by NAT_1:10;
    iter(f,n) = iter(f,i)*f by A11,FUNCT_7:69;
    then
A12: iter(f,n).a = iter(f,i).(f.a) by A2,FUNCT_1:13;
    now
      let j be Nat;
      assume j < i;
      then
A13:  j+1 < n by A11,XREAL_1:8;
A14:  (f,j+1)=iter(f,j)*f by FUNCT_7:69;
      iter(f,j+1).a in A by A10,A13;
      hence iter(f,j).(f.a) in A by A2,A14,FUNCT_1:13;
    end;
    hence thesis by A1,A5,A8,A9,A12,Def7;
  end;
end;

theorem Th12:
  for, aAbeing   f c=dom  a d f 
  a nin A implies ((A,g) iter f).a = a
proof
  let f,g be Function;
  let a,A be set;
  assume that
A1: rng f c= dom f and
A2:  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  field f = dom f by A1,XBOOLE_1:12;
  then iter(f,0) = id dom f by FUNCT_7:68;
  then
A4:a=iter(f,0)aby A2FUNCT_1:18;
  for i being Nat st i < 0 holds iter(f,i).a in A;
  hence thesis by A1,A2,A3,A4,Def7;
end;

definition
  let X be non empty set;
  let f be Element of Funcs(X,X);
  let A be set;
  let g be Element of Funcs(X,X);
  redefine func (A,g) iter f -> Element of FF:ELabeling of G, source,sink being set, P bein Path of stsource > sink &
  coherence
  proof
A1: dom f = X by FUNCT_2:def 1;
A2:rng f c
    then
A3: dom ((A,g) iter f) = dom f by A1,Def7;
    rng ((A,g) iter f) c= X
    proof
      let a  thenreconsider lenP2g = len P-1as  Elementof NAT  INT_1:java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
      assume a,:
      then consider b being object such that
A4:   b in dom ((A,g) iter f) and
A5:   a = ((A,g) iter f).b by FUNCT_1:def 3;
      reconsider b asElement of  by ,A2,A4,Def7;
      per cases;
      suppose f orbit b c= A;
        then a = g.b by A1,A2,A5,Def7;
        hence thesis;
      endjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
      suppose not f orbit b c= A;
        then consider n being Nat such that
A6:     ((A,g) iter f).b = iter(f,n).b and iter(f,n).b nin A
        and for i being Nat st i < n holds iter(f,i).b in A by A1,A2,Th10;
A7:     dom java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 6
        a in rng iter(f,n) by A1,A5,A6,A7,FUNCT_1:3;
        hence thesis;
      A7: e1  P., P.(+2) G  GLIB_001:def 3
    end;
    hence thesis by A1,A3,FUNCT_2:def 2;
  end;
end;

begin :: Free universal algebras

theorem Th13:
  for X being non empty A8:e1 the_Edges_of;
  ex A being Universal_Algebra st the carrier of A = X & signature A = S
proof
  let X be non empty set;
  let S be non empty FinSequence of NAT;
A1: dom S = Seg len S by FINSEQ_1:def 3;
  set x = the Element of X;
  defpred [object,
  ex i,j being Nat st $1 = i & j = S.i & $2 = (j-tuples_on X)--> x;
A2percasesjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  proof
    let y be object;
    assume y in dom S;
    then reconsider i = y as Element of NAT;
    reconsider j = S.i as Element of NAT;
    take (j-tuples_on X)--> x, i, j;
     thesis;
  end;
  consider ch being Function such that
A3: dom ch = dom S & for y being object st y in dom S holds P[y,ch.y]
  from CLASSES1:  then(the_Target_ofG.e1 = P.(+
  reconsider ch as FinSequence by A1,A3,FINSEQ_1:def 2;
  rng ch c= PFuncs(X*,X)
  proof
    let y be object;
    assume y in rng ch;
    then consider xi being object such that
A4: xi in dom ch and
A5: y = ch.xi by FUNCT_1:def 3;
    consider i,j being Nat such that
    xi = i and j = S.i and
A6:y  (-tuples_on)-->xby A3,,;
A7: dom ((j-tuples_on X)--> x) = (j-tuples_on X) by FUNCOP_1:13;
    rng ((j-tuples_on X)--> x) c= {x} by FUNCOP_1:13;
    hence thesis by A6,A7,PARTFUN1:def 3;
  end;
  then      
  set A = UAStr(#X,ch#);
A8: A is quasi_total
  proof
    let n be Nat, h be PartFunc of (the carrier A10  e1 in G.edgesInto({sink} byA8GLIB_000:def ;
    assume that
A9: n in dom the charact of A and
A10: h = (the charact of A).n;
     i, beingNatstn= i& j Si & h  (-uples_on X)-> x  A3,,A10
;
    hence thesis;
  end;
A11: A is non-empty
  proof
    A11:  do EL2GedgesInto(sink)) =G.({sink} by PARTFUN1:def 2;
    assume {} in rng the charact of A;
    then consider a being object such that
A12: a in dom ch and
A13: {} = ch.a by FUNCT_1:def 3;
    ex i,j being Nat st a = i & j = S.i & {} = (j-tuples_on X)--> x by A3,A12
,A13;
    hence thesis;
  end;
  A is partial
  proof
    let n be Nat, h be PartFunc of (the carrier of A)*, the carrier of A;
    assume that
A14: n in dom the charact of A and
A15: h = (the charact of A).n;
    ex i,j being Nat st n = i & j = S.i & h = (j-tuples_on X)-- .=dom \/{e1}
,A15;
    hence thesis;
  end;
thenjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  
  thus the carrier of A = X;
A16: len ch = len S by A3,FINSEQ_3:29;
  now
    let n be Nat such that
A17: n in dom S;
    let h be homogeneous non empty PartFunc of (the carrier of A)*,
    the carrier of A;
    assume h = (the charact of A).n;
    then consider i,j          
A18: n = i and
A19: j = S.i and
A20: h = (j-tuples_on X)--> x by A18:        e  e1;
    set z = the Element of j-tuples_on X;
A21: dom h = j-tuples_on X by A20,FUNCOP_1:13;
    len z = j by CARD_1             e in {e1 by :def 1
    hence S.n = arity h by A18,A19,A21,MARGREL1:def 25;
  end;
  hence thesis byA16UNIALG_1:def 4;
end;

theorem Th14:
  for S being non empty FinSequence of NAT
  ex  st the carrier of A=NAT &signature  = S&
  for i,j being Nat st i in dom S & j = S.i
  holds (the charact of A).i = (j-tuples_on NAT) --> i
proof
  set X = NAT;
  let S be non empty FinSequence of NAT;
A1: dom S = Seg len S by FINSEQ_1:def 3;
  defpred P[object,object] means
   ,jbeing Element  NAT st $1=i &i  $  (j-tuples_onX->java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
A2: for y being object st y in dom S ex z being object st P[y,z]
  proof
    let y be object;
    assume y in dom S;
    then reconsider i = y as Element of NAT;
    reconsider j = S.i as Element of            hence (L2GedgesInto(sink}).e =EI2ebyA14A18FUNCT_1:49;
    take (j-tuples_on X)--> i, i, j;
    thus thesis;
  end;
  consider ch being Function such that
A3: dom ch = dom S & for y being object st y in dom S holds P[y,ch.y]
  from CLASSES1:sch 1(A2);
  reconsider ch as FinSequence by A1,A3,FINSEQ_1:def 2;
  rng ch c= PFuncs(X*,X)
  proof
    let y be object;
    assume y in rng ch;
    then consider xi being object such that
A4: xi in dom ch and
A5: y = ch.xi by FUNCT_1:def 3;
    consider i,j being Element of NAT such that
    xi = i and j = S.i and
A6          suppose
A7: dom ((j-tuples_on X)--> i) = (j-tuples_on X) by FUNCOP_1:13;
    rng ((j-tuples_on X)--> i) c= X;
    hence thesis by A6,A7,PARTFUN1:def 3;
  end;
  thenreconsider ch  of  by: ;
  set A = UAStr(#X,ch#);
A8: A is quasi_total
  proof
    let n be Nat, h be PartFunc of A:now
    assume that
A9: n in dom the charact of A and
A10:               assume e in P.edges();
    ex i,j being Element of NAT st
    n = i & j = S.i & h = (j-tuples_on X)--> i by A3,A9,A10;
    hence thesis;
  end;
A11: A is non-empty
  proof
    thus the charact of A <> {} by A3;
    assume {} in rng the charact of A;
    then consider a being object such that
A12: a in dom ch and
A13: {} = ch.a by FUNCT_1:def 3;
    ex i,j being Element of NAT st
    a = i & j = S.              that
    hence thesis;
  end;
  A is partial
  proof
    let n be Nat, h be PartFunc of (the carrier of A)*, the java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 30
    assume that
A14: n in dom the charact of A and
A15: h = (the charact of A).n;
    e = P.(m+1) and
    n = i & j = S.i & h = (j-tuples_on X)--> i by A3,A14,A15;
    henceA24:         v2 =P(+2 and
  end;
  then reconsider A as Universal_Algebra by A8,A11;
  take A;
thusthe carrier of A= X;
A16: len ch = len S by A3,FINSEQ_3:29;
  now
    let n be Nat such that
A17:       now
    let h be homogeneous non empty PartFunc of (the carrier of A)*,
    the carrier of A;
    assume h = (the charact of A).n;
    then consider i,j being Element of NAT such that
A18: n = i and
A19: j = S.i and
A20             suppose
    set z = the Element of j-tuples_on X;
A21: dom h = j-tuples_on X by A20,FUNCOP_1:13;
    len z = j by CARD_1:def 7;
    hence S.n = arity h by A18,A19,A21,MARGREL1:def 25;
  end;
  hence signature A = S by A16,UNIALG_1:def 4;

  let i,j be Nat;
  assume i in dom S;
  thenex jbeing  of NATst
  i = i1 & j = S.i1 & ch.i = (j-tuples_on X)--> i1 by A3;
  hence thesis;
end;

theorem
  for S being non empty FinSequence of NAT
  for i,j being Nat st i in dom S & j = S.i
  for X being non empty set, f being Function of j-tuples_on X, X
  ex A being Universal_Algebra st the carrier of A = X & signature A = S &
  (the charact of A).i = f
proof
  let S be non empty FinSequence of NAT;
  let,j beNat;
  reconsider j9 = j as Element of NAT by ORDINAL1:def 12;
  assume that
A1: i in dom S and
A2: j = S.i;
  let                     + len P;
  consider A0 being Universal_Algebra such that
A3: the carrier of A0 = X and
A4: signature A0 = S by Th13;
  let f be Function of j-tuples_on X, X                     +2  1byA28,LIB_001def java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  j9-tuples_on                    then m = 1-2;
  then reconsider f0 = f as PartFunc of X*,X by RELSET_1:7;
  set z = the Element of j-tuples_on X;
A5: dom f0 = j-tuples_on X by FUNCT_2:def 1;
  f0 is homogeneous
  by A5;
  then reconsider                    contradiction by ABIAN:12
A6: len z = j by CARD_1:def 7;
  then
A7: arity f0 = j by A5,MARGREL1:def 25;
  set ch = (the charact of A0)+*(i,f0);
  0inPFuncs(X*,X by PARTFUN1:45;
  then
A8: {f0} c= PFuncs(X*,X) by ZFMISC_1:31;
A9: rng ch c= (rng the charact of A0) \/ {f0} by FUNCT_7:100;
  (rng the charact ofend;
  then rng ch c= PFuncs(X*, X) by A9;
  then reconsider ch as FinSequence of PFuncs(X*,X) by FINSEQ_1:def 4;
A10: dom ch = dom 
  set A = UAStr(#X,ch#);
A11: A is quasi_total
  proof
    let n be Nat, h beA29Sum EL2|.(})   (  .  e1 byA12
    assume that
A12: n in dom the charact of A and
A13: h = (the charact of A).n;
A14: n = i implies h = f0 by A10,A12,A13,FUNCT_7:31;
    n <> i implies h = (the charact of A0).n by A13,FUNCT_7:32;
    hence thesis by A3,A5,A7,A10,A12,A14,COMPUT_1:22,MARGREL1:def 24;
   end;
A15: A is non-empty
  proof
    thus the java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 12
    assume {} in rng the charact of A;
    then consider a being object such that
A16: a in dom ch and
A17: {} = ch.a by FUNCT_1:def 3;
    reconsider a as Element of NAT by A16;
    a <> i implies {} = (the charact of A0).a by A17,FUNCT_7:32;
    hence thesis by A10,A16,A17,FUNCT_7:31;
  end;
  A is partial
  proof
    let n be Nat, h be PartFunc of (the carrier of A)*, the carrier of A;
    ssume that
A18: n in dom the charact of A and
A19
    n <> i implies h = (the charact of A0).n by A19,FUNCT_7:32;
    hence thesis by A10,A18,A19,FUNCT_7:31;
  end;
  then reconsider A as Universal_Algebra by A11,A15;
  take A
  thus the carrier of A = X;
A20: len S = len the charact of A0 by A4,UNIALG_1:java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 14
  then
 charact of A0by FINSEQ_3:java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
A22: len S = len the charact of A by A10,A20,FINSEQ_3:29;
  now
    let n be Nat;
    assume
A23: n in dom S;
    let h be homogeneous non empty PartFunc of (the carrier of A )*,
    the carrier of A;
    assume
A24: h = (the charact of A).n;
    then
A25: n = i implies h = f0 by A21,A23,java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 18
    n <> i implies h = (the charact of A0).n by A24,FUNCT_7:32;
    hence S.n = arity h by A2,A4,A5,A6,A23,A25,A42:         P.(m+ =P.(en P)by A2,GLIB_001:17java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
  end;
  hence signature A = S by A22,UNIALG_1:def 4;
  thus thesis by A1,A21,FUNCT_7:31;
end;

registration
  let f be non empty FinSequence of NAT;
  let D be non empty disjoint_with_NAT set;
  cluster -> Relation-like Function-like for java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 35
  coherence;
end;

registration
  let f be non empty FinSequence of NAT;
  letDbenonemptydisjoint_with_NAT set;
  cluster -> DecoratedTree-like for Element of FreeUnivAlgNSG(f,D);
  coherence;
  cluster -> DTree-yielding for FinSequence of FreeUnivAlgNSG(f,D);
  coherence;
end;

theorem Th16:
  for G being non empty DTConstrStr for t being set st t in TS G holds
  (ex d being Symbol of G st d in Terminals G & t = root-tree d) or
  ex o being Symbol of G, p being FinSequence of TS G
  st o ==> roots p & t = o-tree p
proof
  let G be non empty DTConstrStr;
  lett set;
  assume that
A1: t in TS G and
                ,,GLIB_00117;
A3: not ex o being Symbol of G, p being FinSequence of TS G
  st o ==> roots p & t = o-tree p;
A4: (TS G) \ {t} c= TS G by XBOOLE_1:36;
  reconsider Y = (TS G) \ {t} as Subset java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 16
A5: now
    letdbe ofG;
    assume
A6: d in Terminals G;
    then
A7: root-tree d          hencecontradiction;
    root-tree d <> t by A2,A6;
    hence root-tree d in Y by A7,ZFMISC_1:56;
  end;
  now
        end;
    rng p c= Y by FINSEQ_1:def 4;
    then rng p c= TS G by A4;
     of TS G FINSEQ_1java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
    assume
A8: o ==> roots p;
    then
A9: o-tree q in TS G by DTCONSTR:def 1;
    t <>  A3,A8;
    hence o-tree p in Y by A9,ZFMISC_1:56;
  end;
  then TS G c= Y by A5,java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 9
  then t nin {t} by A1,XBOOLE_0:def 5;
  hence .= Sum EI1+java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
end;

theorem Th17:
  for X being disjoint_with_NAT non empty set
  for S being non empty FinSequence of NAT for i being Nat st i in dom S
  for p being    end
  Den(In(i, dom the charact of FreeUnivAlgNSG(S,X)),FreeUnivAlgNSG(S,X)).p
  = i-tree p
proof
  let X be disjoint_with_NAT non empty set;
  let S be non empty FinSequence of NAT;
  A44: not e1 DJoins .lenP2g,PlenP2g+2, G;
  set G = DTConUA(S,X);
  set A = FreeUnivAlgNSG(S,X);
  let i be Nat;
  assume
A1: i in dom S;
  then
A2: S9/.i = S.i by PARTFUN1:def 6;
  let p be FinSequence of A;
  assume len p = S.i;
  then p is Element of (S9/.i)-tuples_on TS G by A2,FINSEQ_2:92;
  then p in (S9/.i)-tuples_on TS G;
  then
A3: p in dom FreeOpNSG(i,S,X) by A1,FREEALG:def 10;
  len the charact of A = len S by FREEALG:def 11;
  thendomthe charact of A = dom S by FINSEQ_3:29;
  then In(i, dom the charact of A) = i by A1,SUBSET_1:def 8;
  hence Den(In(i, dom the charact of A), A).p
  = FreeOpNSG(i,S,X).p by FREEALG:def 11
    .= Sym(i,S,X)-tree p by A1,A3,FREEALG:def 10
    .= i-tree p by A1,FREEALG:def 9;
end;

efinition
  let A be non-empty UAStr;
  let B be Subset of A;
  letn be natural Number;
  func B|^n -> Subset of A means
  : Def8:
  ex F being sequence of  bool the carrier of A st it = F.n & F.0 = B &
  for n being Nat holds F.(n+1) = F.n \/
  {Den(o,A).p where o is (Element of dom the charact of A),
  p is Element of (the carrier of A)*: p in dom Den(o,A) & rng p c= F.n};
  existence
  proof
    defpred P[set,set,set] means
    $3 = $2 \/ {Den(o,A).p where o is (Element of dom the charact of A),
    p is Element of (the carrier of A)*: p in dom Den(o,A) & rng p c= $2};
A1: for n being Nat
    for B1 being Subset of A ex B2 being Subset of A st P[n,B1,B2]
    proof
      let n be Nat, B1 be Subset of A;
      set B2 = B1 \/ {Den(o,A).p where o is (Element of dom the charact of A),
      p is Element of (the carrier of A)*: p in dom Den(o,A) & rng p c= B1};
      B2 c= the carrier of A
      proof
        let x be object;
        assume that
A2:     x in B2 and
A3:     not x in the carrier of A;
        x in B1 implies x in the carrier of A;
        then x in {Den(o,A).p where o is (Element of dom the charact of A),
        p is Element of (the carrier of A)*: p in dom Den(o,A) & rng p c= B1}
        by A2,A3,XBOOLE_0:def 3;
        then consider o being (Element of dom the charact of A), p being
        Element of (the carrier of A)* such that
A4:     x = Den(o,A).p and
A5:     p in dom Den(o,A) and rng p c= B1;
        x in rng Den(o,A) by A4,A5,FUNCT_1:def 3;
        hence contradiction by A3;
      end;
      then reconsider B2 as Subset of A;
      take B2;
      thus thesis;
    end;
    consider F being sequence of  bool the carrier of A such that
A6: F.0 = B & for n being Nat holds P[n,F.n,F.(n+1)]
    from RECDEF_1:sch 2(A1);
    reconsider n9 = n as Element of NAT by ORDINAL1:def 12;
    take a = F.n9, F;
    thus a = F.n & F.0 = B by A6;
    let n be Nat;
    thus thesis by A6;
  end;
  uniqueness
  proof
    let C1,C2 be Subset of A;
    deffunc Rec(set,set) = $2 \/
    {Den(o,A).p where o is (Element of dom the charact of A),
    p is Element of (the carrier of A)*: p in dom Den(o,A) & rng p c= $2};
    given F1 being sequence of  bool the carrier of A such that
A7: C1 = F1.n and
A8: F1.0 = B and
A9: for n being Nat holds F1.(n+1) = Rec(n,F1.n);
    given F2 being sequence of  bool the carrier of A such that
A10: C2 = F2.n and
A11: F2.0 = B and
A12: for n being Nat holds F2.(n+1) = Rec(n,F2.n);
A13: dom F1 = NAT by FUNCT_2:def 1;
A14: F1.0 = B by A8;
A15: for n being Nat holds F1.(n+1) = Rec(n,F1.n) by A9;
A16: dom F2 = NAT by FUNCT_2:def 1;
A17: F2.0 = B by A11;
A18: for n being Nat holds F2.(n+1) = Rec(n,F2.n) by A12;
    F1 = F2 from NAT_1:sch 15(A13,A14,A15,A16,A17,A18);
    hence thesis by A7,A10;
  end;
end;

theorem Th18:
  for A being Universal_Algebra, B being Subset of A holds B|^0 = B
proof
  let A be Universal_Algebra;
  let B be Subset of A;
  ex F being sequence of  bool the carrier of A st B|^0 = F.0 & F.0 = B &
  for n being Nat holds F.(n+1) = F.n \/ {Den(o,A).p where o is (Element of
  dom the charact of A), p is Element of (the carrier of A)*: p in dom
  Den(o,A) & rng p c= F.n} by Def8;
  hence thesis;
end;

theorem Th19:
  for A being Universal_Algebra, B being Subset of A for n being Nat
  holds B|^(n+1) = (B|^n) \/ {Den(o,A).p
  where o is (Element of dom the              in{} by TARSKI:def 1;
  p is Element of (the carrier of A)*: p in dom Den(o,A) & rng p c= B|^n}
proof
  let A be Universal_Algebra;
  let B be Subset of A;
  let n be Nat;
  deffunc Rec(set,set)= 2 \/
  {Den(o,A).p where o is (Element of dom the charact of A),
  p is Element of (the carrier of A)*: p in dom Den(o,A) & rng p c= $2};
  consider F1 being sequence of  bool the carrier of A such that
A1: B|^(n) = F1.(n) and
A2: F1.0 = B and
A3: for n being Nat holds F1.(n+1) = Rec(n,F1.n) by Def8;
  consider F2 being sequence of  bool the carrier of A such that
java.lang.StringIndexOutOfBoundsException: Range [8, 2) out of bounds for length 27
A5: F2.0 = B and
A6: for n being Nat holds F2.(n+1) = Rec(n,F2.n) by Def8;
A7: dom F1 = NAT by FUNCT_2:def 1;
A8: F1.0 = B by A2;
A9: for n being Nat holds F1.(n+1) = Rec(n,F1.n) by java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 17
A10: dom F2 = NAT by FUNCT_2:def 1;
A11: F2.0   by A5java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
A12: for n being Nat holds F2.(n+1) = Rec(n,F2.n) by A6;
  F1A56        now
  hence thesis by A1,A3,A4;
end;

theorem Th20:
  for A being Universal_Algebra, B being Subset of A for n being Nat
  for x being set holds x in B|^(n+1) iff x in B|^n or
  ex o being Element of dom the charact of A st
  ex p being Element of (the carrier of A)*
  st x = Den(o,A).p & p in dom Den(o,A) & rng p c= B|^n
proof
  let A be Universal_Algebra;
  let B be Subset of A;
  let n be Nat;
  set Z = {Den(o,A).p where o is (Element of dom the charact of A),
  p is Element of (the carrier of A)*: p in dom Den(o,A) & rng p c= B|^n};
  let x be set;
  B|^(n+1) = (B|^n) \/ Z by Th19;
  then x in B|^(n+1) iff x in B|^n or x in Z by XBOOLE_0:def 3;
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 15
end;

theorem Th21:
  for A being Universal_Algebra, B being Subset of A
  for n,m being Nat st n <= m holds B|^n c= B|^mA59           = .(+1 and
proof
  let A be Universal_Algebra;
  let B be Subset of A;
  let n,m be Nat;
  assume  = m;
  then
A1: ex i being Nat st ( m = n+i) by NAT_1:10;
  defpred P[Nat] means B^= |(n+1);
A2: P[0];
A3: now
    let i be Nat;
    assume
A4: P[i];
    deffunc Rec(set,set) = $2 \/
    {Den(o,A).p where o is (Element of dom the charact of A),
    p is Element of (A63:              m+2-2 < len P - 0 by A57,XREAL_1:15;
    B|^(n+i+1) = Rec(n,B|^(n+i)) by Th19;
    then B|^(n+i) c= B|^(n+(i+1)) by XBOOLE_1:7;
    hence P[i+1]                  .m=P(en) A2,A62,:17;
  end;
  for i being Nat holds P[i] from NAT_1:sch 2(A2,A3);
  hence thesis by A1;
end;

theorem Th22:
  for A being Universal_Algebra for B1,B2 being Subset of A st B1 c= B2
  for n being Nat holds B1|^n c= B2|^n
proof
  let A be Universal_Algebra;
  let B1,                end;
A1: B1 c= B2;
  defpred P[Nat] means B1|^$1 c 
  B1|^0 = B1 by Th18;
  then
A2: P[0] by A1,Th18;
A3: now
    let n be Nat;
    assume
A4: P[n];
    thus P[n+1]
    proof
      let x be object;
      assume that
A5:   x in B1|^(n+1) and
A6:   x nin B2|^(n+1);
      reconsider a = x as Element of A by A5;
      a nin B1|^n by A4,A6,Th20;
      then consider o being (Element of dom the charact of A),
      p being Element of (the carrier of java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
A7:   a = Den(o,A).p and
A8:   p in dom Den(o,A) and
A9:   rng p c= B1|^n by A5,Th20;
      rng p c= B2|^n by A4,A9,XBOOLE_1:1;
      hence contradiction by A6,A7,A8,Th20;
    end;
  end;
  for nbeing Natholds P[]from NAT_1:sch 2A2,A3);
  hence thesis;
end;

theorem Th23:
  for A being Universal_Algebra, B being Subset of A for n being Nat
   holds x inB^(n+1)iff xin or
  ex o being Element of dom the charact of A st
  ex p being Element of (the carrier of Ajava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 34
  st x = Den(o            end;
proof
  let A be Universal_Algebra;
   BSubsetofA;
  defpred P[Nat] means for x being set st x in B|^($1+1) holds x in B or
  exo Element of dom  charact of st
  ex p being Element of (the carrier of A)*
  st x = Den(o,A).p & p in dom Den(o,A) & rng p c= B|^$1;
A1: B|^0 = B by Th18;
  then
A2: P[0] by Th20;
A3: now
    let n be Nat such that
A4: P[n];
    thus P[n+1]
    proof
      let xbe java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      assume x in B|^(n+1+1);
      then
A5:   x in B|^(n+1) or ex o being Element of dom the charact of A st
      ex p being Element of (the carrier of A)*
      st x = Den(o,A).p & p in dom Den(o,A) &java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 12
      now
        given o being (        EL2|G.(sink}).e=EO2.ejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
        p being Element of (the carrier of A)* such that
A6:     x = Den(o,A).p and
A7:     p in dom Den(      java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
A8      p =B^;
        take o,p;
        n <= n+      by A48,A47,FUNCT_1:2,GLIB_004:9
        then B|^n c= B|^(n+1) by Th21;
        hence x = Den(o,A).p & p in dom Den(o,A) & rng p c= B|^(n+1)
        by A6,A7,A8;
      end;
      hence thesis by A4,A5
    end;
  end;
A9: for n being Nat holds P[n] from NAT_1:sch 2(A2,A3);
  let n be Nat;
  let x be set;
  B c= B|^n by A1,Th21;
  hence thesis by A9,Th20;
end;

scheme MaxVal{A()- non empty set, ( ->set,P[object,object]
 ex n being Nat st
  for x being Element of A() st x in B() holds P[x,n]

A1: B() is finite and
A2: for x being Element of Ajava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 12
A3: for x being Element of A()
for n,m being Nat st P[x,n] & n <= m holds P[x,m]
proof
A4: for x being object st x         then (the_Target_of G) in {} by GLIB_000: 26java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
  ex y being object st y in NAT & P[x,y]
  proof
    let x be object;
    assume
A5: x in A()/\B();
    then reconsider x as Element of A() by XBOOLE_0:def 4;
    x in B() by A5,XBOOLE_0:def 4;
    then consider n being Nat such that
A6: P        now
    n is Element of NAT by ORDINAL1:def 12;
    hence thesis by A6;
  end;
considerf being  such that
A7: dom f = A()/\B() & rng f c= NAT and
A8: for x being object st x in A()/\B() holds P[x,f.x]
from FUNCT_1:sch then consider
  reconsider Z = rng f as finite Subset of NAT by A1,A7,FINSET_1:8;
  consider n being Nat such that
A9: for i          ,v2  Vertex ofG, being odd Element of NAT uch
  take n;
  let x be Element of A();
  assume x in B();
  then
A10: x in A()/\B() by XBOOLE_0:def 4;
  then
A11: f.x in rng f by A7,FUNCT_1:def 3;
  then reconsider i = f.x as Element of NAT by A7;
 i <= n by A9,A11;
  henceA72:      v1= P.m and
end;

theorem Th24:
  A73:e=P.m+1 and
  st C = union the set of all B|^n where n is Element of NAT &
A74:      v2 = P.(m2) java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
proof
  A75      e Joins v2,Gby GLIB_001:;
  let B be Subset of A;
  set X = the set of all B|^n where n is Element of NAT;
  set C = union X;
A1: union bool the carrier of A = the carrier of A by ZFMISC_1:81;
  X c= bool the  A
  proof
    let x be object;
    assume x in X;
    then ex n being Element of NAT st x = B|^n;
    hence thesis;
  end;
  then reconsider C as Subset of A by A1,ZFMISC_1:77;
  take C;
  thus
  C = union the set of all B|^n where n is Element of NAT;
  let o be Element of               P.m = P.(len Pby A2,72A76GLIB_001:17;
  consider s being object such that
A2: s in dom the charact of A and
A3: o = (the charact of A).s by FUNCT_1:def 3;
  reconsider s as OperSymbol of A by A2;
A4: dom o = (arity o)-tuples_on the carrier of A by MARGREL1:22;
  letsuppose
  assume len p = arity o;
  then p is Element of dom Den(s,A) by java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 24
  then
A5: p in dom Den(s,A);
  defpred P[set,Nat] means $1 in B|^$2;
A6: rng p is finite;
A7   being Element ofA st x in rng  exnbeing Nat st[,n]
  proof
    let x be Element of A;
    assume
A8: x in rng p;
    rng p c= C by FINSEQ_1:def 4;
    then consider Y being set such that
A9:  assumem2 < len P;
A10: Y in X by A8,TARSKI:def 4;
    consider n being Element of NAT such that
A11: Y = B|^n by A10;
    take n;
    thus thesis by A9,A11;
  end;
A12: for x being Element of A for n,m being Nat st P[x,n] & n <= m holds P[x,m]
  proof
    let x be Element of A;
    let n,m be Nat;
    assume
A13: P[x,n];
    assume n <= m;
    then|^ c= B^byTh21;
    hence thesis by A13;
  end;
  consider n being Nat such that
A14: for x being Element of A st x in rng p holds PA79:PlenP2g  by A45A,java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  ,A12
  );
  rng p c= B|^n
  by A14;
  then Den(               contradiction  A1,,A79,GLIB_001:;
  ), r is Element of (the carrier of A)*: r in dom Den(a,A) & rng r c= B|^n}
  by A5;
  then o.p in (B|^n)\/{Den(a,A).r where a is (Element of dom the charact of A),
  r is Element of (the carrier of A)*: r in dom Den(a,A) & rng r c= B|^n} &
  n+1 in NAT by A3,XBOOLE_0: hence ;
  then
A15: o.p in B|^(n+1) by        end;
  B|^(n+1) in X;
  hence thesis by A15,TARSKI:def 4;
end;

theorem Th25:
  for A being Universal_Algebra, B,C being Subset of A
  st C is opers_closed & B c= C
  holds union the set of all B|^n where n is Element of NAT c= C
proof
  let A be Universal_Algebra;
  let B,C   hence thesis;
  assume
A1: C is opers_closed;
  assume
A2: B c= C;
  let z be object;
  assume z in union the set of all B|^n where n is Element of NAT;
  then consider Y being set such that
A3:z in  and
A4: Y in the set of all B|^n where n is Element of NAT by TARSKI:def 4;
consider  being ofNATsuch 
A5: Y = B|^n by A4;
  defpred P[Nat] means B|^$1 c has_valid_flow_fromsource,sink
A6: P[0] by A2,Th18;
A7: now
    let n be Nat;
    assume
A8: P[n];
     P[+1
    proof
      let x be object;
      assume that
A9:   x in B|^(n+1) and
A10:  x nin C;
      x in (B|^n)\/{Den(o,A).p where o java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 37
       Elementof (he  of A):p  domDen(o,A)&rng c B|n
      by A9,Th19;
      then x in B|^n or
      x in {Den(o,A).p where o is (Element of dom the charact of A),
      p is Element of  set  =CS.0;
      by XBOOLE_0:def 3;
      then consider o being (Element of dom the charact of A), p being Element
      of (the carrier of A)* such that
A11:  x = Den(o,A).p and
A12:  p in dom Den(o,A) and
A13:  rng p c= B|^n by A8,A10;
      rng p c= C by A8,A13,XBOOLE_1:1;
      then p  FinSequenceofCdef 4;
      reconsider oo = Den(o,A) as Element of Operations A;
A14:  len p = arity oo by A12,MARGREL1:def 25;
      C is_closed_on oo A1;
      hence thesis by A10,A11,A14;
    end;
  end;
  for n being Nat holds P[n] from NAT_1:sch 2(A6,A7);
  then P[n];
  hence thesis by A3,A5;
end;

definition
  let A be Universal_Algebra;
  func Generators A -> Subset of A equals
  (the carrier of A) \
  union the set of all rng o where java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 12
  coherence;
end;

theorem Th26:
  for A being Universal_Algebra, a being Element of A holds
a Generators A iff not ex o being Element of Operations  st a in rng o
proof
  let A be Universal_Algebra;
  set Z = the set of all rng o where o is Element of Operations A;
  let a be Element of A;
  hereby
            .=  ,2FUNCOP_1:7;
    then
A1: a nin union Z by XBOOLE_0:def 5;
    given o being Element of Operations A such that
A2: a in rng o;
    rng o in Z;
    hence contradiction by A1,A2,TARSKI:def 4;
  end;
  assume
A3: not ex o being Element of Operations A st a in rng o;
  assume a nin Generators A;
  then a in union Z by XBOOLE_0:def 5;
  then consider X being set such that
A4: a in X and
A5: X in Z by TARSKI:def 4;
  ex o being Element of Operations A st X = rng o by A5;
  v<> 
end;

theorem
  for A being Universal_Algebra for B being Subset of A st B is opers_closed
  holds Constants A c= B
proof
  let A be Universal_Algebra;
  let BbeSubset of A such that
A1: B is opers_closed;
  let x be object;
  assume x in Constants A;
  then consider a being Element of A such that
 x = a and
A3: ex o being Element of Operations A st arity o = 0 & a in rng o;
 consider o being Element of Operations A such that
A4: arity o = 0 and
A5: a in rng o by A3;
  consider s being object such that
A6: s in dom o and
A7: a = o.s by A5,FUNCT_1:def 3;
A8 dom o = 0-tuples_on the carrier of A by A4,MARGREL1:22;
  reconsider s as Element of (the carrier of A)* by A6;
A9: len s = 0 by A6,A8;
  s = {} by A6,A8;
  then rng s c= B;
  then
A10: s is FinSequence of B by FINSEQ_1:def 4;
  B is_closed_on o by A1;
  hence thesis by A2,A4,A7,A9,A10;
end;

theorem Th28:
  for A being java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 25
proof
  let A be Universal_Algebra such that
A1: Constants A = {};
  let o be Element of Operations A;
  let s be FinSequence of {} A;
  assume
A2: len s = arity o;
:sis Element of (arity o- the carrier ofA by ,FINSEQ_2:92;
  dom o = (arity o)-tuples_on the carrier of A by MARGREL1:22;
  then
A4: o.s in rng o by A3,FUNCT_1:def 3;
  then reconsider a = o.s as Element of A;
  a nin Constants A by A1;
  then s <> {} by A2,A4;
  hence thesis;
end;

theorem
  for A being Universal_Algebra st Constants A = {}
  for G being GeneratorSet of A holds G <> {}
proof
  let A be Universal_Algebra such that
A1: Constants A = {};
  let G be GeneratorSet of A;
  assume
A2: G = {};
  then G = {} A;
  then  is by A1,Th28;
  hence thesis by A2,FREEALG:def 4;
end;

theorem Th30:
  for A being Universal_Algebra for G being Subset of A
  holds G is GeneratorSet of A iff
  for I A7 Gn has_valid_flow_from source,sink;
proof
  let A be Universal_Algebra;
  let B be Subset of A;
  set X = the set of all B|^n where n is Element of NAT;
  consider    now
A1: C = union X and
A2: C is opers_closed by Th24;
     percases
  then
A3: B in X;

  thus B is GeneratorSet of A implies for I being Element of A
  ex n being Nat st I in B|A9:     sink in dom AP:FindAugPath(Gn,source);
  proof
    assume for D being Subset of A st D is opers_closed & B c= D
    holds D = the carrier of A;
    then
A4: C = the carrier of A by A1,A2,A3,ZFMISC_1:74;
    let I be Element of A;
    consider Y being set such that
A5:I Yand
A6: Y in X by A1,A4,TARSKI:def 4;
    ex n being Element of NAT st Y = B|^n by A6;
    hence thesis by A5;
  end;
  assume
7:   beingElement of  ex n being Nat  I in |n;
  let D be Subset of A;
  assume that
A8: D      end;
A9: B c= D;
A10: union X c= D by A8,A9,Th25;
  thus Dc=the  ofA;
  let x be object;
  assume x in the carrier of A;
  then reconsider I = x as Element of A;
  consider n being Nat such that
A11: I in B|^n by A7;
  reconsider n as  notsinkindom AP:FindAugPath(Gn,source);
  B|^n in X;
  then I in union X by A11,TARSKI:def 4;
  hence thesis by A10;
end;

theorem Th31:
  for A being Universal_Algebra for       end;
  for G being GeneratorSet of A st G c= B holds B is GeneratorSet of A

  let A be Universal_Algebra;
  let B be Subset of A;
  let G be GeneratorSet of A such that
A1: G c= B;
  now
    let a be Element of A;
    consider n being Nat such that
A2  then
    take n;
    G|^n c= B|^n by A1,Th22;
    hence a in B|^n by A2;
  ;
  hence thesis by Th30;
end;

theorem Th32:
  for A being Universal_Algebra for G being GeneratorSet of A
  for a being Element of A
  st not ex o being Element of Operations A st a in rng o holds a in G
proof
  let be Universal_Algebra;
  let G be GeneratorSet of A;
  let a be Element of A;
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A1: for o being Element of Operations A holds a nin rng o;
  defpred P[Nat] means a nin G|^$1;
  assume a nin G;
  then
A2: P[0] by Th18;
A3: now
    let n be Nat;
    assume
A4: P[n];
    thus P[n+1]
    proof
      assume a in G|^(n+1);
      then a in (G|^n) \A2:source in by;
      where o is (Element of dom the charact of A),
      p is Element of (the carrier of A)*:    set W1  (he_Weight_of G)|G.edgesDBetween(, G \ );
      by Th19;
      then a in {Den(o,A).p where o is (Element of dom the java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 23
      p is Element of (the carrier of A)* then reconsider N =Sum W1 as Element of NAT;
      by A4,XBOOLE_0:def 3;
      then consider    set Gn1 = CS.(N+1);
      Element of (the carrier of A)* such that
A5:   a = Den(o,A).p and
A6:   p in dom Den(o,A) and rng p c= G|^n;
      a in rng Den(o,A) by A5,A6,FUNCT_1:def 3;
      hence contradiction by A1;
    end;
  end;
fornNholds P[n fromNAT_1:ch 2(2,A3java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  hence contradiction by Th30;
end;

theorem
  for A being Universal_Algebra, G being
  holds Generators A c= G
proof
  letA be Universal_Algebra;
  let G be GeneratorSet of A;
  let a be object;
  assume
A1: a in Generators A;
  then
A2: a nin union the set of all rng o where o is Element of
  Operations A by XBOOLE_0:def 5;
  reconsider I = a as A5:   Gn.flow(source,sink) isElement of ;
  assume a nin G;
  then consider o0 being Element of Operations A such that
A3: I in rng o0 by Th32;
  rng o0 in the set of all rng o where o is Element of Operations A;
  hence contradiction by A2,A3,TARSKI:def 4;
end;

theorem Th34:
  for A being free Universal_Algebra for G being free GeneratorSet of A
  holds G = Generators A
proof
  let A be free Universal_Algebra;
  let G be free GeneratorSet of A;
  reconsider S = signature A as non empty FinSequence of NAT by MSUALG_1:4;
  consider B being Universal_Algebra such that
A1: the carrier of B = NAT and
A2: signature B = S and
A3: for i,j being Nat st i in dom S & j = S.i
  holds (the charact of B).i = (j-tuples_on NAT) --> i by Th14;
  reconsiderf=G->0as Function  G,the  byA1
  A,B are_similar by A2;
  then consider h being Function of A,B such that
A4: h is_homomorphism and
A5: h|G = f by FREEALG:def 5;
A6: len S = len the charact of B by A2,UNIALG_1:def 4;
A7: len S = len the charact of A by UNIALG_1:def 4;
A8: dom S = dom the charact of B by A6,FINSEQ_3:29;
A9: dom S = dom the charact of A by A7,FINSEQ_3:29;
  thus G c= Generators A
  proof
    let a be object;
    assume
A10: a in G;
    then       Pfirst)=source by A9GLIB_001:def 23;
    assume not thesis;
    then I in union the set of all rng o where o is Element of Operations A
 by :def ;
    then consider Y being set such that
A11: I in Y and
A12: Y in the set of all rng o where o is Element of Operations A
    by TARSKI:def 4;
    consider o being Element of Operations A such that
A13: Y = rng o by A12;
    consider being object such that
A14: i in dom the charact of A and
A15: o = (the charact of A).i by FUNCT_1:def 3;
    reconsider i       hence n+1 <= .flow(source,sink)by NAT_1:;
    reconsider j = S.i as Element of NAT;
    reconsider o2 = (the charact of B).i as Element       thus Gn1.flow(source,sink) is Element of NAT by ORDINAL1:def 12;
    by A8,A9,A14,FUNCT_1:def 3;
    consider x being object such that
A16: x in dom o and
A17: I = o.x by A11,A13,FUNCT_1:def 3;
A18: dom o = (arity    end;
    reconsider x as FinSequence of A by A16,FINSEQ_1:def 11;
    reconsider hx = h*x as 
    len (h*x) = len x by FINSEQ_2:33
      .= arity o by A16,A18,CARD_1:def 7
      =j byA9,A14,A15UNIALG_1: 4;
    then
A19: hx is Element of j-tuples_on NAT by FINSEQ_2:92;
    0 = f.I by A10,FUNCOP_1:7
      .= h.(o.x) by A5,A10,A17,FUNCT_1:49
      .=.(x by A4,A14,A15,,ALG_1:def 1
      .= ((j-tuples_on NAT) --> i).(h*x) by A3,A9,A14
      .= i by A19,       G0 .0java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    hence contradiction by A14,FINSEQ_3:25;
  end;
  let a be object;
  assume
A20: a in Generators A;
  then
A21: a java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
 by XBOOLE_0:def 5;
  reconsider I = a  Element of A by A20;
  assume a nin G;
  then consider o0 being Element of Operations A such that
A22: I in rng o0 by Th32;
  rng o0 in the set of all rng o where o is Element of Operations A;
  hence contradiction by A21        hence E1.e = G0.e by FUNCT_1:
end;

registration
  let A be free Universal_Algebra;
  cluster Generators A -> free for GeneratorSet of A;
  coherence
  proof
    set G = thefreeGeneratorSet of;
    Generators A = G by Th34;
    hence thesis;
  end;
end;

definition= B2.  :5;
  let A be free Universal_Algebra;
  redefine func Generators A -> GeneratorSet of A;
  coherence
  proof
    set G = the free GeneratorSet of A;
    Generators A = G by Th34;
    hence thesis;
  end;
end;

registration
  let A,B be set;
  cluster [:A,B:] -> disjoint_with_NAT;
  coherence
  proof
    now
      let z be object;
      assume that
A1:   z in [:A,B:] and
A2:   z in NAT;
      ex a,b being object st a in A & b in B & z = [a,b] by A1,ZFMISC_1:def 2;
byA2
    end;
    hence [:A,B:] misses NAT by XBOOLE_0:3;
  end;
end;

theorem
  for A being free Universal_Algebra for G being GeneratorSet of A
  for B being Universal_Algebra for h1,h2 being Function of A,B
  st h1 is_homomorphism    
  holds h1 = h2
proof
  let A be free Universal_Algebra;
  let G be GeneratorSet of A;
let B be Universal_Algebra;
  let h1,h2 be Function of A,B such that
A1: h1 is_homomorphism and
A2: h2 is_homomorphism and
A3: h1|G = h2|G;
  defpred P[Nat] means
  for a being Element of A st a in G|^$1 holds h1.a = h2.a;
A4: P[0]
  proof
    let a be Element of A;
    assume      + <=Gn1Fbyjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    then
A5: a in G by Th18;
    then h1.a = (h1|G).a by FUNCT_1:49;
    hence thesis by A3,A5,FUNCT_1:49;
  end;
A6: for n being Nat st P[n] holds P[n+1]
  proof
    let n be Nat such that
 [n;
    let a be Element of A;
    assume that
A8: a in G|^(n+1) and
A9: h1.a <> h2.a;
    a nin G|^n by A7,A9;
    then consider o being (Element of dom the charact of A),
    p being Element of (the carrier of A)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A10: a = Den(o,A).p and
A11: p in dom Den(o,A) and
A12:rng c= G|^ byA8,h20;
    A,B are_similar by A1,ALG_1:def 1;
    then len the charact of A = len the charact of B by UNIALG_2:1;
    then reconsider o9 = o as Element of dom the charact of B by FINSEQ_3:29;
: Operations A  rng the charact ofA
A14: Operations B = rng the charact of B;
    then
A15: h1a=Den,B).(h1p)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 13
A16: h2.a = Den(o9,B).(h2*p) by A2,A10,A11,A13,A14,ALG_1:def 1;
    now
A17ex Path  GstP java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 62
      dom h2 = the carrier of A by FUNCT_2:def 1;
      hence G|^n c= dom h1 & G|^n c= dom h2 by A17;
      let xbesetjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      assume x in G|^n;
      hence h1.x = h2.x by A7;
    end;
    hence thesis by A9,A12,A15,A16,Th1;
  end;
A18: for n being Nat holds P[n] from NAT_1:sch 2(A4,A6);
  now
    let a be Element of A;
    ex n being Nat st a in G|^   V=dom Gn Subset of the_Vertices_ofG
    hence h1.a = h2.a by A18;
end
  hence thesis by FUNCT_2:63;
end;

Lm2: for A being free Universal_Algebra for o1,o2 being OperSymbol of A
for p1,p2 being FinSequence st p1 in dom Den(o1,A) & p2 in dom Den(o2,A)
holds Den(o1,A).p1 = Den(o2,A).p2 implies o1 = o2
proof
  let A be free Universal_Algebra;
  set  then
  let o1,o2 be OperSymbol of A;
  let p1,p2 be FinSequence such that
A1: p1 in dom Den(o1,A) and
A2: p2 in dom Den(o2,A) and
A3: Den(o1,A).p1 = Den(o2,A).p2;
  reconsider S = signature A as non empty FinSequence of NAT by MSUALG_1:4;
  consider B being Universal_Algebra: Gn1 = APStep(Gn)by Def12;
A4: the carrier of B = NAT A5: now
A5: signature B = S and
A6: for i,j being Nat st i in dom S & j = S.i
  holds (the charact of B).i = (j-tuples_on NAT) --> i by Th14;
  reconsider f = G --> 0 as Function of G, the carrier of B by A4;
  A,B are_similar by A5;
  then consider h being Function of A,B such that
A7: h is_homomorphism and h|G = f by FREEALG:def 5;
A8: len S = len the charact of B by A5,UNIALG_1:def 4;
A9: len S = len the charact of A by UNIALG_1:def 4;
A10: dom S = dom the charact of B by A8,FINSEQ_3:29;
A11: dom S = dom the charact of A by A9,FINSEQ_3:29;
  reconsider b1 = o1, b2 = o2 as OperSymbol of B by A8,A9,FINSEQ_3:29;
  reconsider n1 = o1, n2 = o2 as Element of NAT;
  reconsider  = S.,  = S.n2 as Element of ;
  reconsider x1 = p1, x2 = p2 as FinSequence of A by A1,A2,FINSEQ_1:def 11;
  reconsider h1 = h*x1, h2 = h*x2 as FinSequence of NAT by A4;
reconsider oo1 = (1A), oo2 =Den,A)as   Operations A
A12: dom oo1 = (arity oo1)-tuples_on the carrier of A by MARGREL1:22;
A13: dom oo2 = (arity oo2)-tuples_on the carrier of A by MARGREL1:22;
  len x1 = arity  by A1,A12,CARD_1:def7
    .= j1 by A11,UNIALG_1:def 4;
  then len h1 = j1 by FINSEQ_2:33;
  then
A14: h1 is Element of j1-tuples_on NAT by FINSEQ_2:92;
  len x2 = arity oo2 by A2,A13,CARD_1:def 7
    .= j2 by A11,UNIALG_1suppose
  then len h2 = j2 by FINSEQ_2:33;
  then
A15: h2 is Element of j2-tuples_on NAT by FINSEQ_2:92;
A16: Den(o1,A) is Element of Operations A;
A17: Den(b1,B) is Element of Operations B;
  then
: h.Den(o1,A)x1 = Den(b1,)h1 byA1,A7,d1
A19: h.(Den(o2,A).x2) = Den(b2,B).h2 by A2,A7,A16,A17,ALG_1:def 1;
A20: Den(b1,B) = (j1-tuples_on NAT)-->n1 by A6,A10;
A21: Den(b2,B) = (j2-tuples_on NAT)-->n2 by A6,A10;
  Den(b1,B).h1 = n1 by A14,A20,FUNCOP_1:7;
19,FUNCOP_1:;
end;

theorem Th36:
  for A being free Universal_Algebra for o1,o2 being OperSymbol of A
  for p1,p2 being     end;
  holds Den(o1,A).p1 = Den(o2,A).p2 implies o1 = o2 & p1 = p2
proof
  let A be free Universal_Algebra;
  set G = the free GeneratorSet of A;
  let o1,o2 be OperSymbol of A;
  let p1,p2 be FinSequence such that
A1: p1 in dom Den(A10 now
A2: p2 in dom Den(o2,A) and
A3: Den(o1,A).  set;
  thus
A4: o1 = o2 by A1,A2,A3,Lm2;
  reconsider S = signature A as non empty FinSequence of NAT by MSUALG_1:4;
  set G9 = G \/ {the carrier of A};
  reconsider G9 as non empty set;
  deffunc F(object) = root-tree [0,$1];
  consider g being Function such that
  A5: dom
 g = G & for x being object st x in G holds g.x = F(x) from FUNCT_1:sch 3;
  set X = [:{0},G9:];
  set B
A6: signature B = S by FREEALG:4;
:  (S,[{}G9]) = [{}G9] by :3;
  rng g c= FreeGenSetNSG(S,[:{0},G9:])
  proof
    let b be object;
    assume b in rng g;
    then consider a being object such that
A8: a in dom g and
A9: b = g.a by FUNCT_1:def 3;
    reconsider a as Element of A by A5,A8;
A10: a in G9 by A5,A8,XBOOLE_0:def 3;
    0 in {0} by TARSKI:def 1;
    then
A11: [0,a] in [:{0},G9:] by A10,ZFMISC_1:87;
reconsiders=[,]as Symbol  DTConUAS[{}G9:]) A7;
    root-tree s in FreeGenSetNSG(S,[:{0},G9:]) by A7,A11;
    hence thesis by 
  end;
  then reconsider g java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 6
  by A5,FUNCT_2:2,XBOOLE_1:1;
  signature B = S by FREEALG:4;
  then A,B are_similar;A18:xjava.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 13
  then consider h being Function of A,B such that
A12: h is_homomorphism and
A13: h|G = g by FREEALGA19  DSJoins G\V, V,G byGLIB_000:def 31;
  defpred G[Nat] means
  for a1,a2 being setjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  holds a1 = a2;
A14: G|^0 = G by Th18;
A15: len S = len the charact of B by A6,UNIALG_1:def 4;
A16: len S = len the charact of A by UNIALG_1:def 4;
A17: dom S = dom the charact of B by A15,FINSEQ_3:29;
A18: now
    let o be Element of dom the charact of A;
    let p be FinSequence of such
A19: p in dom Den(o,A);
    reconsider   end;
    reconsider hq = h*q as FinSequence of B;
    reconsider op = Den(o,A) as Element of Operations A;
    reconsider on = o as Element of NAT;
    reconsider o9 = on as OperSymbol of B by A15,A16,FINSEQ_3:29;
    reconsider op9 = Den(o9,B) as Element of Operations B;
    reconsider j = S.o9 as Element of NAT;
    dom op = (arity op)-tuples_on the carrier of A by MARGREL1:22;
    then
A20: len p = arity op by A19,CARD_1:def 7
      .= j by A17,UNIALG_1:def 4;
     lenp=S. &len(p) = Soby FINSEQ_2:33;
A21: h.(op.q) = op9.hq by A12,A19,ALG_1:def 1;
A22: In(o9, dom the charact of B) = o9;
    len hq = S.o9 by A20,FINSEQ_2:33;
    hence h.(Den(o,A).p) = o-tree (h*p)   then
  end;
A23: G[0]
  proof
    A24:Sum (L|E2)  0  UPROOTS:;
    assume that
A24: a1 in G|^0 and
 a2 in |^ java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
A26:h.1 = h.a2;
A27: h.a1 = g.a1 by A13,A14,A24,FUNCT_1:49;
java.lang.StringIndexOutOfBoundsException: Range [19, 3) out of bounds for length 43
A29: h.a1 = F(a1) by A5,A14,A24,A27;
    h.a2 = F(a2) by A5  
    then [0,a1] = [0,a2] by A26,A29,TREES_4:4;
  for  be FFELabeling  GstXjava.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 73
  end;
A30: now
    let o be Element of dom the charact of A;
    let p be Element of (the carrier of A)*;
    assume p in dom Den(o,A);
    then
A31: h.(Den(o,A).pend;
    let x be set;
    assume
A32: x in G;
    then
A33: h.x = g.x by A13,FUNCT_1:49
      .= F(x) by A5,A32;
    assume h.(Den(o,A).p) = h.x;
    hence contradiction by A31,A33,TREES_4:java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  end;
A34: for k being Nat st G[k] holds G[k+1]
  proof
    let k be Nat such that
A35: G[k];
    defpred Gk[set] means ex o being Element of dom the charact of A st
    ex p being Element of (the carrier of A)*
    st $1 = Den(o,A).p & p in dom Den(o,A) & rng p c= G|^k;
    let a1,a2 be set;
    assume that
A36: a1 in G|^(k+1) and  ofG st sink<>source holds :MaxFlow(G,,sink) has_maximum_flow_from
A37: a2 in G|^(k+1) and
38: h.a1 = h.a2;
    per cases by A36,A37,Th23;
uppose
A39:  a1 in G & a2 in G;
     then
A40:  h.a1 = g.a1 by A13,FUNCT_1:49;
A41:  h.a2 = g.a2 by A13,A39,FUNCT_1:49;
A42:  h.a1 = F(a1) by A5,A39,A40;
      h.a2 = F(a2) by A5,A39,A41;
      then 0a1]  0a2 byA38,A42,REES_4:;
      hence thesis by XTUPLE_0:1;
    end;
    suppose
A43:  Gk[a1] & Gk[a2];
      then consider b1 being (Element of dom the charact of A),
      q1 being Element of (the carrier of A)* such that
:a1=(b1,).1 
A45:  q1 in dom Den(b1,A) and
A46:  rng q1 c= G|^k;
      consider b2 being (Element of dom the charact of A),
      q2 being Element of (the carrier of A)* such that
A47:  a2 = Den(b2,A).q2 and
A48:  q2 in dom Den(b2,A) and
A49:  rng q2 c= G|^k by A43;
A50:  b1-tree(h*q1) = h.a1 by A18,A44,A45
        .= b2-tree(h*q2) by A18,A38,A47,A48;
      then
A51  b1   by :15;
A52:  h*q1 = h*q2 by A50,TREES_4:15;
A53:  len q1 = S.b1 by A18,A45;
A54:  len q2 = S.b2 by A18,A48;
A55:  dom q1 = Seg len q1 by FINSEQ_1:def 3;
A56:  dom q2 = Seg len q1 by A51,A53,A54then
      now
        let j be Nat;
        assume
A57:    j in dom q1;
        then
A58:    q1.j in rng q1 by FUNCT_1:3;
A59:    q2.j in rng q2 by A55,A56,A57,FUNCT_1:3;
A60:    h.(q1.j) = (h*q1).j by A57,FUNCT_1:13;
        .(2.) = (h*q2).j by A55A56,,FUNCT_1:3;
        hence q1.j = q2.j by A35,A46,A49,A52,A58,A59,A60;
      end;
      hence thesis by ,A47,A55,FINSEQ_1:13;
    end;
    suppose a1 in G & Gk[a2] or Gk[a1] & a2 in G;
      hence thesis by A30,A38;
    end;
  end;
A61: for k being Nat holds G[k] from NAT_1:sch 2(A23,A34);
  reconsider q1 = p1 q2 =p2 as  A byA1A2FINSEQ_1:def11
  o1-tree(h*q1) = h.(Den(o1,A).p1) by A1,A18
    .= o2-tree(h*q2) by A2,A3,A18;
  then
java.lang.StringIndexOutOfBoundsException: Range [27, 3) out of bounds for length 31
A63: len q1 = S   thesis A2,Th16,h18;
A64: len q2 = S.o2 by A2,A18;
A65: dom q1 = Seg len q1 by FINSEQ_1:def 3;
A66: dom q2 = Seg len q1 by A4,A63,A64,FINSEQ_1:def 3;
  now
    let j be Nat;
    assume
A67: j in dom q1;
    then
A68: q1.j in rng q1 by FUNCT_1:3;
A69: q2.j in rng q2 by A65,A66,A67,FUNCT_1:3;
    consider n1 being Nat such that
A70: q1.j in G|^n1 by A68,Th30;
    consider n2 being Nat such that
A71: q2.j in G|^n2 by A69,Th30;
    reconsider k = max(n1,n2) as Nat by TARSKI:1;
A72: G|^n1 c= G|^k by Th21,XXREAL_0:25;
A73: G|^n2 c= G|^k by Th21,XXREAL_0:25;
A74: h.(q1.j) = (h*q1).j by A67,FUNCT_1:13;
    h.(q2.j) = (h*q2).j by A65,A66,A67,FUNCT_1:13;
    hence q1.j = q2.j by A61,A62,A70,A71,A72,A73,A74;
  end;
  hence thesis by A65,A66;
end;

theorem
  for A being free Universal_Algebra for o1,o2 being Element of Operations A
  for p1,p2 being FinSequence st p1 in dom o1 & p2 in dom o2
  holds o1.p1 = o2.p2 implies o1 = o2 & p1 = p2
proof
  let A be free Universal_Algebra;
  let o1,o2 be Element of Operations A;
  consider a1 being object such that
A1: a1 in dom the charact of A and
A2: o1 = (the charact of A).a1 by FUNCT_1:def 3;
  consider a2 being object such that
A3: a2 in dom the charact of A and
A4: o2 = (the charact of A).a2 by FUNCT_1:def 3;
  reconsider a1,a2 as OperSymbol of A by A1,A3;
A5: o1 = Den(a1,A) by A2;
A6: o2 = Den(a2,A) by A4;
  let p1,p2 be FinSequence;
  assume that
A7: p1 in dom o1 and
A8: p2 in dom o2 and
A9: o1.p1 = o2.p2;
  thus thesis by A5,A6,A7,A8,A9,Th36;
end;

theorem Th38:
  for A being free Universal_Algebra for o being OperSymbol of A
  for p being FinSequence st p in dom Den(o,A) for a being set st a in rng p
  holds a <> Den(o,A).p
proof
  let A be free Universal_Algebra;
  let o be OperSymbol of A;
  let p be FinSequence such that
A1: p in dom Den(o,A);
  let a be set such that
A2: a in rng p and
A3: a = Den(o,A).p;
  reconsider p as FinSequence of A by A1,FINSEQ_1:def 11;
  a in rng p by A2;
  then reconsider a as Element of A;
  set G = Generators A;
  consider n being Nat such that
A4: a in G|^n by Th30;
  defpred P[Nat] means ex a being (Element of A), o being OperSymbol of A st
  ex p being FinSequence of A st
  p in dom Den(o,A) & a in rng p & a = Den(o,A).p & a in G|^$1;
  a in rng p by A2;
  then
A5: ex n being Nat st P[n] by A1,A3,A4;
  consider n being Nat such that
A6: P[n] & for m being Nat st P[m] holds n <= m from NAT_1:sch 5(A5);
  consider a being (Element of A), o being OperSymbol of A,
  p being FinSequence of A such that
A7: p in dom Den(o,A) and
A8: a in rng p and
A9: a = Den(o,A).p and
A10: a in G|^n by A6;
  reconsider op = Den(o,A) as Element of Operations A;
  a in rng op by A7,A9,FUNCT_1:3;
  then a nin G by Th26;
  then n <> 0 by A10,Th18;
  then consider k being Nat such that
A11: n = k+1 by NAT_1:6;
  reconsider k as Element of NAT by ORDINAL1:def 12;
A12: k < n by A11,NAT_1:13;
  then a nin G|^k by A6,A7,A8,A9;
  then consider o9 being (Element of dom the charact of A),
  p9 being Element of (the carrier of A)* such that
A13: a = Den(o9,A).p9 and
A14: p9 in dom Den(o9,A) and
A15: rng p9 c= G|^k by A10,A11,Th20;
  p9 = p by A7,A9,A13,A14,Th36;
  hence contradiction by A6,A7,A8,A9,A12,A15;
end;

theorem Th39:
  for A being free Universal_Algebra for G being GeneratorSet of A
  for o being OperSymbol of A
  st for o9 being OperSymbol of A, p being FinSequence
  st p in dom Den(o9,A) & Den(o9,A).p in G holds o9 <> o
  for p being FinSequence st p in dom Den(o,A)
  for n being Nat st Den(o,A).p in G|^(n+1) holds rng p c= G|^n
proof
  let A be free Universal_Algebra;
  let G be GeneratorSet of A;
  let o be OperSymbol of A such that
A1: for o9 being OperSymbol of A, p being FinSequence
  st p in dom Den(o9,A) & Den(o9,A).p in G holds o9 <> o;
  let p be FinSequence such that
A2: p in dom Den(o,A);
  let n be Nat such that
A3: Den(o,A).p in G|^(n+1) and
A4: not rng p c= G|^n;
  reconsider p as FinSequence of A by A2,FINSEQ_1:def 11;
  defpred P[Nat] means ex p being FinSequence of A st
  p in dom Den(o,A) & Den(o,A).p in G|^($1+1) & not rng p c= G|^$1;
  p is FinSequence of A;
  then
A5: ex n being Nat st P[n] by A2,A3,A4;
  consider n being Nat such that
A6: P[n] & for m being Nat st P[m] holds n <= m from NAT_1:sch 5(A5);
  consider p being FinSequence of A such that
A7: p in dom Den(o,A) and
A8: Den(o,A).p in G|^(n+1) and
A9: not rng p c= G|^n by A6;
  set a = Den(o,A).p;
  now
    assume
A10: a in G|^n;
    a nin G by A1,A7;
    then n <> 0 by A10,Th18;
    then consider k being Nat such that
A11: n = k+1 by NAT_1:6;
    reconsider k as Element of NAT by ORDINAL1:def 12;
A12: k < n by A11,NAT_1:13;
    then G|^k c= G|^n by Th21;
    then not rng p c= G|^k by A9;
    hence contradiction by A6,A7,A10,A11,A12;
  end;
  then ex o9 being (Element of dom the charact of A),
  p9 being Element of (the carrier of A)* st
  a = Den(o9,A).p9 & p9 in dom Den(o9,A) & rng p9 c= G|^n by A8,Th20;
  hence contradiction by A7,A9,Th36;
end;

theorem
  for A being free Universal_Algebra for o being OperSymbol of A
  for p being FinSequence st p in dom Den(o,A)
  for n being Nat st Den(o,A).p in (Generators A)|^(n+1)
  holds rng p c= (Generators A)|^n
proof
  let A be free Universal_Algebra;
  set G = Generators A;
  let o be OperSymbol of A;
  now
    let o9 be OperSymbol of A, p be FinSequence;
    reconsider op = Den(o9,A) as Element of Operations A;
    assume p in dom Den(o9,A);
    then op.p in rng op by FUNCT_1:3;
    hence Den(o9,A).p in G implies o9 <> o by Th26;
  end;
  hence thesis by Th39;
end;

begin :: If-while Algebra

definition
  let S be non empty UAStr;
  attr S is with_empty-instruction means
  : Def10:
  1 in dom the charact of S &
  (the charact of S).1 is 0-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S;
  attr S is with_catenation means
  : Def11:
  2 in dom the charact of S &
  (the charact of S).2 is 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S;
  attr S is with_if-instruction means
  : Def12:
  3 in dom the charact of S &
  (the charact of S).3 is 3-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S;
  attr S is with_while-instruction means
  : Def13:
  4 in dom the charact of S &
  (the charact of S).4 is 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S;
  attr S is associative means
  :
  Def14: (the charact of S).2 is 2-ary associative non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S;
end;

definition
  let S be non-empty UAStr;
  attr S is unital means
  : Def15:
  ex f being 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S
  st f = (the charact of S).2 &
  Den(In(1, dom the charact of S), S).({}) is_a_unity_wrt f;
end;

theorem Th41:
  for X being non empty set, x being Element of X
  for c being 2-ary associative unital
  non empty quasi_total homogeneous PartFunc of X*, X st x is_a_unity_wrt c
  for i being 3-ary non empty quasi_total homogeneous PartFunc of X*, X
  for w being 2-ary non empty quasi_total homogeneous PartFunc of X*, X
  ex S being non-empty strict UAStr st the carrier of S = X &
  the charact of S = <*(0-tuples_on X)-->x,c*>^<*i,w*> &
  S is with_empty-instruction with_catenation unital associative
  with_if-instruction with_while-instruction quasi_total partial
proof
  let X be non empty set;
  let x be Element of X;
  let c be 2-ary associative unital non empty quasi_total homogeneous
  PartFunc of X*, X;
  assume
A1: x is_a_unity_wrt c;
  let i be 3-ary non empty quasi_total homogeneous PartFunc of X*, X;
  let w be 2-ary non empty quasi_total homogeneous PartFunc of X*, X;
  set Y = 0-tuples_on X;
  set e = Y --> x;
  reconsider e as 0-ary
  non empty quasi_total homogeneous PartFunc of X*, X;
  set char = <*e,c*>^<*i,w*>;
  char is PFuncFinSequence of X
  proof
    let a be object;
    assume a in rng char;
    then a in rng <*e,c*> \/ rng <*i,w*> by FINSEQ_1:31;
    then a in rng <*e,c*> or a in rng <*i,w*> by XBOOLE_0:def 3;
    then a in {e,c} or a in {i,w} by FINSEQ_2:127;
    then a = e or a = c or a = i or a = w by TARSKI:def 2;
    hence thesis by PARTFUN1:45;
  end;
  then reconsider char as non empty non-empty PFuncFinSequence of X;
  reconsider S = UAStr(#X, char#) as non-empty strict UAStr by UNIALG_1:def 3;
  take S;
  thus the carrier of S = X;
  thus the charact of S = <*(0-tuples_on X)-->x,c*>^<*i,w*>;
A2: len <*e,c*> = 2 by FINSEQ_1:44;
  len <*i,w*> = 2 by FINSEQ_1:44;
  then len char = 2+2 by A2,FINSEQ_1:22;
  then
A3: dom char = Seg 4 by FINSEQ_1:def 3;
  reconsider e as 0-ary non empty homogeneous
  PartFunc of (the carrier of S)*, the carrier of S;
  reconsider c as 2-ary associative non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S;
A4: <*e,c*>.1 = e;
A5: <*e,c*>.2 = c;
A6: <*i,w*>.1 = i;
A7: <*i,w*>.2 = w;
  thus 1 in dom the charact of S by A3;
A8: dom <*e,c*> = Seg 2 by FINSEQ_1:89;
  then
A9: 1 in dom <*e,c*>;
A10: 2 in dom <*e,c*> by A8;
A11: e = (the charact of S).1 by A4,A9,FINSEQ_1:def 7;
A12: c = (the charact of S).2 by A5,A10,FINSEQ_1:def 7;
  thus (the charact of S).1 is 0-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S
  by A4,A9,FINSEQ_1:def 7;
  thus 2 in dom the charact of S by A3;
  thus (the charact of S).2 is 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S
  by A5,A10,FINSEQ_1:def 7;
  thus S is unital
  proof
    take c;
    thus c = (the charact of S).2 by A5,A10,FINSEQ_1:def 7;
A13: 1 in dom the charact of S by A3;
A14: Y = {{}} by COMPUT_1:5;
A15: In(1, dom the charact of S) = 1 by A13,SUBSET_1:def 8;
A16: {} in Y by A14,TARSKI:def 1;
    e = Den(In(1, dom the charact of S),S) by A4,A9,A15,FINSEQ_1:def 7;
    hence thesis by A1,A16,FUNCOP_1:7;
  end;
  thus (the charact of S).2 is 2-ary associative non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S
  by A5,A10,FINSEQ_1:def 7;
  thus 3 in dom the charact of S by A3;
A17: dom <*i,w*> = Seg 2 by FINSEQ_1:89;
  then
A18: 1 in dom <*i,w*>;
A19: 2 in dom <*i,w*> by A17;
A20: char.(2+1) = i by A2,A6,A18,FINSEQ_1:def 7;
A21: char.(2+2) = w by A2,A7,A19,FINSEQ_1:def 7;
  thus (the charact of S).3 is 3-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S by A20;
  thus 4 in dom the charact of S by A3;
  thus (the charact of S).4 is 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of S)*, the carrier of S by A2,A7,A19,
FINSEQ_1:def 7;
  thus S is quasi_total
  proof
    let i be Nat, h be PartFunc of (the carrier of S)*, the carrier of S;
    assume i in dom the charact of S;
    hence thesis by A3,A11,A12,A20,A21,ENUMSET1:def 2,FINSEQ_3:2;
  end;
  let i be Nat, h be PartFunc of (the carrier of S)*, the carrier of S;
  assume that
A22: i in dom the charact of S and
A23: h = (the charact of S).i;
  let p1,p2 be FinSequence;
  i = 1 or i = 2 or i = 3 or i = 4 by A3,A22,ENUMSET1:def 2,FINSEQ_3:2;
  hence thesis by A11,A12,A20,A21,A23,MARGREL1:def 1;
end;

registration
  cluster with_empty-instruction with_catenation with_if-instruction
    with_while-instruction unital associative
    for quasi_total partial non-empty strict UAStr;
  existence
  proof

set c = the 2-ary associative unital non empty quasi_total homogeneous
PartFunc of {{}}*, {{}};
    set a = the Element of {{}};
    consider x being set such that
A1: x is_a_unity_wrt c by Def3;
    arity c = 2 by COMPUT_1:def 21;
    then
A2: dom c = 2-tuples_on {{}} by COMPUT_1:22;
    then <*a,a*> in dom c by FINSEQ_2:137;
    then <*a,x*> in dom c by A1;
    then reconsider x as Element of {{}} by A2,FINSEQ_2:138;

set i = the 3-ary non empty quasi_total homogeneous PartFunc of {{}}*, {{}};

set w = the 2-ary non empty quasi_total homogeneous PartFunc of {{}}*, {{}};
    ex S being non-empty strict UAStr st the carrier of S = {{}} &
    the charact of S = <*(0-tuples_on {{}})-->x,c*>^<*i,w*> &
    S is with_empty-instruction with_catenation unital associative
    with_if-instruction with_while-instruction quasi_total partial by A1,Th41;
    hence thesis;
  end;
end;

definition
  mode preIfWhileAlgebra is with_empty-instruction
    with_catenation with_if-instruction with_while-instruction
    Universal_Algebra;
end;

reserve A for preIfWhileAlgebra,
  C,I,J for Element of A;
reserve S for non empty set,
  T for Subset of S,
  s for Element of S;

definition
  let A be non empty UAStr;
  mode Algorithm of A is Element of A;
end;

theorem Th42:
  for A being with_empty-instruction non-empty UAStr
  holds dom Den(In(1, dom the charact of A), A) = {{}}
proof
  let A be with_empty-instruction non-empty UAStr;
  reconsider e = (the charact of A).1 as 0-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def10;

  1 in dom the charact of A by Def10;
  then
A1: Den(In(1, dom the charact of A), A) = e by SUBSET_1:def 8;
  arity e = 0 by COMPUT_1:def 21;
  then dom e = 0-tuples_on the carrier of A by COMPUT_1:22;
  hence thesis by A1,COMPUT_1:5;
end;

definition
  let A be with_empty-instruction non-empty UAStr;
  func EmptyIns A -> Algorithm of A equals
  Den(In(1, dom the charact of A), A).{};
  coherence
  proof
    reconsider e = (the charact of A).1 as 0-ary non empty homogeneous
    quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def10;
    1 in dom the charact of A by Def10;
    then
A1: Den(In(1, dom the charact of A), A) = e by SUBSET_1:def 8;
    then dom e = {{}} by Th42;
    then {} in dom e by TARSKI:def 1;
    hence thesis by A1,PARTFUN1:4;
  end;
end;

theorem
  for A being with_empty-instruction Universal_Algebra
  for o being Element of Operations A
  st o = Den(In(1, dom the charact of A), A)
  holds arity o = 0 & EmptyIns A in rng o
proof
  let A be with_empty-instruction Universal_Algebra;
  let o be Element of Operations A such that
A1: o = Den(In(1, dom the charact of A), A);
A2: dom Den(In(1, dom the charact of A), A) = {{}} by Th42;
A3: <*>the carrier of A in {{}} by TARSKI:def 1;
  hence arity o = len (<*>the carrier of A) by A1,A2,MARGREL1:def 25
    .= 0;
  thus thesis by A1,A2,A3,FUNCT_1:def 3;
end;

theorem Th44:
  for A being with_catenation non-empty UAStr
  holds dom Den(In(2, dom the charact of A), A) = 2-tuples_on the carrier of A
proof
  let A be with_catenation non-empty UAStr;
  reconsider f = (the charact of A).2 as 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def11;
  2 in dom the charact of A by Def11;
  then
A1: Den(In(2, dom the charact of A), A) = f by SUBSET_1:def 8;
  arity f = 2 by COMPUT_1:def 21;
  hence thesis by A1,COMPUT_1:22;
end;

definition
  let A be with_catenation non-empty UAStr;
  let I1,I2 be Algorithm of A;
  func I1 \; I2 -> Algorithm of A equals
  Den(In(2, dom the charact of A), A).<*I1,I2*>;
  coherence
  proof
    reconsider f = (the charact of A).2 as 2-ary non empty homogeneous
    quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def11;
    2 in dom the charact of A by Def11;
    then
A1: Den(In(2, dom the charact of A), A) = f by SUBSET_1:def 8;
    then dom f = 2-tuples_on the carrier of A by Th44;
    then <*I1,I2*> in dom f by FINSEQ_2:137;
    hence thesis by A1,PARTFUN1:4;
  end;
end;

theorem
  for A being with_empty-instruction with_catenation unital non-empty UAStr
  for I being Element of A holds EmptyIns A\;I = I & I\;EmptyIns A = I
proof
  let A be with_empty-instruction with_catenation unital non-empty UAStr;
  let I be Element of A;
  consider f being 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A such that
A1: f = (the charact of A).2 and
A2: Den(In(1, dom the charact of A), A).({}) is_a_unity_wrt f by Def15;
A3: 2 in dom the charact of A by Def11;
  arity f = 2 by COMPUT_1:def 21;
  then
A4: dom f = 2-tuples_on the carrier of A by COMPUT_1:22;
A5: In(2, dom the charact of A) = 2 by A3,SUBSET_1:def 8;
  <*I,I*> in dom f by A4,FINSEQ_2:137;
  hence thesis by A1,A2,A5;
end;

theorem
  for A being associative with_catenation non-empty UAStr
  for I1,I2,I3 being Element of A holds (I1\;I2)\;I3 = I1\;(I2\;I3)
proof
  let A be associative with_catenation non-empty UAStr;
  let I1,I2,I3 be Element of A;
  reconsider f = (the charact of A).2 as
  2-ary associative non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def14;
A1: 2 in dom the charact of A by Def11;
  arity f = 2 by COMPUT_1:def 21;
  then
A2: dom f = 2-tuples_on the carrier of A by COMPUT_1:22;
A3: In(2, dom the charact of A) = 2 by A1,SUBSET_1:def 8;
A4: <*I1,I2*> in dom f by A2,FINSEQ_2:137;
A5: <*I2,I3*> in dom f by A2,FINSEQ_2:137;
A6: <*I1,I2\;I3*> in dom f by A2,FINSEQ_2:137;
  <*I1\;I2,I3*> in dom f by A2,FINSEQ_2:137;
  hence thesis by A3,A4,A5,A6,Def2;
end;

theorem Th47:
  for A being with_if-instruction non-empty UAStr
  holds dom Den(In(3, dom the charact of A), A) = 3-tuples_on the carrier of A
proof
  let A be with_if-instruction non-empty UAStr;
  reconsider f = (the charact of A).3 as 3-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def12;
  3 in dom the charact of A by Def12;
  then
A1: Den(In(3, dom the charact of A), A) = f by SUBSET_1:def 8;
  arity f = 3 by COMPUT_1:def 21;
  hence thesis by A1,COMPUT_1:22;
end;

definition
  let A be with_if-instruction non-empty UAStr;
  let C,I1,I2 be Algorithm of A;
  func if-then-else(C,I1,I2) -> Algorithm of A equals
  Den(In(3, dom the charact of A), A).<*C,I1,I2*>;
  coherence
  proof
    reconsider f = (the charact of A).3 as 3-ary non empty homogeneous
    quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def12;
    3 in dom the charact of A by Def12;
    then
A1: Den(In(3, dom the charact of A), A) = f by SUBSET_1:def 8;
    arity f = 3 by COMPUT_1:def 21;
    then dom f = 3-tuples_on the carrier of A by COMPUT_1:22;
    then <*C,I1,I2*> in dom f by FINSEQ_2:139;
    hence thesis by A1,PARTFUN1:4;
  end;
end;

definition
  let A be with_empty-instruction with_if-instruction non-empty UAStr;
  let C,I be Algorithm of A;
  func if-then(C,I) -> Algorithm of A equals
  if-then-else(C,I,EmptyIns A);
  coherence;
end;

theorem Th48:
  for A being with_while-instruction non-empty UAStr
  holds dom Den(In(4, dom the charact of A), A) = 2-tuples_on the carrier of A
proof
  let A be with_while-instruction non-empty UAStr;
  reconsider f = (the charact of A).4 as 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def13;
  4 in dom the charact of A by Def13;
  then
A1: Den(In(4, dom the charact of A), A) = f by SUBSET_1:def 8;
  arity f = 2 by COMPUT_1:def 21;
  hence thesis by A1,COMPUT_1:22;
end;

definition
  let A be with_while-instruction non-empty UAStr;
  let C,I be Algorithm of A;
  func while(C,I) -> Algorithm of A equals
  Den(In(4, dom the charact of A), A).<*C,I*>;
  coherence
  proof
    reconsider f = (the charact of A).4 as 2-ary non empty homogeneous
    quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def13;
    4 in dom the charact of A by Def13;
    then
A1: Den(In(4, dom the charact of A), A) = f by SUBSET_1:def 8;
    arity f = 2 by COMPUT_1:def 21;
    then dom f = 2-tuples_on the carrier of A by COMPUT_1:22;
    then <*C,I*> in dom f by FINSEQ_2:137;
    hence thesis by A1,PARTFUN1:4;
  end;
end;

definition
  let A be preIfWhileAlgebra;
  let I0,C,I,J be Element of A;
  func for-do(I0,C,J,I) -> Element of A equals
  I0\;while(C,I\;J);
  coherence;
end;

definition
  let A be preIfWhileAlgebra;
  func ElementaryInstructions A -> Subset of A equals
  (the carrier of A)
  \ {EmptyIns A} \ rng Den(In(3, dom the charact of A), A)
  \ rng Den(In(4, dom the charact of A), A)
  \ {I1 \; I2 where I1,I2 is Algorithm of A: I1 <> I1\;I2 & I2 <> I1\;I2};
  coherence;
end;

theorem Th49:
  for A being preIfWhileAlgebra holds EmptyIns A nin ElementaryInstructions A
proof
  let A be preIfWhileAlgebra;
  set I = EmptyIns A;
  I in {I} by TARSKI:def 1;
  then I nin (the carrier of A)\{I} by XBOOLE_0:def 5;
  then I nin (the carrier of A) \ {EmptyIns A}
  \ rng Den(In(3, dom the charact of A), A) by XBOOLE_0:def 5;
  then I nin (the carrier of A) \ {EmptyIns A}
  \ rng Den(In(3, dom the charact of A), A)
  \ rng Den(In(4, dom the charact of A), A) by XBOOLE_0:def 5;
  hence thesis by XBOOLE_0:def 5;
end;

theorem Th50:
  for A being preIfWhileAlgebra
  for I1,I2 being Element of A st I1 <> I1\;I2 & I2 <> I1\;I2
  holds I1\;I2 nin ElementaryInstructions A
proof
  let A be preIfWhileAlgebra;
  let I1,I2 be Element of A;
  assume that
A1: I1 <> I1\;I2 and
A2: I2 <> I1\;I2;
  I1\;I2 in {J1 \; J2 where J1,J2 is Algorithm of A:
  J1 <> J1\;J2 & J2 <> J1\;J2} by A1,A2;
  hence thesis by XBOOLE_0:def 5;
end;

theorem Th51:
  for A being preIfWhileAlgebra for C,I1,I2 being Element of A
  holds if-then-else(C,I1,I2) nin ElementaryInstructions A
proof
  let A be preIfWhileAlgebra;
  let C,I1,I2 be Element of A;
  set I = if-then-else(C,I1,I2);
  reconsider f = (the charact of A).3 as 3-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def12;
  3 in dom the charact of A by Def12;
  then In(3, dom the charact of A) = 3 by SUBSET_1:def 8;
  then dom Den(In(3, dom the charact of A), A)
  = (arity f)-tuples_on the carrier of A by COMPUT_1:22
    .= 3-tuples_on the carrier of A by COMPUT_1:def 21;
  then <*C,I1,I2*> in dom Den(In(3, dom the charact of A), A) by FINSEQ_2:139;
  then I in rng Den(In(3, dom the charact of A), A) by FUNCT_1:def 3;
  then I nin (the carrier of A) \ {EmptyIns A}
  \ rng Den(In(3, dom the charact of A), A) by XBOOLE_0:def 5;
  then I nin (the carrier of A) \ {EmptyIns A}
  \ rng Den(In(3, dom the charact of A), A)
  \ rng Den(In(4, dom the charact of A), A) by XBOOLE_0:def 5;
  hence thesis by XBOOLE_0:def 5;
end;

theorem Th52:
  for A being preIfWhileAlgebra for C,I being Element of A
  holds while(C,I) nin ElementaryInstructions A
proof
  let A be preIfWhileAlgebra;
  let C,I1 be Element of A;
  set I = while(C,I1);
  reconsider f = (the charact of A).4 as 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def13;
  4 in dom the charact of A by Def13;
  then In(4, dom the charact of A) = 4 by SUBSET_1:def 8;
  then dom Den(In(4, dom the charact of A), A)
  = (arity f)-tuples_on the carrier of A by COMPUT_1:22
    .= 2-tuples_on the carrier of A by COMPUT_1:def 21;
  then <*C,I1*> in dom Den(In(4, dom the charact of A), A) by FINSEQ_2:137;
  then I in rng Den(In(4, dom the charact of A), A) by FUNCT_1:def 3;
  then I nin (the carrier of A) \ {EmptyIns A}
  \ rng Den(In(3, dom the charact of A), A)
  \ rng Den(In(4, dom the charact of A), A) by XBOOLE_0:def 5;
  hence thesis by XBOOLE_0:def 5;
end;

theorem Th53:
  for A being preIfWhileAlgebra for I being Element of A
  st I nin ElementaryInstructions A holds I = EmptyIns A or
  (ex I1,I2 being Element of A st I = I1\;I2 & I1 <> I1\;I2 & I2 <> I1\;I2) or
  (ex C,I1,I2 being Element of A st I = if-then-else(C,I1,I2)) or
  ex C,J being Element of A st I = while(C,J)
proof
  let A be preIfWhileAlgebra;
  let I be Element of A such that
A1: I nin ElementaryInstructions A and
A2: I <> EmptyIns A and
A3: for I1,I2 being Element of A st I = I1\;I2 & I1 <> I1\;I2 holds
  I2 = I1\;I2 and
A4: for C,I1,I2 being Element of A holds I <> if-then-else(C,I1,I2) and
A5: for C,J being Element of A holds I <> while(C,J);
A6: now
    assume I in rng Den(In(3, dom the charact of A), A);
    then consider x being object such that
A7: x in dom Den(In(3, dom the charact of A), A) and
A8: I = Den(In(3, dom the charact of A), A).x by FUNCT_1:def 3;
    reconsider f = (the charact of A).3 as 3-ary non empty homogeneous
    quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def12;
    3 in dom the charact of A by Def12;
    then In(3, dom the charact of A) = 3 by SUBSET_1:def 8;
    then dom Den(In(3, dom the charact of A), A)
    = (arity f)-tuples_on the carrier of A by COMPUT_1:22
      .= 3-tuples_on the carrier of A by COMPUT_1:def 21;
    then consider C,I1,I2 be object such that
A9: C in the carrier of A and
A10: I1 in the carrier of A and
A11: I2 in the carrier of A and
A12: x = <*C,I1,I2*> by A7,FINSEQ_2:139;
    reconsider C,I1,I2 as Element of A by A9,A10,A11;
    I = if-then-else(C,I1,I2) by A8,A12;
    hence contradiction by A4;
  end;
A13: now
    assume I in rng Den(In(4, dom the charact of A), A);
    then consider x being object such that
A14: x in dom Den(In(4, dom the charact of A), A) and
A15: I = Den(In(4, dom the charact of A), A).x by FUNCT_1:def 3;
    reconsider f = (the charact of A).4 as 2-ary non empty homogeneous
    quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def13;
    4 in dom the charact of A by Def13;
    then In(4, dom the charact of A) = 4 by SUBSET_1:def 8;
    then dom Den(In(4, dom the charact of A), A)
    = (arity f)-tuples_on the carrier of A by COMPUT_1:22
      .= 2-tuples_on the carrier of A by COMPUT_1:def 21;
    then consider C,J be object such that
A16: C in the carrier of A and
A17: J in the carrier of A and
A18: x = <*C,J*> by A14,FINSEQ_2:137;
    reconsider C,J as Element of A by A16,A17;
    I = while(C,J) by A15,A18;
    hence contradiction by A5;
  end;
  A19: I
 nin {I1\;I2 where I1,I2 is Algorithm of A: I1 <> I1\;I2 & I2 <> I1\;I2}
  by A3;
  I in (the carrier of A) \ {EmptyIns A} by A2,ZFMISC_1:56;
  :: Gauge ::  :: Received September 3, 2017
  \ rng Den(In:: detailed in file COPYING.interpretation.
 vocabularies VALUED_1,,MEMBERED, PARTFUN1 ,,MEASURE7, COUSIN,
  \       ,, XXREAL_0 ARYTM_1,FINSEQ_1,CARD_3,
\ In4  charactofA,A  ,:def5
henceA19,:5
end;

definition
  ;
        ELSET_1, XXREAL_0,XREAL_0, MEMBERED, VALUED_0, FUNCT_2, FINSEQ_1,
  : Def23:

  attrA degeneratedmeans
  :Def24
  (ex I1,I2 being Element of A st
  I1 <> EmptyIns A & I1\;I2 = I2 or I2 <> EmptyIns A & I1\;I2 = I1 or
  (I1 <> EmptyIns A or I2 <> EmptyIns A) & I1\;I2 = EmptyIns A) or
  ex C,I2being  of Ast if-henelse(,,) = EmptyIns A or
 (exC,  Element  A  EmptyInsA or
assumethat
  \I2  -thenC,J1,2)or
  (ex I1,I2,C,J being Element of A st  c < b- ;
   I1\I2 = while(,) orexC1I1I2,2,J being Element  A 
if-C1I1,I2) = while(C2,J);
ll_founded
  :
  end
end;

definition
f  -> non empty FinSequenceof NAT equals
  <0, 2>^<3 2*;
  coherence;
end

theorem|. b  d |<= r    .( - r) * (  d.|by ,A6,A7,Lm01;
  ECIW-signature =  &domECIW-=Seg  
1= 0 & .2=2&
ECIW-signature3=3&ECIW-signature. = 
proof
:len <0,2>=2 by FINSEQ_1:44;
A2: len <*3,2*> = 2      ;
bpositive  c ispositive
Q_1: 3java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
  then
A5: 1 in dom <*3,2*>;
A6: <*3,2*>.1 = 3;
A7:2 in dom <3*> by A4;
forc,dbeing negative  st a< b * *djava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
A9: 2+1 = 3;
A10: 1 in dom <*0,2*> by A3;
A11: <*0,2*>.1 = 0;
A12: 2 in dom <*0,2*> by A3;
  <*0,2*>.2 = 2;
  hence thesis by A1,A2,A5,A6,A7,A8,A9,A10,A11,A12,FINSEQ_1:22,def 7;
end;

definition
  letA partialnon-mpty  empty UAStr;
  attr A    b* c * (e /(  *|  .) = b* c  e/2 *b*c)
  : Def27:
  signature A = ECIW-signature;
end;

theorem Th55:
 A isECIWstrict
  for o beingA2  xbe st  inholds.  Fx from FUNCT_2:sch 2(A1);
proof
  let A be partial non-empty non empty UAStr;
  assume signature A = ECIW-signature;
  then 4 = len the     take h
  thendom thecharact of =Seg  FINSEQ_1:def3java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  m1
end;


   nonemptyset;
  cluster FreeUnivAlgNSG(ECIW-signature,XA2:for x  object  x in X holds h.  (  :ch();
    with_if-instruction -;
  coherence
  roof
=(-X;
    c=ECIWsignature;
: *,2* = 2 byjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 35
  *2   java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 35
  then
A3: len char  22by ;
  charact S= byFREEALG:def11;
:dom <0,* =S 2by F:3
hencebyPARTFUN3def1
A7:domthecharact  S=Seg 4A3,4,: ;
A8: java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
thus1 indom thecharact of by
    then
java.lang.StringIndexOutOfBoundsException: Range [16, 2) out of bounds for length 65
A10: 1       hence 0 < r by PARTFUN3:def 1;
A11: 2 in;
A12: 3 indomchar A8;
A13: 4 in   for f,g beiofX,EAL holds
     et f, be Function of X,REAL;
    reconsider char  empty FinSequenceof omega
seto  FreeOpNSG1charX;
 1in domdom<0,2*  A5
A15: <*0,2*>. (exsbe  forr str   java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [20, 3) out of bounds for length 28
A17:thus Xc {}
    char.1 = 0 by A14,A15,FINSEQ_1:def 7;
    then char/.1 = 0 by        .= x by A3;
    then
 carrierof by ,:def 10java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
    reconsidero as homogeneous non emptyquasi_total PartFuncofD,D
    =0 byCOMPUT_125java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    hence (thecharactofS.1is 0arynonempty homogeneous
    quasi_total       thusthesis byA1
    by A9,COMPUT_1:reconsider r0 = the Element of X as Real;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    then beemptyreal-memberedjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
A19: (java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 28
    set  X={  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    char.
    then java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 7

 o tuples_onthe carrierofjava.lang.StringIndexOutOfBoundsException: Range [64, 44) out of bounds for length 64
    reconsider o as homogeneous
     =2  ,java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 35
    hence (the charact of S).2 is 2-ary non empty java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 30
    quasi_total PartFunc java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 7
    
    :Ac .,.[
    then
p
    set o = FreeOpNSG(3,char,Xthenrng  c= [a, infty. &rng c=]. infty,. byA1;
 1 in dom <*3,2*> by A6;
A23: <*3,2*>.1 = 3;
A24: 2 *32>byA6
A25: <*3,2*>.2 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 6
    char.(2+1) = 3 by A1,A22,A23,    assume xin{,}java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    then (char qua FinSequence of omega)/.3 = 3 by A12  end
    0,}c=[01]by Th13;
A26hence thesis Th12;
    reconsider  end;
    arity o = 3 by A26,COMPUT_1:25;
    hence (the charact of S).3 is 3-ary non empty homogeneous
    quasi_total PartFunc of (the carrier of S)*, the carrier of S
    by A21,COMPUT_1:def 21;
    thus 4 in dom the charact of S by A7;
    then
A27: (the charact of S).4 = FreeOpNSG(4,char,X) by FREEALG:def 11;
    set o = FreeOpNSG(4,char,X);
    char.(2+2) = 2 by A1,A24,A25,FINSEQ_1:def 7;
    then (char qua FinSequence of omega)/.4 = 2 by A13,PARTFUN1:def 6;
    then
A28: dom o = 2-tuples_on the carrier of S by A13,FREEALG:def 10;
    reconsider o as homogeneous non empty quasi_total PartFunc of D*, D;
    arity o = 2 by A28,COMPUT_1:25;
    hence thesis by A27,COMPUT_1:def 21;
  end;
end;

theorem Th56:
  for X being disjoint_with_NAT non empty set
  for I being Element of FreeUnivAlgNSG(ECIW-signature,X) holds
  (ex x being Element of X st I = root-tree x) or
  ex n being Nat, p being FinSequence of FreeUnivAlgNSG(ECIW-signature,X)
  st n in Seg 4 & I = n-tree p & len p = ECIW-signature.n
proof
  let X be disjoint_with_NAT non empty set;
  set S = ECIW-signature;
  set G = DTConUA(S,X);
  let I be Element of FreeUnivAlgNSG(S,X) such that
A1: not ex x being Element of X st I = root-tree x;
  Terminals DTConUA(S,X) = X by FREEALG:3;
  then not ex d being Symbol of G st d in Terminals G & I = root-tree d by A1;
  then consider o being Symbol of G, p being FinSequence of TS G such that
A2: o ==> roots p and
A3: I = o-tree p by Th16;
A4: NonTerminals G = {s where s is Symbol of G:
  ex n being FinSequence st s ==> n} by LANG1:def 3;
  then
A5: o in NonTerminals G by A2;
A6: NonTerminals G = Seg 4 by Th54,FREEALG:2;
  then reconsider n = o as Element of NAT by A5;
  reconsider p as FinSequence of FreeUnivAlgNSG(ECIW-signature,X);
  take n, p;
  thus n in Seg 4 by A2,A4,A6;
  thus I = n-tree p by A3;
A7: [n, roots p] in the Rules of G by A2,LANG1:def 1;
  then
A8: roots p in (the carrier of G)* by ZFMISC_1:87;
  dom p = dom roots p by TREES_3:def 18;
  hence len p = card dom roots p by CARD_1:62
    .= len roots p by CARD_1:62
    .= S.n by A7,A8,FREEALG:def 7;
end;

theorem Th57:
  for X being disjoint_with_NAT non empty set
  holds EmptyIns FreeUnivAlgNSG(ECIW-signature,X) = 1-tree {}
proof
  let X be disjoint_with_NAT non empty set;
  set S = ECIW-signature;
  reconsider s = S as non empty FinSequence of omega;
  set A = FreeUnivAlgNSG(S,X);
A1: 1 in dom the charact of A by Def10;
  reconsider f = (the charact of A).1 as 0-ary non emptyA1: X  Y;
  quasi_total PartFunc of(the carrier of )* the carrier of  by ;
A2: f = FreeOpNSGend;
A3: 1 in dom S by Th54;
  then
A4: s/.1 = S.1 by PARTFUN1
A5: dom FreeOpNSG(1,S( be  st f=  ()chi(,))
   A3FREEALG:def 10
    .= {{}} by A4,Th54,java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 10
:}in{}  TARSKI:def ;
A7: {} = <*> TS(DTConUA(S,X));
  thus EmptyIns A = f.{} by A1,SUBSET_1:def 8
    .= Sym(1,S,X)-tree({}) by A2,A3,A5,A6,A7,FREEALG:def 10
    .= 1-tree {} by A3,FREEALG:def 9;
end;

theorem Th58:
  for X being   for X being disjoint_with_NAT
  for p being FinSequence of FreeUnivAlgNSG(:def3
  st 1-tree p is Element of FreeUnivAlgNSG(ECIW-signature,X) holds p = {}

  let X be disjoint_with_NAT non  assume
setS  -signature;
 set =DTConUA(S,)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  set A = FreeUnivAlgNSG(S,X);
  letbeFinSequence A;
  assume 1-tree p is Elementletxy object;
  then reconsider f.x = r * (chiZZ.x)byA5,,VALUED_1def5
  per cases by Th56;
  suppose ex x being Element of X st I = root-tree x;
    consider of such
A1: 1-tree p = root-tree java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 8
    in rngchi(X)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    hencebyjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 31
  end;
  supposen Nat  beingFinSequenceof A
 in4 & I = ntreep & lenp= .;
    then consider n being Nat, q java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 35
      4
A2: I = n-tree q and
A3: len q = S.n;
     = pby A2,TREES_4:15;
    hence thesis by A2,A3Th54,:;
  end;
end

theorem Th59:
  for X being disjoint_with_NAT non empty setproof
  forI1, being Element of FreeUnivAlgNSG(ECIW-signature,java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  holds\;I2 = -tree(I1,)
roof
  let X be disjoint_with_NAT      r = (pper_sum_setf)D by ,A2
  set lAbenonempty closed_interval Subset  REAL;
  reconsider s = S as non empty for x being set holds (x in it iff x tagged_division of A);
  set A = consider R set that
  let I1,I2 be Element of A;
A1: 2 in dom the charact of A x of Ajava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  reconsider f = (the charact of A).2 as 2-ary non empty homogeneous
    let D1,D2be  suchthat
A2: f=FreeOpNSG(2S,X)by A1FREEALGd11;
A32 in S by;
 by: ;
  then
A4: dom FreeOpNSG(2,S,X) = 2-tuples_on TS(DTConUA(S,X))    TDin tagged_divsAbyDef1;
  by A3,Th54,FREEALG:def 10;end;
A5: <*I1,I2*>letTDbetagged_divisionof ;
  D:
    .      DT;
    =2tree I1,2)by,def 9;


Th60:
  for X being disjoint_with_NAT    division_of 
  for pbeing  ofFreeUnivAlgNSG(-signature,)
  st2-treep ElementECIW-signature,X
exI1I2beingElementofECIW-X) stp=<I2>
proof
  let X be disjoint_with_NAT non empty set;
  set S = ECIW-signature;
  set G = DTConUA(S,X);
  set A = FreeUnivAlgNSG(S,X);
  let p be FinSequence of A;
  assume 2-tree p is Element of A;
  then reconsider I = 2-tree p as Element of A;
  per cases by Th56;
  suppose ex x being Element of X st I = root-tree x;
    then consider x being Element of X such that
A1: 2-tree p = root-tree x;
    2-tree p = x-tree(<*>TS G) by A1,TREES_4:20;
    then 2 = x by TREES_4:15;
    then X meets NAT by XBOOLE_0:3;
    hence thesis by FREEALG:def 1;
  end;
  suppose ex n being Nat, p being FinSequence of A
    st n in Seg 4 & I = n-tree p & len p = S.n;
    then consider n being Nat, q being FinSequence of A such that
    n in Seg 4 and
A2: I = n-tree q and
A3:lenq .java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
  =2 A2TREES_4:5
A5: q =definition
    funclen TD - ofNATequals
    then java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 4
    then reconsider I1 = p.1, I2 = p.2 as Element of A by ZFMISC_1:32;
    take I1,I2;
    thus thesis by A3,A4,A5,Th54,FINSEQ_1:44;
  end;
end;

theorem Th61:
 Xbeingnon 
  java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 41
  holds I1

let  java.lang.StringIndexOutOfBoundsException: Range [33, 28) out of bounds for length 43
  set S = ECIW-signature;
  set G = DTConUA(S,X);
       fine ofI;
     T  Elementofset_of_tagged_Division)such that
   p *I2;
  rng p c= FinTrees      i Nat;
  then
A1: p is FinSequence of FinTrees the carrier of G by FINSEQ_1:def 4;
A2: rng p = {I1,I2} by       then
  then
A3: I1 in rng p by TARSKI:def 2;
A4: I2 in rng p by A2rng T c= I byTh22
  I1\;I2 = 2-tree(I1,I2) by Th59
java.lang.StringIndexOutOfBoundsException: Range [16, 4) out of bounds for length 23
  hence thesis by A1,A3,A4,Th3;
end;


forXbeing non set
  takeIT
  holds I1\;I2 = J1\;J2 implies java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 23
proof
  i .().)*volTDi) 
  set S = ECIW-signature;
  set A = FreeUnivAlgNSG(S,X);
  let I1,I2,J1, proof
A1: I1\;I2 = 2-bA7;
  J1\;J2;
  then
  hence thesis by FINSEQ_1:77;
end;

 :
  for X being disjoint_with_NAT nonjava.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
  for C,I1,I2 being Element of FreeUnivAlgNSG(ECIW-signature,X)
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
proof
   be java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 43
th :
  reconsider s = S as nonforDbeingofID= < >)
  set AD=
  let C,I1,I2 then1<  D  =2 =lenD 2
A1: 3 in dom the charact of A by Def12;
  reconsider f = (the charact of A).end
  quasi_total PartFunc ofjava.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 5
A2:  ibe  t in 
A3: 3 in domA3    inTD;
  .  3byd6
  
A4: dom FreeOpNSG(3,S,X) =.  java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 38
  by       t ()i  ;
A5: <*.=vol(divset(i)
  thus if-then-else(C,.= byDef4
    . 3S,X)-(*,,*)A2A3A4,5,FREEALGd10
-<*CI1,I2> A3FREEALG:def9
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 4

theoremIemptyjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 52
 beingjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 45
 pbeing  ECIWX)
  st 3-tree p is Element of java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 18
  ex exbejava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 55
  st p = <*C,I1,I2*>

  let X be disjoint_with_NAT   java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 18
  set S = ECIW-:   for TD be tagged_di   
  set G = DTConUA(S,    ofITDisfine
  set A = FreeUnivAlgNSG(S,X);
  let p be A7:   TD is jauge-fine:68
  assume 3-tree p is Element of A;
  then reconsider I = 3-tree p as Element of A;
  per cases by Th56;
  suppose ex x| (J1-,)-(  fTD) .
    then consider x being Element of X suchby :57;
:-tree p=root-tree x
    3-tree p = x-tree(<*>TS G) by hence .-J2|< 
    then 3 = x byend;
    then X meets NAT by  is HK-integrable & HK-integral=0
    hence thesis by FREEALG:def 1;
  end;
     epsilon0
     nSeg 4 &I=n- p& p=Sn
thenconsidern beingNat q FinSequence of Asuch java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
nin 
  =n-treeq
A3: len q = S.n;
A4:n =3byA2TREES_415;
A5: q = p by A2,TREES_4:15;
    then p =<*p.1,p.2,p.3*> by .=1:;
    then
A6: rng p = {phence thesis by A3;
A7: p.1 in {p.1,p.2,p.3} by ENUMSET1:def 1;
A8: p.2 in {p.1,p.2,p.3} by ENUMSET1:def 1;
    p.3 in {p.1,p.2,p.3} by ENUMSET1:def 1;
    hence byA2,DEFCC
    take C,I1,I2;
    java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 7
  end;
end;

theorem
  forthenf()i    ,,,;
  for C1,C2,I1,I2,J1,J2 being Element of FreeUnivAlgNSG(ECIW-signature,X)
  st if-then-else(.=0;
  holds C1 =for kbe k in tagged_volume(,)
proof
  let X be disjoint_with_NAT non empty set;
  set S = ECIW-signature;
  set A = FreeUnivAlgNSG(S,X);
  let C1,C2,I1,I2,J1,J2 be Element of A;
A1: if-then
  if-then-else
thenifthenelseI2  thenelseC2,J1J2)
<,>=*,,*  A115
  hence thesis by FINSEQ_1:   java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 18
end;

theorem Th66:
  for X being disjoint_with_NAT non empty set
  for C,I being Element of FreeUnivAlgNSG(ECIW-signature,X)
  holds while(C,I) = 4-tree(C,I)
n
Xbejava.lang.StringIndexOutOfBoundsException: Range [32, 28) out of bounds for length 43
  set S = ECIW-signature;
  reconsider s = S as non empty FinSequence of omega;
  set A = FreeUnivAlgNSG(S,X);
  let C,I be Element of A;
A1: 4 in dom the charact of A by Def13;
  reconsider f = (the charact of A).4 as 2-ary non empty homogeneous
  quasi_total PartFunc of (the carrier of A)*, the carrier of A by Def13;
A2: f = FreeOpNSG(4,S,X) by A1,FREEALG:def 11;
A3: 4 in dom S by Th54;
  then s/.4 = S.4 by PARTFUN1:def 6;
  then
A4: dom FreeOpNSG(4,S,X) = 2-tuples_on TS(DTConUA(S,X))
  by A3,Th54,FREEALG:def 10;
A5: <*C,I*> in 2-tuples_on TS(DTConUA(S,X)) by FINSEQ_2:137;
  thus while(C,I) = f.<*C,I*> by A1,SUBSET_1:def 8
    .= Sym(4,S,X)-tree(<*C,I*>) by A2,A3,A4,A5,FREEALG:def 10
    .= 4-tree(C,I) by A3,FREEALG:def 9;
end;

theorem Th67:
  for X being disjoint_with_NAT non empty set
  for p being FinSequence of FreeUnivAlgNSG(ECIW-signature,X)
  st 4-tree p is Element of FreeUnivAlgNSG(ECIW-signature,X)
  ex C,I being Element of FreeUnivAlgNSG(ECIW-signature,X) st p = <*C,I*>
proof
  let X be disjoint_with_NAT non empty set;
  set S = ECIW-signature;
  set G = DTConUA(S                                  .=0;
  set A = FreeUnivAlgNSG(S,X);
  let p be FinSequence of A;
  assume 4-           |.(f,TD  .|<=byA4;
  then reconsider I = 4-tree p as Element of A;
  per cases by Th56;
-tree x
    then consider x being Element of X such that
A1: 4-tree p = root-tree x;
    4-tree p = x-tree(<*>TS G) by A1,TREES_4:20;
    then 4 = x by TREES_4:15;
    then X meets NAT by XBOOLE_0:3;
    hence thesis by FREEALG:def 1;
  end;
  suppose ex n being Nat, p being FinSequence of A
    st n in Seg 4 & I = n-tree p & len p = S.n;
    then consider n being Nat, q being FinSequence of A such that
    n in Seg 4 and
A2: I = n-tree q and
A3: len q = S.n;
A4: n = 4 by A2,TREES_4:15;
A5: q = p by A2,java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 6
    then p = <*p.1,:java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
    then rng p = {p.1,p.2} by FINSEQ_2:127;
    then reconsider I1 = p.1, I2 = p.2 as java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 20
    take I1,I2;
    thus thesis by A3,A4,A5,Th54assume isfine
  



  NAT java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 45
  for I being let I be non empty Subset ofREAL;
  st I in ElementaryInstructions FreeUnivAlgNSG(ECIW-signature,pjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 11
proof;
  let X java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  set S = ECIW-signature;
  set A = FreeUnivAlgNSG(S, X);
  let I be Element of FreeUnivAlgNSG(ECIW-signature,X) such that
A1: I in ElementaryInstructions FreeUnivAlgNSG(ECIW-signature,X);
  per cases by Th56;
  suppose ex x being Element of X st I = root-tree x;
    then consider x being Element of X such that
A2: I = root-tree x;
    root-tree x = x-tree {} by TREES_4:20;
    hence thesis by A2;
  end;
  java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9
    ex n being Nat, p being FinSequence of FreeUnivAlgNSG(ECIW-signature,X)
    st n in Seg 4 & I = n-tree p & len p = S.n;
    then consider n being Nat,
    p being FinSequence of FreeUnivAlgNSG(ECIW-signature,X) such that
A3: n in Seg 4 and
A4: I = n-tree p and len p = S.n;
    percasesbyENUMSET1def2,FINSEQ_3:;
    
A5:   n = 1;
      then p = {} by A4,Th58;
      then         i domr#fTD)
      hence A1,
    end;
    suppose
A6:   n = 2;
      then consider I1,I2 being Element of A such that
A7:   p = <*I1,I2*> by A4,Th60;
A8:   I = n-tree(I1,I2) by A4,A7
        .= I1\;I2 by A6,Th59;
      then
A9:   I <> I1 by Th61;
      I <> I2 by A8,Th61;
      hencethesis  A8,9Th50;
    end;
    suppose
A10:  n = 3;
      then consider C,I1,I2 being Element of A such that
A11:  p  .=r *(java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 51
      I = if-then-else(C,I1,I2) by A4,A10,A11,Th63;
      hence thesis by A1,Th51;
    end;
    suppose
A12:  n = 4;
      then consider C,I9 being Element of A such that
A13:  p = <*C,I9*> by A4,Th67;
      I = n-tree(C,I9) by A4,A13
        .= while(C,I9) by A12,Th66;
      hence thesis by A1,Th52;
    end;
  end;
end;

theorem
  for X being disjoint_with_NAT non empty set
  for p being FinSequence of FreeUnivAlgNSG(ECIW-signature,X)
  for x being Element of X
  st x-tree p is Element of FreeUnivAlgNSG(ECIW-signature,X) holds p = {}
proof
  let X be disjoint_with_NAT non empty set;
  set S = ECIW-signature;
  set A = FreeUnivAlgNSG(S, X);
  let p be FinSequence of FreeUnivAlgNSG(ECIW-signature,X);
  let x be Element of X;
  assume x-tree p is Element of FreeUnivAlgNSG(ECIW-signature,X);
  then reconsider I = x-tree p as Element of A;
  now
    given n being Nat, p being FinSequence of A such that
A1: n in Seg 4 and
A2: I = n-tree p and len p = ECIW-signature.n;
A3: x = n by A2,TREES_4:15;
    X misses NAT by FREEALG:def 1;
    hence contradiction by A1,A3,XBOOLE_0:3;
  end;
  then consider y being Element of X such that
A4: I = root-tree y by Th56;
  x-tree p = y-tree {} by A4,TREES_4:20;
  hence thesis by TREES_4:15;
end;

theorem Th70:
  for X being disjoint_with_NAT non empty set
(CIW-ignature,X) =
  FreeGenSetNSG(ECIW-signature,X) &
  card X = card FreeGenSetNSG(ECIW-signature,X)
proof
  let X be disjoint_with_NAT non empty set;
  set S = ECIW-signature;
  set G = DTConUA(S,X);
A1: X = Terminals G by FREEALG:3;
  set A = FreeUnivAlgNSG(S, X);
  thus ElementaryInstructions A = FreeGenSetNSG(S, X)
  proof
    thus ElementaryInstructions A c= FreeGenSetNSG(S, X)
    proof
      let x be object;
      assume x in ElementaryInstructions A;
      then consider y being Element of X such:TD = [D,]byDef2;
A2:   x = y-tree {} by Th68;
      : dom T = Seg lenjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 53
      x = root       = t).as  I
      hence thesis by A1;
    end;
     x beobject;
    assume
A3                            .*vol(ivset(ivision_ofTDi))
    then hence thesis;
    java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 6
A4    tagged_volume(,D  TD &
java.lang.StringIndexOutOfBoundsException: Range [23, 2) out of bounds for length 27
A6: x = y-tree {} by A4,TREES_4:20;
    assume
A7:xninA
    casesjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 25
supposeI  ;
      then x = 1-tree {} by Th57;
      then
A8:   y = 1 by A6,TREES_4:15;
      X misses NAT by FREEALG:def 1;
      hence thesis by A1,A5,A8,XBOOLE_0:3;
    end;
    suppose ex I1,I2 being Element of A st
      I = I1\;I2 & I1 <> I1\;I2 & I2 <> I1\;I2;
      then consider I1,I2 be Element of A such that
A9:   I = I1\;I2;
      x = 2-tree(I1,I2) by A9,Th59
        .= 2-tree<*I1,I2*>;
      hence thesis by A6,TREES_4:15;
    end;
    suppose ex C,I1,I2 being Element of A st I = if-then-else(C,I1,I2);
      then consider C,I1,I2 be Element of A such that
A10:  I = if-then-else(C,I1,I2);
      x = 3-tree<*C,I1,I2*> by A10,Th63;
      hence thesis by A6,TREES_4:15;
    end;
    suppose ex C,J being Element of A st I = while(C,J);
      then consider      assume i in dom tagged_volume(f + g,TD);
A11:  I = while(C,J);
      x =4-,
        .=4tree<CJ>java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
      hence = tagged_volume,.i+g(tagged_ofTD.)
    end;
  end;
  java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 19
  consider
   
 f = X & for x being      HKintegrable;
A13: rng f = FreeGenSetNSG(S,X)
  proof
    thus rng f c= FreeGenSetNSG(S,X)
    proof
      let a be object;
           java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 24
      then consider x being object such that
A14:xin and
A15:assume
         jauge  thepositiveyielding  ofIREAL;
      hence thesis by A1,A14;
    end;
    let a be object;
    a in FreeGenSetNSGS)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    then consider s being Symbol of G such
A16: a = root-tree s and
A17: s X A1
    reconsider s as Element of X by A17;
    f.s = a    f.s = a   ofITDisjaugefine
    hence thesis by A12,FUNCT_1:def 3;
  end;
  f is one-to-one
  proof
ab  java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
    java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 15
A18: a in dom f and
A19: b in dom f;
    reconsider x = a, y = b as Element .   (TD)by :;
    java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 21
    then F(x) = f.b by A12
      .= F(y) by A12;
    hence thesis by TREES_4:4;
  end;
  then X, FreeGenSetNSG(SforTDbeingjava.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 59
  hence thesis by CARD_1:5;
end;

registration
  cluster infinite disjoint_with_NAT for set;
  existence
  proof
    take X = [:NAT,{0}:];
    thus X is infinite;
    now
      let x be object;
      assume x in X;
      then
A1:   ex a,b being object st ( a in NAT)&( b in {0})&( x = [a,b])
      by ZFMISC_1:def 2;
      assume x in NAT;
      hence contradiction by A1;
    end;
    hence X misses NAT by XBOOLE_0:3;
  end;
end;

registration
  let X be infinite disjoint_with_NAT set;
  cluster FreeUnivAlgNSG(ECIW-signature,X) -> infinite;
  coherence
  proof
    card X = card FreeGenSetNSG(ECIW-signature,X) by Th70;
    then card ElementaryInstructions FreeUnivAlgNSG(ECIW-signature,X) is
    infinite by Th70;
    hence
    ElementaryInstructions FreeUnivAlgNSG(ECIW-signature,X) is infinite;
  end;
end;

registration
  let X be disjoint_with_NAT non empty set;
  cluster FreeUnivAlgNSG(ECIW-signature,X) -> ECIW-strict;
  coherence
  by FREEALG:4;
end;

theorem Th71:
  for A being preIfWhileAlgebra holds Generators A c= ElementaryInstructions A
proof
  let A be preIfWhileAlgebra;
  let x be object;
  assume that
A1: x in Generators A and
A2: x nin ElementaryInstructions A;
  reconsider x as Element of A by A1;
  dom Den(In(1, dom the charact of A), A) = {{}} by Th42;
  then
A3: {} in dom Den(In(1, dom the charact of A),A) by TARSKI:def 1;
  per cases by A2,Th53;
  suppose x = EmptyIns A;
    then x in rng Den(In(1, dom the charact of A), A) by A3,FUNCT_1:3;
    hence contradiction by A1,Th26;
  end;
  suppose
    ex I1,I2 being Element of A st x = I1\;I2 & I1 <> I1\;I2 & I2 <> I1\;I2;
    then consider I1,I2    then consider J2 being Real such that
A4: x = I1\;I2 and I1 <> I1\;I2
    andI2 >I1;;
    dom Denex -  ,java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
    Th44
    then <*I1,I2*> in dom for TD being tagged_division of I st TD is jauge-fine
    then x in       holds |.tagf+g,)- (J1 + J2. =
    hence contradiction by   =/2
  java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
being Element A =if--(,1I2);
    then consider C,I1,I2 being Element of A such that
A5: x = if-then-else(C,I1,I2);
    dom Den(In(3, dom theFunction  I,EAL;
    by Th47;
    then <*C,I1,I2*> in dom Den(In(3, dom the charact of A),A) by FINSEQ_2:139;
    then x in rng Den(In(3, dom the charact  for being tagged_divisionof st TDisjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 61
    henceassume TD is jauge-java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  suppose ex C,J being Element of A st x = while(C,J);
    then consider C,J being Element of A such that
:  whileCJ;
    dom Den(In(4, dom the charact of A), A) = 2-tuples_on the carrier of A
    by;
    then <*C,J*> in dom           =tagged_sumfTD  tagged_sum(,)
    then x in rng Den(In(4, dom the charact of A),A) by A6,FUNCT_1:3;
    ,Th26
  end;
end;

theorem Th72:
  for A being preIfWhileAlgebra st A hence 
  holds EmptyIns A <end;
  EmptyIns A <>     then HK-integral(+g)=J1 +J2 A4,DEFCC
proof
  let A be preIfWhileAlgebra java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
A1: A is free;
  let C,I1,I2 be Element of A;
A2: dom Den(In(1, dom the charact of A), A) = {{}} by Th42;
A3: dom Den(In(2, dom the charact of A), A) = 2-tuples_on the carrier of A
  by Th44;
A4: dom Den(In(3, dom the charact of A), A) = 3-tuples_on the carrier of A
  by Th47;
A5: dom Den(In(4, dom the charact of A), A) = 2-tuples_on the carrier of A
  by Th48;
A6: {} in {{}} by TARSKI:def 1;
  <*I1,I2*> in 2-tuples_on the carrier of A by FINSEQ_2:137;
  hence EmptyIns A <> I1\;I2 by A1,A2,A3,A6,Th36;
  <*C,I1,I2*A1:f   # (I by Th16;
  hence  <>ifthen-C,,)by A1A2A4,A6Th36;
<C,I1*  -java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 59
  hence thesis by A1,A2,A5,A6,Th36;
end;

theorem Th73:
  for A being preIfWhileAlgebra st A is free
  for I1,I2,C,J1,J2 being     hence f is HK-integrable by A,Th35;
  (I1\;I2 = J1\
  I1\;I2 <> if-then-else(C,J1,J2  IbeingSubsetREAL
proof
  let A be preIfWhileAlgebra such that
A1: A is free;
  let I1,I2,C,J1,J2 be end
A2: 2java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 41
A3: dom;
  by.java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 71
A4: In(2, dom the charact of A) = 2 by    java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
A5 3 indomtheofDef12
A6:  is
  by Th47;
A7: In(3, dom the charact of A) = 3 by A5,SUBSET_1
A8: 4 in dom the charact ofcluster  forintegrableFunctionof ,REAL
A9: dom Den(In(4, dom the charact reconsider   of ,REAL :2;
  by java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 4
 4  A)   SUBSET_1:def8;
A11: <*I1,I2*> in 2-tuples_on the carrier of A by FINSEQ_2:137;
* 2tuples_on the  A 137
A13: rng <*I1,I2*> = {I1,I2A1  y yin java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 57
  then
   *,2> TARSKI2
 in rngjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  hence I1\;I2 <> I1 & I1\;I2 <> I2 by  thenjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 66
  hereby
    assume I1\;I2 java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    then <*I1,I2*> = <*J1,J2*> by A1 ().    ,;
    hence I1 = J1 & I2 =end
  end;
  <*C,J1,J2*> in 3-  holds upper_sum(f,D1)fD)& java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 77
  hence I1\;I2 <> if-then-else(C,J1,J2) by A1,A3,A4,A6,A7,A11,Th36;
  <*C,J1*> in 2-tuples_on the carrier of A by FINSEQ_2:137;
  hence thesis by A1,A3,A4,A9,A10,A11,Th36;
end;

theorem Th74:
  for A being preIfWhileAlgebra st A is free
  for C,I1,I2,D,J1,J2 being Element of A
  holds if-then-else(C,I1,I2) <> C & if-then-else(C,I1,I2) <> I1 &
  if-then-else(C,I1,I2) <> I2 & if-then-else(C,I1,I2) <> while(D,J1) &
  (if-then-else(C,I1,I2) = if-then-else(D,J1,J2) implies C=D & I1=J1 & I2=J2)
proof
  let A be preIfWhileAlgebra such that
A1: A is free;
  let C,I1,I2,D,J1,J2 be Element of A;
A2: 3 in dom the charact of A by Def12;
A3: dom Den(In(3, dom the charact of A), A) = 3-tuples_on the carrier of A
  by Th47;
A4: In(3, dom the charact of A) = 3 by A2,SUBSET_1:def 8;
A5: 4 in dom the charact of A by Def13;
A6: dom Den(In(4, dom the charact of A), A) = 2-tuples_on the carrier of A
  by Th48;
A7: In(4, dom the charact of A) = 4 by A5,SUBSET_1:def 8;
A8: <*C,I1,I2*> in 3-tuples_on the carrier of A by FINSEQ_2:139;
A9: <*D,J1,J2*> in 3-tuples_on the carrier of A by FINSEQ_2:139;
A10: rng <*C,I1,I2*> = {C,I1,I2} by FINSEQ_2:128;
  then
A11: C in rng <*C,I1,I2*> by ENUMSET1:def 1;
A12: I1 in rng <*C,I1,I2*> by A10,ENUMSET1:def 1;
  I2 in rng <*C,I1,I2*> by A10,ENUMSET1:def 1;
  hence if-then-else(C,I1,I2) <> C & if-then-else(C,I1,I2) <> I1 &
  if-then-else(C,I1,I2) <> I2 by A1,A3,A8,A11,A12,Th38;
  <*D,J1*> in 2-tuples_on the carrier of A by FINSEQ_2:137;
  hence if-then-else(C,I1,I2) <> while(D,J1) by A1,A3,A4,A6,A7,A8,Th36;
  assume if-then-else(C,I1,I2) = if-then-else(D,J1,J2);
  then <*C,I1,I2*> = <*D,J1,J2*> by A1,A3,A8,A9,Th36;
  hence thesis by FINSEQ_1:78;
end;

theorem Th75:
  for A being preIfWhileAlgebra st A is free for C,I,D,J being Element of A
  holds while(C,I) <> C & while(C,  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  (    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
proof
  let A be preIfWhileAlgebra such that
:is
  let C,* vol D1)def6
 dom DenIn4domthe charactofA), A  2-ofA
  by Th48;
A3: <*C,I*> in 2-tuples_on the carrier of A by FINSEQ_2:137;
A4: <*D,J*> in     = Sum (upper_volume(f,)by ,A1,2,NTEGRA3:3A5
A5: rng <*C     java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 61
  then
A6: C in rng <*C,I*> upper_bound divset,) =D byJORDAN5A:;
  I in rng <*C,I*> by A5,TARSKI:def 2;
   java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 32
  assume while(C,I) = while(D,J);
  then <*C     lower_volumefD)
  hence thesis by FINSEQ_1:77;
end;

registration
  cluster free -> <= (upper_volume(f TD)i
  coherence
  
    let A be preIfWhileAlgebra;
    assume
A1: A is free;
    then reconsider A9 = A as free Universal_Algebra;
    for   iindom.in(9i) d 2
     A=  by Th34;
    hence java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 8
    thus:inrng (|divset(,) by A5,PARTFUN1:def 6;
    not ex I1,I2 be Element of A st I1 <> EmptyIns A & I1\;I2 = I2 or    rng f|divset(i)java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 72
    I2 <0< divsetDi)by9
( >A   >A) &I1\I2= java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 64
    by A1,Th72         A1;
    thus thesis by A1,Th72,Th73,Th74;
  end;
end;

registration
inon -free
    strict for preIfWhileAlgebra;
   
  proof
    set    =Sumf,java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 41
    take FreeUnivAlgNSG(ECIWdom TD=SegTDbydef
    thus thesis;. lower_volume(,TD :ef3 then
  end;
end;

definition
  mode IfWhileAlgebra is
    non degenerated well_founded ECIW-strict preIfWhileAlgebra;
end;

registration
  let A be infinite preIfWhileAlgebra;
  cluster ElementaryInstructions A -> infinite;
  java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 23

theorem Th76:
  for A being preIfWhileAlgebra for B being Subset of A for n being Nat holds
  EmptyIns A in B|^(n+1) & for C,I1,I2 being Element of A
  st C B|^ & I1  B^   in^
  holds I1\;I2 in B|^(n+1) & if-then-java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 16
  while(C,I1) in B|^(n+1)
proof
  let A be preIfWhileAlgebra;
  let Bjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 59
letn
  set X = {Den(o,A).p where o is (Element of dom the charact of A),
  p is Element of (the carrier     o   INTEGRA1: 3;
A1: B|^(n    java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
 carrier A)*
  by FINSEQ_1:def 11;
A2: pe in {{}} by TARSKI: < lower_boundX2+e  A16def2;
A3: rng pe = {};
A4: dom Den(In(1, dom the charact of reconsider as  by: 3java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
  {} c= B|^n;
  EmptyIns A in X by A2,A3,A4;
  hence EmptyIns
  let C,I1,I2 be Element of A;
  assume
A5: C in B|^n;
  assume
A6: I1 in B|^n;
  assume
A7: I2 in B|^n;
A8: <*I1,I2*> in 2-tuples_on the carrier of A by FINSEQ_2:137;
A9: rng <*I1,I2*> = {I1,I2} by java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 27
A10: dom Den(In(       ;
  A29:x4. <> lower_bound I
^byA7Z32
thenI1;inXbyA8,,;
  hence I1\;I2 in B|^(n+1) by A1,XBOOLE_0:def 3;
A11: <*C,I1,I2*> in 3-tuples_on the carrier of A by FINSEQ_2:139;
A12: rng <*C,I1,I2*> = {C,I1,I2} by FINSEQ_2:128;
A13: dom Den(In(3, dom the charact of A), A) = 3-tuples_on the carrier of A
  by Th47;
  {C,I1,I2} c= B|^n by A5,A6,A7,ZFMISC_1:133;
  then if-then-else(C,I1,I2) in X by A11,A12,A13;
  hence if-then-else(C,I1,I2) in B|^(n+1) by A1,XBOOLE_0:def 3;
A14: <*C,I1*> in 2-tuples_on the carrier of A by FINSEQ_2:137;
A15: rng <*C,I1*> = {C,I1} by FINSEQ_2:127;
A16: dom Den(In(4, dom the charact of A), A) = 2-tuples_on the carrier of A
  by Th48;
  {C,I1} c= B|^n by A5,A6,ZFMISC_1:32;
  then while(C,I1) in X by A14,A15,A16;
  hence thesis by A1,XBOOLE_0:def 3;
end;

theorem Th77:
  for A being ECIW-strict preIfWhileAlgebra
  for x being set, n being Nat st x in (ElementaryInstructions A)|^(n+1)
  holds x in (ElementaryInstructions A)|^n or x = EmptyIns A or
  (ex I1,I2 being Element of A st x = I1\;I2 &
  I1 in (ElementaryInstructions A)|^n & I2 in (ElementaryInstructions A)|^n) or
  (ex C,I1,I2 being Element of A st x = if-then-else(C,I1,I2) &
  C in (ElementaryInstructions A)|^n &
  I1 in (ElementaryInstructions A)|^n & I2 in (ElementaryInstructions A)|^n) or
  ex C,I being Element of A st x = while(C,I) &
             2- 1 = lenx/1)+ )  byXREAL_19
proof
  letA ECIW-
  set B = ElementaryInstructions A;
  let x be set;
          java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 56
  assume
A1: x in B|^(n+1);
  then reconsider I = x as Element of A;
  assume
A2: x nin B|^n;
  assume
A3: x <> EmptyIns A;
  assume
A4: not ex I1,I2 being Element of A st x = I1\;I2 & I1 in B|^n & I2 in B|^n;
  assume
A5: not ex C,I1,I2 being Element of A st x = if-then-else(C,I1,I2) &
  C in B|^n & I1 in B|^n & I2 in B|^n;
  B|^(n+1) = B|^n\/{Den(o,A).p where o is (Element of dom the charact of A),
   t carrier of A* ino,A    =B^n}
  by Th19;
  then x in {Den(o,A).p where o is (Element of dom the charact of A),
   of A)*: p in  Den(A  rng p c= B|^n}
  by A1,A2,XBOOLE_0:def 3;
  then consider reserve jauge forpositive-ielding Functionof IR;
  p being java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 10
A6:I  Den(,)p and
A7: p in dom by FUNCT_3def 3
A8  c= |n
  reconsider no = o as java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 6
  reconsider oo = Den(o,A) as  jauge = r (#) chi(I,I) & D ijauge-fine
  len signature A = len the charact  
  then
A9: dom signature A = domA9: dom signaturet
A10: p=arity oo A7,ARGREL1:java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    .= (signature A).no by A9,:D D9T9  i     D9
    .= ECIW-signature.o by Def27;
A11: 1 in Seg 2;
A12: 2 in Seg 2;
A13: 1 in Seg 3;
:D.iinI A63;
A15: 3 in Seg 3;
p java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 20
  suppose
 o=1;
  }by A10,
    hence thesis by A3,(division_of)i < r
  end;
  suppose
A17: o = 2;
    then
A18: p = <*p.1,p.2*> by A10,Th54,FINSEQ_1:44;
A19: dom p = Seg 2 by A10,A17      java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
    then
A20: p.1 in rng p by A11,FUNCT_1:def 3;
A21: p.2 in rng p by A12,A19,FUNCT_1:def 3;
    then reconsider I1 = p.1, I2 = p.2 as Element of A by A20;
    I = I1\;I2 by A6,A17,A18;
    hence thesis by A4,A8,A20,A21;
  end;
  suppose
A22: o = 3;
    then
A23: p = <*p.1,p.2,A14: r <max D)  INTEGRA3: java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
A24: dom p = Seg 3 by A10,A22,Th54, sup rng upper_volume(g,division_of java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 65
    then
A25: p.1 in rng p by A13,FUNCT_1:def 3;
A26: p end
A27: p.3 in rng p by A15,A24,FUNCT_1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    then reconsider C = p.1, I1 = p.2, I2 = p.3 as Element of A by A25
I -C,, byA22,A23;
   java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 38
  end;
  suppose
: o = 4;
    then
A29: p = <*       Seglenupper_volumefD  :def java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
A30: dom p = Seg reconsider   xasNat by java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    then
A31: p.1 in rng p by A11,FUNCT_1:def 3;
A32 java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 27
thenjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 62
    I = while(I1,I2) by A6,A28,A29;
    hence thesis by A8,A31,A32;
  ;
end;

theorem
  for A being Universal_Algebra for |.r )- rng ).  
  olds Constants  =B^1
proof
  let A be Universal_Algebra;
  let B be Subset of A;
  let x be object;
  assume x in Constants A;
  then consider a being Element of A such that
A1: x = a and
A2: ex o being Element of Operations A st arity o = 0 & a in rng o;
o java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 52
A3: arity o = 0 and
A4: a in rng o by A2
    (for i bfori being st indom   r <=p)&
A5: s in dom o and
A6: a =let  REALjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  consider z being object such that
A7: z in dom the charact of A and
A8: o = (the charact of A).z by FUNCT_1:def 3;
  reconsider z as Element of dom the charact of A by A7;
A9: Den(z,A) = o by A8;
A10: s is Element of 0-tuples_on the carrier of A by A3,A5,MARGREL1:22;
  reconsider s as Element of (the carrier of A)* by A5;
  rng s c= B by A10;
  then
A11: x in {Den(r,A).p where r is (Element of dom the charact of A),
  p is Element of (the carrier of A)*: p in dom Den(r,      =r 
  by A1,A5,A6,A9;
  B|^0 = B by Th18;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  A), p is Element of (the carrier of A)*: p in dom Den(r,hencejava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
  by Th19;
  hence thesis by A11,XBOOLE_0:def 3;


:
  AbeingpreIfWhileAlgebra is well_foundediff
forIbeing Element  exn in ( A|n
     by Th30;

scheme StructInd{ A() -> well_founded ECIW-strict preIfWhileAlgebra,
  Ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
provided
A1: for I being Element of A()      consider i0 be Nat such that
and
A2: P[EmptyIns A()] and
A3  ,  A)stPI1]&P]holds PI1\;2 
A4: for C,      divset(,i0    ,,,java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 55
holds P[if-then-else(C,I1,I2)] and
A5: for C,I being Element of A() st P[C] & Pnow
proof
  set A = A();
A6: ex n being Nat st ( I() in (ElementaryInstructions A())|^n) by Th79;
  defpred Q[Nat] means for I being Element of A()
  st I in (ElementaryInstructions A())|^$1 holds P[I];
  (ElementaryInstructions A())|^0 = ElementaryInstructions A() by Th18;
  then
A7: Q[0] by A1;
A8: now
    let n be Nat;
    assume
A9: Q[n];
    thus Q[n+1]
    proof
      let I be Element of A();
      
A10:  I in (ElementaryInstructions A()           percases XXREAL_01;
      per cases by A10,Th77;
      suppose I in (java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 64
        hence thesis by A9;
      end;
      suppose      byA6A220
       thesisA2;
      end;
 I1\I2&
        I1 in (ElementaryInstructions A)|^n &
        I2               Di)  i0 19;
        then consider I1,I2 being Elementhencedivset1 = [D.1,D1]by ,,java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 70
A11:    I = I1\;I2 and
A12:    I1 in (ElementaryInstructions A)|^n and
A13assume
A14:    P[I1]A10    java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 22
A9
        =0;
      ;
      
     thenCI1I2 &
 A|n&
          (java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 45
        I2(java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 44
then,I2 beingofA that
A15:    I = if-  divset(D,1) = [(,)  ..D. java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 55
A16:    C in (ElementaryInstructions java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 65
A17:    I1 in (ElementaryInstructions A)|^n and
:I2in(java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 44
A19:    PthenI=D<java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 61
A20:    
        P[I2] by A9,A18;
        hence let f be bounded integrable Function of I,REAL;
      end;
      suppose ex C,J being Element of A st I = java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 20
        C in (ElementaryInstructions A)|^n &
        J in (ElementaryInstructions A)|^n;
        then       then integral f = r * integral g by A2,A4,INTEGRA2:31;
A21:    I = while(C,J) and
A22:    C in (ElementaryInstructions A)|^n and
A23:    J in (ElementaryInstructions A)|^n;
A24:    P[C] by A9,A22;
        P[J] by A9,A23;
        hence thesis by A5,A21,A24;
      end;
    end;
  end;
  for n being Nat holds Q[n] from NAT_1:sch 2(A7,A8);
  hence thesis by A6;
end;

begin :: Execution function

definition
  let A be preIfWhileAlgebra;
  let S be non empty set; :: states
  let f        .< java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 34
  attr f is complying_with_empty-instruction means
  :
Def28 sofholds(,A  
  attr f is complying_with_catenation means
  : Def29:
  for s being Element of S
  for I1,I2 being Element of A holds f.(s,I1 \  (,)/    
end;

definition
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
  let S be non empty set; :: states
 Subset  S:: true states
f  java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 50
  pred f A15:        D <=D9 and
   for s being Element of S for C, I1,I2 being Element of A holds
  (f.(s,C) in T implies f.(s,if-then-else        (,java.lang.StringIndexOutOfBoundsException: Range [38, 35) out of bounds for length 55
f.s,) nin.(,-else,,)=f.f(,C,);
 java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 40
   for s being Element of S for Cf,java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 58
 f(,whileCI)= f(f(.s,)I,CI) &
   fIis 
end;


  for         =):def17java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  st f is complying_with_empty-instruction & f complies_with_if_wrt T
  for s being Element of S holds
  f.(s,C) nin byINTEGRA1def 16;
proof
  let f be Function of [:S, the carrier of A:], S such             
A1: f is complying_with_empty-instruction and
:  java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 29
  let s be Element of S;
  assume f.( | f-java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 71
hence.si-I))=f((sC)java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 57
.=.(C)by ;
;

theorem Th81:
  pr10< TD)by9;
  A33:        |. lower_sum(f,division_of TD) - J .| <= epsilon
  pr1(S, the carrier of  (  / 2)-lower_sum(d java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
  pr1(S, the carrier of A                    XXREAL_0
proof
set   S ofA;
  thus
for being f.( java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 72
  hereby
    let s be Element of S;
    let I1,I2 be Element of A;
    thus f.(s,I1                    + (java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 59
      .= f.(s,I1) by FUNCT_3:def 4
     . .f(s,)I2 byjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 42
  end;
  hereby
    let s be Element of java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
    let C, I1,I2 be Element of A;
    f.(s,if-then-else(C,I1,I2)) = s by FUNCT_3:endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      .= f.(s,C) by FUNCT_3:def 4;
    hence
    (f.(s,C) in T implies f.(s,if-then-else(C,I1,I2)) = f.(f.(s,C),I1))
    & (f.(s,C) nin T implies f.(s,if-then-else(C,I1,I2)) = f.(f.(s,C),I2))
    by FUNCT_3:def 4;
  end;
  let s be Element of S;
  let C, I be Element of A;
  f.(s,C) = s by FUNCT_3:def 4;
  hence thesis by FUNCT_3:def 4;
end;

definition
  let A be preIfWhileAlgebra;
  let S be non empty set; :: states
  let T be Subset of S;   :: true states
  mode ExecutionFunction of A,S,T -> Function of [:S, the carrier of A:], S
    means
    : Def32:
    it is complying_with_empty-instruction &
    it is complying_with_catenation & it complies_with_if_wrt T &
    it complies_with_while_wrt T;
  existence
  proof
    take pr1(S, the carrier of A);
    thus thesis by Th81;
  end;
end;

registration
  let A be preIfWhileAlgebra;
  let S be non empty set; :: states
  let T be Subset of S;   :: true states
  cluster -> complying_with_empty-instruction complying_with_catenation
    for ExecutionFunction of A,S,T;
  coherence by Def32;
end;

definition
  let A be preIfWhileAlgebra;
  let I be Element of A;
  let S be non empty set; :: states
  let s be Element of S;
  let T be Subset of S;   :: true states
  let f be ExecutionFunction of A, S, T;

:: iteration of I started in s terminates wrt f
  pred f iteration_terminates_for I,s means
   ex r being non empty FinSequence of S st r.1 = s & r.len r nin T &
  for i being Nat st 1 <= i & i < len r holds r.i in T & r.(i+1) = f.(r.i, I);
end;

definition
  let A be preIfWhileAlgebra;
  let I be Element of A;
  let S be non empty set; :: states
  let s be Element of S;
  let T be Subset of S;   :: true states
  let f be ExecutionFunction of A, S, T;
  func iteration-degree(I,s,f) -> R_eal means
  :
  Def34: ex r being non empty FinSequence of S st
  it = (len r)-1 & r.1 = s & r.len r nin T &
  for i being Nat st 1 <= i & i < len r holds r.i in T & r.(i+1) = f.(r.i, I)
  if f iteration_terminates_for I,s otherwise it = +infty;
  correctness
  proof
A1: now
      assume f iteration_terminates_for I,s;
      then consider r being non empty FinSequence of S such that
A2:   r.1 = s and
A3:   r.len r nin T and
A4:   for i being Nat st 1 <= i & i < len r holds r.i in T & r.(i+1) = f.(
      r.i, I);
      reconsider x = (len r)-1 as R_eal by XXREAL_0:def 1;
      take x, r;
      thus x = (len r)-1 & r.1 = s & r.len r nin T &
      for i being Nat st 1 <= i & i < len r
      holds r.i in T & r.(i+1) = f.(r.i, I) by A2,A3,A4;
    end;
    now
      let d1, d2 be R_eal;
      given r1 being non empty FinSequence of S such that
A5:   d1 = (len r1)-1 and
A6:   r1.1 = s and
A7:   r1.len r1 nin T and
A8:   for i being Nat st 1 <= i & i < len r1 holds r1.i in T & r1.(i+1) =
      f.(r1.i, I);
      given r2 being non empty FinSequence of S such that
A9:   d2 = (len r2)-1 and
A10:  r2.1 = s and
A11:  r2.len r2 nin T and
A12:  for i being Nat st 1 <= i & i < len r2 holds r2.i in T & r2.(i+1) =
      f.(r2.i, I);
      defpred P[Nat] means
      $1 < len r1 implies $1 < len r2 & r1.($1+1) = r2.($1+1);
A13:  P[0] by A6,A10;
A14:  now
        let i be Nat;
        assume
A15:    P[i];
        thus P[i+1]
        proof
          assume
A16:      i+1 < len r1;
A17:      1 <= i+1 by NAT_1:11;
          then
A18:      r1.(i+1+1) = f.(r1.(i+1), I) by A8,A16;
A19:      r1.(i+1) in T by A8,A16,A17;
          i+1 <= len r2 by A15,A16,NAT_1:13;
          hence i+1 < len r2 by A11,A15,A16,A19,NAT_1:13,XXREAL_0:1;
          hence r1.(i+1+1) = r2.(i+1+1) by A12,A15,A16,A17,A18,NAT_1:13;
        end;
      end;
A20:  for i being Nat holds P[i] from NAT_1:sch 2(A13,A14);
      consider i being Nat such that
A21:  len r1 = i+1 by NAT_1:6;
      reconsider i as Element of NAT by ORDINAL1:def 12;
      i < len r1 by A21,NAT_1:13;
      then
A22:  r1.len r1 = r2.len r1 by A20,A21;
A23:  1 <= len r1 by A21,NAT_1:11;
A24:  len r1 <= len r2 by A20;
      len r2 <= len r1 by A7,A12,A22,A23;
      hence d1 = d2 by A5,A9,A24,XXREAL_0:1;
    end;
    hence thesis by A1;
  end;
end;

reserve f for ExecutionFunction of A,S,T;

theorem
  f iteration_terminates_for I,s iff iteration-degree(I,s,f) < +infty
proof
  hereby
    assume f iteration_terminates_for I,s;
    then consider r being non empty FinSequence of S such that
A1: iteration-degree(I,s,f) = (len r)-1 and r.1 = s
    and r.len r nin T
    and for i being Nat st 1 <= i & i < len r holds r.i in T & r.(i+1) = f.(
    r.i, I)
    by Def34;
    (len r)-1 in REAL by XREAL_0:def 1;
    hence iteration-degree(I,s,f) < +infty by A1,XXREAL_0:9;
  end;
  thus thesis by Def34;
end;

theorem Th83:
  s nin T implies f iteration_terminates_for I,s & iteration-degree(I,s,f) = 0
proof
  assume
A1: s nin T;
  set r = <*s*>;
A2: r.1 = s;
A3: len r = 1 by FINSEQ_1:40;
A4: for i being Nat st 1 <= i & i < len r
  holds r.i in T & r.(i+1) = f.(r.i, I) by FINSEQ_1:40;
A5: 1-1 = 0.;
  thus f iteration_terminates_for I,s
  proof
    take <*s*>;
    thus thesis by A1,A2,FINSEQ_1:40;
  end;
  hence thesis by A1,A2,A3,A4,A5,Def34;
end;

theorem
  s in T implies
  (f iteration_terminates_for I,s iff f iteration_terminates_for I, f.(s,I)) &
  iteration-degree(I,s,f) = 1.+iteration-degree(I,f.(s,I),f)
proof
  assume
A1: s in T;
  thus
A2: f iteration_terminates_for I,s iff f iteration_terminates_for I, f.(s,I)
  proof
    thus f iteration_terminates_for I,s implies
    f iteration_terminates_for I, f.(s,I)
    proof
      given r being non empty FinSequence of S such that
A3:   r.1 = s and
A4:   r.len r nin T and
A5:   for i being Nat st 1 <= i & i < len r
      holds r.i in T & r.(i+1) = f.(r.i, I);
      consider r1 being (Element of S), q being FinSequence of S such that
      r1 = r.1 and
A6:   r = <*r1*>^q by FINSEQ_3:102;
A7:   len r = 1+len q by A6,FINSEQ_5:8;
      then reconsider q as non empty FinSequence of S by A1,A3,A4;
      len r >= 1 by A7,NAT_1:11;
      then
A8:   1 < len r by A1,A3,A4,XXREAL_0:1;
A9:   len q >= 0+1 by NAT_1:13;
      take q;
A10:  len <*r1*> = 1 by FINSEQ_1:40;
      1 in dom q by A9,FINSEQ_3:25;
      hence q.1 = r.(1+1) by A6,A10,FINSEQ_1:def 7
        .= f.(s,I) by A3,A5,A8;
      len q in dom q by A9,FINSEQ_3:25;
      hence q.len q nin T by A4,A6,A7,A10,FINSEQ_1:def 7;
      let i be Nat;
      assume that
A11:  1 <= i and
A12:  i < len q;
A13:  i in dom q by A11,A12,MSUALG_8:1;
A14:  1 <= i+1 by NAT_1:11;
A15:  i+1 < len r by A7,A12,XREAL_1:6;
A16:  i+1 in dom q by A11,A12,MSUALG_8:1;
A17:  r.(i+1) = q.i by A6,A10,A13,FINSEQ_1:def 7;
      r.(i+1+1) = q.(i+1) by A6,A10,A16,FINSEQ_1:def 7;
      hence thesis by A5,A14,A15,A17;
    end;
    given q being non empty FinSequence of S such that
A18: q.1 = f.(s,I) and
A19: q.len q nin T and
A20: for i being Nat st 1 <= i & i < len q
    holds q.i in T & q.(i+1) = f.(q.i, I);
    take r = <*s*>^q;
A21: len <*s*> = 1 by FINSEQ_1:40;
    thus
A22: r.1 = s by FINSEQ_1:41;
A23: len r = 1+len q by FINSEQ_5:8;
A24: 0+1 <= len q by NAT_1:13;
    then len q in dom q by FINSEQ_3:25;
    hence r.len r nin T by A19,A21,A23,FINSEQ_1:def 7;
    let i be Nat;
    assume that
A25: 1 <= i and
A26: i < len r;
    consider j being Nat such that
A27: i = 1+j by A25,NAT_1:10;
    per cases;
    suppose
A28:  j = 0;
      1 in dom q by A24,FINSEQ_3:25;
      hence thesis by A1,A18,A21,A22,A27,A28,FINSEQ_1:def 7;
    end;
    suppose j > 0;
      then
A29:  j >= 0+1 by NAT_1:13;
A30:  j < len q by A23,A26,A27,XREAL_1:6;
A31:  j in dom q by A29,A30,MSUALG_8:1;
A32:  j+1 in dom q by A29,A30,MSUALG_8:1;
A33:  r.(j+1) = q.j by A21,A31,FINSEQ_1:def 7;
      r.(j+1+1) = q.(j+1) by A21,A32,FINSEQ_1:def 7;
      hence thesis by A20,A27,A29,A30,A33;
    end;
  end;
  per cases by A2;
  suppose
A34: not f iteration_terminates_for I,s;
    then
A35: iteration-degree(I,s,f) = +infty by Def34;
    iteration-degree(I,f.(s,I),f) = +infty by A2,A34,Def34;
    hence thesis by A35,XXREAL_3:def 2;
  end;
  suppose
 f iteration_terminates_for I,f.(s,I);
    then consider q being non empty FinSequence of S such that
A36: iteration-degree(I,f.(s,I),f) = (len q)-1 and
A37: q.1 = f.(s,I) and
A38: q.len q nin T and
A39: for i being Nat st 1 <= i & i < len q
    holds q.i in T & q.(i+1) = f.(q.i, I) by Def34;
    set r = <*s*>^q;
A40: len <*s*> = 1 by FINSEQ_1:40;
A41: r.1 = s by FINSEQ_1:41;
A42: len r = 1+len q by FINSEQ_5:8;
    1+((len q)-1) = len q;
    then
A43: (len r)-1 = 1.+iteration-degree(I,f.(s,I),f) by A36,A42,XXREAL_3:def 2;
A44: 0+1 <= len q by NAT_1:13;
    then len q in dom q by FINSEQ_3:25;
    then
A45: r.len r nin T by A38,A40,A42,FINSEQ_1:def 7;
    now
      let i be Nat;
      assume that
A46:  1 <= i and
A47:  i < len r;
      consider j being Nat such that
A48:  i = 1+j by A46,NAT_1:10;
      per cases;
      suppose
A49:    j = 0;
        1 in dom q by A44,FINSEQ_3:25;
        hence r.i in T & r.(i+1) = f.(r.i,I)
        by A1,A37,A40,A41,A48,A49,FINSEQ_1:def 7;
      end;
      suppose j > 0;
        then
A50:    j >= 0+1 by NAT_1:13;
A51:    j < len q by A42,A47,A48,XREAL_1:6;
A52:    j in dom q by A50,A51,MSUALG_8:1;
A53:    j+1 in dom q by A50,A51,MSUALG_8:1;
A54:    r.(j+1) = q.j by A40,A52,FINSEQ_1:def 7;
        r.(j+1+1) = q.(j+1) by A40,A53,FINSEQ_1:def 7;
        hence r.i in T & r.(i+1) = f.(r.i,I) by A39,A48,A50,A51,A54;
      end;
    end;
    hence thesis by A2,A41,A43,A45,Def34;
  end;
end;

theorem
  iteration-degree(I,s,f) >= 0 proof per cases;
  suppose not f iteration_terminates_for I,s;
    hence thesis by Def34;
  end;
  suppose f iteration_terminates_for I,s;
    then consider r being non empty FinSequence of S such that
A1: iteration-degree(I,s,f) = (len r)-1 and r.1 = s
    and r.len r nin T
    and for i being Nat st 1 <= i & i < len r holds r.i in T & r.(i+1) = f.(
    r.i, I)
    by Def34;
    ex i being Nat st len r = i+1 by NAT_1:6;
    hence thesis by A1;
  end;
end;

scheme Termination {A() -> preIfWhileAlgebra, I() -> (Element of A()),
  S() -> non empty set, s() -> (Element of S()), T() -> Subset of S(),
  f() -> ExecutionFunction of A(),S(),T(), F(set) -> Nat, P[set] }:
  f() iteration_terminates_for I(),s()
provided
A1: s() in T() iff P[s()] and
A2: for s being Element of S() st P[s]
holds (P[f().(s,I())] iff f().(s,I()) in T()) & F(f().(s,I())) < F(s)
proof
  per cases;
  suppose s() nin T();
    hence thesis by Th83;
  end;
  suppose
A3: s() in T();
    deffunc F(set,set) = f().(In($2,S()),I());
    consider f being sequence of S() such that
A4: f.0 = s() and
A5: for i being Nat holds f.(i+1) = F(i,f.i) from NAT_1:sch 12;
    defpred Q[Nat] means ex i being Element of NAT st F(f.i) = $1;
    F(f.0) in NAT by ORDINAL1:def 12;
    then
A6: ex j being Nat st Q[j];
    consider j being Nat such that
A7: Q[j] & for i being Nat st Q[i] holds j <= i from NAT_1:sch 5(A6);
    consider i0 being Element of NAT such that
A8: F(f.i0) = j by A7;
    defpred R[Nat] means not P[f.$1];
    In(f.i0,S()) = f.i0;
    then f.(i0+1) = f().(f.i0,I()) by A5;
    then P[f.i0] implies F(f.(i0+1)) < j by A2,A8;
    then
A9: ex i being Nat st R[i] by A7;
    consider j being Nat such that
A10: R[j] & for i being Nat st R[i] holds j <= i from NAT_1:sch 5(A9);
    deffunc G(Nat) = f.($1-'1);
    consider p being FinSequence of S() such that
A11: len p = j+1 & for i being Nat st i in dom p holds p.i = G(i)
    from FINSEQ_2:sch 1;
A12: dom p = Seg(j+1) by A11,FINSEQ_1:def 3;
    reconsider p as non empty FinSequence of S() by A11;
    take p;
A13: 1 <= j+1 by NAT_1:11;
    then 1 in Seg(j+1);
    hence p.1 = G(1) by A11,A12
      .= s() by A4,XREAL_1:232;
    len p in Seg(j+1) by A11,A13;
    then
A14: p.len p = G(j+1) by A11,A12
      .= f.j by NAT_D:34;
    j > 0 by A1,A3,A4,A10;
    then j >= 0+1 by NAT_1:13;
    then consider j9 being Nat such that
A15: j = 1+j9 by NAT_1:10;
    reconsider j9 as Element of NAT by ORDINAL1:def 12;
A16: f.j = f().(In(f.j9,S()),I()) by A5,A15;
    j9 < j by A15,NAT_1:13;
    then
    P[f.j9] by A10;
    hence p.len p nin T() by A2,A10,A14,A16;
    let i be Nat;
    assume that
A18: 1 <= i and
A19: i < len p;
A20: i+1 >= 1 by A18,NAT_1:13;
A21: i+1 <= len p by A19,NAT_1:13;
A22: i in Seg(j+1) by A11,A18,A19;
A23: i+1 in Seg(j+1) by A11,A20,A21;
A24: p.i = G(i) by A11,A12,A22;
A25: p.(i+1) = G(i+1) by A11,A12,A23;
    consider i9 being Nat such that
A26: i = 1+i9 by A18,NAT_1:10;
    reconsider i9 as Element of NAT by ORDINAL1:def 12;
    i <= j by A11,A19,NAT_1:13;
    then
A27: i9 < j by A26,NAT_1:13;
    then
A28: P[f.i9] by A10;
A29: i-'1 = i9 by A26,NAT_D:34;
A30: i+1-'1 = i by NAT_D:34;
A31: In(f.i9,S()) = f.i9;
    now
      assume i9 <> 0;
      then i9 >= 0+1 by NAT_1:13;
      then consider i99 being Nat such that
A32:  i9 = 1+i99 by NAT_1:10;
      reconsider i99 as Element of NAT by ORDINAL1:def 12;
      i99 <= i9 by A32,NAT_1:11;
      then i99 < j by A27,XXREAL_0:2;
      then
A33:  P[f.i99] by A10;
      f.i9 = F(i99,f.i99) by A5,A32;
      hence p.i in T() by A2,A24,A28,A29,A33;
    end;
    hence thesis by A3,A4,A5,A24,A25,A26,A29,A30,A31;
  end;
end;

scheme Termination2 {A() -> preIfWhileAlgebra, I() -> (Element of A()),
  S() -> non empty set, s() -> (Element of S()), T() -> Subset of S(),
  f() -> ExecutionFunction of A(),S(),T(), F(set) -> Nat, P,R[set] }:
  f() iteration_terminates_for I(),s()
provided
A1: P[s()] and
A2: s() in T() iff R[s()] and
A3: for s being Element of S() st P[s] & s in T() & R[s]
holds P[f().(s, I())] & (R[f().(s,I())] iff f().(s,I()) in T()) &
F(f().(s,I())) < F(s)
proof
  per cases;
  suppose s() nin T();
    hence thesis by Th83;
  end;
  suppose
A4: s() in T();
    deffunc F(set,set) = f().(In($2,S()),I());
    consider f being sequence of S() such that
A5: f.0 = s() and
A6: for i being Nat holds f.(i+1) = F(i,f.i) from NAT_1:sch 12;
    defpred Q[Nat] means ex i being Element of NAT st F(f.i) = $1;
    F(f.0) in NAT by ORDINAL1:def 12;
    then
A7: ex j being Nat st Q[j];
    consider j being Nat such that
A8: Q[j] & for i being Nat st Q[i] holds j <= i from NAT_1:sch 5(A7);
    consider i0 being Element of NAT such that
A9: F(f.i0) = j by A8;
    defpred notR[Nat] means not (P[f.$1] & f.$1 in T() & R[f.$1]);
    In(f.i0,S()) = f.i0;
    then f.(i0+1) = f().(f.i0,I()) by A6;
    then not notR[i0] implies F(f.(i0+1)) < j by A3,A9;
    then
A10: ex i being Nat st notR[i] by A8;
    consider j being Nat such that
A11: notR[j] & for i being Nat st notR[i] holds j <= i from NAT_1:sch 5(A10
    );
    deffunc G(Nat) = f.($1-'1);
    consider p being FinSequence of S() such that
A12: len p = j+1 & for i being Nat st i in dom p holds p.i = G(i)
    from FINSEQ_2:sch 1;
A13: dom p = Seg(j+1) by A12,FINSEQ_1:def 3;
    reconsider p as non empty FinSequence of S() by A12;
    take p;
A14: 1 <= j+1 by NAT_1:11;
    then 1 in Seg(j+1);
    hence p.1 = G(1) by A12,A13
      .= s() by A5,XREAL_1:232;
    len p in Seg(j+1) by A12,A14;
    then
A15: p.len p = G(j+1) by A12,A13
      .= f.j by NAT_D:34;
    j > 0 by A1,A2,A4,A5,A11;
    then j >= 0+1 by NAT_1:13;
    then consider j9 being Nat such that
A16: j = 1+j9 by NAT_1:10;
    reconsider j9 as Element of NAT by ORDINAL1:def 12;
A17: f.j = f().(In(f.j9,S()),I()) by A6,A16;
A18: j9 < j by A16,NAT_1:13;
    then
A19: R[f.j9] by A11;
A20: f.j9 in T() by A11,A18;
    P[f.j9] by A11,A18;
    hence p.len p nin T() by A3,A11,A15,A17,A19,A20;
    let i be Nat;
    assume that
A22: 1 <= i and
A23: i < len p;
A24: i+1 >= 1 by A22,NAT_1:13;
A25: i+1 <= len p by A23,NAT_1:13;
A26: i in Seg(j+1) by A12,A22,A23;
A27: i+1 in Seg(j+1) by A12,A24,A25;
A28: p.i = G(i) by A12,A13,A26;
A29: p.(i+1) = G(i+1) by A12,A13,A27;
    consider i9 being Nat such that
A30: i = 1+i9 by A22,NAT_1:10;
    reconsider i9 as Element of NAT by ORDINAL1:def 12;
    i <= j by A12,A23,NAT_1:13;
    then
A31: i9 < j by A30,NAT_1:13;
A32: i-'1 = i9 by A30,NAT_D:34;
A33: i+1-'1 = i by NAT_D:34;
    In(f.i9,S()) = f.i9;
    hence thesis by A6,A11,A28,A29,A30,A31,A32,A33;
  end;
end;

theorem Th86:
  for r being non empty FinSequence of S st r.1 = f.(s,C) & r.len r nin T &
  for i being Nat st 1 <= i & i < len r
  holds r.i in T & r.(i+1) = f.(r.i, I \; C) holds f.(s, while(C,I)) = r.len r
proof
A1: f complies_with_while_wrt T by Def32;
  let r be non empty FinSequence of S;
  assume
A2: r.1 = f.(s,C);
  assume
A3: r.len r nin T;
  assume
A4: for i being Nat st 1 <= i & i < len r
  holds r.i in T & r.(i+1) = f.(r.i, I \; C);
  defpred P[Nat] means (len r)-$1 in dom r implies
  for q being Element of S st f.(q,C) = r.((len r)-$1)
  holds f.(q, while(C,I)) = r.len r;
A5: P[0] by A1,A3;
A6: for i being Nat st P[i] holds P[i+1]
  proof
    let i be Nat such that
A7: P[i] and
A8: (len r)-(i+1) in dom r;
    reconsider j = (len r)-(i+1) as Element of NAT by A8;
A9: j+1+i = len r;
A10: 1 <= j+1 by NAT_1:11;
A11: j+1 <= len r by A9,NAT_1:11;
A12: 1 <= j by A8,FINSEQ_3:25;
A13: j < len r by A11,NAT_1:13;
    then
A14: r.(j+1) = f.(r.j, I\;C) by A4,A12;
    let q be Element of S;
    assume
A15: f.(q,C) = r.((len r)-(i+1));
    then
A16: f.(q,C) in T by A4,A12,A13;
    r.(j+1) = f.(f.(f.(q,C), I), C) by A14,A15,Def29;
    then f.(f.(f.(q,C), I), while(C,I)) = r.len r by A7,A10,A11,FINSEQ_3:25;
    hence thesis by A1,A16;
  end;
A17: for i being Nat holds P[i] from NAT_1:sch 2(A5,A6);
A18: len r >= 0+1 by NAT_1:13;
  then consider i being Nat such that
A19: len r = 1+i by NAT_1:10;
  P[i] by A17;
  hence thesis by A2,A18,A19,FINSEQ_3:25;
end;

theorem Th87:
  for I being Element of A for s being Element of S holds
  not f iteration_terminates_for I,s iff (curry' f).I orbit s c= T
proof
  let I be Element of A;
  let s be Element of S;
  set g = (curry' f).I;
  hereby
    assume
A1: not f iteration_terminates_for I,s;
    thus g orbit s c= T
    proof
      let x be object;
      assume x in g orbit s;
      then
A2:   ex n being Element of NAT st ( x = iter(g, n).s)&( s in dom iter(g, n));
      defpred P[Nat] means iter(g,$1).s nin T;
      assume x nin T;
      then
A3:   ex n being Nat st P[n] by A2;
      consider n being Nat such that
A4:   P[n] & for m being Nat st P[m] holds n <= m from NAT_1:sch 5(A3);
      deffunc F(Nat) = iter(g,$1-'1).s;
      consider r being FinSequence such that
A5:   len r = n+1 & for k being Nat st k in dom r holds r.k = F(k)
      from FINSEQ_1:sch 2;
      rng r c= S
      proof
        let a be object;
        assume a in rng r;
        then consider b being object such that
A6:     b in dom r and
A7:     a = r.b by FUNCT_1:def 3;
        reconsider b as Element of NAT by A6;
        r.b = iter(g,b-'1).s by A5,A6;
        hence thesis by A7;
      end;
      then reconsider r as non empty FinSequence of S
      by A5,FINSEQ_1:def 4;
A8:   1 <= n+1 by NAT_1:11;
      then
A9:   1 in dom r by A5,FINSEQ_3:25;
A10:  n+1 in dom r by A5,A8,FINSEQ_3:25;
A11:  1-'1 = 0 by XREAL_1:232;
A12:  n+1-'1 = n by NAT_D:34;
A13:  iter(g,0) = id S by FUNCT_7:84;
      r.1 = F(1) by A5,A9;
      then
A14:  r.1 = s by A11,A13;
A15:  r.len r nin T by A4,A5,A10,A12;
      now
        let i be Nat such that
A16:    1 <= i and
A17:    i < len r;
        consider j being Nat such that
A18:    i = 1+j by A16,NAT_1:10;
        reconsider j as Element of NAT by ORDINAL1:def 12;
A19:    i-'1 = j by A18,NAT_D:34;
A20:    (i+1)-'1 = i by NAT_D:34;
A21:    dom curry' f = the carrier of A by FUNCT_2:def 1;
        dom g = S by FUNCT_2:def 1;
        then
A22:    g.(iter(g,j).s) = f.(iter(g,j).s, I) by A21,FUNCT_5:34;
A23:    iter(g,i) = g*iter( g,j) by A18,FUNCT_7:71;
A24:    1 <= i+1 by A16,NAT_1:13;
A25:    i+1 <= n+1 by A5,A17,NAT_1:13;
A26:    i-'1 < n by A5,A17,A18,A19,XREAL_1:6;
A27:    i in dom r by A16,A17,FINSEQ_3:25;
A28:    i+1 in dom r by A5,A24,A25,FINSEQ_3:25;
A29:    r.i = iter(g,i-'1).s by A5,A27;
        r.(i+1) = iter(g,i).s by A5,A20,A28;
        hence r.i in T & r.(i+1) = f.(r.i, I) by A4,A19,A22,A23,A26,A29,
FUNCT_2:15;
      end;
      hence contradiction by A1,A14,A15;
    end;
  end;
  assume
A30: (curry' f).I orbit s c= T;
  given r being non empty FinSequence of S such that
A31: r.1 = s and
A32: r.len r nin T and
A33: for i being Nat st 1 <= i & i < len r
  holds r.i in T & r.(i+1) = f.(r.i, I);
  defpred P[Nat] means $1+1 <= len r implies r.($1+1) in (curry' f).I orbit s;
  dom g = S by FUNCT_2:def 1;
  then
A34: P[0] by A31,Th6;
A35: for i being Nat st P[i] holds P[i+1]
  proof
    let i be Nat such that
A36: P[i] and
A37: i+1+1 <= len r;
A38: 1 <= i+1 by NAT_1:11;
A39: i+1 < len r by A37,NAT_1:13;
    then i+1 in dom r by A38,FINSEQ_3:25;
    then
A40: r.(i+1) in rng r by FUNCT_1:3;
    dom f = [:S, the carrier of A:] by FUNCT_2:def 1;
    then
A41: [r.(i+1), I] in dom f by A40,ZFMISC_1:87;
    consider n being Element of NAT such that
A42: r.(i+1) = iter((curry' f).I,n).s and s in dom iter((curry' f).I,n)
    by A36,A37,NAT_1:13;
A43: r.(i+1+1) = f.(r.(i+1), I) by A33,A38,A39
      .= (curry' f).I.(r.(i+1)) by A41,FUNCT_5:22
      .= (g*iter(g,n)).s by A42,FUNCT_2:15
      .= iter((curry' f).I,n+1).s by FUNCT_7:71;
    dom iter(g,n+1) = S by FUNCT_2:def 1;
    hence r.(i+1+1) in g orbit s by A43;
  end;
  consider i being Nat such that
A44: len r = i+1 by NAT_1:6;
  for n being Nat holds P[n] from NAT_1:sch 2(A34,A35);
  then r.(i+1) in g orbit s by A44;
  hence contradiction by A30,A32,A44;
end;

scheme InvariantSch {A() -> preIfWhileAlgebra, C,I() -> (Element of A()),
  S() -> non empty set, s() -> (Element of S()), T() -> Subset of S(),
  f() -> ExecutionFunction of A(),S(),T(), P,R[set] }:
  P[f().(s(),while(C(),I()))] & not R[f().(s(),while(C(),I()))]
provided
A1: P[s()] and
A2: f() iteration_terminates_for I()\;C(), f().(s(),C()) and
A3: for s being Element of S() st P[s] & s in T() & R[s] holds P[f().(s,I())]
and
A4: for s being Element of S() st P[s] holds
P[f().(s,C())] & (f().(s,C()) in T() iff R[f().(s,C())])
proof
  consider r being non empty FinSequence of S() such that
A5: r.1 = f().(s(),C()) and
A6: r.len r nin T() and
A7: for i being Nat st 1 <= i & i < len r holds r.i in T() & r.(i+1) = f
  ().(r.i, I()\;C())
  by A2;
A8: f().(s(), while(C(),I())) = r.len r by A5,A6,A7,Th86;
  defpred Q[Nat] means $1+1 in dom r implies P[r.($1+1)] &
  ($1+1 < len r implies R[r.($1+1)]) &
  ex q being Element of S() st P[q] & r.($1+1) = f().(q,C());
  0+1 < len r implies r.(0+1) in T() by A7;
  then
A9: Q[0] by A1,A4,A5;
A10: for n being Nat st Q[n] holds Q[n+1]
  proof
    let n be Nat;
    assume
A11: Q[n];
    assume
A12: n+1+1 in dom r;
    then
A13: n+1+1 <= len r by FINSEQ_3:25;
A14: n+1+1 >= 1 by NAT_1:11;
A15: n+1 >= 1 by NAT_1:11;
A16: n+1 < len r by A13,NAT_1:13;
    then
A17: n+1 in dom r by A15,FINSEQ_3:25;
A18: r.(n+1) in T() by A7,A15,A16;
A19: r.(n+1+1) = f().(r.(n+1), I()\;C( )) by A7,A15,A16;
    reconsider q1 = r.(n+1), q2 = r.(n+1+1) as Element of S()
    by A12,A17,DTCONSTR:2;
    reconsider q3 = f().(q1,I()) as Element of S();
A20: q2 = f().(q3, C()) by A19,Def29;
A21: P[q3] by A3,A11,A15,A16,A18,FINSEQ_3:25;
    hence P[r.(n+1+1)] by A4,A20;
    hereby
      assume n+1+1 < len r;
      then r.(n+1+1) in T() by A7,A14;
      hence R[r.(n+1+1)] by A4,A20,A21;
    end;
    take q3;
    thus thesis by A3,A11,A15,A16,A18,A19,Def29,FINSEQ_3:25;
  end;
A22: for n being Nat holds Q[n] from NAT_1:sch 2(A9,A10);
A23: len r >= 0+1 by NAT_1:13;
  then consider j being Nat such that
A24: len r = 1+j by NAT_1:10;
A25: j+1 in dom r by A23,A24,FINSEQ_3:25;
  hence P[f().(s(),while(C(),I()))] by A8,A22,A24;
  ex q being Element of S() st P[q] & r.(j+1) = f().(q, C()) by A22,A25;
  hence thesis by A4,A6,A8,A24;
end;

scheme coInvariantSch {A() -> preIfWhileAlgebra, C,I() -> (Element of A()),
  S() -> non empty set, s() -> (Element of S()), T() -> Subset of S(),
  f() -> ExecutionFunction of A(),S(),T(), P[set] }: P[s()]
provided
A1: P[f().(s(),while(C(),I()))] and
A2: f() iteration_terminates_for I()\;C(), f().(s(),C()) and
A3: for s being Element of S() st P[f().(f().(s,C()),I())] & f().(s,C()) in T()
holds P[f().(s,C())] and
A4: for s being Element of S() st P[f().(s,C())] holds P[s]
proof
  consider r being non empty FinSequence of S() such that
A5: r.1 = f().(s(),C()) and
A6: r.len r nin T() and
A7: for i being Nat st 1 <= i & i < len r holds r.i in T() & r.(i+1) = f
  ().(r.i, I()\;C())
  by A2;
  defpred Q[Nat] means (len r)-$1 in dom r implies P[r.((len r)-$1)];
  defpred R[Nat] means $1+1 in dom r implies
  ex q being Element of S() st r.($1+1) = f().(q,C());
A8: R[0] by A5;
A9: for n being Nat st R[n] holds R[n+1]
  proof
    let n be Nat;
    assume R[n];
    assume n+1+1 in dom r;
    then
A10: n+1+1 <= len r by FINSEQ_3:25;
A11: n+1 >= 1 by NAT_1:11;
A12: n+1 < len r by A10,NAT_1:13;
    then
A13: r.(n+1) in T() by A7,A11;
A14: r.(n+1+1) = f().(r.(n+1), I()\;C() ) by A7,A11,A12;
    reconsider q1 = r.(n+1) as Element of S() by A13;
    reconsider q3 = f().(q1,I()) as Element of S();
    take q3;
    thus thesis by A14,Def29;
  end;
A15: Q[0] by A1,A5,A6,A7,Th86;
A16: for n being Nat st Q[n] holds Q[n+1]
  proof
    let n be Nat;
    assume
A17: Q[n];
    assume
A18: (len r)-(n+1) in dom r;
    then reconsider j = (len r)-(n+1) as Element of NAT;
A19: j >= 1 by A18,FINSEQ_3:25;
    n+1 >= 0+1 by NAT_1:13;
    then j <= (len r)-1 by XREAL_1:10;
    then
A20: j+1 <= (len r)-1+1 by XREAL_1:6;
A21: 1 <= 1+j by NAT_1:11;
A22: j < len r by A20,NAT_1:13;
A23: j+1 in dom r by A20,A21,FINSEQ_3:25;
A24: r.j in T() by A7,A19,A22;
A25: r.(j+1) = f().(r.j, I()\;C()) by A7,A19,A22;
    reconsider q1 = r.j, q2 = r.(j+1) as Element of S() by A23,A24,DTCONSTR:2;
    reconsider q9 = f().(q1, I()) as Element of S();
    consider j9 being Nat such that
A26: j = 1+j9 by A19,NAT_1:10;
    for n being Nat holds R[n] from NAT_1:sch 2(A8,A9);
    then consider qq being Element of S() such that
A27: r.(j9+1) = f().(qq,C()) by A18,A26;
    q2 = f().(q9, C()) by A25,Def29;
    then P[f().(f().(qq,C()),I())] by A4,A17,A20,A21,A26,A27,FINSEQ_3:25;
    hence thesis by A3,A7,A19,A22,A26,A27;
  end;
A28: for n being Nat holds Q[n] from NAT_1:sch 2(A15,A16);
A29: len r >= 0+1 by NAT_1:13;
  then consider j being Nat such that
A30: len r = 1+j by NAT_1:10;
  (len r)-j in dom r by A29,A30,FINSEQ_3:25;
  hence thesis by A4,A5,A28,A30;
end;

theorem Th88:
  for A being free preIfWhileAlgebra for I1,I2 being Element of A
  for n being Nat st I1\;I2 in (ElementaryInstructions A)|^n
  ex i being Nat st n = i+1 &
  I1 in (ElementaryInstructions A)|^i & I2 in (ElementaryInstructions A)|^i
proof
  let A be free preIfWhileAlgebra;
  set B = ElementaryInstructions A;
A1: B is GeneratorSet of A by Def25;
  let I1,I2 be Element of A;
A2: I1\;I2 <> I1 by Th73;
  I1\;I2 <> I2 by Th73;
  then I1\;I2 nin B by A2,Th50;
  then
A3: I1\;I2 nin B|^0 by Th18;
  let n be Nat;
  assume
A4: I1\;I2 in B|^n;
  then n > 0 by A3;
  then n >= 0+1 by NAT_1:13;
  then consider i being Nat such that
A5: n = 1+i by NAT_1:10;
  take i;
  thus n = i+1 by A5;
A6: dom Den(In(2, dom the charact of A), A) = 2-tuples_on the carrier of A
  by Th44;
A7: for o being OperSymbol of A, p being FinSequence st p in dom Den(o,A)
  holds Den(o,A).p in B implies o <> In(2, dom the charact of A)
  proof
    let o be OperSymbol of A;
    let p be FinSequence;
    assume that
A8: p in dom Den(o,A) and
A9: Den(o,A).p in B and
A10: o = In(2, dom the charact of A);
    consider a,b being object such that
A11: a in the carrier of A and
A12: b in the carrier of A and
A13: p = <*a,b*> by A6,A8,A10,FINSEQ_2:137;
    reconsider a,b as Element of A by A11,A12;
:::: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
     java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 73
   hence by,,A13A,Th50java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
  ;
charactofA,)byA6FINSEQ_2137;
then<,I2>= |^i byA1A4,A5,A7,Th39
  then{,I2 c |^i by :;
  hence thesis by ZFMISC_1:32;
end;

theorem Th89:
  for A being free preIfWhileAlgebra for C,I1,I2 being Element of A
  
  exibeing Natst =i+& CinElementaryInstructionsA|^&
I1in( A|i &I2 in (lementaryInstructions)^java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

  let A be free preIfWhileAlgebra;
  set B = ElementaryInstructions A;
A1: B is GeneratorSet of A by Def25;
  let CI1I2beElement  A;
  ifthen
  then
A2:    suppose
  let n be Nat;
  assume
:if--elseCI1,2 |n;
hen   at that
 =1,java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 26
;
  
 charact ,A  - thecarrier  A
  by Th47;
:forobeing OperSymbol  ,pbeing FinSequence st p dom Den,A)
  holds Den(o,A).p in B implies o <> In(3, dom the charact of A)
  proof
    let o be OperSymbol of A;
FinSequence;
      pc  byA16;
A7: p in        \ domStart-Ati,SCMFSA)
A8:Den(,A).   
A9: o = In(A20: (ComputS2,,1)dom p    p
    consider:domp1 = p / dom (d.-> 0 +*
d
 b in the carrier of A and
A12   the carrier ofAand
p=<a,b,*  A5A5,A7,9,INSEQ_2:39;
    reconsider      then
Deno)p=ifthenelsea,  ;
. i ->(:d2)il  A30FUNCT_4java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
  ;
*I*  (3  theofA A5139java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  then
A14  il dom ( ->(:d) by : 1
A15A46  /ICs2=IC byPBOOLE143java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
16I1 in{CI1I2}by ENUMSET1:ef 1java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  I2 in {C,I1,I2 } by ENUMSET1:def         A47A,,,UNCT_1:7;
  hence thesis by A14,    *(( d2->1 * StartAt(l,SCM+FSA);
end;

A53Exec:<,.,>,s1.= k- 0bySCMFSA_275;
  for A being free:  ICSCM in  (tartAt,+)  TARSKI:ef1java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
fornNat(I ( A)|n
  ex i being Nat st n = i+1 &considerS2
C  (lementaryInstructions)^i&  in(ElementaryInstructions A|i
proof .  d2 byA49GRFUNC_12
  let A be free preIfWhileAlgebra;
      Ajava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
A1A68  .il
   C be ;
 byTh52
  then:domp2=domp\/dom ((d2.>)
A2: while(C,I) nin B|^0il.> d1=0..,d) def
  let n Start(+)   \(d2 /   java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  
A3: while(C,I) in B|^n;
thenconsider  being Nat such that
 1 ,;
 ;
thusn=i+ by 
A5:dom Den((, dom  charactofA) A)=2-tuples_onthe  ofA
  by;
take1;
  holds Den(o,A).pA82 IC SCMFSAindom(-tSCM+FSA)) by TARSKI:def 1;
  
    let o be OperSymbol of A;
    let p be then
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 15
: dom(A and
A8: Den(o,A).p in B and
 o=In4  thecharactof A)
    PARTFUN1def2
A10        (ollowingComputS,,0)).java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
A11java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
A12: p =  let q beingnon -free finite
ab as Element ofAbyA10,A11java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    Den(o,A)  set   *(.- );
    hencecontradictionbyA8,;
  end;
 *,*>dom ((4,dom  charactofA,)by FINSEQ_2;
thenrng<CI* c= B|^i by A1,A3,A4,A6,Th39;
  then {C,I} c= B|^i by FINSEQ_2:127;
hjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
;

begin :: Existence and uniqueness of execution function and termination

{( >freeECIW-trictpreIfWhileAlgebra
  S() -> nonA23 ICCsi=IC(sidomp A22,49
onF,WhiF(set,et) - (  ()),
  set,etset)-> Element ofS(:
  ex  beingFunctionof the carrier of A(), S() st
  (for I being Element   for  being  halt-free 
  holds f.I = ElemF(I)) & f.EmptyIns A() = Emp for ,P2being Instruction-Sequence of SCM+FSA
  fI1 being Element of ()holds .(I1;)=(.I1,.I2) java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
f ,I1I2 of)
  holds   & c P2
 , being Elementof()  .while(I =WhiFfC.I
provided
A1: for I being Element of    (1 EXTPRO_1java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
holds ElemF(I) in S()
proof
  set  set PbeingSequenceof+
A2: B|^0 = B by Th18;
FB={I,ElemF() whereIis  A(:I in };
(,)={;,ConFffI2java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
  where I1,I2 is (:da  pp s1i.da+(,s1,i
  I1 in B|^$1 & I2 inA7:Cs1i1.da=Cs1i.+Cs1i.dbbyA5SCMFSA_2java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  deffunc 
 CI1,2 is (  A),,fI1fI2 is Element of S)):
  i =( )
  [C,fC] in $2 & [(the InstructionsFSCMFSA--defined;
  WFNat)= [whileC,) WhiFgCgI
whereCI  Elementof ()gCgI  ofS):
).b<java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    I = CurInstr(P2,Comput(P2,
  CF($1,$2) \/ IF($1,$2) \/ WF($1,$2);
beingsuchthat
A3: dom FF = NAT & FF.0 = FB and
A4: for n being Nat holds dom p holds Comput(P1,s1,i).da*Comput(1,i.=
  set f      ( InstructionsFofFSA)-valued NAT-defined Function;
A5: s2,i)) A1A2,AMISTD_5:;
  proof
    let n,m be Nat;
    assume n <= m;
    then consider i being Nat   for p being q-autonomic non empty of +,
A6: m = n+i fori Nat,da db beingIntLocation st
    reconsider i   set Cs1i = Computs1i;
A7: m = n+i by A6;
    defpred I[Nat] means FF.n c= FF
 I0;
A9: now
 i Natjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      reconsider n9 =n   contradiction A4A8,,6:def10;
      FF.(n9+theorem
F(n+i,FF.n+) /
      (IF(n+i, FF.(n+i)) \/ WFst q=P1&q  P2
        .= FFdompholds ComputP1s1,).amod ComputPs,i)djava.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
     n,FF(+)\/(+i (ni))by4
        .= FF.(n+i) \/ ({[EmptyIns A(), Emp()]} \/ (CF(n+i, FF.(n+i)) \/
((ni,FF.(+i)\ WF(n+i,byXBOOLE_14;
      then FF.(n+i) c=    .  CurInstr ,Cs2i;
      []implies Ii] by XBOOLE_11java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
end
    for i being Nat =P2ComputP2java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    hence thesis by A7;
  end;
  defpred P[Nat] means ex g being Function of B|^$1, S() st g = FF.$1 &
  (mptyInsA( inB^$ implies .EmptyInsA()= Emp()&
( I1    (\I2in|1
.I1;  (g,I2))java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  f CI1 being Element of ()  thenelseC,1I2 inB^1
  holds g.if-  <( (s,)+1java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 41
  (for C,I being Element of A() st while(C,I) in B|^$1
  holds g.while(C,I) = WhiF(g.C,g.I));
  defpred p[set] means $1 in B;
  reconsider f0 = {[I,ElemF(I)] where I is Element of A(): p[I]} as Function
from 
A10: dom f0 = B
  proof
    thus dom f0 c= B
    proof
      let x be object;
      assumein dom ;
      then [x,f0.x] in f0 by FUNCT_1:def 2;
ex Elementof(  xf0] IElemF)]&p[];
hencethesis by XTUPLE_01
java.lang.StringIndexOutOfBoundsException: Range [7, 4) out of bounds for length 8
    let x be object;
    assume
A11: x in B;
    then reconsider I = x as Element of A();
    [I,ElemF(I)] in f0 by A11;
    hence thesis by   let P1,P2 be Instruction P1,P2Instruction-ofSCM+
  end;
  rng f0 c= S()
  proof
    let y be object;
    assume y in rng f0;
    then consider x being object such that
A12: [x,y] in f0 by XTUPLE_0:def 13;
    consider I being Element of A() such that
A13: [x,y] = [I,ElemF(I)] and
A14: p[I] by A12;
    y  (I) by A13,XTUPLE_0:1;
    hence thesis by A1,A14;
  end;
  then reconsider f0 as Function of B|^0, S() by A2,A10,FUNCT_2:2;
A15: P[0]
  proof
    take f0;
    thus f0 = FF.0 by A3;
    now
      let I1,I2 be Element of A();
A16:  I1\;I2 <> I1 by Th73;
      I1\;I2 <> I2 by Th73;
      hence I1\;I2 nin B by A16,Th50;
    end;
    hence thesis by A2,Th49,Th51,Th52;
  end  set Cs1i ComputP,i;
 st[] P1
  proof
let beNat
    gbeingFunction of B|i S)  
A18: g = FF.i and
A19: EmptyIns A() in B|^i implies g.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 4
:forI1 beingElementof( stI1\I2 inB^iholds g.(I1\;I2)
    = ConF(g.I1,g being Nat, da,dbbeing Int-Location,fbeing FinSeq-Location st
A21: for C,I1,I2 being Element of A() st P1i.. &=| si.. 
    qjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 34
A22: for C,I being Element of A() st  c  c=java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
    I) = WhiF(g.C,g.I);
    set h = FF.(i+1);
A23:  <i+1by :13java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
A24: java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 44
A25  g |byjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 35
A26: B|^i c= B|^(i+1) by A23,Th21;
A27:now
      x be setjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      x ;
            s1, ,
      x in WF(i, g) by A24,XBOOLE_0:def 3;
      then x in g \/ {[EmptyIns A(), Emp()]} \/ CF(i, g) or x in IF(i, g) or
      x in WF(i, g) by XBOOLE_0:def 3;
      then x in g \/ {[EmptyIns A(), Emp()]} or x in CF(i,g) or x in IF(i, g
       or x in (i, )  :def 3;
        ing x in{EmptyIns A(, Emp)}orxCFg or
      x in IF =((,2,i.fjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    end;
    h is Relation-like
    proof
      let x be object;
      assumex in h;
       xing  x {[mptyIns (),Emp()}or
)or IFig orx  WF(,g by ;
 exa, beingobject stx=[,b)or x=[mptyIns () Emp(]or
      (ex I1,I2 being (Element of A()), fI1,fI2 being Element of S() st
      x = [I1\;I2, ConF(fI1,fI2)] & I1 in B|^i & I2 in B|^i &
      [I1,fI1] in g & [I2,fI2] in g) or
      (ex C,I1,I2 being (Element of A()),a,b,c being Element of S() st
      x = [if-then-else(C,I1,I2), IfF(a    = ((P2Cs2i), Cs2i)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
       inB|i & [,] ing &[, ing &[2,]in g) 
      (ex C,I being (Element of A()), a,      (heInstructionsF  SCM+)-valued NAT-defined Function
      x = [while(C,I), WhiF(a,b)] & C in B|^i & I in B|^i & [C,a] in g &
      [,]ing by RELAT_1:def 1java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
hencethesis;
    end;
     t +)
    h is Function-like
    proof
      letset   (P1i+1);
 x1 =x,],  [x,y2]
      assume
:[,]in;
      assume
.=Exec (urInstr(P2 Cs2i),Cs2i;
      per cases by A27,A28  ..da.f=k1
      suppose
A30:    x1 in g;
        then
A31:    x in dom g by FUNCT_1:1;
A32:    y1 = g.x by A30,FUNCT_1:1;
        per cases by A27,A29;
        suppose x2 in g;
          hence thesis by A30,FUNCT_1:def 1;
        end;
        suppose x2 in {[EmptyIns A(), Emp()]};
          then
A33:      x2 = [EmptyIns A(), Emp()] by TARSKI:def 1;
          then x = EmptyIns A() by XTUPLE_0:1;
          hence thesis by A19,A31,A32,A33,XTUPLE_0:1;
        end;
        suppose x2 in CF(i,g);
          then consider J1,J2 being (Element of A()), gJ1,gJ2 being Element
          of S() such that
A34:      x2 = [J1\;J2, ConF(gJ1,gJ2)] and J1 in B|^i
          and J2 in B|^i and
A35:      [J1,gJ1] in g and
A36:      [J2,gJ2] in g;
A37:      x = J1\;J2 by A34,XTUPLE_0:1;
A38:      y2 = ConF(gJ1,gJ2) by A34,XTUPLE_0:1;
A39:      g.J1 = gJ1 by A35,FUNCT_1:1;
          g.J2 = gJ2 by A36,FUNCT_1:1;
          hence thesis by A20,A31,A32,A37,A38,A39;
        end;
        suppose x2 in IF(i,g);
          then consider D,J1,J2 being (Element of A()), a,b,c being Element
          of S() such that
A40:      x2 = [if-then-else(D,J1,J2), IfF(a,b,c)] and D in B|^i
          and J1 in B|^i
          and J2 in B|^i and
A41:      [D,a] in g and
A42:      [J1,b] in g and
A43:      [J2,c] in g;
A44:      x = if-then-else(D,J1,J2) by A40,XTUPLE_0:1;
A45:      y2 = IfF(a,b,c) by A40,XTUPLE_0:1;
A46:      g.D = a by A41,FUNCT_1:1;
A47:      g.J1 = b by A42,FUNCT_1:1;
          g.J2 = c by A43,FUNCT_1:1;
          hence thesis by A21,A31,A32,A44,A45,A46,A47;
        end;
        suppose x2 in WF(i,g);
          then consider D,J being (Element of A()), a,b being Element of S()
          such that
A48:      x2 = [while(D,J), WhiF(a,b)] and D in B|^i
          and J in B|^i and
A49:      [D,a] in g and
A50:      [J,b] in g;
A51:      x = while(D,J) by A48,XTUPLE_0:1;
A52:      y2 = WhiF(a,b) by A48,XTUPLE_0:1;
A53:      g.D = a by A49,FUNCT_1:1;
          g.J = b by A50,FUNCT_1:1;
          hence thesis by A22,A31,A32,A51,A52,A53;
        end;
      end;
      suppose x1 in {[EmptyIns A(), Emp()]};
        then
A54:    x1 = [EmptyIns A(), Emp()] by TARSKI:def 1;
        then
A55:    x = EmptyIns A() by XTUPLE_0:1;
A56:    y1 = Emp() by A54,XTUPLE_0:1;
        per cases by A27,A29;
        suppose
A57:      x2 in g;
          then x in dom g by FUNCT_1:1;
          hence thesis by A19,A55,A56,A57,FUNCT_1:1;
        end;
        suppose x2 in {[EmptyIns A(), Emp()]};
          then x2 = [EmptyIns A(), Emp()] by TARSKI:def 1;
          hence thesis by A54,XTUPLE_0:1;
        end;
        suppose x2 in CF(i,g);
          then consider J1,J2 being (Element of A()), a,b being Element of S(
          ) such that
A58:      x2 = [J1\;J2, ConF(a,b)] and J1 in B|^i
          and J2 in B|^i
          and [J1,a] in g
          and [J2,b] in g;
          x = J1\;J2 by A58,XTUPLE_0:1;
          hence thesis by A55,Th72;
        end;
        suppose x2 in IF(i,g);
          then consider D,J1,J2 being (Element of A()),a,b,c being Element of
          S() such that
A59:      x2 = [if-then-else(D,J1,J2), IfF(a,b,c)] and D in B|^i
          and J1 in B|^i
          and J2 in B|^i
          and [D,a] in g
          and [J1,b] in g
          and [J2,c] in g;
          x = if-then-else(D,J1,J2) by A59,XTUPLE_0:1;
          hence thesis by A55,Def24;
        end;
        suppose x2 in WF(i,g);
          then consider D,J being (Element of A()),a,b being Element of S()
          such that
A60:      x2 = [while(D,J), WhiF(a,b)] and D in B|^i
          and J in B|^i
          and [D,a] in g
          and [J,b] in g;
          x = while(D,J) by A60,XTUPLE_0:1;
          hence thesis by A55,Def24;
        end;
      end;
      suppose x1 in CF(i,g);
        then consider I1,I2 being (Element of A()), gI1,gI2 being Element of
        S() such that
A61:    x1 = [I1\;I2, ConF(gI1,gI2)] and I1 in B|^i
        and I2 in B|^i and
A62:    [I1,gI1] in g and
A63:    [I2,gI2] in g;
A64:    x = I1\;I2 by A61,XTUPLE_0:1;
A65:    y1 = ConF(gI1,gI2) by A61,XTUPLE_0:1;
A66:    g.I1 = gI1 by A62,FUNCT_1:1;
A67:    g.I2 = gI2 by A63,FUNCT_1:1;
        per cases by A27,A29;
        suppose
A68:      x2 in g;
          then
A69:      x in dom g by FUNCT_1:1;
          y2 = g.x by A68,FUNCT_1:1;
          hence thesis by A20,A64,A65,A66,A67,A69;
        end;
        suppose x2 in {[EmptyIns A(), Emp()]};
          then x2 = [EmptyIns A(), Emp()] by TARSKI:def 1;
          then x = EmptyIns A() by XTUPLE_0:1;
          hence thesis by A64,Th72;
        end;
        suppose x2 in CF(i,g);
          then consider J1,J2 being (Element of A()), a,b being Element of S(
          ) such that
A70:      x2 = [J1\;J2, ConF(a,b)] and J1 in B|^i
          and J2 in B|^i and
A71:      [J1,a] in g and
A72:      [J2,b] in g;
A73:      x = J1\;J2 by A70,XTUPLE_0:1;
A74:      y2 = ConF(a,b) by A70,XTUPLE_0:1;
A75:      g.J1 = a by A71,FUNCT_1:1;
A76:      g.J2 = b by A72,FUNCT_1:1;
          I1 = J1 by A64,A73,Th73;
          hence thesis by A64,A65,A66,A67,A73,A74,A75,A76,Th73;
        end;
        suppose x2 in IF(i,g);
          then consider D,J1,J2 being (Element of A()),a,b,c being Element of
          S() such that
A77:      x2 = [if-then-else(D,J1,J2), IfF(a,b,c)] and D in B|^i
          and J1 in B|^i
          and J2 in B|^i
          and [D,a] in g
          and [J1,b] in g
          and [J2,c] in g;
          x = if-then-else(D,J1,J2) by A77,XTUPLE_0:1;
          hence thesis by A64,Th73;
        end;
        suppose x2 in WF(i,g);
          then consider D,J being (Element of A()),a,b being Element of S()
          such that
A78:      x2 = [while(D,J), WhiF(a,b)] and D in B|^i
          and J in B|^i
          and [D,a] in g
          and [J,b] in g;
          x = while(D,J) by A78,XTUPLE_0:1;
          hence thesis by A64,Th73;
        end;
      end;
      suppose x1 in IF(i,g);
        then consider C,I1,I2 being (Element of A()), gC,gI1,gI2 being
        Element of S() such that
A79:    x1 = [if-then-else(C,I1,I2), IfF(gC,gI1,gI2)] and C in B|^i
        and I1 in B|^i
        and I2 in B|^i and
A80:    [C,gC] in g and
A81:    [I1,gI1] in g and
A82:    [I2,gI2] in g;
A83:    x = if-then-else(C,I1,I2) by A79,XTUPLE_0:1;
A84:    y1 = IfF(gC,gI1,gI2) by A79,XTUPLE_0:1;
A85:    g.I1 = gI1 by A81,FUNCT_1:1;
A86:    g.I2 = gI2 by A82,FUNCT_1:1;
A87:    g.C = gC by A80,FUNCT_1:1;
        per cases by A27,A29;
        suppose
A88:      x2 in g;
          then
A89:      x in dom g by FUNCT_1:1;
          y2 = g.x by A88,FUNCT_1:1;
          hence thesis by A21,A83,A84,A85,A86,A87,A89;
        end;
        suppose x2 in {[EmptyIns A(), Emp()]};
          then x2 = [EmptyIns A(), Emp()] by TARSKI:def 1;
          then x = EmptyIns A() by XTUPLE_0:1;
          hence thesis by A83,Th72;
        end;
        suppose x2 in CF(i,g);
          then consider J1,J2 being (Element of A()),a,b being Element of S()
          such that
A90:      x2 = [J1\;J2, ConF(a,b)] and J1 in B|^i
          and J2 in B|^i
          and [J1,a] in g
          and [J2,b] in g;
          x = J1\;J2 by A90,XTUPLE_0:1;
          hence thesis by A83,Th73;
        end;
        suppose x2 in IF(i,g);
          then consider D,J1,J2 being (Element of A()),a,b,c being Element of
          S() such that
A91:      x2 = [if-then-else(D,J1,J2), IfF(a,b,c)] and D in B|^i
          and J1 in B|^i
          and J2 in B|^i and
A92:      [D,a] in g and
A93:      [J1,b] in g and
A94:      [J2,c] in g;
A95:      x = if-then-else(D,J1,J2) by A91,XTUPLE_0:1;
A96:      y2 = IfF(a,b,c) by A91,XTUPLE_0:1;
A97:      g.D = a by A92,FUNCT_1:1;
A98:      g.J1 = b by A93,FUNCT_1:1;
A99:      g.J2 = c by A94,FUNCT_1:1;
A100:     C = D by A83,A95,Th74;
          I1 = J1 by A83,A95,Th74;
          hence thesis by A83,A84,A85,A86,A87,A95,A96,A97,A98,A99,A100,Th74;
        end;
        suppose x2 in WF(i,g);
          then consider D,J being (Element of A()),a,b being Element of S()
          such that
A101:     x2 = [while(D,J), WhiF(a,b)] and D in B|^i
          and J in B|^i
          and [D,a] in g
          and [J,b] in g;
          x = while(D,J) by A101,XTUPLE_0:1;
          hence thesis by A83,Th74;
        end;
      end;
      suppose x1 in WF(i,g);
        then consider C,I being (Element of A()), gC,gI being Element of S()
        such that
A102:   x1 = [while(C,I), WhiF(gC,gI)] and C in B|^i
        and I in B|^i and
A103:   [C,gC] in g and
A104:   [I,gI] in g;
A105:   x = while(C,I) by A102,XTUPLE_0:1;
A106:   y1 = WhiF(gC,gI) by A102,XTUPLE_0:1;
A107:   g.C = gC by A103,FUNCT_1:1;
A108:   g.I = gI by A104,FUNCT_1:1;
        per cases by A27,A29;
        suppose
A109:     x2 in g;
          then
A110:     x in dom g by FUNCT_1:1;
          y2 = g.x by A109,FUNCT_1:1;
          hence thesis by A22,A105,A106,A107,A108,A110;
        end;
        suppose x2 in {[EmptyIns A(), Emp()]};
          then x2 = [EmptyIns A(), Emp()] by TARSKI:def 1;
          then x = EmptyIns A() by XTUPLE_0:1;
          hence thesis by A105,Th72;
        end;
        suppose x2 in CF(i,g);
          then consider J1,J2 being (Element of A()),a,b being Element of S()
          such that
A111:     x2 = [J1\;J2, ConF(a,b)] and J1 in B|^i
          and J2 in B|^i
          and [J1,a] in g
          and [J2,b] in g;
          x = J1\;J2 by A111,XTUPLE_0:1;
          hence thesis by A105,Th73;
        end;
        suppose x2 in IF(i,g);
          then consider D,J1,J2 being (Element of A()), a,b,c being Element
          of S() such that
A112:     x2 = [if-then-else(D,J1,J2), IfF(a,b,c)] and D in B|^i
          and J1 in B|^i
          and J2 in B|^i
          and [D,a] in g
          and [J1,b] in g
          and [J2,c] in g;
          x = if-then-else(D,J1,J2) by A112,XTUPLE_0:1;
          hence thesis by A105,Th74;
        end;
        suppose x2 in WF(i,g);
          then consider D,J being (Element of A()),a,b being Element of S()
          such that
A113:     x2 = [while(D,J), WhiF(a,b)] and D in B|^i
          and J in B|^i and
A114:     [D,a] in g and
A115:     [J,b] in g;
A116:     x = while(D,J) by A113,XTUPLE_0:1;
A117:     y2 = WhiF(a,b) by A113,XTUPLE_0:1;
A118:     g.D = a by A114,FUNCT_1:1;
A119:     g.J = b by A115,FUNCT_1:1;
          D = C by A105,A116,Th75;
          hence thesis by A105,A106,A107,A108,A116,A117,A118,A119,Th75;
        end;
      end;
    end;
    then reconsider h as Function;
A120: dom h = B|^(i+1)
    proof
      thus dom h c= B|^(i+1)
      proof
        let a be object;
        set ah = [a,h.a];
        assume a in dom h;
        then
A121:   [a,h.a] in h by FUNCT_1:def 2;
        per cases by A27,A121;
        suppose ah in g;
          then a in dom g by FUNCT_1:1;
          hence thesis by A26;
        end;
        suppose ah in {[EmptyIns A(), Emp()]};
          then ah = [EmptyIns A(), Emp()] by TARSKI:def 1;
          then a = EmptyIns A() by XTUPLE_0:1;
          hence thesis by Th76;
        end;
        suppose ah in CF(i,g);
          then consider I,J being (Element of A()),e,b being Element of S()
          such that
A122:     ah = [I\;J, ConF(e,b)] and
A123:     I in B|^i and
A124:     J in B|^i and [I,e] in g
          and [J,b] in g;
          a = I\;J by A122,XTUPLE_0:1;
          hence thesis by A123,A124,Th76;
        end;
        suppose ah in IF(i,g);
          then consider C,I,J being (Element of A()),e,b,c being Element of S
          () such that
A125:     ah = [if-then-else(C,I,J), IfF(e,b,c)] and
A126:     C in B|^i and
A127:     I in B|^i and
A128:     J in B|^i and [C,e] in g
          and [I,b] in g
          and [J,c] in g;
          a = if-then-else(C,I,J) by A125,XTUPLE_0:1;
          hence thesis by A126,A127,A128,Th76;
        end;
        suppose ah in WF(i,g);
          then consider I,J being (Element of A()),e,b being Element of S()
          such that
A129:     ah = [while(I,J), WhiF(e,b)] and
A130:     I in B|^i and
A131:     J in B|^i and [I,e] in g
          and [J,b] in g;
          a = while(I,J) by A129,XTUPLE_0:1;
          hence thesis by A130,A131,Th76;
        end;
      end;
      let x be object;
      assume
A132: x in B|^(i+1);
      per cases by A132,Th77;
      suppose x in B|^i;
        then [x,g.x] in g by A25,FUNCT_1:def 2;
        then [x,g.x] in g \/ {[EmptyIns A(), Emp()]} by XBOOLE_0:def 3;
        then [x,g.x] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g)
        by XBOOLE_0:def 3;
        then [x,g.x] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g) \/ IF(i,g)
        by XBOOLE_0:def 3;
        then [x,g.x] in h by A24,XBOOLE_0:def 3;
        hence thesis by XTUPLE_0:def 12;
      end;
      suppose x = EmptyIns A();
        then [x,Emp()] in {[EmptyIns A(), Emp()]} by TARSKI:def 1;
        then [x,Emp()] in g \/ {[EmptyIns A(), Emp()]} by XBOOLE_0:def 3;
        then [x,Emp()] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g)
        by XBOOLE_0:def 3;
        then [x,Emp()] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g) \/ IF(i,g)
        by XBOOLE_0:def 3;
        then [x,Emp()] in h by A24,XBOOLE_0:def 3;
        hence thesis by XTUPLE_0:def 12;
      end;
      suppose ex I1,I2 being Element of A() st x = I1\;I2 &
        I1 in B|^i & I2 in B|^i;
        then consider I1,I2 being Element of A() such that
A133:   x = I1\;I2 and
A134:   I1 in B|^i and
A135:   I2 in B|^i;
        reconsider a = g.I1, b = g.I2 as Element of S() by A134,A135,FUNCT_2:5;
A136:   [I1,a] in g by A25,A134,FUNCT_1:def 2;
        [I2,b] in g by A25,A135,FUNCT_1:def 2;
        then [x,ConF(a,b)] in CF(i,g) by A133,A134,A135,A136;
        then [x,ConF(a,b)] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g)
        by XBOOLE_0:def 3;
        then [x,ConF(a,b)] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g) \/ IF(
        i,g) by XBOOLE_0:def 3;
        then [x,ConF(a,b)] in h by A24,XBOOLE_0:def 3;
        hence thesis by XTUPLE_0:def 12;
      end;
      suppose
        ex C,I1,I2 being Element of A() st x = if-then-else(C,I1,I2) &
        C in B|^i & I1 in B|^i & I2 in B|^i;
        then consider C,I1,I2 being Element of A() such that
A137:   x = if-then-else(C,I1,I2) and
A138:   C in B|^i and
A139:   I1 in B|^i and
A140:   I2 in B|^i;
        reconsider a = g.I1, b = g.I2, c = g.C as Element of S()
        by A138,A139,A140,FUNCT_2:5;
A141:   [I1,a] in g by A25,A139,FUNCT_1:def 2;
A142:   [I2,b] in g by A25,A140,FUNCT_1:def 2;
        [C,c] in g by A25,A138,FUNCT_1:def 2;
        then [x,IfF(c,a,b)] in IF(i,g) by A137,A138,A139,A140,A141,A142;
        then [x,IfF(c,a,b)] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g) \/ IF
        (i,g) by XBOOLE_0:def 3;
        then [x,IfF(c,a,b)] in h by A24,XBOOLE_0:def 3;
        hence thesis by XTUPLE_0:def 12;
      end;
      suppose ex C,I being Element of A() st
        x = while(C,I) & C in B|^i & I in B|^i;
        then consider C,I being Element of A() such that
A143:   x = while(C,I) and
A144:   C in B|^i and
A145:   I in B|^i;
        reconsider a = g.C, b = g.I as Element of S() by A144,A145,FUNCT_2:5;
A146:   [C,a] in g by A25,A144,FUNCT_1:def 2;
        [I,b] in g by A25,A145,FUNCT_1:def 2;
        then [x,WhiF(a,b)] in WF(i,g) by A143,A144,A145,A146;
        then [x,WhiF(a,b)] in h by A24,XBOOLE_0:def 3;
        hence thesis by XTUPLE_0:def 12;
      end;
    end;
    rng h c= S()
    proof
      let a be object;
      assume a in rng h;
      then consider x being object such that
A147: [x,a] in h by XTUPLE_0:def 13;
      set ah = [x,a];
      per cases by A27,A147;
      suppose ah in g;
        hence thesis by ZFMISC_1:87;
      end;
      suppose ah in {[EmptyIns A(), Emp()]};
        then ah = [EmptyIns A(), Emp()] by TARSKI:def 1;
        then a = Emp() by XTUPLE_0:1;
        hence thesis;
      end;
      suppose ah in CF(i,g);
        then consider I,J being (Element of A()),e,b being Element of S() such
        that
A148:   ah = [I\;J, ConF(e,b)] and I in B|^i
        and J in B|^i
        and [I,e] in g
        and [J,b] in g;
        a = ConF(e,b) by A148,XTUPLE_0:1;
        hence thesis;
      end;
      suppose ah in IF(i,g);
        then consider C,I,J being (Element of A()),e,b,c being Element of S()
        such that
A149:   ah = [if-then-else(C,I,J), IfF(e,b,c)] and C in B|^i
        and I in B|^i
        and J in B|^i
        and [C,e] in g
        and [I,b] in g
        and [J,c] in g;
        a = IfF(e,b,c) by A149,XTUPLE_0:1;
        hence thesis;
      end;
      suppose ah in WF(i,g);
        then consider I,J being (Element of A()),e,b being Element of S() such
        that
A150:   ah = [while(I,J), WhiF(e,b)] and I in B|^i
        and J in B|^i
        and [I,e] in g
        and [J,b] in g;
        a = WhiF(e,b) by A150,XTUPLE_0:1;
        hence thesis;
      end;
    end;
    then reconsider h as Function of B|^(i+1), S() by A120,FUNCT_2:2;
    h = g\/{[EmptyIns A(), Emp()]}\/CF(i,g)\/(IF(i,g)\/WF(i,g))
    by A24,XBOOLE_1:4
      .= g\/{[EmptyIns A(), Emp()]}\/(CF(i,g)\/(IF(i,g)\/WF(i,g)))
    by XBOOLE_1:4
      .= g\/({[EmptyIns A(), Emp()]}\/(CF(i,g)\/(IF(i,g)\/WF(i,g))))
    by XBOOLE_1:4;
    then
A151: g c= h by XBOOLE_1:7;
    take h;
    thus h = FF.(i+1);
    hereby
      set x = EmptyIns A();
      assume x in B|^(i+1);
      [x,Emp()] in {[EmptyIns A(), Emp()]} by TARSKI:def 1;
      then [x,Emp()] in g \/ {[EmptyIns A(), Emp()]} by XBOOLE_0:def 3;
      then [x,Emp()] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g)
      by XBOOLE_0:def 3;
      then [x,Emp()] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g) \/ IF(i,g)
      by XBOOLE_0:def 3;
      then [x,Emp()] in h by A24,XBOOLE_0:def 3;
      hence h.EmptyIns A() = Emp() by FUNCT_1:1;
    end;
    hereby
      let I1,I2 be Element of A();
      set x = I1\;I2;
      set y = ConF(h.I1,h.I2);
      assume I1\;I2 in B|^(i+1);
      then
A152: ex i0 being Nat st ( i+1 = i0+1)&( I1 in B|^i0)&( I2 in B|^ i0) by Th88;
      then reconsider gI1 = g.I1, gI2 = g.I2 as Element of S() by FUNCT_2:5;
A153: [I1,gI1] in g by A25,A152,FUNCT_1:def 2;
A154: [I2,gI2] in g by A25,A152,FUNCT_1:def 2;
A155: g.I1 = h.I1 by A151,A153,FUNCT_1:1;
      g.I2 = h.I2 by A151,A154,FUNCT_1:1;
      then [x,y] in CF(i,g) by A152,A153,A154,A155;
      then [x,y] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g) by XBOOLE_0:def 3;
      then [x,y] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g) \/ IF(i,g)
      by XBOOLE_0:def 3;
      then [x,y] in h by A24,XBOOLE_0:def 3;
      hence h.(I1\;I2) = ConF(h.I1,h.I2) by FUNCT_1:1;
    end;
    hereby
      let C,I1,I2 be Element of A();
      set x = if-then-else(C,I1,I2);
      set y = IfF(h.C,h.I1,h.I2);
      assume if-then-else(C,I1,I2) in B|^(i+1);
      then
A156: ex i0 being Nat st ( i+1 = i0+1)&( C in B|^i0)&( I1 in B|^
      i0)&( I2 in B|^i0) by Th89;
      then reconsider gC = g.C, gI1 = g.I1, gI2 = g.I2 as Element of S()
      by FUNCT_2:5;
A157: [C,gC] in g by A25,A156,FUNCT_1:def 2;
A158: [I1,gI1] in g by A25,A156,FUNCT_1:def 2;
A159: [I2,gI2] in g by A25,A156,FUNCT_1:def 2;
A160: g.C = h.C by A151,A157,FUNCT_1:1;
A161: g.I1 = h.I1 by A151,A158,FUNCT_1:1;
      g.I2 = h.I2 by A151,A159,FUNCT_1:1;
      then [x,y] in IF(i,g) by A156,A157,A158,A159,A160,A161;
      then [x,y] in g \/ {[EmptyIns A(), Emp()]} \/ CF(i,g) \/ IF(i,g)
      by XBOOLE_0:def 3;
      then [x,y] in h by A24,XBOOLE_0:def 3;
      hence h.if-then-else(C,I1,I2) = IfF(h.C,h.I1,h.I2) by FUNCT_1:1;
    end;
    let C,I be Element of A();
    set x = while(C,I);
    set y = WhiF(h.C,h.I);
    assume while(C,I) in B|^(i+1);
    then
A162: ex i0 being Nat st ( i+1 = i0+1)&( C in B|^i0)&( I in B|^i0 ) by Th90;
    then reconsider gC = g.C, gI = g.I as Element of S() by FUNCT_2:5;
A163: [C,gC] in g by A25,A162,FUNCT_1:def 2;
A164: [I,gI] in g by A25,A162,FUNCT_1:def 2;
A165: g.C = h.C by A151,A163,FUNCT_1:1;
    g.I = h.I by A151,A164,FUNCT_1:1;
    then [x,y] in WF(i,g) by A162,A163,A164,A165;
    then [x,y] in h by A24,XBOOLE_0:def 3;
    hence thesis by FUNCT_1:1;
  end;
A166: for i being Nat holds P[i] from NAT_1:sch 2(A15,A17);
  f is Relation-like Function-like
  proof
    hereby
      let x be object;
      assume x in f;
      then consider n being object such that
A167: n in dom FF and
A168: x in FF.n by CARD_5:2;
      reconsider n as Element of NAT by A3,A167;
      P[n] by A166;
      hence ex a,b being object st x = [a,b] by A168,RELAT_1:def 1;
    end;
    let x,y1,y2 be object;
    assume [x,y1] in f;
    then consider n1 being object such that
A169: n1 in dom FF and
A170: [x,y1] in FF.n1 by CARD_5:2;
    assume [x,y2] in f;
    then consider n2 being object such that
A171: n2 in dom FF and
A172: [x,y2] in FF.n2 by CARD_5:2;
    reconsider n1,n2 as Element of NAT by A3,A169,A171;
    n1 <= n2 or n2 <= n1;
    then FF.n1 c= FF.n2 or FF.n2 c= FF.n1 by A5;
    then [x,y1] in FF.n2 & P[n2] or [x,y2] in FF.n1 & P[n1] by A166,A170,A172;
    hence thesis by A170,A172,FUNCT_1:def 1;
  end;
  then reconsider f as Function;
A173: dom f = the carrier of A()
  proof
    thus dom f c= the carrier of A()
    proof
      let x be object;
      assume x in dom f;
      then [x,f.x] in f by FUNCT_1:def 2;
      then consider n being object such that
A174: n in dom FF and
A175: [x,f.x] in FF.n by CARD_5:2;
      reconsider n as Element of NAT by A3,A174;
      P[n] by A166;
      then x in B|^n by A175,ZFMISC_1:87;
      hence thesis;
    end;
    let x be object;
    assume x in the carrier of A();
    then reconsider I = x as Element of A();
    consider n being Nat such that
A176: I in B|^n by Th79;
    reconsider n as Element of NAT by ORDINAL1:def 12;
    P[n] by A166;
    then reconsider g = FF.n as Function of B|^n, S();
    dom g = B|^n by FUNCT_2:def 1;
    then [I,g.I] in g by A176,FUNCT_1:def 2;
    then [I,g.I] in f by A3,CARD_5:2;
    hence thesis by XTUPLE_0:def 12;
  end;
  rng f c= S()
  proof
    let b be object;
    assume b in rng f;
    then consider a being object such that
A177: a in dom f and
A178: b = f.a by FUNCT_1:def 3;
    reconsider a as Element of A() by A173,A177;
    consider n being Nat such that
A179: a in B|^n by Th79;
    reconsider n as Element of NAT by ORDINAL1:def 12;
    P[n] by A166;
    then reconsider g = FF.n as Function of B|^n, S();
A180: dom g = B|^n by FUNCT_2:def 1;
    then [a,g.a] in g by A179,FUNCT_1:def 2;
    then [a,g.a] in f by A3,CARD_5:2;
    then
A181: b = g.a by A178,FUNCT_1:1;
    g.a in rng g by A179,A180,FUNCT_1:3;
    hence thesis by A181;
  end;
  then reconsider f as Function of the carrier of A(), S() by A173,FUNCT_2:2;
  take f;
  hereby
    let I be Element of A();
    assume I in ElementaryInstructions A();
    then [I,ElemF(I)] in FF.0 by A3;
    then [I,ElemF(I)] in f by A3,CARD_5:2;
    hence f.I = ElemF(I) by FUNCT_1:1;
  end;
A182: now
    let n be Nat;
    let I be Element of A();
    let g be Function of B|^n, S();
    assume that
A183: I in B|^n and
A184: g = FF.n;
    dom g = B|^n by FUNCT_2:def 1;
    then
A185: [I,g.I] in g by A183,FUNCT_1:def 2;
    n in NAT by ORDINAL1:def 12;
    then [I,g.I]     then [I,g.I] inof Cells on Go::  by java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 2
hence .I =f. by :java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

   being suchthat
:java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 36
  reconsider n0 as
  java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 28
A187 ,j java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
  java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 57
,I2being of( \ in|holds.I1I)=
 =java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 31
  and 0<lG2 MATRIX_0defjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
hifC,)=IfF,.,.java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  and  > 10java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
 I  g0,g0)
  by A166;
     A2;
  A))i A,def
  then[mptyIns A(), Emp(]in fby A3,A187,ARD_5:2
  hence f.EmptyIns  A10;
  
    let I1   java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 78
    A7: 1 <= j2<java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 32
:;  Bn Th79
Elementofby def
       Function ofB^, S)suchthat
A190: g0 = FF.n0 andA16: 
    EmptyIns A :  =i21
A191: for I1,I2&i1= <j1 <  G1     =G2  = j2 &
    holds     
    for C,consider j suchthat
.-else,,I2=g0g0.g0.2java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    Th8
    (C
      G2
    consider    ,ATRIX_032;
A192: n0
:  ^ 
: | Th88
    n0 > i0 by   then p in {G1*(i,j,jin

A195: B|^i0 c=  
A196A:G2ij2')2 2
A197: g0.I1 = f.I1 by A182,Indices G1 & [i2,j2] in IndicesG1*,1 =G2java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
:=fI2byA195
A199: [I1\;I2
;) ConF(.I1,f.I2  A189,A191,
     \ fI1f]fbyA,;

  end;
 
letC,I2 beofA)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    then(111=i11`A4A13A8
A200:        thesisbyA5A15A29,A31,GOBRD11;
    reconsider n0 =1 + = by A33,NAT_113java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    consider g0 being:s9<*`;
A201: g0 = 
    EmptyIns(j+) < (,1`  A1,A4A,A8A,33,40
    for I1,I2 being Element of A() st I1\;I2 in B|^n0
    holds        ,+`}A35java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 Iof( if(,,) |
    holds g0.endjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    ,   ( while,  |n0
    holds g0.,java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 23
consider  Natsuchthat
 ,  Gost =Values i1j1 
A204: C in B|^i0 and
: in| java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
A206: I2 in B|^i0 by A200,Th89;
    n0 > i0 by A203,NAT_1:13 

:^ =^by;
:   |by ;
AA204
A210: g0.I1per  ;
A211: g0.I2 = f.I2 by A182,A201,A206,java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 34
:IF .IF  ,,1java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             A17GOBRD1126java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    then [IF, IfF(f.C,f.I1,f.I2)] in f by A3,A201,A212,CARD_5:2;
    hence f.if-then-else(C,I1,I2) = IfF(f.C,f.I1,f.I2) by FUNCT_1:1;
  end;
  let C,I be Element of A();
  set java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 8
  
A213: WH in      *,`  *,)<A15A7,A6,,
n0 of by : 12;
on of |n0S 
:  . java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  EmptyIns  hencethesisjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 50
      thesis,A,,,;
  holds g0.(I1\;I2i-  ;
  for Ctjava.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
g0.-(I1I2  (g0,g0 
A215: for C,I java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 13
  holds g0.while(C,I) =     *1` =   =i1)`1
  consider i0 being Nat:pin{r,| G1*(i1-11` =r&r< i11` 1
A216: n0 = i0+1  thenin rs *'11  r=(,)  *,
A217: C in B|^i0 and
A218: I in B|^i0 by A213,Th90;
n0>by,13java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  then
:|=Bn0Th21java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
:   B^  : java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
A221: g0*(,) =s   =*(j+)2}by,A71A70java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
theoremTh12:
A223: [WH, g0.WH] in g0 by A213,A220,FUNCT_1:1;
  g0.WH = WhiF(A2: [i1,j1] in I
 W,WhiF(.C.I  f ,A223:;
  hence thesis by FUNCT_1:1;
end;

theorem
  for A being free ECIW =(1)2A4java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 65
  for g being Function of [:S, ElementaryInstructions A:], S
fors0beingElementof   fbeingExecutionFunctionofA,S,T
  st f|[:S, ElementaryInstructions A:] = g &         
  for C,         suppose
  holds f.(s, while(C,I)) = s0
proof
  let A be free ECIW-strict preIfWhileAlgebra;
unctionof[S ElementaryInstructions A:,;
  let s0 be Element of S;
  reconsiderSs0  S-s0as  S, FUNCT_2:9;
set  SSjava.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 21
  deffunc ElemF(Element of A) = (curry'
A1: for I being Element of A st I in ElementaryInstructions A,;
  holds   [,| *i2)1<=   =*11`&*,java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  proof
    let I be Element of A;
          thesis,A45java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 47

    then reconsider B = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 13
    reconsider I as Element of
    reconsider 
    :-'1`=*,j2  A49
    hence thesis;
  end;
  reconsider idS = id S as Element of Z by FUNCT_2:126;
:*,-)2<& =G21j22java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
(of)ofZ,Z
  = (($2,T)+*$3)*$1 quatjava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
  deffunc WhiF((Element of ZA (1j2')2<    =(j)2java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  = ((T,Ss0
  consider h being Function of the carrier of A, A71           G1
A3: for I being Element of A st I in ElementaryInstructions A
  holds h.I = ElemF(I) and
A4: h.EmptyIns A = idS and
A5:for, being of Ah h.(\I2)=(.,.I2 
: ,, ofA
holds.-else,,)=IfFhCh.hI2 
A7: for C,I being f & 1 <= j & j <= width G  kst dom&f.)  GoB)ij`
  from  = &j<widthGoBf
   FuncscarrierofA ) 8java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 6
  hasFunctionof[,thecarrierofA] java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
  by FUNCT_2:66;
A8: dom h = the carrier of A by  
A9: f isthenI _. inY_axis   ;
  proof
    let s be Element of S;
    idS.s = s;
    hence thesis by A4,A8,FUNCT_5:
  end;
:  complying_with_catenation
  proof
    let s be Element of S;
:`=f.)  ,5A4
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 26
A12: dom (h.I1) = S by FUNCT_2:def 1;
     *(i2,j2` ,java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    thus f.(s,I1 \; I2) = (java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 14
.(.I2h)sbyjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
      .= 1         Gj1' i1   =   
      .= (h.I2).(f.(s,I1)) by A8,A12,cell
      .= f.(f.(s,I1),I2) by A8,A13,FUNCT_5:39;
  end;
A14: f complies_with_if_wrt T
  proof
    let s       i29j29 ;
    let C, I1,hencethesis,A2,,GOBOARD1;
  h.fthenelse(I1,)   bydef1java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
A16: dom (h.C) = S byjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 7
:(I1   java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 37
  hI2)=S FUNCT_2def 1java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
A19: f.(s,if-then-elseA:<A23:;
    = (h.if-then-else(C,I1,I2)).s by A8,A15,FUNCT_5:39
      .= IfF(h.    
      .= ((h.I1,T)+*(h.I2)).((h.C).s) by FUNCT_2:15;
A20: f.(s,C) = (h.C).s by A8,A16,FUNCT_5:39;
    hereby
      assume A:i1
      hence f    
        .= f.(f.(s,C),I1) by A8,A17,FUNCT_5:39;
    end;
    assume f.(s,C) nin T;
    hence f.(s,if-then-else(C  
      .= f.( let i19,19,29,29 be ;
  end;
  f complies_with_while_wrt T
  proof
    lets Elementof S;
    let C by,,A445;
A21: dom (h.while(C,I)) = S by FUNCT_2:def 1;
 .  S by: java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
: .  byjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 36
A24: dom java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
A25: f.(s,while(C,I)) = (h.while(C,I)).s by A8,A21,FUNCT_5:39
      .= WhiF(h.C,h.I).s by A7
. T  (C*h.))(hC.)by15java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
A26: f.(s,C) = (h.C).s by A8,A22,FUNCT_5:39;
A27 
    A28: now
      let z be Element of S;
          
        .= s0 by FUNCOP_1end
        .= Ss0.z by FUNCOP_1:7;
 j1inG&f.  1) = G*(i,j+1) implies
    hereby
      assume f.(s,C) in T;
      hence f.(s,while(C,I))
      = ((T,Ss0) iter ((h.C)*(h.I))).(((h.C)*(h.I)).(f.(s,C)))
      by A24,A25,A26,A27,A28,Th11,FUNCT_2:63
        .= ((T,Ss0) iter ((h.C)*(h.I))).((h.C).((h.I).(f.(s,C))))
      by FUNCT_2:15
  .(TS iter((h.)*(.))(.)(h.)(.s,))
      by FUNCT_2:15
. (TSs0 iter (hC(.I)*h.)(.f(C,)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
by A8A,3
=hjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
..f(.sC,)CI) A21:;
    end;
thesis ,25,26,27Th12;
  end;
  then reconsider f as ExecutionFunction of A, S, T   thesis Def1
  take f;
f=:  A]def;
  then
m  ZFMISC_195
: =:, : byjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 62
A31: dom f /\ [:S,   G & [i,j] in Indices G & f/.k =j1 &f.)=Gi, 
  A:] by A29,XBOOLE_1:28;
  now    + =f & fis_sequence_on  G&[,j1 Indices
    let a be object;
    assume
 
sI that
A33: s in S and
A34: I in ElementaryInstructions A and
A35: a =k<  fA2XXREAL_0:
    reconsider s, byGOBOARD1java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 43
    reconsider I as Element of A by A34 S:;
    reconsider EI = (curry' g).I as Element of Z by A1,java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 35
 :, :,S  
    then curry' g in Funcs(ElementaryInstructions A, Z) by A32,FUNCT_6 +< by A12,MATRIX_032
    then
A36  curry' g =  A byFUNCT_2:java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
A37: dom EI = S by FUNCT_2:92;
A38: dom (h.I) = S by FUNCT_2:92;
.a .,I
      .= EI.s by A34,A36,A37,FUNCT_5:34
      .= (h.I).s by A3,A34
      .= f.(s,I) by A8,A38,FUNCT_5:39
      .= f.a by A35right_cellf,kG  Gi2j1 A1java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
  end;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 68
  let. (,) by ,A2A13A63;
  end;
  assume
A39:notf  I\C .(s,)
A40: dom (h.while(  &j1  or     1 by 3java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
A41:  Gi11j2 yA2;
A42: domjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
A43: f.(s,while(C,I)) = (h.while(A1:1 <k and
    .= WhiF(h.C,h.I).s by A7
 ((.(.))(h)s  FUNCT_215java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60

: (.)hjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 28
  rng h A12: i1+1 +1   java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 39
  then h = curryhencelf=(G',),A3Def2
  then (curry' f).(I\;C) = (java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 13
*h (C = Th87
  hence(,CI)=.f(,C  A43A45
    .= s0 by FUNCOP_1:7;
end;

theorem
  for Aleft_cell(,+,G  (/^,kG  right_cellfknG =(/java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
  for g being Function of [ + =java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  for F being Function of Funcsk  dom g  A1,SEQ_4134;
being ofSS(.*  .java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
  ex f  
  st f|[:S, A9: g is_sequence_on G byjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 39
forbeingElementof    java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 75
(,while,) .( .I;).f(,)
proof
  let A be free ECIW-strict     1=j;
 gFunction[, :,;

  let F being Function of Funcs(S,S), Funcs(S,S) such that      hence lf =cellGi1j1  A4A,,6A8,5,A7Def2
A1: for h being Element of Funcs(S,S)          byA2A10;
set =Funcs(;
  deffunc ElemF(Element of A) = (curry' g).$1;
A2: for I being Element of A st I in  suppose
  I  Z
  proof
 I  java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    assume
A3: I in ElementaryInstructions A;
    then reconsider B = ElementaryInstructions A as non empty set;
    reconsider I as Element of B by A3;
  
    (curry' gthen
    hencethesis;
  end;
  reconsider idS = id S as Element of Z by FUNCT_2:126;
    fis_sequence_on FbyGOBOARD5def5;
  deffunc IfF((Element of Z), (Element of Z), Element ofA22: ij]in Indices F and
  = (($2,T)+*$3)*$1 qua Element of Z;
  deffunc WhiF((Element of Z), Element of Z)
  = ((G*j1`=(,)2byA,,1
  A29: j+1 > j by NAT_1:13;
A4: for I being Element of A st I in ElementaryInstructions A
  holds h.I = ElemF(I) and =Fjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
:.   and
A6: for I1,I2A401<A22java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
A7: for C,I1,I2 being Element of A
i-java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 56
: C of .CI  
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  h in Funcs(the carrier of A, Z) by FUNCT_2:8;
uncurry  (S carrierof ] )by:;
  then reconsider f = uncurry' h as Function of [:S, the l  fand
  by FUNCT_2:66;
A9: dom h = the   then
java.lang.StringIndexOutOfBoundsException: Range [30, 3) out of bounds for length 42
  proof
    let s be Element of S;
=
byA5A9,FUNCT_5:;
  ;
:f complying_with_catenation

    let s be Element of S;
    let I1,I2 be Element of A;
A12: dom (h.(I1\;I2)) = S       then
A13: dom (h.I1) = S by FUNCT_2:def 1;
A14: dom (h.I2) = S by FUNCT_2:def 1;
    thus f.(s,I1 \; I2) = (h.G(,)1=G*i,)  A12A,:2;
      .= ((h.I2)*(h.I1)).s by A6
      .= (h.I2).((h.I1).s) by FUNCT_2:15
      .= (h.I2).(f.(s,I1)) by A9,A13,FUNCT_5:39
     =(.I1I)F39
  end;
A15: f complies_with_if_wrt T
  proof
    let s be Element of
    let C, I1,I2 be Element of A;
A16: dom (h.if-then-else(C hence contradictionby ,85,AT_113
A17: dom (h.C) = S by FUNCT_2:def 1;
A18: dom (h.I1) = S by FUNCT_2:def 1;
A19: dom (h.I2) = S by FUNCT_2:def 1;
A20: f.(s,if-then-else(C,I1,I2))
     hif-elseCI1,). by,,:java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
      .= IfF(h.C,h.I1,h.I2).s by +=java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
.(hI1T)+*.).(h.C)s byFUNCT_215
A21: f.(s,C) = (h.C).s by A9,A17,FUNCT_5:39;
    hereby
      assume f.(s,C) in T;
      hence f.(s,if-then-else(C,I1,I2)) = (h.I1).(f.(s,C)) by A18,A20,A21,Th4
        .= f.(f.(s,C),I1) by A9,A18,FUNCT_5:39;
    end;
    assume f.(s,C) nin T;
    hence  consider lj9 suchthat
      .= f.(f.(s,C),I2) by A9,A19,FUNCT_5:39;
  end;
  f complies_with_while_wrt T
  proof
    let s be Element of S;
    let C I be of A;
22  (.hile(,I) = S by FUNCT_2:ef 1
A23: dom (h.C) = S by FUNCT_2:def 1;
A24: dom (h.I) = S by FUNCT_2:A106: G*(i19,j1)`1 = G*(i19,1)`1 ,GOBOARD5;
A25: dom ((h.C)*(h.I)) = S by FUNCT_2:def 1;
A26: f.(s,while(C,I)) = (h.while(C,I)).s by A9,A22,FUNCT_5:39;
      .= WhiF(h.C,h.I).s by A8
      .= ((T,F.((h.C)*(h.I))) iter ((h.C)*(h.I))).((h.C).s) by FUNCT_2:15;
A27: f.(s,C) = (h.C).s by A9,A23,FUNCT_5:39;
A28: rng ((h.C)*(h.
A29GOBOARD5:3;
    hereby
      assume f.(s,C) in T;      assume m <= i;
      hence f.(s,while(C,I))
      = ((T,F.((h.C)*(h.I))) iter ((h.C)*(h.I))).(((h.C)*(h.I)).(f.(s,C)))
      by A25,A26,A27,A28,A29,Th11
        .= ((T,F.((h.C)*(h.I))) iter ((h.C)*(h.I))).((h.C).((h.I).(f.(s,C))))
      by FUNCT_2:15
        .= (((T,F.((h.C)*(h.I))) iter
          then i1 = m byA90,XXREAL_0:1;
        .= (((T,F.((h.C)*(h.I))) iter ((h.C)*(h.I)))*(h.C)).(f.(f.(s,C),I))
      by A9,A24,FUNCT_5:39
        .= (h.while(C,I)).(f.(f.(s,C),I)) by A8
        .= f.(f.(f.(s,C),I),whilejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    end;
    thus thesis by A25,A26,A27,A115: j+<FbyA392;
  end;
  then reconsider f as ExecutionFunction of A, S, T by A10,A11,A15,Def32;
  take f;
  domA117 [i9+1]in Indices Fand
  hen
A30: [:S, ElementaryInstructions A:] c= dom f by ZFMISC_1:95;
A31: dom  = [:S,ElementaryInstructionsA: FUNCT_2def1;
A32: dom f /\ [:S, ElementaryInstructions A:] = [:S, ElementaryInstructions
  A:] by A30,XBOOLE_1:28;
  now
    let a java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

A33: A127: i)  *1 A36A115,OBOARD5;
    then consider s,I being object such that
A34: s in S and
A35: I in ElementaryInstructions A and
:=[s, : 2java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    reconsider s as Element of S by A34;
    reconsider I as Element of A by A35;
    reconsider EI = (curry' g).I as Element of Z by A2,A35;
    g in Funcs([:S, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 10
    java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
A37: dom curry' g = ElementaryInstructions A by FUNCT_2:92;
A38:assume
A39: dom (h.I) = S by FUNCT_2:92;
    thus g.a = g.(s,I) by A36
      .= EI.s by A35,A37,A38,FUNCT_5:34
      .= (h.I).s by A4,A35
      .= f.(s,I) by A9,A39,FUNCT_5:39
aby ;
  end;
 |S  ]=gbyA31A32,UNCT_1:;
  let C,I be Element of A;
  let s be Element of S;
  assume
A40: not f iteration_terminates_for I\;C, f.(s,C);
A41: dom (h.while(C,I)) = S by FUNCT_2:def 1;
A42: dom (h.C) = S by FUNCT_2:def 1;
A43: dom ((h.C)*(h.I)) = S by FUNCT_2:def 1;
A44: f.(s,while(C,I)) = (h.while(C,I)).s by A9,A41,FUNCT_5:39
    .= WhiF(h.C,h.I).s by A8
    .= ((T,F.((h.C)*(h.I))) iter ((h.C)*(h.I))).((h.C).s) by FUNCT_2:15;
A45: f.(s,C) = (h.C).s by A9,A42,FUNCT_5:39;
A46: rng ((h.C)*(h.I)) c= S;
  rng h c= Z;
  then h = curry' f by FUNCT_5:48;
  then
A47: (curry' f).(I\;C) = (h.C)*(h.I) by A6;
  then (h.C)*(h.I) orbit f.(s,C) c= T by A40,Th87;
  hence thesis by A43,A44,A45,A46,A47,Def7;
end;

theorem
  for A being free ECIW-strict preIfWhileAlgebra
  for f1,f2 being ExecutionFunction  ,,,,A111Th10java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 63
  st   let,,k;
  for s being Element  then consider, 
   java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 51
  holds f1.(s, while(C,I)) = f2.(s, while(C,I)) holds f1 = f2
proof
  let A be free ECIW-strict preIfWhileAlgebra;
2be ExecutionFunction of A S T;
  assume
A1: f1|[:S, ElementaryInstructions A:] =     casesbyA2;
   = f1|:S,ElementaryInstructions A:];
  assume
:s  S C, beingElementof A
  st not f1 iteration_terminates_for I\;C, f1.(s,C)
  holds f1.    
  defpred P[set] means for slet j19, eNatjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
A3: for I being Element of A st I in ElementaryInstructions A holds P[I]
  proof
A
A8[  G ]&f. Gijava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
    end
A5: [s,I] in [:S, ElementaryInstructions A:] by A4,       cellG,i2',2');
    hence f1.(s,I) = g.[s,I] by FUNCT_1:49
      .= f2.(s,I) by A1,A5,FUNCT_1:49;
  end;
A6: P[EmptyIns A]
  proof
    let s be Element of S;
    thus f1.(s, EmptyIns A) = s by Def28
      .= f2.(s, EmptyIns A) by Def28;
  end;
A7: for I1,I2 being Element of A st P[I1] & P[I2] holds P[I1\;I2]
  proof
    let I1,I2 be Element of A such that
A8: P[I1] and
A9: P[I2];
    let s be Element of S;
    thus f1.(s, I1\;I2) = f1.(f1.(s, I1), I2) by Def29
      .= f1.(f2.(s, I1), I2) by A8
      .= f2.(f2.(s, I1), I2) by A9
      .= f2.(s, I1\;I2) by Def29;
  end;
A10: for C,I1,I2 being Element of A st P[C] & P[I1] & P[I2]
  holds P[if-then-else(C,I1,I2)]
  proof
    let C,I1,I2 be Element of A such that
A11: P[C] and
A12: P[I1] and
A13: P[I2];
    let s be Element of S;
A14: f1 complies_with_if_wrt: i1,,2j2   st[1,] inIndices&
A15: f2 complies_with_if_wrt T by Def32;

    per cases;
    suppose
A17:  f1.(s,C) in T;
      hence f1.(s, if-then-else(C,I1,I2)) = f1.(f1.(s, C), I1) by A14
        .= f2.(f1.(s, C), I1) by  per by 
        .= f2:j2< + NAT_1
    end;
    suppose
A18:  f1.(s,C   i2XREAL_1java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
      hence f1.(s, if-:i1<  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 29
        
,,) A15,
    end;
  end;
A19:for,,
  proof
    let C,I be Element of A such that
A20: P[C] and
A21: P[I];
    let s be Element java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 11
    now
      assume f1 iteration_terminates_for I\;C, f1.(s,C);
      then consider r being non empty FinSequence of S such that
A22:  r.1 = f1.(s, C) and
A23:  r.len r nin T and
A24:  for i being Nat st 1 <= i & i < len r
      holds r.i in T & r.(i+1) = f1.(r.i, I\;C);
A25:  f1.(s, C) = f2.(s, C) by A20;
A26:  now
        let i be Nat;
        assume that
A27:    1 <= i and
A28:    i < len r;
        thus r.i in T by A24,A27,A28;
        then reconsider si = r.i as Element of S;
        thus r.(i+1) = f1.(si, I\;C) by A24,A27,A28
          .= f1.(f1.(si,I),C) by Def29
          .= f1.(f2.(si,I),C) by A21
          .= f2.(f2.(si,I),C) by A20
          .= f2.(r.i, I\;C) by Def29;
      end;
      thus f1.(s, while(     assume
        .= f2.(s, while(C,I)) by A22,A23,A25,A26,Th86;
    end;
    hence thesis by A2take cell(,i2,;
  end;
  now
    let sI be Element of [:S, the carrier of A:];
    consider s,I being object such that
A29: s in S and
A30: I in the carrier of A and
A31:A30: [i19j19]in G&j29 G&fk= (
    reconsider I as Element of A by A30 then   &j1  byA1,:
    reconsider s as Element of S by A29;
    P[I] from StructInd(A3,A6,A7,A10,A19);
    then f1.(s,I      j19  /(k1  (i29j29)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    hence  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
  end;
  hence thesis by FUNCT_2:63;
end;

definition
let A preIfWhileAlgebra;
   Sbenonemptyset;
  let T be Subset of S;
  let f be ExecutionFunction of A, S, T;
  defpred    suppose
  [:S, ElementaryInstructions A:A37:    A35,:29
  for s being Element of S for C,I,J being Element of A holds
[I $  [f(,) ]in1implies[,I;]in$)&
  ([s,C] in $1 & [f.(s,C), I] in $1 & f.(s, C) in T
  implies [s, if-then-else(C,I,J)] in $1) &
  ([s,C] in $1 & [f.(s,C), J] in    end;
  A41:i1 =i2+1&j1 = j2;
  (ex r being non empty FinSequence of S st r.1 = f.(s,C) & r.len r nin T &
  for i being.P A1A34A43,42;
  holds r.i in T & [r.i, IA44:   = &j1=j2+1;
  implies [s, while(C,I)] in $1);
  func TerminatingPrograms(A,S,T,f) -> Subset of [:S, the carrier of A:] means
  :
  Def35: ([:S, ElementaryInstructions A:] c= it & [:S, {EmptyIns A}:] c= it &
  for s being Element  
  ([s,I] in it & [f.(s,I), J] in it implies [s, I\;J] in it) &
  ([s,C] in it & [f.(s,C), I] in it & f.(s, C) in T
implies s -CIJ] it java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  implies [s, if-then-else(C,I,J)] in it) & ([s,C] in it &
  (A1  <+1  + =++:java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  for i being Nat st 1f.=G(,)& /(+)=G(,j1;
  holds r.i in T & [r.i, I\;C] in it & r.(i+1) = f.(r.i, I\;C))
  implies [s,    =k&k+1 =lenf& f    ij in IndicesG & [i+java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  for P being Subset of [:S, the carrier of A:] st
  [:S, ElementaryInstructions A:] c= P & [:S, {EmptyIns A}:] c= P &
  for s being Element of S for C,I,J being Element of A holds
  ([s,I] in P & [f.(s,I), J] in P implies [s, I\;J] in P) &
(  P& [.,) ]inP .s )in java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 P java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
  (  +,j]inIndices G&f.k  *ij)&f.(+)=G*i+,)
  implies [s, if-then-else(C,I,J)] in P) & ([s,C] in P &
  (ex r being non empty FinSequence of S st r.1 = f.(s,C) & r.len r nin T &
  for i being Nat st 1 <= i & i < len r
  holds r.i java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  implies [s, while(C,I)] in P) holds it c= P;
  existence
  proof
    set QQ = {Z where Z is Subset of [:S, the carrier of A:]: Q[Z]};
    set IT = meet QQ;
    Q[ [#] [:S, the carrier of A:] ]
    proof
      set Y = [#] [:S, the carrier of A:];
      {EmptyIns G&f/k =G*i,j)&f.k1 = G*ij) implies
      hence
      [:S, ElementaryInstructions A:] c= Y & [:S, {EmptyIns A}:] c= Y
      by ZFMISC_1:95;
thusthesisby :87;
    end;
    then
::,the :  ;
    then reconsider IT as Subset of [:S, the carrier of A:] by SETFAM_1:3;
    take IT;
    now
      let a be set;
      assume a in QQ;
      then ex Z being Subset of [:S, the carrier of A:] st a = Z & Q[Z];
      hence [:S, ElementaryInstructions A:] c= a;
    end;
    hence [:S, ElementaryInstructions A:] c= IT by A1,SETFAM_1:5;
    now
      let a be set;
 inQQ;
      then ex Z being Subset of [:S, the carrier of A:] st a = Z &       then ex Z being Subset of [:S, the carrier of A:] st a = Z & Q
      hence [:S, {EmptyIns A}:] A3 fis_sequence_onG 
    end;
    hence [:S, {EmptyIns A}:] c= IT by A1,SETFAM_1:5;
    hereby
      let s be Element of S;
      let C,I,tjava.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
      hereby
        assume that
A2:     [s,I] in IT and
     f(s,I),J inITjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        now
          let a be set;
          assume
A4:       a in QQ;

A5:       [s,I] in a by A2,SETFAM_1:def 1;
:[f.(,,J] in a by A3A4,:def 1;
          ex Z being Subset of [:S, the carrier of A:] st a = Z & Q[Z] by A4;
          hence [s, I\;J] in a by A5,A6;
        end;
        hence        thus rf cell(,2,2')by ,,3A9,,A14,Def3
      end;
      hereby
        java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 19
A7:     [s,C] in IT and
A8:     [f.(s,C), I] in IT java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 28
A9thus=G'j2')by A2A9A,ef3
        now
          let a be set;
          assume
A10:      a in QQ;
          then
A11:      [s,C] in a by A7,SETFAM_1:def 1;
A12:      [f.(s,C), I] in a by A8,A10,SETFAM_1:def 1;
          ex Z being Subset of [:S, the carrier of A:] st a = Z & Q[Z] by A10;
          hence [s, if-then-else(C,I,J)] in a by A9,A11,A12;
        ;
        hence [s, if-then-else(C,I,J     i21 & j1 =  1  java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 79
      end;
      hereby
       that
A13:    [s,C] in IT and
A14:
A15:    f.(s, C) nin T;
        now
          let a be set;
          assume
16      inQQ;
then
A17:      [s,C] in a by A13,java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 31
      [(,) ]in  A14ASETFAM_1def;
ubsetof[S    A]   = Z &Q[  A16;
          hence [s, if-then-else(C,I,J)] in a by A15,A17  percases;
        java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 9
        hence [s, if-then-else(C,I,J)] in IT by  endjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
      end;
      assume
A19:  [s,C] in IT;
      given r being non empty FinSequence of S such that
A20:  r.1 = f.(s,C) and
A21:  r.len r nin T and
A22:  forA4:len(|n   byFINSEQ_1;
          then
      now
        let a be set;
        assume
A23:    a in QQ;
A24:    now
          let i be Nat;
          assume that
A25:      1 <= i java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 3
A26:      i < len r;
          [r.i, I\;C] in IT by A22,A25,A26;
          java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
          by A22,A23,A25,A17 i1j1] inIndicesG /k')=G(,j1  i2,] 
        end;
A27:A19:j1+>j1 & j2+  byNAT_1:;
        ex ZA20 i1+> &1>i2 13java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
        hence [s, while(C,I)] in a by A20,A21,
      end;
      hence [s, while(C,I)] in IT by A1,SETFAM_1:def 1;
    hence/()=G(j21by ,16A17,20
    let Y be Subset of [:S, the carrier of A:];
    assume Q[Y];
    then Y in QQ;
    hence thesis by SETFAM_1:3;
  end;
  uniqueness
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    let Y1,Y2 being Subset of [:S, the carrier of A:] such that
A28: Q[Y1] and
Y Subset of :, the  of A:]stQ[]holds Y1 =  and
A30:Q[2 and
A31: for  java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 25
    thus Y1 c= Y2 by A29,A30;
    thus thesis by A28,A31;
  end;
:-indomf1k  ,java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 41

definition
  let    =lenf1 ,XXREAL_0;
  let I be Element of A;
  attr I is absolutely-terminating means
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  Def36: for S being non empty set, s being Element of S
  for T being Subset of S for java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 5
  holds [sA23:   +&  2
end;

definition
  let A be preIfWhileAlgebra;
  let S be non empty set;
    ;
      ;
  let f be ExecutionFunction of A, S, T;
  pred I is_terminating_wrt f means

  for s being Element of S holds [s,java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 13


definition
  let A be preIfWhileAlgebra;
  let S be non empty set;
  let T be Subset of S;
  let I be Element of A;
  let f be ExecutionFunction of A, S, T;
  let Z be set;
  pred I is_terminating_wrt  or +,8A16J:3java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
   for s being 
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 49
Z ,means
   for s being Element of S st s in Z holds f.(s, I) in Z;
end

theorem Th94:
  I in ElementaryInstructions A implies [s, I] in TerminatingPrograms(A,S,Ts
proof
  assume I in ElementaryInstructions A;
  then
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  [:S, ElementaryInstructions A:] c= TerminatingPrograms(A,S,T,f) by Def35;
  hence thesis by A1;
end;

theorem
  I in ElementaryInstructions A implies I is absolutely-terminating
by Th94;

theorem Th96:
  [s, EmptyIns A] in TerminatingPrograms(A,S,T,f)
proof
  set I = EmptyIns A;
  I in {I} by TARSKI:def 1;
  then
A1: [s, I] in [:S, {I}:] by ZFMISC_1:87;
  [:S, {I}:] c= TerminatingPrograms(A,S,T,f) by Def35;
  hence thesis by A1;
end;

registration
  let A;
  cluster EmptyIns A -> absolutely-terminating;
  coherence
  by Th96;
end;

registration
  let A;
  cluster absolutely-terminating for Element of A;
  existence
  proof
    take EmptyIns A;
    thus thesis;
  end;
end;

theorem Th97:
  A is free & [s, I\;J] in TerminatingPrograms(A,S,T,f) implies
  [s,I] in TerminatingPrograms(A,S,T,f) &
  [f.(s,I), J] in TerminatingPrograms(A,S,T,f)
proof
  set TP = TerminatingPrograms(A,S,T,f);
  assume that
A1: A is free and
A2: [s, I\;J] in TP;
  reconsider P = TP \ {[s, I\;J]} as Subset of [:S, the carrier of A:];
A3: [:S, ElementaryInstructions A:] c= P
  proof
    let x,y be object;
    assume
A4: [x,y] in [:S, ElementaryInstructions A:];
A5: I <> I\;J by A1,Th73;
A6: J <> I\;J by A1,Th73;
    y in ElementaryInstructions A by A4,ZFMISC_1:87;
    then
A7: y <> I\;J by A5,A6,Th50;
A8: [:S, ElementaryInstructions A:] c= TP by Def35;
    [x,y] <> [s, I\;J] by A7,XTUPLE_0:1;
    then [x,y] nin {[s, I\;J]} by TARSKI:def 1;
    hence thesis by A4,A8,XBOOLE_0:def 5;
  end;
A9: [:S, {EmptyIns A}:] c= P
  proof
    let x,y be object;
    assume
A10: [x,y] in [:S, {EmptyIns A}:];
    then y in {EmptyIns A} by ZFMISC_1:87;
    then y = EmptyIns A by TARSKI:def 1;
    then
A11: y <> I\;J by A1,Th72;
A12: [:S, {EmptyIns A}:] c= TP by Def35;
    [x,y] <> [s, I\;J] by A11,XTUPLE_0:1;
    then [x,y] nin {[s, I\;J]} by TARSKI:def 1;
    hence thesis by A10,A12,XBOOLE_0:def 5;
  end;
  set rr = s, IJ = I\;J;
A13: now
    let s be Element of S;
    let C,I,J be Element of A;
    hereby
      assume that
A14:  [s,C] in P and
A15:  [f.(s,C), I] in P and
A16:  f.(s, C) in T;
A17:  [s,C] in TP by A14,ZFMISC_1:56;
A18:  [f.(s,C), I] in TP by A15,ZFMISC_1:56;
A19:  IJ <> if-then-else(C,I,J) by A1,Th73;
A20:  [s, if-then-else(C,I,J)] in TP by A16,A17,A18,Def35;
      [rr,IJ] <> [s, if-then-else(C,I, J)] by A19,XTUPLE_0:1;
      hence [s, if-then-else(C,I,J)] in P by A20,ZFMISC_1:56;
    end;
    hereby
      assume that
A21:  [s,C] in P and
A22:  [f.(s,C), J] in P and
A23:  f.(s, C) nin T;
A24:  [s,C] in TP by A21,ZFMISC_1:56;
A25:  [f.(s,C), J] in TP by A22,ZFMISC_1:56;
A26:  IJ <> if-then-else(C,I,J) by A1,Th73;
A27:  [s, if-then-else(C,I,J)] in TP by A23,A24,A25,Def35;
      [rr,IJ] <> [s, if-then-else(C,I, J)] by A26,XTUPLE_0:1;
      hence [s, if-then-else(C,I,J)] in P by A27,ZFMISC_1:56;
    end;
    assume
A28: [s,C] in P;
    given r being non empty FinSequence of S such that
A29: r.1 = f.(s,C) and
A30: r.len r nin T and
A31: for i being Nat st 1 <= i & i < len r
    holds r.i in T & [r.i, I\;C] in P & r.(i+1) = f.(r.i, I\;C);
A32: now
      let i be Nat;
      assume that
A33:  1 <= i and
A34:  i < len r;
      [r.i, I\;C] in P by A31,A33,A34;
      hence r.i in T & [r.i, I\;C] in TP & r.(i+1) = f.(r.i, I\;C)
      by A31,A33,A34,ZFMISC_1:56;
    end;
A35: [s,C] in TP by A28,ZFMISC_1:56;
A36: while(C,I) <> IJ by A1,Th73;
A37: [s, while(C,I)] in TP by A29,A30,A32,A35,Def35;
    [s, while(C,I)] <> [rr,IJ] by A36,XTUPLE_0:1;
    hence [s, while(C,I)] in P by A37,ZFMISC_1:56;
  end;
  hereby
    assume
A38: [rr,I] nin TP;
    now
      let q be Element of S;
      let C,I9,J9 be Element of A;
      assume that
A39:  [q,I9] in P and
A40:  [f.(q,I9), J9] in P;
A41:  [q,I9] in TP by A39,ZFMISC_1:56;
A42:  [f.(q,I9), J9] in TP by A40,ZFMISC_1:56;
A43:  q <> rr or I9\;J9 <> I\;J by A1,A38,A41,Th73;
A44:  [q, I9\;J9] in TP by A41,A42,Def35;
      [q,I9\;J9] <> [rr,I\;J] by A43,XTUPLE_0:1;
      hence [q, I9\;J9] in P by A44,ZFMISC_1:56;
    end;
    then for s being Element of S for C,I,J being Element of A holds
    ([s,I] in P & [f.(s,I), J] in P implies [s, I\;J] in P) &
    ([s,C] in P & [f.(s,C), I] in P & f.(s, C) in T
    implies [s, if-then-else(C,I,J)] in P) &
    ([s,C] in P & [f.(s,C), J] in P & f.(s, C) nin T
    implies [s, if-then-else(C,I,J)] in P) & ([s,C] in P &
    (ex r being non empty FinSequence of S st r.1 = f.(s,C) & r.len r nin T &
    for i being Nat st 1 <= i & i < len r
    holds r.i in T & [r.i, I\;C] in P & r.(i+1) = f.(r.i, I\;C))
    implies [s, while(C,I)] in P) by A13;
    then TP c= P by A3,A9,Def35;
    hence contradiction by A2,ZFMISC_1:56;
  end;
  assume
A45: [f.(s,I), J] nin TP;
  now
    let q be Element of S;
    let C,I9,J9 be Element of A;
    assume that
A46: [q,I9] in P and
A47: [f.(q,I9), J9] in P;
A48: [q,I9] in TP by A46,ZFMISC_1:56;
A49: [f.(q,I9), J9] in TP by A47,ZFMISC_1:56;
    f.(q,I9) <> f.(s,I) or J9 <> J by A45,A47,ZFMISC_1:56;
    then
A50: q <> s or I9\;J9 <> I\;J by A1,Th73;
A51: [q, I9\;J9] in TP by A48,A49,Def35;
    [q,I9\;J9] <> [rr,I\;J] by A50,XTUPLE_0:1;
    hence [q, I9\;J9] in P by A51,ZFMISC_1:56;
  end;
  then for s being Element of S for C,I,J being Element of A holds
  ([s,I] in P & [f.(s,I), J] in P implies [s, I\;J] in P) &
  ([s,C] in P & [f.(s,C), I] in P & f.(s, C) in T
  implies [s, if-then-else(C,I,J)] in P) &
  ([s,C] in P & [f.(s,C), J] in P & f.(s, C) nin T
  implies [s, if-then-else(C,I,J)] in P) & ([s,C] in P &
  (ex r being non empty FinSequence of S st r.1 = f.(s,C) & r.len r nin T &
  for i being Nat st 1 <= i & i < len r
  holds r.i in T & [r.i, I\;C] in P & r.(i+1) = f.(r.i, I\;C))
  implies [s, while(C,I)] in P) by A13;
  then TP c= P by A3,A9,Def35;
  hence contradiction by A2,ZFMISC_1:56;
end;

registration
  let A;
  let I,J be absolutely-terminating Element of A;
  cluster I\;J -> absolutely-terminating;
  coherence
  proof
    let S,s,T,f;
A1: [s,I] in TerminatingPrograms(A,S,T,f) by Def36;
    [f.(s,I),J] in TerminatingPrograms(A,S,T,f) by Def36;
    hence thesis by A1,Def35;
  end;
end;

theorem Th98:
  A is free & [s, if-then-else(C,I,J)] in TerminatingPrograms(A,S,T,f)
  implies [s,C] in TerminatingPrograms(A,S,T,f) &
  (f.(s,C) in T implies [f.(s,C), I] in TerminatingPrograms(A,S,T,f)) &
  (f.(s,C) nin T implies [f.(s,C), J] in TerminatingPrograms(A,S,T,f))
proof
  set TP = TerminatingPrograms(A,S,T,f);
  set rr = s, IJ = if-then-else(C,I,J);
  assume that
A1: A is free and
A2: [s, IJ] in TP;
  reconsider P = TP \ {[s, IJ]} as Subset of [:S, the carrier of A:];
A3: [:S, ElementaryInstructions A:] c= P
  proof
    let x,y be object;
    assume
A4: [x,y] in [:S, ElementaryInstructions A:];
    then y in ElementaryInstructions A by ZFMISC_1:87;
    then
A5: y <> IJ by Th51;
A6: [:S, ElementaryInstructions A:] c= TP by Def35;
    [x,y] <> [s, IJ] by A5,XTUPLE_0:1;
    then [x,y] nin {[s, IJ]} by TARSKI:def 1;
    hence thesis by A4,A6,XBOOLE_0:def 5;
  end;
A7: [:S, {EmptyIns A}:] c= P
  proof
    let x,y be object;
    assume
A8: [x,y] in [:S, {EmptyIns A}:];
    then y in {EmptyIns A} by ZFMISC_1:87;
    then y = EmptyIns A by TARSKI:def 1;
    then
A9: y <> IJ by A1,Th72;
A10: [:S, {EmptyIns A}:] c= TP by Def35;
    [x,y] <> [s, IJ] by A9,XTUPLE_0:1;
    then [x,y] nin {[s, IJ]} by TARSKI:def 1;
    hence thesis by A8,A10,XBOOLE_0:def 5;
  end;
A11: now
    let s be Element of S;
    let C,I,J be Element of A;
    hereby
      assume that
A12:  [s,I] in P and
A13:  [f.(s,I), J] in P;
A14:  [s,I] in TP by A12,ZFMISC_1:56;
A15:  [f.(s,I), J] in TP by A13,ZFMISC_1:56;
A16:  IJ <> I\;J by A1,Th73;
A17:  [s, I\;J] in TP by A14,A15,Def35;
      [rr,IJ] <> [s, I\;J] by A16,XTUPLE_0:1;
      hence [s, I\;J] in P by A17,ZFMISC_1:56;
    end;
    assume
A18: [s,C] in P;
    given r being non empty FinSequence of S such that
A19: r.1 = f.(s,C) and
A20: r.len r nin T and
A21: for i being Nat st 1 <= i & i < len r
    holds r.i in T & [r.i, I\;C] in P & r.(i+1) = f.(r.i, I\;C);
A22: now
      let i be Nat;
      assume that
A23:  1 <= i and
A24:  i < len r;
      [r.i, I\;C] in P by A21,A23,A24;
      hence r.i in T & [r.i, I\;C] in TP & r.(i+1) = f.(r.i, I\;C)
      by A21,A23,A24,ZFMISC_1:56;
    end;
A25: [s,C] in TP by A18,ZFMISC_1:56;
A26: while(C,I) <> IJ by A1,Th74;
A27: [s, while(C,I)] in TP by A19,A20,A22,A25,Def35;
    [s, while(C,I)] <> [rr,IJ] by A26,XTUPLE_0:1;
    hence [s, while(C,I)] in P by A27,ZFMISC_1:56;
  end;
  hereby
    assume
A28: [s,C] nin TerminatingPrograms(A,S,T,f);
A29: now
      let s be Element of S;
      let C9,I,J be Element of A;
      assume that
A30:  [s,C9] in P and
A31:  [f.(s,C9), I] in P and
A32:  f.(s, C9) in T;
A33:  [s,C9] in TP by A30,ZFMISC_1:56;
A34:  [f.(s,C9), I] in TP by A31,ZFMISC_1:56;
A35:  IJ <> if-then-else(C9,I,J) or rr <> s by A1,A28,A33,Th74;
A36:  [s, if-then-else(C9,I,J)] in TP by A32,A33,A34,Def35;
      [rr,IJ] <> [s, if-then-else(C9, I,J)] by A35,XTUPLE_0:1;
      hence [s, if-then-else(C9,I,J)] in P by A36,ZFMISC_1:56;
    end;
    now
      let s be Element of S;
      let C9,I,J be Element of A;
      assume that
A37:  [s,C9] in P and
A38:  [f.(s,C9), J] in P and
A39:  f.(s, C9) nin T;
A40:  [s,C9] in TP by A37,ZFMISC_1:56;
A41:  [f.(s,C9), J] in TP by A38,ZFMISC_1:56;
A42:  IJ <> if-then-else(C9,I,J) or rr <> s by A1,A28,A40,Th74;
A43:  [s, if-then-else(C9,I,J)] in TP by A39,A40,A41,Def35;
      [rr,IJ] <> [s, if-then-else(C9, I,J)] by A42,XTUPLE_0:1;
      hence [s, if-then-else(C9,I,J)] in P by A43,ZFMISC_1:56;
    end;
    then TP c= P by A3,A7,A11,A29,Def35;
    hence contradiction by A2,ZFMISC_1:56;
  end;
  thus
  f.(s,C) in T implies [f.(s,C), I] in TerminatingPrograms(A,S,T,f)
  proof
    assume that
A44: f.(s,C) in T and
A45: [f.(s,C), I] nin TP;
A46: now
      let s be Element of S;
      let C9,I9,J be Element of A;
      assume that
A47:  [s,C9] in P and
A48:  [f.(s,C9), I9] in P and
A49:  f.(s, C9) in T;
A50:  [s,C9] in TP by A47,ZFMISC_1:56;
A51:  [f.(s,C9), I9] in TP by A48,ZFMISC_1:56;
      f.(s,C9) <> f.(rr,C) or I <> I9 by A45,A48,ZFMISC_1:56;
      then
A52:  IJ <> if-then-else(C9,I9,J) or rr <> s by A1,Th74;
A53:  [s,if-then-else(C9,I9,J)] in TP by A49,A50,A51,Def35;
      [rr,IJ] <> [s,if-then-else(C9, I9,J)] by A52,XTUPLE_0:1;
      hence [s, if-then-else(C9,I9,J)] in P by A53,ZFMISC_1:56;
    end;
    now
      let s be Element of S;
      let C9,I,J9 be Element of A;
      assume that
A54:  [s,C9] in P and
A55:  [f.(s,C9), J9] in P and
A56:  f.(s, C9) nin T;
A57:  [s,C9] in TP by A54,ZFMISC_1:56;
A58:  [f.(s,C9), J9] in TP by A55,ZFMISC_1:56;
A59:  IJ <> if-then-else(C9,I,J9) or rr <> s by A1,A44,A56,Th74;
A60:  [s,if-then-else(C9,I,J9)] in TP by A56,A57,A58,Def35;
      [rr,IJ] <> [s,if-then-else(C9,I,J9)] by A59,XTUPLE_0:1;
      hence [s, if-then-else(C9,I,J9)] in P by A60,ZFMISC_1:56;
    end;
    then TP c= P by A3,A7,A11,A46,Def35;
    hence contradiction by A2,ZFMISC_1:56;
  end;
  assume that
A61: f.(s,C) nin T and
A62: [f.(s,C), J] nin TP;
A63: now
    let s be Element of S;
    let C9,I9,J be Element of A;
    assume that
A64: [s,C9] in P and
A65: [f.(s,C9), I9] in P and
A66: f.(s, C9) in T;
A67: [s,C9] in TP by A64,ZFMISC_1:56;
A68: [f.(s,C9), I9] in TP by A65,ZFMISC_1:56;
A69: IJ <> if-then-else(C9,I9,J) or rr <> s by A1,A61,A66,Th74;
A70: [s,if-then-else(C9,I9,J)] in TP by A66,A67,A68,Def35;
    [rr,IJ] <> [s,if-then-else(C9,I9, J)] by A69,XTUPLE_0:1;
    hence [s, if-then-else(C9,I9,J)] in P by A70,ZFMISC_1:56;
  end;
  now
    let s be Element of S;
    let C9,I,J9 be Element of A;
    assume that
A71: [s,C9] in P and
A72: [f.(s,C9), J9] in P and
A73: f.(s, C9) nin T;
A74: [s,C9] in TP by A71,ZFMISC_1:56;
A75: [f.(s,C9), J9] in TP by A72,ZFMISC_1:56;
    f.(s,C9) <> f.(rr,C) or J <> J9 by A62,A72,ZFMISC_1:56;
    then
A76: IJ <> if-then-else(C9,I,J9) or rr <> s by A1,Th74;
A77: [s,if-then-else(C9,I,J9)] in TP by A73,A74,A75,Def35;
    [rr,IJ] <> [s,if-then-else(C9,I, J9)] by A76,XTUPLE_0:1;
    hence [s, if-then-else(C9,I,J9)] in P by A77,ZFMISC_1:56;
  end;
  then TP c= P by A3,A7,A11,A63,Def35;
  hence contradiction by A2,ZFMISC_1:56;
end;

registration
  let A;
  let C,I,J be absolutely-terminating Element of A;
  cluster if-then-else(C,I,J) -> absolutely-terminating;
  coherence
  proof
    let S,s,T,f;
A1: [s,C] in TerminatingPrograms(A,S,T,f) by Def36;
A2: f.(s,C) in T or f.(s,C) nin T;
A3: [f.(s,C),I] in TerminatingPrograms(A,S,T,f) by Def36;
    [f.(s,C),J] in TerminatingPrograms(A,S,T,f) by Def36;
    hence thesis by A1,A2,A3,Def35;
  end;
end;

registration
  let A;
  let C,I be absolutely-terminating Element of A;
  cluster if-then(C,I) -> absolutely-terminating;
  coherence;
end;

theorem Th99:
  A is free & [s, while(C,I)] in TerminatingPrograms(A,S,T,f)
  implies [s,C] in TerminatingPrograms(A,S,T,f) &
  ex r being non empty FinSequence of S st r.1 = f.(s,C) & r.len r nin T &
  for i being Nat st 1 <= i & i < len r
  holds r.i in T & [r.i, I\;C] in TerminatingPrograms(A,S,T,f) &
  r.(i+1) = f.(r.i, I\;C)
proof
  set TP = TerminatingPrograms(A,S,T,f);
  set rr = s, IJ = while(C,I);
  assume that
A1: A is free and
A2: [s, IJ] in TP;
  reconsider P = TP \ {[s, IJ]} as Subset of [:S, the carrier of A:];
A3: [:S, ElementaryInstructions A:] c= P
  proof
    let x,y be object;
    assume
A4: [x,y] in [:S, ElementaryInstructions A:];
    then y in ElementaryInstructions A by ZFMISC_1:87;
    then
A5: y <> IJ by Th52;
A6: [:S, ElementaryInstructions A:] c= TP by Def35;
    [x,y] <> [s, IJ] by A5,XTUPLE_0:1;
    then [x,y] nin {[s, IJ]} by TARSKI:def 1;
    hence thesis by A4,A6,XBOOLE_0:def 5;
  end;
A7: [:S, {EmptyIns A}:] c= P
  proof
    let x,y be object;
    assume
A8: [x,y] in [:S, {EmptyIns A}:];
    then y in {EmptyIns A} by ZFMISC_1:87;
    then y = EmptyIns A by TARSKI:def 1;
    then
A9: y <> IJ by A1,Th72;
A10: [:S, {EmptyIns A}:] c= TP by Def35;
    [x,y] <> [s, IJ] by A9,XTUPLE_0:1;
    then [x,y] nin {[s, IJ]} by TARSKI:def 1;
    hence thesis by A8,A10,XBOOLE_0:def 5;
  end;
A11: now
    let s be Element of S;
    let C,I,J be Element of A;
    hereby
      assume that
A12:  [s,I] in P and
A13:  [f.(s,I), J] in P;
A14:  [s,I] in TP by A12,ZFMISC_1:56;
A15:  [f.(s,I), J] in TP by A13,ZFMISC_1:56;
A16:  IJ <> I\;J by A1,Th73;
A17:  [s, I\;J] in TP by A14,A15,Def35;
      [rr,IJ] <> [s, I\;J] by A16,XTUPLE_0:1;
      hence [s, I\;J] in P by A17,ZFMISC_1:56;
    end;
    hereby
      assume that
A18:  [s,C] in P and
A19:  [f.(s,C), I] in P and
A20:  f.(s, C) in T;
A21:  [s,C] in TP by A18,ZFMISC_1:56;
A22:  [f.(s,C), I] in TP by A19,ZFMISC_1:56;
A23:  IJ <> if-then-else(C,I,J) by A1,Th74;
A24:  [s, if-then-else(C,I,J)] in TP by A20,A21,A22,Def35;
      [rr,IJ] <> [s, if-then-else(C,I, J)] by A23,XTUPLE_0:1;
      hence [s, if-then-else(C,I,J)] in P by A24,ZFMISC_1:56;
    end;
    hereby
      assume that
A25:  [s,C] in P and
A26:  [f.(s,C), J] in P and
A27:  f.(s, C) nin T;
A28:  [s,C] in TP by A25,ZFMISC_1:56;
A29:  [f.(s,C), J] in TP by A26,ZFMISC_1:56;
A30:  IJ <> if-then-else(C,I,J) by A1,Th74;
A31:  [s, if-then-else(C,I,J)] in TP by A27,A28,A29,Def35;
      [rr,IJ] <> [s, if-then-else(C,I, J)] by A30,XTUPLE_0:1;
      hence [s, if-then-else(C,I,J)] in P by A31,ZFMISC_1:56;
    end;
  end;
  hereby
    assume
A32: [s,C] nin TerminatingPrograms(A,S,T,f);
    now
      let s be Element of S;
      let C9,I9,J be Element of A;
      assume
A33:  [s,C9] in P;
      given r being non empty FinSequence of S such that
A34:  r.1 = f.(s,C9) and
A35:  r.len r nin T and
A36:  for i being Nat st 1 <= i & i < len r
      holds r.i in T & [r.i, I9\;C9] in P & r.(i+1) = f.(r.i, I9\;C9);
A37:  now
        let i be Nat;
        assume that
A38:    1 <= i and
A39:    i < len r;
        [r.i, I9\;C9] in P by A36,A38,A39;
        hence r.i in T & [r.i, I9\;C9] in TP & r.(i+1) = f.(r.i, I9\;C9)
        by A36,A38,A39,ZFMISC_1:56;
      end;
A40:  [s,C9] in TP by A33,ZFMISC_1:56;
      then
A41:  while(C9,I9) <> IJ or s <> rr by A1,A32,Th75;
A42:  [s, while(C9,I9)] in TP by A34,A35,A37,A40,Def35;
      [s, while(C9,I9)] <> [rr,IJ] by A41,XTUPLE_0:1;
      hence [s, while(C9,I9)] in P by A42,ZFMISC_1:56;
    end;
    then for s being Element of S for C,I,J being Element of A holds
    ([s,I] in P & [f.(s,I), J] in P implies [s, I\;J] in P) &
    ([s,C] in P & [f.(s,C), I] in P & f.(s, C) in T
    implies [s, if-then-else(C,I,J)] in P) &
    ([s,C] in P & [f.(s,C), J] in P & f.(s, C) nin T
    implies [s, if-then-else(C,I,J)] in P) & ([s,C] in P &
    (ex r being non empty FinSequence of S st r.1 = f.(s,C) & r.len r nin T &
    for i being Nat st 1 <= i & i < len r
    holds r.i in T & [r.i, I\;C] in P & r.(i+1) = f.(r.i, I\;C))
    implies [s, while(C,I)] in P) by A11;
    then TP c= P by A3,A7,Def35;
    hence contradiction by A2,ZFMISC_1:56;
  end;
  assume
A43: not ex r being non empty FinSequence of S st
  r.1 = f.(rr,C) & r.len r nin T & for i being Nat st 1 <= i & i < len r
  holds r.i in T & [r.i, I\;C] in TP & r.(i+1) = f.(r.i, I\;C);
  now
    let s be Element of S;
    let C9,I9,J be Element of A;
    assume
A44: [s,C9] in P;
    given r being non empty FinSequence of S such that
A45: r.1 = f.(s,C9) and
A46: r.len r nin T and
A47: for i being Nat st 1 <= i & i < len r
    holds r.i in T & [r.i, I9\;C9] in P & r.(i+1) = f.(r.i, I9\;C9);
A48: now
      let i be Nat;
      assume that
A49:  1 <= i and
A50:  i < len r;
      [r.i, I9\;C9] in P by A47,A49,A50;
      hence r.i in T & [r.i, I9\;C9] in TP & r.(i+1) = f.(r.i, I9\;C9)
      by A47,A49,A50,ZFMISC_1:56;
    end;
A51: [s,C9] in TP by A44,ZFMISC_1:56;
    I <> I9 or C <> C9 or s <> rr by A43,A45,A46,A48;
    then
A52: while(C9,I9) <> IJ or s <> rr by A1,Th75;
A53: [s, while(C9,I9)] in TP by A45,A46,A48,A51,Def35;
    [s, while(C9,I9)] <> [rr,IJ] by A52,XTUPLE_0:1;
    hence [s, while(C9,I9)] in P by A53,ZFMISC_1:56;
  end;
  then for s being Element of S for C,I,J being Element of A holds
  ([s,I] in P & [f.(s,I), J] in P implies [s, I\;J] in P) &
  ([s,C] in P & [f.(s,C), I] in P & f.(s, C) in T
  implies [s, if-then-else(C,I,J)] in P) &
  ([s,C] in P & [f.(s,C), J] in P & f.(s, C) nin T
  implies [s, if-then-else(C,I,J)] in P) & ([s,C] in P &
  (ex r being non empty FinSequence of S st r.1 = f.(s,C) & r.len r nin T &
  for i being Nat st 1 <= i & i < len r
  holds r.i in T & [r.i, I\;C] in P & r.(i+1) = f.(r.i, I\;C))
  implies [s, while(C,I)] in P) by A11;
  then TP c= P by A3,A7,Def35;
  hence contradiction by A2,ZFMISC_1:56;
end;

theorem
  A is free & [s, while(C,I)] in TerminatingPrograms(A,S,T,f) & f.(s,C) in T
  implies [f.(s,C), I] in TerminatingPrograms(A,S,T,f)
proof
  set TP = TerminatingPrograms(A,S,T,f);
  set IJ = while(C,I);
  assume that
A1: A is free and
A2: [s, IJ] in TP and
A3: f.(s,C) in T;
  consider r being non empty FinSequence of S such that
A4: r.1 = f.(s,C) and
A5: r.len r nin T and
A6: for i being Nat st 1 <= i & i < len r
  holds r.i in T & [r.i, I\;C] in TP & r.(i+1) = f.(r.i, I\;C) by A1,A2,Th99;
  len r >= 1 by NAT_1:14;
  then 1 < len r by A3,A4,A5,XXREAL_0:1;
  then [r.1, I\;C] in TP by A6;
  hence thesis by A1,A4,Th97;
end;

theorem
  for C,I being absolutely-terminating Element of A
  st f iteration_terminates_for I\;C, f.(s,C)
  holds [s, while(C,I)] in TerminatingPrograms(A,S,T,f)
proof
  let C,I be absolutely-terminating Element of A;
  given r being non empty FinSequence of S such that
A1: r.1 = f.(s,C) and
A2: r.len r nin T and
A3: for i being Nat st 1 <= i & i < len r
  holds r.i in T & r.(i+1) = f.(r.i, I\;C);
A4: now
    let i be Nat;
    assume that
A5: 1 <= i and
A6: i < len r;
    thus r.i in T by A3,A5,A6;
    hence [r.i, I\;C] in TerminatingPrograms(A,S,T,f) &
    r.(i+1) = f.(r.i, I\;C) by A3,A5,A6,Def36;
  end;
  [s,C] in TerminatingPrograms(A,S,T,f) by Def36;
  hence thesis by A1,A2,A4,Def35;
end;

Lm3: for A being free ECIW-strict preIfWhileAlgebra
for f1,f2 being ExecutionFunction of A, S, T
st f1|[:S, ElementaryInstructions A:] = f2|[:S, ElementaryInstructions A:]
for I being Element of A
for s being Element of S st [s,I] in TerminatingPrograms(A,S,T,f1)
holds [s,I] in TerminatingPrograms(A,S,T,f2) & f1.(s,I) = f2.(s,I)
proof
  let A be free ECIW-strict preIfWhileAlgebra;
  let f1,f2 be ExecutionFunction of A, S, T such that
A1: f1|[:S, ElementaryInstructions A:] = f2|[:S, ElementaryInstructions A:];
  set g = f1|[:S, ElementaryInstructions A:];
  set TP1 = TerminatingPrograms(A,S,T,f1);
  set TP2 = TerminatingPrograms(A,S,T,f2);
  defpred P[Element of A] means
  for s st [s,$1] in TP1 holds [s,$1] in TP2 & f1.(s,$1) = f2.(s,$1);
A2: for I being Element of A st I in ElementaryInstructions A holds P[I]
  proof
    let I be Element of A;
    assume
A3: I in ElementaryInstructions A;
    let s be Element of S;
    assume [s,I] in TP1;
    thus [s,I] in TP2 by A3,Th94;
A4: [s,I] in [:S, ElementaryInstructions A:] by A3,ZFMISC_1:87;
    hence f1.(s,I) = g.[s,I] by FUNCT_1:49
      .= f2.(s,I) by A1,A4,FUNCT_1:49;
  end;
A5: P[EmptyIns A]
  proof
    let s be Element of S;
    f1.(s,EmptyIns A) = s by Def28;
    hence thesis by Def28,Th96;
  end;
A6: for I1,I2 being Element of A st P[I1] & P[I2] holds P[I1\;I2]
  proof
    let I1,I2 be Element of A such that
A7: P[I1] and
A8: P[I2];
    let s be Element of S;
    assume
A9: [s, I1\;I2] in TP1;
    then
A10: [s, I1] in TP1 by Th97;
A11: [f1.(s,I1),I2] in TP1 by A9,Th97;
A12: [s, I1] in TP2 by A7,A10;
A13: [f1.(s,I1),I2] in TP2 by A8,A11;
A14: f1.(s,I1) = f2.(s,I1) by A7,A10;
A15: f1.(f1.(s,I1),I2) = f2.(f1.(s,I1),I2) by A8,A11;
    f1.(f1.(s,I1),I2) = f1.(s,I1\;I2) by Def29;
    hence thesis by A12,A13,A14,A15,Def29,Def35;
  end;
A16: for C,I1,I2 being Element of A st P[C] & P[I1] & P[I2]
  holds P[if-then-else(C,I1,I2)]
  proof
    let C,I1,I2 be Element of A such that
A17: P[C] and
A18: P[I1] and
A19: P[I2];
A20: f1 complies_with_if_wrt T by Def32;
A21: f2 complies_with_if_wrt T by Def32;
    set J = if-then-else(C,I1,I2);
    let s be Element of S;
    assume
A22: [s, J] in TP1;
    then
A23: [s, C] in TP1 by Th98;
A24: f1.(s,C) in T implies [f1.(s,C),I1] in TP1 by A22,Th98;
A25: f1.(s,C) nin T implies [f1.(s,C),I2] in TP1 by A22,Th98;
A26: [s, C] in TP2 by A17,A23;
A27: f1.(s,C) = f2.(s,C) by A17,A23;
A28: f1.(s,C) in T implies [f1.(s,C),I1] in TP2 & f1.(f1.(s,C),I1) = f2.(f1
    .(s,C),I1) & f1.(s,J) = f1.(f1.(s,C),I1) by A18,A20,A24;
A29: f1.(s,C) nin T implies [f1.(s,C),I2] in TP2 & f1.(f1.(s,C),I2) = f2.(
    f1.(s,C),I2) & f1.(s,J) = f1.(f1.(s,C),I2) by A19,A20,A25;
    f1.(s,C) in T or f1.(s,C) nin T;
    hence thesis by A21,A26,A27,A28,A29,Def35;
  end;
A30: for C,I being Element of A st P[C] & P[I] holds P[while(C,I)]
  proof
    let C,I be Element of A such that
A31: P[C] and
A32: P[I];
    set J = while(C,I);
    let s be Element of S;
    assume
A33: [s, J] in TP1;
    then
A34: [s, C] in TP1 by Th99;
    then
A35: [s, C] in TP2 by A31;
A36: f1.(s,C) = f2.(s,C) by A31,A34;
    consider r being non empty FinSequence of S such that
A37: r.1 = f1.(s,C) and
A38: r.len r nin T and
A39: for i being Nat st 1 <= i & i < len r holds
    r.i in T & [r.i, I\;C] in TP1 & r.(i+1) = f1.(r.i, I\;C) by A33,Th99;
    for i being Nat st 1 <= i & i < len r holds
    r.i in T & r.(i+1) = f1.(r.i, I\;C) by A39;
    then
A40: f1.(s,J) = r.len r by A37,A38,Th86;
    defpred Q[Nat] means 1 <= $1 & $1 < len r implies
    r.$1 in T & [r.$1, I\;C] in TP2 & r.($1+1) = f2.(r.$1, I\;C);
A41: for i being Nat holds Q[i]
    proof
      let i be Nat;
      assume that
A42:  1 <= i and
A43:  i < len r;
      thus
A44:  r.i in T by A39,A42,A43;
      then reconsider ri = r.i as Element of S;
A45:  [r.i, I\;C] in TP1 by A39,A42,A43;
      hence [r.i, I\;C] in TP2 by A6,A31,A32,A44;
A46:  [ri, I] in TP1 by A45,Th97;
A47:  [f1.(ri,I),C] in TP1 by A45,Th97;
      thus r.(i+1) = f1.(r.i, I\;C) by A39,A42,A43
        .= f1.(f1.(ri,I),C) by Def29
        .=
        .= f2.(f2.(ri,I),C) by A32,A46
        .= f2.(r.i, I\;C) by Def29;
    end;
    then for i being Nat st 1 <= i & i < len r holds
    r.i in T & r.(i+1) = f2.(r.i, I\;C);
    hence thesis by A35,A36,A37,A38,A40,A41,Def35,Th86;
  end;
  let I be Element of A;
  thus P[I] from StructInd(A2,A5,A6,A16,A30);
end;

theorem
  for A being free ECIW-strict preIfWhileAlgebra
 for f1,f2 being ExecutionFunction of A,S,T
  st f1|:,ElementaryInstructions A:  f2|[S, ElementaryInstructions A:
  holds TerminatingPrograms(A,S,T,f1) = TerminatingPrograms(A,S,T,f2)
proof
  let A be free ECIW-strict preIfWhileAlgebra;
  let f1,f2 be ExecutionFunction of A, S, T;
  assume
A1: f1|[:S, ElementaryInstructions A:] = f2|[:S, java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 58
  set TP1 = TerminatingPrograms(A,S,T,f1);
  set TP2 = TerminatingPrograms(A,S,T,f2);
  thus TP1 c= TP2
  proof
    let q,I be object;
    assume
A2: [q,I] in TP1;
    then
A3: q is Element of S by ZFMISC_1:87;
    I is Element of A by A2,ZFMISC_1:87;
    hence thesis by A1,A2,A3,Lm3;
  end;
  let q,I beobject;
  assume
A4: [q,I] in TP2;
  then
A5: q is Element of S by ZFMISC_1:87;
  I is Element of A by A4,ZFMISC_1:87;
  hence thesis by A1,A4,A5,Lm3;
end;

theorem
  for A being free ECIW-strict preIfWhileAlgebra
  for f1,f2 being ExecutionFunction of A, S, T
[S ElementaryInstructions A:] = f2|[:S ElementaryInstructions A]
  for s being Element of S
  for I being Element of A st [s,I] in TerminatingPrograms(A,S,T,f1)
  holds f1.(s, I) = f2.(s, I) by Lm3;

theorem Th104:
  for I being absolutely-terminating Element of A holds I is_terminating_wrt f
by Def36;

theorem
  for I being Element of A holds
  I is_terminating_wrt f iff I is_terminating_wrt f, S;

theorem Th106:
  for I being Element of A st I is_terminating_wrt f
  for P being set holds I is_terminating_wrt f, P;

theorem
  for I being absolutely-terminating Element of A
  for P being set holds I is_terminating_wrt f, P by Th104,Th106;

theorem
  for I being Element of A holds S is_invariant_wrt I, f;

theorem
  for P being set for I,A7: seq*seq by A1,VALUED_0:ef 17;
  st P is_invariant_wrt I, f & P is_invariant_wrt J, f
  holds P is_invariant_wrt I\;J, f
proof
  let P be set;
  let I,J be Element of A;
  assume that
A1: for s being Element of S st s in P holds f.(s, I) in P and
 for sbeing Element of S st s in P holds f.(s, J) in P;
  let s be Element of S;
  assume s in P;
  then
A3: f.(s, I) in P by A1;
  f.s,I\J)=.(.s ) )by Def29;
  hence thesis by A2,A3;
end;

theorem
  for I,J being Element of A st I is_terminating_wrt f & J is_terminating_wrt f
  holds I\;J is_terminating_wrt f
proof
  let I,J be Element of A such that
A1: for s being Element of S holds [s,I] in TerminatingPrograms(A, S, T, f) and
A2: for s     by A2,CLVECdef 16;
  let s be Element of S;
A3: [s,I] in TerminatingPrograms(A,S,T,f) by A1;
  [f.(s,I),J] in TerminatingPrograms(A,S,T,f) by A2;
  hence thesis by A3,Def35;
end;

theorem
  for  setf I,beingElement 
  st I is_terminating_wrt f,P & J is_terminating_wrt f,P &
  P is_invariant_wrt I,f holds I\;J is_terminating_wrt f,P
proof
  let P be set;
  let I,J be Element of A such that
  hence   A4,CLVECT_1:def 16;
  holds [s,I] in TerminatingPrograms(A, S, T, f) and
A2: for s being Element of S st s in P
  holds sJ  TerminatingProgramsA,S,T,f)and
A3: for s being Element of S st s in P holds f.(s, I) in P;
  let s be Element of S;
  assume
:s P;
  
A5: [s,I] in TerminatingPrograms(A,S,T,f) by A1;
  [f.(s,I),J] in TerminatingPrograms(A,S,T,f) by A2,A3,A4;
  hence thesis by A5,Def35;
end;

theorem
  for C,I,J being Element of A
  st C is_terminating_wrt f & I is_terminating_wrt f & J is_terminating_wrt f
  holds if-then-else(C,I,J) is_terminating_wrt f
proof
let ,IJ Element of such that
A1: for s being Element of S holds [s,C] in TerminatingPrograms(A, S, T, f) and
2  s being Element ofS holds [s,I] in TerminatingPrograms(A, S, T, f) and
A3 for sbeing  of S holds [s,J]in TerminatingProgramsA,S,T,f;
let  be of S
:f(s,)inT  .s,) ;
A5: [s,C] in TerminatingPrograms(A,S,T,f) by A1;
A6:A7 =1+l by :;
  [f.(s,C),J] in erminatingPrograms,,T,)by ;
  hence thesis by    then



  for P being set for C,I,J being Element of A
  st C is_terminating_wrt  =mjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    f,    C
holds if-hen-(,IJ  fP
proof
  let P be set;
  CIJthat
A1end;
minatingProgramsA,S  f)and
A2:   
  holds [,]in TerminatingPrograms(,S,,f)
:for s being Element ofS st s inP
holdssJ]in TerminatingPrograms(, ,f)and
:for being ofSsts   holds f.s,C)inP
  let s be Element of S;
  assume
A5: s in P;
A6: f.(s,C) in T or f.(s,C) nin T;
A7: [s,C] in TerminatingPrograms(A,S,T,f ) by A1,A5;
:f.s,)I]in TerminatingPrograms(A,,,)by A2,4,5;
   (s1)+artial_Sums(2)=Partial_Sumss1+s2)
  hence thesis by A6,A7,A8,Def35;
end;

theorem Th114:
  for C,I being Element of A
  st C is_terminating_wrt f & I is_terminating_wrt f &
  f iteration_terminates_for I\;C, f.(s,C) holds [s, while(C,I)] in
  TerminatingPrograms(A, S, T, f)
proof
  let C,I be Element of A such that
A1: C is_terminating_wrt f and
A2: I is_terminating_wrt f;
  given r being non empty FinSequence of S such that
A3: r.1 = f.(s,C) and
A4: r.len r nin T and
A5: for i being Nat st 1 <= i & i < len r
  holds r.i in T & r.(i+1) = f.(r.i, I\;C);
A6: now
    let i be Nat;
    assume that
A7: 1 <= i and
A8: i <BHSP_4def 1
RLVECT_1:ef 3
    then reconsider s =r as  ofS
A9: [s, I] in TerminatingPrograms(A,S,T,f) by A2;
    [f.(s, I), C] in TerminatingPrograms(A,S,T,f) by A1;
    hence [.,\;] in (A,,,)&
    r.(i+1) = f.(r.i, I\;C) by A5,A7,A8,A9,Def35;
  end;
  [s,C] in TerminatingPrograms(A,S,T,f) by A1;
  hence thesis by A3,A4,A6,Def35;
end;

theorem
  for P being set for C,I being Element  A
  st C is_terminating_wrt f, &I is_terminating_wrt f,P &
A1 
  f iteration_terminates_for I\;C, f.(s,C) & s in P holds [s, while(C,I)] in
  TerminatingPrograms(A, S, T, f)
proof
let P be set;
  let C,I be Element of A such that
A1: C is_terminating_wrt f,P and
A2: I is_terminating_wrt f,P and
A3: P is_invariant_wrt C,f and
A4: P is_invariant_wrt I,f;
 given r being non empty FinSequence of S such that
 r. = (,)and
:r.en ninT and
A7: for i being Nat st 1 <= i & i < len r
  holds r.i in T & r.(i+1) = f.(r.i, I\;C);
  assume
A8: s in P;
  defpred P[Nat] means $1 < len r implies r.($1+1) in P;
A9: P[0] by A3,A5,A8;
A10: for i being Nat st P[i] holds P[i+1]
  proof
    let i be Nat such that
A11: P[i] and
A12: i+1 < len r;
A13: i+1 >= 1 by NAT_1:11;
    then
 .i+ in Tby A7,A12java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
A15: r.(i+1+1) = f.(r.(i+1), I\;C) by A7,A12,A13;
    reconsider s = r.(i+1) as Element of S by A14;
    f.(s,I) in P by A4,A11,A12,NAT_1:13;
    then f.(f.(s,I),C) in P by A3;
    hence r.(i+1+1) in P by A15,Def29;
  end;
: for i Natholds [i from :ch2(9,A10);
A17: now
    let i be Nat;
    assume that
A18: 1 <= i and
A19: i < len r;
    thus r.i in T by A7,A18,A19;
    then reconsider s = r.i as Element of S;
A20: i-'1 <= i by NAT_D:35;
A21: i = (i-'1)+1 by A18,XREAL_1:235;
    i-'1 < len r java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
    then
A22: s : Partial_Sums+() =artial_Sums(eq1+eq2) by ;
    
A23: [s, I] in TerminatingPrograms & seq2 is  holds seq1-eq2 issummable & Sum(eq1-seq2) Sum(
    f.(s, I) in PA1: Partial_Sums(eq1)is convergent &Partial_Sums(eq2)is convergent;
    then [f.(s, I), C] in TerminatingPrograms(A,S,T,f) by A1;
      hence t by A2,3;
    r.(i+1) = f.(    Th17;
  end;
  [,  (,ST,)by A1,8;
  hence thesis by A6,A17D;


 :
,I beingElementA
  st C is_terminating_wrt f & I is_terminating_wrt f,P &
  P is_invariant_wrt C,f & (for s st s in P & f.(f.(s,I),C) in T
  holds f.(s,I) in P) & f iteration_terminates_for I\;C, f.(s,C) & s in P
  holds [s, while(C,I)] in TerminatingPrograms(A, S, T, f)
proof
  let P be set;
  let C,I be Element of A such that
A1: C is_terminating_wrt f and
A2: I is_terminating_wrt f,P and
A3: P is_invariant_wrt C,f and
A4: for s st s in P & f.(f.(s,I),C) in T holds f.(s,I) in P;
  given r *Partial_Sums(seq)0 byBHSP_4def
A5: r.1 = f.  then for  be Element NAT[n;
A6: r.len r nin T and
A7: for i being Nat st 1 <= i & i < len r
  holds r.i in T & r.(i+1) = f.(r.i, I\;C);
  assume
A8: s in P;
  defpred P[Nat] means $1+1 < len r implies r.($1+1) in P;
A9: P[0] by A3,A5,A8;
A10: for i being Nat st P[i] holds P[i+1]
  proof
    let i  Natthat
A11: P[i] and
A12: i+1+1 < len r;
A13: i+1 >= 1 by NAT_1:11;
A14: i+1+1 >= 1 by NAT_1:11;
A15: i+1 < len r by A12,NAT_1:13;
    then
A16: r.(i+1) in T by A7,A13;
A17: r.(i+1+1) in T by A7,A12,A14;
A18: r.(i+1+1) = f.(r.(i+1), I\;C) by A7,A13,A15;
    reconsider s = r.(i+1) as Element of S by java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 44
    f.(f.(s, I), C) in 
    then f.  coherence by Th20;
    then f.(f.(s,I),C) in P by A3;
    hence r.(i+1+1) in P by A18,Def29;
  end;
A19:for i being Nat holds P[]from NAT_1:sch 2A9,)
A20: now
    let i be Nat;
    assume that
A21: 1 <= i and
A22: i < len r;
    thus r.i in T by A7A21,A22;
    then reconsider s = r.i as Element of S;
    i = (i-'1)+1 by A21,XREAL_1:235;
    then s in P by A19,A22;
    then
A23:[s  inTerminatingPrograms,,,) by A2;
    [f.(s, I), C] in TerminatingPrograms(A,S,T,f) by A1;
    hence [r.i, I\;C] in TerminatingPrograms(A,S,T,f) &
    r.(i+1) = f.(r.i, I\;C) by A7,A21,A22,A23,Def35;
  end;
  [s,C] in TerminatingPrograms(A,S,T,f) by A1;
  hence thesis by A5,A6,A20,Def35;
end;

theorem
  for C,I being Element of A
  st C is_terminating_wrt f & I is_terminating_wrt f &
  for s holds f iteration_terminates_for I\;C, s
  holds while(C,I) is_terminating_wrt f
proof
  let C,I be Element of A such that
A1: C is_terminating_wrt f and
A2: I is_terminating_wrt f and
A3: for s holds f iteration_terminates_for I\;C, s;
  let s;
  (Partial_Sums()\)-s1)0=(artial_Sums()\).0 -s1. 
  hence thesis by A1,A2,Th114;
end;

theorem
  for P being    =s.0+) +(.- s0 byRLVECT_1:def 3
  st C is_terminating_wrt f & I is_terminating_wrt f,P &
  P is_invariant_wrt C,f & (for s st s in P & f.(f.(s,I),C) in T
  holds f.(s,I) in P    .s.0+)by RLVECT_1:
  for s st f.(  X be ComplexNormSpace,s sequenceof X holds s is
  holds while(C,I)is_terminating_wrt fP
proof
  let P be set;
  let C,I be Element of A such that
A1: C     then Partial_Sums\)isjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
A2: I assume s is summable;
:P s_invariant_wrt,fand
A4: for s st s in P & f.(f. cluster seq^\n -> summable for   X;
A5:for s st f.s,C)in P holds f iteration_terminates_for I\C .sC)
   ;
  assume
A6: s in P;
  then f.(s,C) in   
  hence thesis by A1Th5CLOPBAN1def13Th4;
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4

Messung
CHZG
8010010093

¤ Dauer der Verarbeitung: 0.661 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,058
#Domains=861,598