reserve i for Nat, x,y for set;
reserve S for non empty non void ManySortedSign;
reserve X for non-empty ManySortedSet of S;

theorem Th63:
  for j,k be set, i,m,n being Nat st m >= 4 & m+6 <= n & i >= 1
  for S being 1-1-connectives bool-correct non empty non void BoolSignature
  st S is (n+i,j,k)-array (m,k) integer
  ex B being bool-correct non empty non void BoolSignature,
  C being non empty non void ConnectivesSignature st
  the BoolSignature of S = B+*C &
  B is n-connectives (m,k) integer & C is (i,j,k)-array &
  the carrier of B = the carrier of C &
  the carrier' of B = (the carrier' of S)\rng the connectives of C &
  the carrier' of C = rng the connectives of C &
  the connectives of B = (the connectives of S)|n &
  the connectives of C = (the connectives of S)/^n
  proof
    let j,k be set;
    let i,m,n be Nat;
    assume A1: m >= 4;
    assume A2: m+6 <= n & i >= 1;
    let S be 1-1-connectives bool-correct non empty non void BoolSignature;
    assume A3: len the connectives of S >= n+i+3;
    given J,K,L being Element of S such that
A4: L = j & K = k & J <> L & J <> K &
    (the connectives of S).(n+i) is_of_type <*J,K*>, L &
    (the connectives of S).(n+i+1) is_of_type <*J,K,L*>, J &
    (the connectives of S).(n+i+2) is_of_type <*J*>, K &
    (the connectives of S).(n+i+3) is_of_type <*K,L*>, J;
A5: S is (i+n,j,k)-array by A3,A4;
    assume A6: len the connectives of S >= m+6;
    given I being Element of S such that
A7: I = k & I <> the bool-sort of S &
    (the connectives of S).m is_of_type {},I &
    (the connectives of S).(m+1) is_of_type {},I &
    (the connectives of S).m <> (the connectives of S).(m+1) &
    (the connectives of S).(m+2) is_of_type <*I*>,I &
    (the connectives of S).(m+3) is_of_type <*I,I*>,I &
    (the connectives of S).(m+4) is_of_type <*I,I*>,I &
    (the connectives of S).(m+5) is_of_type <*I,I*>,I &
    (the connectives of S).(m+3) <> (the connectives of S).(m+4) &
    (the connectives of S).(m+3) <> (the connectives of S).(m+5) &
    (the connectives of S).(m+4) <> (the connectives of S).(m+5) &
    (the connectives of S).(m+6) is_of_type <*I,I*>,the bool-sort of S;
A8: S is (m,k) integer by A6,A7;
    set r = (the connectives of S)/^n;
    set W = rng r;
A9: n+i+3 = n+(i+3) & n <= n+(i+3) by NAT_1:12;
    then
A10: len the connectives of S >= n by A3,XXREAL_0:2;
    then len r = (len the connectives of S)-n by RFINSEQ:def 1;
    then
