reserve X,Y for set, x,y,z for object, i,j,n for natural number;

theorem Th11:
  for n being non empty natural number
  for X being non empty set
  for J being Signature
  ex S being strict non void non empty AlgLangSignature over X st
  S is n PC-correct QC-correct n AL-correct J-extension &
  (for i st i = 0 or ... or i = 8 holds
  (the connectives of S).(n+i) = (sup the carrier' of J)+^i) &
  (for x being Element of X holds
  (the quantifiers of S).(1,x) = [the carrier' of J,1,x] &
  (the quantifiers of S).(2,x) = [the carrier' of J,2,x]) &
  the formula-sort of S = sup the carrier of J &
  the program-sort of S = (sup the carrier of J)+^1 &
  the carrier of S = (the carrier of J) \/
  {the formula-sort of S, the program-sort of S} &
  for w being Ordinal st w = sup the carrier' of J holds
  the carrier' of S = (the carrier' of J) \/
  {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}\/
  [:{the carrier' of J},{1,2},X:]
  proof
    let n be non empty natural number;
    let X be non empty set;
    let J be Signature;
    set w = sup the carrier' of J;
    set u = sup the carrier of J;
    set O1 = {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}\/
    [:{the carrier' of J},{1,2},X:];
    set O = (the carrier' of J)\/O1;
    set a = ({w+^1,w+^2,w+^3,w+^4}--><*u+^0,u+^0*>)\/
    (({w+^0}\/[:{the carrier' of J},{1,2},X:])--><*u+^0*>)\/
    ({w+^5}-->{})\/({w+^6,w+^7,w+^8}--><*u+^1,u+^0*>);
    set ay = (the Arity of J)\/a;
    set r = O1-->u+^0;
    set rs = (the ResultSort of J)+*r;
A1: dom ({w+^1,w+^2,w+^3,w+^4}--><*u+^0,u+^0*>) = {w+^1,w+^2,w+^3,w+^4} &
    dom ({w+^6,w+^7,w+^8}--><*u+^1,u+^0*>) = {w+^6,w+^7,w+^8} &
    dom ({w+^5}-->{}) = {w+^5} &
    dom (({w+^0}\/[:{the carrier' of J},{1,2},X:])--><*u+^0*>)
    = {w+^0}\/[:{the carrier' of J},{1,2},X:];
B1: {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} misses
    [:{the carrier' of J},{1,2},X:]
    proof
      assume {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} meets
      [:{the carrier' of J},{1,2},X:]; then
      consider x such that
A2:   x in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} &
      x in [:{the carrier' of J},{1,2},X:]
      by XBOOLE_0:3;
A3:   x = w+^0 or x = w+^1 or x = w+^2 or x = w+^3 or x = w+^4 or x = w+^5 or
      x = w+^6 or x = w+^7 or x = w+^8 by A2,ENUMSET1:def 7;
      consider j being object, y,z such that
A5:   j in {the carrier' of J} & y in {1,2} & z in X & x = [j,y,z]
      by A2,MCART_1:68;
      thus contradiction by A3,A5;
    end;
    {w+^1,w+^2,w+^3,w+^4} misses {w+^0}\/[:{the carrier' of J},{1,2},X:]
    proof
      assume {w+^1,w+^2,w+^3,w+^4} meets
      {w+^0}\/[:{the carrier' of J},{1,2},X:]; then
      consider x such that
A2:   x in {w+^1,w+^2,w+^3,w+^4} & x in {w+^0}\/[:{the carrier' of J},{1,2},X:]
      by XBOOLE_0:3;
A3:   x = w+^1 or x = w+^2 or x = w+^3 or x = w+^4 by A2,ENUMSET1:def 2;
A4:   w+^0 <> w+^1 & w+^0 <> w+^2 & w+^0 <> w+^3 & w+^0 <> w+^4 by ORDINAL3:21;
      x in {w+^0} or x in [:{the carrier' of J},{1,2},X:]
      by A2,XBOOLE_0:def 3; then
      consider j being object, y,z such that
A5:   j in {the carrier' of J} & y in {1,2} & z in X & x = [j,y,z]
      by A3,A4,MCART_1:68,TARSKI:def 1;
      thus contradiction by A2,A5,ENUMSET1:def 2;
    end; then
    reconsider aa = ({w+^1,w+^2,w+^3,w+^4}--><*u+^0,u+^0*>)\/
    (({w+^0}\/[:{the carrier' of J},{1,2},X:])--><*u+^0*>)
    as Function by A1,GRFUNC_1:13;
A6: dom aa = {w+^1,w+^2,w+^3,w+^4} \/({w+^0}\/[:{the carrier' of J},{1,2},X:])
    by A1,XTUPLE_0:23
    .= {w+^0}\/{w+^1,w+^2,w+^3,w+^4}\/[:{the carrier' of J},{1,2},X:]
    by XBOOLE_1:4
    .= {w+^0,w+^1,w+^2,w+^3,w+^4}\/[:{the carrier' of J},{1,2},X:]
    by ENUMSET1:7;
    {w+^0,w+^1,w+^2,w+^3,w+^4}\/[:{the carrier' of J},{1,2},X:] misses {w+^5}
    proof
      assume {w+^0,w+^1,w+^2,w+^3,w+^4}\/[:{the carrier' of J},{1,2},X:]
      meets {w+^5}; then
      consider x such that
A7:   x in {w+^0,w+^1,w+^2,w+^3,w+^4}\/[:{the carrier' of J},{1,2},X:] &
      x in {w+^5} by XBOOLE_0:3;
A8:   w+^5 <> w+^0 & w+^5 <> w+^1 & w+^5 <> w+^2 & w+^5 <> w+^3 & w+^5 <> w+^4
      by ORDINAL3:21;
      x = w+^5 by A7,TARSKI:def 1; then
      w+^5 in {w+^0,w+^1,w+^2,w+^3,w+^4} or
      w+^5 in [:{the carrier' of J},{1,2},X:] by A7,XBOOLE_0:def 3; then
      ex j being object,y,z st j in {the carrier' of J} & y in {1,2} &
      z in X & w+^5 = [j,y,z] by A8,ENUMSET1:def 3,MCART_1:68;
      hence contradiction;
    end; then
    reconsider ab = aa\/({w+^5}-->{}) as Function by A1,A6,GRFUNC_1:13;
A9: dom ab = {w+^0,w+^1,w+^2,w+^3,w+^4}\/[:{the carrier' of J},{1,2},X:]\/
    {w+^5} by A1,A6,XTUPLE_0:23
    .= {w+^5}\/{w+^0,w+^1,w+^2,w+^3,w+^4}\/[:{the carrier' of J},{1,2},X:]
    by XBOOLE_1:4
    .= {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5}\/[:{the carrier' of J},{1,2},X:]
    by ENUMSET1:15;
    {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5}\/[:{the carrier' of J},{1,2},X:]
    misses {w+^6,w+^7,w+^8}
    proof
      assume {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5}\/[:{the carrier' of J},{1,2},X:]
      meets {w+^6,w+^7,w+^8}; then
      consider x such that
A10:   x in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5}\/[:{the carrier' of J},{1,2},X:] &
      x in {w+^6,w+^7,w+^8} by XBOOLE_0:3;
A11:   w+^6 <> w+^0 & w+^6 <> w+^1 & w+^6 <> w+^2 & w+^6 <> w+^3 & w+^6 <> w+^4
      & w+^6 <> w+^5
      by ORDINAL3:21;
A12:   w+^7 <> w+^0 & w+^7 <> w+^1 & w+^7 <> w+^2 & w+^7 <> w+^3 & w+^7 <> w+^4
      & w+^7 <> w+^5
      by ORDINAL3:21;
A13:   w+^8 <> w+^0 & w+^8 <> w+^1 & w+^8 <> w+^2 & w+^8 <> w+^3 & w+^8 <> w+^4
      & w+^8 <> w+^5
      by ORDINAL3:21;
      x = w+^6 or x = w+^7 or x = w+^8 by A10,ENUMSET1:def 1; then
      w+^6 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5} or
      w+^6 in [:{the carrier' of J},{1,2},X:] or
      w+^7 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5} or
      w+^7 in [:{the carrier' of J},{1,2},X:] or
      w+^8 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5} or
      w+^8 in [:{the carrier' of J},{1,2},X:] by A10,XBOOLE_0:def 3; then
      w+^6 in [:{the carrier' of J},{1,2},X:] or
      w+^7 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5} or
      w+^7 in [:{the carrier' of J},{1,2},X:] or
      w+^8 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5} or
      w+^8 in [:{the carrier' of J},{1,2},X:] by A11,ENUMSET1:def 4; then
      w+^6 in [:{the carrier' of J},{1,2},X:] or
      w+^7 in [:{the carrier' of J},{1,2},X:] or
      w+^8 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5} or
      w+^8 in [:{the carrier' of J},{1,2},X:] by A12,ENUMSET1:def 4; then
      (ex j being object,y,z st j in {the carrier' of J} & y in {1,2} &
      z in X & w+^6 = [j,y,z]) or
      (ex j being object,y,z st j in {the carrier' of J} & y in {1,2} &
      z in X & w+^7 = [j,y,z]) or
      (ex j being object,y,z st j in {the carrier' of J} & y in {1,2} &
      z in X & w+^8 = [j,y,z])
      by A13,ENUMSET1:def 4,MCART_1:68;
      hence contradiction;
    end; then
    reconsider a as Function by A1,A9,GRFUNC_1:13;
A14: dom a = {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5}\/[:{the carrier' of J},{1,2},X:]\/
    {w+^6,w+^7,w+^8} by A1,A9,XTUPLE_0:23
    .= {w+^6,w+^7,w+^8}\/{w+^0,w+^1,w+^2,w+^3,w+^4,w+^5}\/
    [:{the carrier' of J},{1,2},X:] by XBOOLE_1:4
    .= O1 by ENUMSET1:82;
    then
A15: dom ay = (dom the Arity of J) \/ dom a = O by XTUPLE_0:23,FUNCT_2:def 1;
A16: dom the Arity of J = the carrier' of J by FUNCT_2:def 1;
A17: O1 misses the carrier' of J
    proof
      assume O1 meets the carrier' of J;
      then consider x such that
A18:   x in O1 & x in the carrier' of J by XBOOLE_0:3;
      x in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} or
      x in [:{the carrier' of J},{1,2},X:] by A18,XBOOLE_0:def 3;
      then (x = w+^0 or ... or x = w+^8) or
      x in [:{the carrier' of J},{1,2},X:] by ENUMSET1:def 7;
      then(w+^0 in w or ... or w+^8 in w) & w = w+^0 or
      x in [:{the carrier' of J},{1,2},X:] by A18,ORDINAL2:19,27;
      then consider j,i,y being object such that
A19:  j in {the carrier' of J} & i in {1,2} & y in X & x = [j,i,y]
      by MCART_1:68,ORDINAL3:22;
      reconsider jiy = [j,i,y] as set;
      the carrier' of J = j & j in { j } & {j} in {{j,i},{j}} in {[j,i]} in jiy
      by A19,TARSKI:def 1,def 2;
      hence thesis by A18,A19,XREGULAR:9;
    end;
    then reconsider ay = (the Arity of J)\/a as Function
    by A14,A16,GRFUNC_1:13;
    set C = (the carrier of J)\/{u+^0,u+^1};
    u+^0 in {u+^0,u+^1} & u+^1 in {u+^0,u+^1} by TARSKI:def 2;
    then reconsider 00 = u+^0, 01 = u+^1 as Element of C by XBOOLE_0:def 3;
    <*00*> in C* & <*00,00*> in C* by FINSEQ_1:def 11; then
    rng ({w+^1,w+^2,w+^3,w+^4}--><*00,00*>) c= C* &
    rng (({w+^0}\/[:{the carrier' of J},{1,2},X:])--><*00*>) c= C*
    by ZFMISC_1:31; then
    rng ({w+^1,w+^2,w+^3,w+^4}--><*00,00*>) \/
    rng (({w+^0}\/[:{the carrier' of J},{1,2},X:])--><*00*>) c= C* &
    <*>C in C* by FINSEQ_1:def 11,XBOOLE_1:8; then
    rng aa c= C* & rng ({w+^5}-->{}) c= C*
    by RELAT_1:12; then
    rng aa \/ rng ({w+^5}-->{}) c= C* &
    <*01,00*> in C* by FINSEQ_1:def 11,XBOOLE_1:8; then
    rng ab c= C* & rng ({w+^6,w+^7,w+^8}--><*01,00*>) c= C*
    by ZFMISC_1:31,RELAT_1:12; then
    rng ab \/ rng ({w+^6,w+^7,w+^8}--><*01,00*>) c= C*
    by XBOOLE_1:8; then
A20: rng a c= C* by RELAT_1:12;
    rng the Arity of J c= (the carrier of J)* c= C* by XBOOLE_1:7,FINSEQ_1:62;
    then rng the Arity of J c= C*;
    then rng ay = (rng the Arity of J) \/ rng a c= C*
    by A20,XBOOLE_1:8,RELAT_1:12;
    then reconsider ay as Function of O,C* by A15,FUNCT_2:2;
    the carrier' of J <> {} implies the carrier of J <> {} by INSTALG1:def 1;
    then
A21: dom r = O1 & rng r = {00} & {00} c= C & dom the ResultSort of J
    = the carrier' of J & rng the ResultSort of J c= the carrier of J c= C
    by XBOOLE_1:7,ZFMISC_1:31,FUNCT_2:def 1;
    then rng the ResultSort of J c= C;
    then dom rs = O & rng rs c= {00}\/rng the ResultSort of J c= C
    by A21,XBOOLE_1:8,FUNCT_4:def 1,17;
    then dom rs = O & rng rs c= C;
    then reconsider rs as Function of O,C by FUNCT_2:2;
    w+^0 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} & ... &
    w+^8 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}
    by ENUMSET1:def 7; then
    w+^0 in O1 & ... & w+^8 in O1 by XBOOLE_0:def 3; then
    reconsider o0=w+^0, o1=w+^1, o2=w+^2, o3=w+^3, o4=w+^4, o5=w+^5,
    o6=w+^6, o7=w+^7, o8=w+^8 as Element of O by XBOOLE_0:def 3;
    set m = n-'1;
    set p = the m qua Nat-element FinSequence of
    {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8};
B2: rng p c= {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} c= O1 c= O
    by XBOOLE_1:7;
    then rng p c= {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} c= O;
    then reconsider p as FinSequence of O by XBOOLE_1:1,FINSEQ_1:def 4;
    set c9 = <*o0,o1,o2,o3,o4,o5,o6,o7*>^<*o8*>;
    n > 0;
    then
A22: n >= 0+1 by NAT_1:13;
    then n-1 >= 1-1 by XREAL_1:9;
    then
bb: m = n-1 by XREAL_0:def 2;
    reconsider c = p^c9 as FinSequence of O;
    rng c9 = {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} by AOFA_A00:26;
    then
B3: rng c = rng p \/ rng c9 c= {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}\/
    {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}
    by B2,XBOOLE_1:13,FINSEQ_1:31;
A23: i = 0 or ... or i = 8 implies c.(n+i) = w+^i
    proof
aaa:  c.(m+1) = c9.1 & ... & c.(m+9) = c9.9 by FINSEQ_3:155;
      assume
      i = 0 or ... or i = 8;
      then i = 0 & c.(n+0) = c9.(0+1) or ... or i = 8 & c.(n+8) = c9.(8+1)
      by aaa,bb;
      hence thesis by AOFA_A00:29;
    end;
    deffunc Q(object) = [the carrier' of J,$1`1,$1`2];
    consider q being Function such that
A25: dom q = [:{1,2},X:] & for x st x in [:{1,2},X:] holds q.x = Q(x)
    from FUNCT_1:sch 3;
    rng q c= O
    proof
      let x; assume x in rng q;
      then consider y such that
A26:   y in dom q & x = q.y by FUNCT_1:def 3;
      consider i,z being object such that
A27:   i in {1,2} & z in X & y = [i,z] by A25,A26,ZFMISC_1:def 2;
      x = [the carrier' of J,y`1,y`2] & y`1 = i & y`2 = z &
      the carrier' of J in {the carrier' of J}
      by A25,A26,A27,TARSKI:def 1;
      then x in [:{the carrier' of J},{1,2},X:] by A27,MCART_1:69;
      then x in O1 by XBOOLE_0:def 3;
      hence x in O by XBOOLE_0:def 3;
    end;
    then reconsider q as Function of [:{1,2},X:], O by A25,FUNCT_2:2;
    set L = AlgLangSignature(#C,O,ay,rs,00,01,c,{1,2},q#);
    reconsider L as non empty non void strict AlgLangSignature over X;
    take L;
    len c9 = 8+1 & len p = n-'1 & n is Real & 1 is Real by CARD_1:def 7;
    then
A28: len p+len c9 = n-'1+1+8 = n+8 by A22,XREAL_1:235;
    then len the connectives of L = n+8 = n+5+3 by FINSEQ_1:22;
    hence len the connectives of L >= n+5 by NAT_1:12;
    set N = {n,n+1,n+2,n+3,n+4,n+5};
    thus (the connectives of L)|N is one-to-one
    proof
      let x,y; assume
A29:  x in dom ((the connectives of L)|N) &
      y in dom ((the connectives of L)|N) &
      ((the connectives of L)|N).x = ((the connectives of L)|N).y;
      then
A30:  x in N & y in N by RELAT_1:57;
      then
A31:  c.x = (c|N).x = c.y by A29,FUNCT_1:49;
A32:  (x = n+0 or ... or x = n+5) & (y = n+0 or ... or y = n+5)
      by A30,ENUMSET1:def 4;
      then consider i being Nat such that
A33:  0 <= i <= 5 & x = n+i;
      consider j being Nat such that
A34:  0 <= j <= 5 & y = n+j by A32;
      i <= 8 & j <= 8 by A33,A34,XXREAL_0:2;
      then (i = 0 or ... or i = 8) & (j = 0 or ... or j = 8);
      then c.x = w+^i & c.y = w+^j by A23,A33,A34;
      hence thesis by A31,A33,A34,ORDINAL3:21;
    end;
    thus (the connectives of L).n is_of_type
    <*the formula-sort of L*>, the formula-sort of L
    proof
      0 = 0 or ... or 0 = 8; then
A35:   c.(n+0) = w+^0 by A23;
A36:   w+^0 in {w+^0} & 00 in {00} by TARSKI:def 1; then
      w+^0 in {w+^0}\/[:{the carrier' of J},{1,2},X:] & <*00*> in {<*00*>}
      by XBOOLE_0:def 3,TARSKI:def 1; then
      [w+^0,<*00*>] in ({w+^0}\/[:{the carrier' of J},{1,2},X:])--><*00*>
      by ZFMISC_1:106; then
      [w+^0,<*00*>] in aa by XBOOLE_0:def 3; then
      [w+^0,<*00*>] in ab by XBOOLE_0:def 3; then
      [w+^0,<*00*>] in a by XBOOLE_0:def 3;
      then [w+^0,<*00*>] in ay by XBOOLE_0:def 3;
      hence (the Arity of L).((the connectives of L).n)
      = <*the formula-sort of L*> by A35,FUNCT_1:1;
      w+^0 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}
      by ENUMSET1:def 7; then
A37:   w+^0 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} \/
      [:{the carrier' of J},{1,2},X:] by XBOOLE_0:def 3; then
      [w+^0,00] in r by A36,ZFMISC_1:87;
      then r.(c.n) = 00 by A35,FUNCT_1:1;
      hence (the ResultSort of L).((the connectives of L).n)
      = the formula-sort of L by A35,A37,A21,FUNCT_4:13;
    end;
    thus (the connectives of L).(n+5) is_of_type {}, the formula-sort of L
    proof
      5 = 0 or ... or 5 = 8; then
A38:  c.(n+5) = w+^5 by A23;
      w+^5 in {w+^5} & {} in {{}}
      by TARSKI:def 1; then
      [w+^5,{}] in {w+^5}-->{} by ZFMISC_1:106; then
      [w+^5,{}] in ab by XBOOLE_0:def 3; then
      [w+^5,{}] in a by XBOOLE_0:def 3;
      then [w+^5,{}] in ay by XBOOLE_0:def 3;
      hence (the Arity of L).((the connectives of L).(n+5)) = {}
      by A38,FUNCT_1:1;
      w+^5 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}
      by ENUMSET1:def 7; then
A39:   w+^5 in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} \/
      [:{the carrier' of J},{1,2},X:] & 00 in {00}
      by TARSKI:def 1,XBOOLE_0:def 3; then
      [w+^5,00] in r by ZFMISC_1:87;
      then r.(w+^5) = 00 by FUNCT_1:1;
      hence (the ResultSort of L).((the connectives of L).(n+5))
      = the formula-sort of L by A39,A38,A21,FUNCT_4:13;
    end;
    thus (the connectives of L).(n+1) is_of_type
    <*the formula-sort of L, the formula-sort of L*>, the formula-sort of L
    & ... &
    (the connectives of L).(n+4) is_of_type
    <*the formula-sort of L, the formula-sort of L*>, the formula-sort of L
    proof
      let i; assume
A40:   1 <= i <= 4;
      then 0 <= i <= 8 by XXREAL_0:2;
      then
A41:   i = 0 or ... or i = 8; then
A42:   c.(n+i) = w+^i by A23;
      i = 1 or ... or i = 4 by A40; then
      c.(n+i) in {w+^1,w+^2,w+^3,w+^4} & <*00,00*> in {<*00,00*>}
      by A42,TARSKI:def 1,ENUMSET1:def 2; then
      [c.(n+i),<*00,00*>] in {w+^1,w+^2,w+^3,w+^4}--><*00,00*>
      by ZFMISC_1:106; then
      [c.(n+i),<*00,00*>] in aa by XBOOLE_0:def 3; then
      [c.(n+i),<*00,00*>] in ab by XBOOLE_0:def 3; then
      [c.(n+i),<*00,00*>] in a by XBOOLE_0:def 3;
      then [c.(n+i),<*00,00*>] in ay by XBOOLE_0:def 3;
      hence (the Arity of L).((the connectives of L).(n+i))
      = <*the formula-sort of L,the formula-sort of L*> by FUNCT_1:1;
      c.(n+i) in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}
      by A42,A41,ENUMSET1:def 7; then
A43:   c.(n+i) in O1 & 00 in {00} by TARSKI:def 1,XBOOLE_0:def 3; then
      [c.(n+i),00] in r by ZFMISC_1:106;
      then r.(c.(n+i)) = 00 by FUNCT_1:1;
      hence (the ResultSort of L).((the connectives of L).(n+i))
      = the formula-sort of L by A43,A21,FUNCT_4:13;
    end;
    thus the quant-sort of L = {1,2};
    thus the quantifiers of L is one-to-one
    proof let x,y; assume
A44:  x in dom the quantifiers of L & y in dom the quantifiers of L;
      then reconsider a = x, b = y as Element of [:{1,2},X:];
      assume (the quantifiers of L).x = (the quantifiers of L).y;
      then [the carrier' of J,x`1,x`2] = (the quantifiers of L).y by A44,A25
      .= [the carrier'of J,y`1,y`2] by A44,A25;
      then x`1 = y`1 & x`2 = y`2 by XTUPLE_0:3;
      then x = [a`1,a`2] = [b`1,b`2] = y;
      hence x = y;
    end;
    rng the quantifiers of L c= [:{the carrier' of J},{1,2},X:]
    proof
      let a be object; assume a in rng the quantifiers of L;
      then consider b being object such that
C1:   b in dom the quantifiers of L & a = (the quantifiers of L).b
      by FUNCT_1:def 3;
      reconsider b as Element of [:{1,2},X:] by C1;
      a = [the carrier' of J,b`1,b`2] & b`1 in {1,2} & b`2 in X &
      the carrier' of J in {the carrier' of J}
      by C1,A25,TARSKI:def 1,MCART_1:10;
      hence thesis by MCART_1:69;
    end;
    hence rng the quantifiers of L misses rng the connectives of L
    by B1,B3,XBOOLE_1:64;
    hereby let q,x be object; assume
A45:  q in the quant-sort of L & x in X;
A46:  (the quantifiers of L).(q,x) = [the carrier' of J,[q,x]`1,[q,x]`2] &
      <*00*> in {<*00*>} & [q,x]`1 = q & [q,x]`2 = x &
      the carrier'of J in {the carrier'of J}
      by A25,A45,TARSKI:def 1,ZFMISC_1:87; then
      (the quantifiers of L).(q,x) in
      [:{the carrier' of J},the quant-sort of L,X:] by A45,MCART_1:69;
      then (the quantifiers of L).(q,x) in
      {w+^0}\/[:{the carrier' of J},{1,2},X:] & <*00*> in {<*00*>}
      by XBOOLE_0:def 3,TARSKI:def 1; then
      [(the quantifiers of L).(q,x),<*00*>] in
      {w+^0}\/[:{the carrier' of J},{1,2},X:]--><*00*>
      by ZFMISC_1:106; then
      [(the quantifiers of L).(q,x),<*00*>] in aa by XBOOLE_0:def 3; then
      [(the quantifiers of L).(q,x),<*00*>] in ab by XBOOLE_0:def 3; then
      [(the quantifiers of L).(q,x),<*00*>] in a by XBOOLE_0:def 3;
      then
A47:  [(the quantifiers of L).(q,x),<*00*>] in ay by XBOOLE_0:def 3;
      thus (the quantifiers of L).(q,x) is_of_type
      <*the formula-sort of L*>, the formula-sort of L
      proof
        thus (the Arity of L).((the quantifiers of L).(q,x))
        = <*the formula-sort of L*> by A47,FUNCT_1:1;
        [the carrier' of J,q,x] in [:{the carrier' of J},{1,2},X:]
        by A46,A45,MCART_1:69;
        then
A48:    [the carrier' of J,q,x] in O1 by XBOOLE_0:def 3;
        then r.[the carrier' of J,q,x] = 00 &
        [the carrier' of J,q,x] in O by XBOOLE_0:def 3,FUNCOP_1:7;
        hence (the ResultSort of L).((the quantifiers of L).(q,x))
        = the formula-sort of L by A21,A46,A48,FUNCT_4:13;
      end;
    end;
    thus the program-sort of L <> the formula-sort of L by ORDINAL3:21;
    thus len the connectives of L >= n+8 by A28,FINSEQ_1:22;
    thus (the connectives of L).(n+6) is_of_type
    <*the program-sort of L,the formula-sort of L*>, the formula-sort of L
    & ... &
    (the connectives of L).(n+8) is_of_type
    <*the program-sort of L,the formula-sort of L*>, the formula-sort of L
    proof let i; assume
A49:  6 <= i <= 8;
A50:  i = 0 or ... or i = 8 by A49; then
A51:  c.(n+i) = w+^i by A23;
      i = 6 or ... or i = 8 by A49;
      then w+^i in {w+^6,w+^7,w+^8} & <*01,00*> in {<*01,00*>}
      by TARSKI:def 1,ENUMSET1:def 1; then
      [w+^i,<*01,00*>] in ({w+^6,w+^7,w+^8})--><*01,00*> by ZFMISC_1:106; then
      [w+^i,<*01,00*>] in a by XBOOLE_0:def 3;
      then [w+^i,<*01,00*>] in ay by XBOOLE_0:def 3;
      hence (the Arity of L).((the connectives of L).(n+i))
      = <*the program-sort of L,the formula-sort of L*> by A51,FUNCT_1:1;
      w+^i in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}
      by A50,ENUMSET1:def 7; then
A52:  w+^i in {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8} \/
      [:{the carrier' of J},{1,2},X:] by XBOOLE_0:def 3; then
      [w+^i,00] in r by ZFMISC_1:106;
      then r.(w+^i) = 00 by FUNCT_1:1;
      hence (the ResultSort of L).((the connectives of L).(n+i))
      = the formula-sort of L by A21,A52,A51,FUNCT_4:13;
    end;
    thus L is J-extension
    proof
      set f1 = id the carrier of J;
      set g1 = id the carrier'of J;
      thus dom f1 = the carrier of J & dom g1 = the carrier' of J;
      thus rng f1 c= the carrier of L & rng g1 c= the carrier' of L
      by XBOOLE_1:7;
      the carrier' of J <> {} implies the carrier of J <> {} by INSTALG1:def 1;
      then
A53:   dom the ResultSort of J = the carrier' of J & dom the Arity of J =
      the carrier' of J by FUNCT_2:def 1;
      rng the ResultSort of J c= the carrier of J;
      hence f1*the ResultSort of J = the ResultSort of J by RELAT_1:53
      .= (the ResultSort of L)|the carrier' of J by A17,A21,FUNCT_4:33
      .= (the ResultSort of L)*g1 by RELAT_1:65;
      let o be set, p be Function;
      assume
A54:   o in the carrier' of J;
      then reconsider x = o as Element of the carrier' of J;
      assume
A55:   p = (the Arity of J).o;
      dom the Arity of J = the carrier' of J by FUNCT_2:def 1;
      then reconsider q = p as Element of (the carrier of J)*
      by A55,A54,FUNCT_1:102;
      rng q c= the carrier of J;
      then f1*p = p & g1.x = x by RELAT_1:53;
      hence f1*p = (the Arity of L).(g1.o) by A53,A55,A54,GRFUNC_1:15;
    end;
    thus (i = 0 or ... or i = 8) implies
    (the connectives of L).(n+i) = (sup the carrier' of J)+^i by A23;
    hereby let x be Element of X;
      1 in {1,2} by TARSKI:def 2;
      then [1,x] in [:{1,2},X:] by ZFMISC_1:def 2;
      hence (the quantifiers of L).(1,x) = [the carrier'of J,[1,x]`1,[1,x]`2]
      by A25
      .= [the carrier' of J,1,x];
      2 in {1,2} by TARSKI:def 2;
      then [2,x] in [:{1,2},X:] by ZFMISC_1:def 2;
      hence (the quantifiers of L).(2,x) = [the carrier'of J,[2,x]`1,[2,x]`2]
      by A25
      .= [the carrier' of J,2,x];
    end;
    thus the formula-sort of L = sup the carrier of J &
    the program-sort of L = (sup the carrier of J)+^1 by ORDINAL2:27;
    thus the carrier of L = (the carrier of J) \/
    {the formula-sort of L, the program-sort of L};
    let w be Ordinal; assume w = sup the carrier' of J;
    hence the carrier' of L = (the carrier' of J) \/
    {w+^0,w+^1,w+^2,w+^3,w+^4,w+^5,w+^6,w+^7,w+^8}\/
    [:{the carrier' of J},{1,2},X:] by XBOOLE_1:4;
  end;