A11: len r >= n+(i+3)-n by A3,XREAL_1:9;
    then
    len r >= i+3 & i+1+2 >= 2 by NAT_1:11;
    then len r >= 2 by XXREAL_0:2;
    then r <> {}; then
    reconsider W as non empty set;
    set O = (the carrier' of S)\W;
    m <= m+6 by NAT_1:11;
    then m <= n by A2,XXREAL_0:2;
    then
A12: 4 <= n by A1,XXREAL_0:2;
    then
A13: 1 <= n & 1 <= m by A1,XXREAL_0:2;
    n <= n+(i+3) by NAT_1:11;
    then 1 <= n+i+3 by A13,XXREAL_0:2;
    then 1 <= len the connectives of S by A3,XXREAL_0:2;
    then
A14: 1 in dom the connectives of S by FINSEQ_3:25;
    then
A15: (the connectives of S).1 in the carrier' of S by FUNCT_1:102;
    now assume (the connectives of S).1 in W;
      then consider x being object such that
A16:   x in dom r & (the connectives of S).1 = r.x by FUNCT_1:def 3;
      reconsider x as Nat by A16;
      r.x = (the connectives of S).(x+n) & n+x in dom the connectives of S
      by A10,A16,RFINSEQ:def 1,FINSEQ_5:26;
      then 1 = n+x & n = n+0 by A14,A16,FUNCT_1:def 4;
      then x = 0 by A13,XREAL_1:6,NAT_1:3;
      hence contradiction by A16,FINSEQ_3:24;
    end;
    then reconsider O as non empty set by A15,XBOOLE_0:def 5;
A17: W c= the carrier' of S by FINSEQ_1:def 4;
    reconsider A = (the Arity of S)|O as Function of O, (the carrier of S)*
    by FUNCT_2:32;
    reconsider Ac = (the Arity of S)|W as Function of W, (the carrier of S)*
    by A17,FUNCT_2:32;
    reconsider R = (the ResultSort of S)|O as Function of O, the carrier of S
    by FUNCT_2:32;
    reconsider Rc = (the ResultSort of S)|W as Function of W, the carrier of S
    by A17,FUNCT_2:32;
    set s = the bool-sort of S;
    set p = (the connectives of S)|n;
    rng p c= O
    proof let x be object; assume x in rng p;
      then consider y being object such that
A18:   y in dom p & x = p.y by FUNCT_1:def 3;
A19:   x in the carrier' of S by A18,FUNCT_1:102;
      assume x nin O;
      then x in W by A19,XBOOLE_0:def 5;
      then consider z being object such that
A20:   z in dom r & x = r.z by FUNCT_1:def 3;
      reconsider y as Nat by A18;
      reconsider z as Nat by A20;
A21:   y in dom the connectives of S & x = (the connectives of S).y
      by A18,RELAT_1:57,FUNCT_1:47;
      y <= len p & len p <= n by A18,FINSEQ_3:25,FINSEQ_5:17;
      then
A22:   y <= n by XXREAL_0:2;
      r.z = (the connectives of S).(z+n) & n+z in dom the connectives of S
      by A10,A20,RFINSEQ:def 1,FINSEQ_5:26;
      then y = n+z & n = n+0 by A21,A20,FUNCT_1:def 4;
      then z = 0 by A22,XREAL_1:6,NAT_1:3;
      hence contradiction by A20,FINSEQ_3:24;
    end;
    then reconsider c = p as FinSequence of O by FINSEQ_1:def 4;
    reconsider cc = r as FinSequence of W by FINSEQ_1:def 4;
    set B = BoolSignature(#the carrier of S,O,A,R,s,c#);
    set C = ConnectivesSignature(#the carrier of S,W,Ac,Rc,cc#);
    now
      5 <= m+1+5 by NAT_1:11;
      then 3 <= m+6 by XXREAL_0:2;
      hence len the connectives of S >= 3 by A6,XXREAL_0:2;
      n <= n+(i+3) by NAT_1:11;
      then len the connectives of B = n by FINSEQ_1:59,A3,XXREAL_0:2;
      hence
A23:   len the connectives of B >= 3 by A12,XXREAL_0:2;
      let z be Nat; assume
A24:   z >= 1 & z <= 3;
      then z <= len the connectives of B by A23,XXREAL_0:2;
      then z in dom the connectives of B by A24,FINSEQ_3:25;
      then
A25:   (the connectives of B).z in O &
      (the connectives of B).z = (the connectives of S).z by FUNCT_1:47,102;
      thus (the Arity of S).((the connectives of S).z)
      = (the Arity of B).((the connectives of B).z) by A25,FUNCT_1:49;
      thus (the ResultSort of S).((the connectives of S).z)
      = (the ResultSort of B).((the connectives of B).z) by A25,FUNCT_1:49;
    end;
    then reconsider B as bool-correct non empty non void BoolSignature
    by Th60;
    reconsider C as non empty non void ConnectivesSignature;
    take B, C;
A26: the carrier of S = (the carrier of B)\/the carrier of C;
A27: the carrier' of S = (the carrier' of B)\/the carrier' of C
    by FINSEQ_1:def 4,XBOOLE_1:45;
    dom the Arity of S = the carrier' of S by FUNCT_2:def 1;
    then
A28: the Arity of S = (the Arity of B)+*the Arity of C by A27,FUNCT_4:70;
    dom the ResultSort of S = the carrier' of S by FUNCT_2:def 1;
    then the ResultSort of S = (the ResultSort of B)+*the ResultSort of C
    by A27,FUNCT_4:70;
    then
A29: the ManySortedSign of S = (B qua non empty ManySortedSign)+*C
    by A26,A27,A28,CIRCCOMB:def 2;
    the connectives of S = c^cc by RFINSEQ:8;
    hence the BoolSignature of S = B+*C by A29,Def52;
    thus
A30: len the connectives of B = n by A9,A3,XXREAL_0:2,FINSEQ_1:59;
    now
      thus 1 <= m & the bool-sort of B = the bool-sort of S by A1,XXREAL_0:2;
      thus len the connectives of B >= m+6 by A2,A9,A3,XXREAL_0:2,FINSEQ_1:59;
      m <= m+6 & m+1 <= m+1+5 by NAT_1:11;
      then m >= 1 & m <= len the connectives of B &
      m+1 >= 1 & m+1 <= len the connectives of B
      by A1,A2,A30,XXREAL_0:2,NAT_1:11;
      then m in dom the connectives of B & m+1 in dom the connectives of B
      by FINSEQ_3:25;
      then (the connectives of B).m = (the connectives of S).m &
      (the connectives of B).(m+1) = (the connectives of S).(m+1)
      by FUNCT_1:47;
      hence (the connectives of B).m <> (the connectives of B).(m+1) by A7;
      m+3 <= m+3+3 & m+4 <= m+4+2 & m+5 <= m+5+1 by NAT_1:11;
      then m+2+1 >= 1 & m+3 <= len the connectives of B &
      m+3+1 >= 1 & m+4 <= len the connectives of B &
      m+4+1 >= 1 & m+5 <= len the connectives of B
      by A2,A30,XXREAL_0:2,NAT_1:11;
      then m+3 in dom the connectives of B & m+4 in dom the connectives of B &
      m+5 in dom the connectives of B by FINSEQ_3:25;
      then (the connectives of B).(m+3) = (the connectives of S).(m+3) &
      (the connectives of B).(m+4) = (the connectives of S).(m+4) &
      (the connectives of B).(m+5) = (the connectives of S).(m+5)
      by FUNCT_1:47;
      hence (the connectives of B).(m+3) <> (the connectives of B).(m+4) &
      (the connectives of B).(m+3) <> (the connectives of B).(m+5) &
      (the connectives of B).(m+4) <> (the connectives of B).(m+5) by A7;
      let z be Nat; assume z >= m & z <= m+6;
      then 1 <= z & z <= len the connectives of B by A2,A30,A13,XXREAL_0:2;
      then z in dom the connectives of B by FINSEQ_3:25;
      then
A31:   (the connectives of B).z in O &
      (the connectives of B).z = (the connectives of S).z by FUNCT_1:47,102;
      thus (the Arity of S).((the connectives of S).z)
      = (the Arity of B).((the connectives of B).z) by A31,FUNCT_1:49;
      thus (the ResultSort of S).((the connectives of S).z)
      = (the ResultSort of B).((the connectives of B).z) by A31,FUNCT_1:49;
    end;
    hence B is (m,k) integer by A8,Th61;
    now
      thus len the connectives of C >= i+3 by A11;
      thus 1 <= i by A2;
      let z be Nat; assume z >= i & z <= i+3;
      then 1 <= z & z <= len r by A11,A2,XXREAL_0:2;
      then z in dom r by FINSEQ_3:25;
      then
A32:   (the connectives of C).z in W &
      (the connectives of C).z = (the connectives of S).(z+n)
      by A10,FUNCT_1:102,RFINSEQ:def 1;
      thus (the Arity of C).((the connectives of C).z)
      = (the Arity of S).((the connectives of S).(z+n)) by A32,FUNCT_1:49;
      thus (the ResultSort of C).((the connectives of C).z)
      = (the ResultSort of S).((the connectives of S).(z+n)) by A32,FUNCT_1:49;
    end;
    hence C is (i,j,k)-array by A5,Th62;
    thus thesis;
  end;
